Skip to content

[MDS-6728] Generate list of recuring crr reports#3839

Merged
asinn134 merged 3 commits intodevelopfrom
mds-6728-list-of-recuring-crr
Feb 25, 2026
Merged

[MDS-6728] Generate list of recuring crr reports#3839
asinn134 merged 3 commits intodevelopfrom
mds-6728-list-of-recuring-crr

Conversation

@asinn134
Copy link
Collaborator

Objective

MDS-6728

  • Added CRR report generation for existing CRR recurring reports. Will run daily under the same cli command as the PRR report generation

  • Added new mine_report_due_date_type called YRL to support the reports that have set due date on Jan 31st for the year.

  • Made it so reports that are associated with a mine report definition that has active_ind = false to not show up in reports table.

  • Mine report definitions with active_ind = false will no longer show up in the report name filter drop down and also the report name drop down when creating a report.

image image image

@asinn134 asinn134 changed the title Mds 6728 list of recuring crr [MDS-6728] Generate list of recuring crr reports Feb 25, 2026
const resp = await CustomAxios({
errorToastMessage: "Failed to load compliance reports",
}).get(`${ENVIRONMENT.apiUrl}${API.MINE_REPORT_DEFINITIONS(searchParams ?? {})}`, headers);
}).get(`${ENVIRONMENT.apiUrl}${API.MINE_REPORT_DEFINITIONS({ ...searchParams, active_ind: [true] })}`, headers);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was for making sure we don't display mine report definitions that are not active

query = MineReport.query.filter_by(mine_guid=mine_guid, deleted_ind=False)

query = (
MineReport.query
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just filtering out the inactive mine report definitions

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed for 'bcgov-sonarcloud_mds_minespace-web'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

return mine_report

@classmethod
def get_all_recurring_crr_reports(cls) -> list[Self]:
Copy link
Collaborator Author

@asinn134 asinn134 Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part searches for the CRR reports that have

  1. A due date
  2. A mine report definition that is active
  3. Are of mine_report_due_date_type "FIS" or "YRL"
  4. An active permit in the mine the report belongs to
  5. A mine_report_category of "TSF" if the mine report definition is one related to TSFs or Dams

Copy link
Collaborator

@matbusby-fw matbusby-fw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@asinn134 asinn134 merged commit a95ca34 into develop Feb 25, 2026
20 checks passed
@asinn134 asinn134 deleted the mds-6728-list-of-recuring-crr branch February 25, 2026 22:57
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