rssidlowski / Pollution_Source_Tracking

City of Baltimore Pollution Source Tracking
0 stars 0 forks source link

Referral Agency: remove Discontinued from list #101

Closed rssidlowski closed 9 years ago

rssidlowski commented 9 years ago

When attempting to remove an item 'Discontinued' from the domain reference agency, get a Loading... message and it never completes. Steps to recreate: 1) Settings 2) Editing domains 3) Select Reference Agency from drop down list 4) highlight the item to be deleted 'discontinued' in this case 5) click on the Delete button at the bottom 6) click Yes on the confirmation message Get the Loading... message

gjmkelly commented 9 years ago

done. you could not remove the item because it caused a foreign key violation since there was a PST_Investigations records with REF_AGENCY_ID = 3. I set that value to null and deleted "Discontinued" from the list. This correct behavior and probably the UI should alert the user that they cannot delete a domain value when that value exists in related records.

rssidlowski commented 9 years ago

Update the UI to display a message when someone attempts to delete a domain value that has legacy data.

gjmkelly commented 9 years ago

I cannot apply all the foreign keys at this point, so please only test on Complainant or Lab Parameter for a value that you know is used (like Blue Water Baltimore, Ammonia). You should see the message: ""One or more records in another related table have data with this value. It can not be deleted from the domain until that is resolved."

reminder to myself: at the city I need to add the following to the web config so the app can see the real reason for failure:

gjmkelly commented 9 years ago
gjmkelly commented 9 years ago

configuration>

/configuration>
rssidlowski commented 9 years ago

Verified. Ready to be migrated to COB environment.

rssidlowski commented 9 years ago

Verified in COB dev.