Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDS-5819] Unhandled Requested Report #2983

Merged
merged 6 commits into from
Mar 5, 2024

Conversation

taraepp
Copy link
Collaborator

@taraepp taraepp commented Mar 4, 2024

Objective

  • make things not blow up when a mine report without any submissions is loaded into new form.
  • and be able to submit against it

Strategy

  • at the endpoint where the latest submission is fetched, if there are no submissions, return the mine report instead
    • and give it a brand-new status of "NON" (sorry I was really running out of suitable keys to use, open to suggestions)
      • status shows up in UI as Report Requested
    • but it is marshalled into the mine_report_submission model so it's got all the same properties, except with NULLs in places like mine_report_submission_guid
    • a CORE user can save a report with the "NON" status and it will be treated like a requested report, even if there are already submissions against it
  • MS user can fill out most fields on report with NON. It is assumed that the CORE user will have put in the report name or permit & permit category, due date, submission year.
    • they can fill out: description comment, submitter name/email, add or remove report contacts
  • couple other things:
    • mine reports already had a calculated status code property, so I returned it instead of having to dig into the submissions each time

Known Issues

  • filtering by status on the mine reports table on CORE works, because it's a FE search, but on the reports page showing all mines, filtering does not work if NON is selected because it a report with no submissions doesn't get a status saved on it and I didn't adjust that query on the BE
    • fixed with change to mine_report.py-->@mine_report_status_code.expression
  • to submit against a requested report, MS user does have to go to the report --> view --> edit report. Maybe not greatest UX. Reinstalled this button when status is NON and changed text to "Submit Report"

MDS-5819
My flow chart:
image
Editing a requested report in MS:
image

Copy link

sonarqubecloud bot commented Mar 5, 2024

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

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarqubecloud bot commented Mar 5, 2024

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_common'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link

sonarqubecloud bot commented Mar 5, 2024

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_core-api'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link

sonarqubecloud bot commented Mar 5, 2024

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

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
11.8% Duplication on New Code

See analysis details on SonarCloud

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.

👍🏻

@taraepp taraepp merged commit 7b56b87 into develop Mar 5, 2024
18 of 20 checks passed
@taraepp taraepp deleted the mds-5819-unhandled-requested-report branch March 5, 2024 20:19
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.

3 participants