Skip to content

[MDS-6742] fix to view report details in compliance articles page#3780

Merged
asinn134 merged 1 commit intodevelopfrom
mds-6742-cant-view-report-details-on-compliance-page-fix
Dec 12, 2025
Merged

[MDS-6742] fix to view report details in compliance articles page#3780
asinn134 merged 1 commit intodevelopfrom
mds-6742-cant-view-report-details-on-compliance-page-fix

Conversation

@asinn134
Copy link
Collaborator

Objective

MDS-6742

  • Fix to make report details show up in the View Health, Safety and Reclamation Code modal
  • The ReportEditForm component that is setup in the ComplianceCodeViewEditForm component always seems to return null for it's form values. I found that in the FormWrapper component the setup of the initial values is determined by the below conditional
  const initialValues = useSelector((state) => {
    if (!isEditMode && forceRedux) {
      return getFormValues(props.name)(state);
    }
    return props.initialValues;
  });

In this situation the isEditMode value is always false so !isEditMode results in true, and by default forceRedux is false. So it seems to never call the getFormValues portion. The fix was to add forceRedux as a prop to the FormWrapper component call in the CompliaceCodeViewEditForm component

image

@sonarqubecloud
Copy link

@asinn134 asinn134 merged commit 42841a1 into develop Dec 12, 2025
12 checks passed
@asinn134 asinn134 deleted the mds-6742-cant-view-report-details-on-compliance-page-fix branch December 12, 2025 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants