Open carmenriddel opened 2 years ago
Goulet, Dan [X] (Inactive) added a comment - 01/Apr/21 11:42 AM Hi Macfarlane, Lindsay ENV:EX,
I've reviewed this and attempted to fix it.
I'd imagine this is larger than a 3, could be an 8.
I've provided more technical bits, where the issues are, and likely the things that need to be completed, in hopes of helping in the future:
Code:
Using current release branch
What is this?
The frontend component at registry/components/people/ApplicationAddEdit.vue supports viewing, adding and editing of Classification & Qualifications The adding feature does not work How to Reproduce:
get code, docker-compose up http://localhost:8080/gwells/registries/people/d660ccb1-46d1-4e7a-93f3-0e77f71ecf24 you should see an existing well driller registration, click "add classification" button. notice that you cannot select one of the select classification radio buttons and have the qualified to drill checkboxes automatically selected for you select the existing driller, edit it, notice that you can select a classification and the applicable checkboxes automatically get selected for you (this should work on add, but it does not) this is used in another location too when editing a registration (Lindsay showed me this) Backend:
stack traces on attempting to save new classifications, regardless of whether or not the frontend code allows selection of classification/qualified to drill.
it appears the backend has an endpoint for this but this feature doesn't work, several errors (registries/serializers.py ApplicationAdminSerializer.create), register_guid violates not-null constraint, likely the value isn't being retrieved or set correctly in to_internal_value. registries/urls.py (url(api_path_prefix() + r'/applications/(?P
issues with copying values around in registry/components/people/ApplicationAddEdit.vue in the copyFormData (notice that the copyFormData method is only consumed by the data () { return qualificationForm: this.copyFormData(this.value) } there's a watch named qualificationForm that has a handler, this watch (observable/reactivity) is broken when you use the Add feature. Putting a console.log in watch qualificationForm handler will demonstrate this (try the different scenarios such as view/edit/add and you'll notice the watch is broken only when registration occurs) I found that a simple fix for the frontend in Add mode can be done by finding the line "if (input) {" in copyFormData (line 201 I believe) and changing it to "if (input && !input.registration) {" will make the selection boxes work as expected. Much to my dismay the backend didn't work either which adds further complexity to this fix and increases the risk/coverage/story points.
This bug still persist:
Describe the Bug When the Data Specialist is trying to edit the profile of an existing registry (well driller or well pump installer) with "Add classification", the auto select of "Qualified to drill" (Well Driller Registration) or "Qualified" (Pump Installer Registration) is not working after the Classification was selected.
This auto select works fine when creating a new registry.
Expected Behaviour In the editing page of the existing driller/pump installer profile (Registry/Person Profile), when "add a classification", the "Qualified to drill"/"Qualified" will be auto selected according to the classification type I choose (Pump Installer, Water Well Driller, Geotechnical/Enviromental Driller, or Geoexchange Driller).
Actual Behaviour In the editing page of the existing driller/pump installer profile (Registry/Person Profile), when "add a classification", nothing was auto selected in the "Qualified to drill"/"Qualified" after I select a classification type (Pump Installer, Water Well Driller, Geotechnical/Environmental Driller, or Geoexchange Driller). This auto select only works well when I am creating a new profile/registry.
Steps To Reproduce Steps to reproduce the behaviour:
The auto selected "qualified to drill" section is not being auto populated when a classification is added to an existing driller/pump installer. It appears to work fine when a new one is added.
WHEN WAS IT IDENTIFIED? January 2021
WHAT IS THE IMPACT? Applications for registration as drillers or well pump installers are missing information required under the Act.
NOTES: Identified during testing of OpenShift4 migration; however, issue exists in PROD.
https://apps.nrs.gov.bc.ca/int/jira/browse/WATER-1607