Skip to content

[MDS-6987] Add Figures and Documents to Condition Data Variable Menu - #3992

Open
alazar-aot wants to merge 5 commits into
developfrom
MDS-6987-Add-Figures-and-Documents-to-CDV-menu
Open

alazar-aot wants to merge 5 commits into
developfrom
MDS-6987-Add-Figures-and-Documents-to-CDV-menu

Conversation

@alazar-aot

@alazar-aot alazar-aot commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Objective

MDS-6987

Why are you making this change? Provide a short explanation and/or screenshots

To allow permitting inspectors to more easily work with permit package references, the Condition Data Variable (CDV) Menu is to be updated to allow inspectors to insert permit package references into condition text when drafting the permit, so that the references remain accurate when permit package files are reordered or replaced.

  • [Commit 1] Removed old CDV menu code and Flagsmith gating - moving forward we only use the 'new' CDV picker without any Flagsmith gate (Cleanup).
  • [Commit 2] Add new Flagsmith Flag for this functionality.
  • [Commit 3] Moved logic for determining permit-package ordering into single helper/utility function, updated unit tests accordingly and pointed all files that need this functionality to use the new helper. Added 'Permit Package files -> Figures/Documents' to CDV menu, gated by feature flag (these selections insert 'tokens' for the permit package files into the condition text)
  • [Commit 4] Replaced the original Permit Condition 'plain text area' with a react-quill editor for the PermitConditionForm's condition filed (this is UI only), which includes a custom Quill embed blot that renders the 'label' (green or red 'pill' of Doc/Fig index and title) for an inserted Figure/Document reference. Small fix to preamble text area (keep using original textarea, not rich-text Quill editor) and run a WGAC pass on the changes using Claude
  • [Commit 5] Added comment regarding preservation of GUID, for when 'Archive/Replace' functionality is implented (risk of breaking the CDV references if guid is not maintained)
  • [Commit 6] TO DO

@alazar-aot alazar-aot added the 🛑 DO NOT MERGE This pull request will have potentially destructive or risky changes if merged. label Sep 9, 2026
…r/utility function, updated unit tests accordingly and pointed all files that need this functionality to use the new helper. Added 'Permit Package files -> Figures/Docuents' to CDV menu, gated by feature flag. These selections insert 'tokens' for the permit package files into the condtion text - currently rendered as {file:guid}
…-quill editor for the PermitConditionForm's condition filed (this is UI only), which includes a custom Quill embed blot that renders the 'label' (green or red 'pill' of Doc/Fig index and title) for an inserted Figure/Document reference. Small fix to preamble text area (keep using original textarea, not rich-text Quill editor) and run a WGAC pass on the changes using Claude
…ce' functionality is implented (risk of breaking the CDV references if guid is not maintained)
@sonarqubecloud

Copy link
Copy Markdown

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
Copy Markdown

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

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

See analysis details on SonarQube Cloud

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛑 DO NOT MERGE This pull request will have potentially destructive or risky changes if merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant