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

ChecklistItems cannot be deleted after they've been used in an inspection #74

Open
DanielCaspers opened this issue Feb 4, 2018 · 0 comments
Labels
bug Design Planning and strategy for how to accomplish tasks

Comments

@DanielCaspers
Copy link
Owner

Problem
I discovered when working on #34 that a foreign key constraint fails when trying to remove a checklist item that is already in use.

https://user-images.githubusercontent.com/6056563/35773755-e6029ec4-0920-11e8-9569-d64a2eb7bb8d.png

This does not apply to removing canned responses or measurements from a checklistitem. That works just fine.

Workarounds
ChecklistItems can be removed from a checklist using the EditChecklist view ("With the checkboxes"). They will continue to remain in the ChecklistItems view...

To remove them from the ChecklistItem's view requires one to delete all dependent inspectionItems in MySQL (thus removing reporting history), and anything else necessary to satisfy related foreign key relationships.

Possible solutions
Perhaps we can safely invert the foreign key relationship? I don't know if that is safe or a good idea, and it may be an anti-pattern...

@DanielCaspers DanielCaspers added bug Future Feature Design Planning and strategy for how to accomplish tasks and removed Future Feature labels Feb 4, 2018
@DanielCaspers DanielCaspers added this to the v2.0 milestone Mar 26, 2018
@DanielCaspers DanielCaspers modified the milestones: v2.0, IceBox Aug 30, 2018
@DanielCaspers DanielCaspers removed this from the IceBox milestone Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Design Planning and strategy for how to accomplish tasks
Projects
None yet
Development

No branches or pull requests

1 participant