Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix document type dropdown for RIGHT-OF-WAY files with BCHMA LICENCE schedules
Problem
Document types containing the word "Licence" in their name were being excluded from the dropdown for all non-LICENCE file types. This was correct for most cases, but broke for RIGHT-OF-WAY files that legitimately use the following BCHMA schedule documents:
BCHMA SCHEDULE B - UTILITY LICENCE
BCHMA SCHEDULE D - ROADWAY LICENCE (note: two spaces before the hyphen, matching the DOG)
BCHMA SCHEDULE H - STANDARD LICENCE
BCHMA SCHEDULE H2 - STANDARD LICENCE SPECIAL TERMS
These documents were not appearing in the dropdown when a user loaded a RIGHT-OF-WAY file.
Root Cause
The existing filter in LandingPage.tsx uses a naming convention heuristic — any document type whose name contains "licence" is hidden for non-LICENCE files. There is no database relationship between document types and file tenure types. The four BCHMA schedules listed above contain "LICENCE" in their names but are valid for RIGHT-OF-WAY files, making them an edge case the heuristic didn't account for.
Solution
Added a whitelist of the four affected document type names. When the file TYPE is RIGHT-OF-WAY, the dropdown filter now:
Excludes all LEASE document types (unchanged)
Excludes LICENCE document types except the four whitelisted BCHMA schedules
Includes all other (non-lease, non-licence) document types (unchanged)
All existing LEASE and LICENCE file behaviour is unchanged.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist
Further comments
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: