Fix: Error message when deleting tree ranks that have associated nodes#5029
Fix: Error message when deleting tree ranks that have associated nodes#5029realVinayak wants to merge 31 commits intomainfrom
Conversation
Looks like usages assume that save was a success anyways
Triggered by d0933c6 on branch refs/heads/issue-5025
Triggered by 624c9bc on branch refs/heads/issue-5025
emenslin
left a comment
There was a problem hiding this comment.
- Verify that the save blocker dialog appears, and the page should only automatically refresh after the save button is pressed
- Make sure save buttons on forms, record sets, attachment gallery, app resource editor, resource dialogs work as expected
- Verify that no save blockers are present nor extra dialogue when removing unsaved ranks/ resources
- Save blocker looks good!
01-26_12.25.mp4
- Only problem I ran into is that you get an error when deleting an empty rank in the middle of a tree, no error occurs when it's at the end of a tree or when opening and deleting just a specific rank. Not sure if it's related to this PR or not but it is different than the behavior in main so I wanted to mention it.
Error:
01-26_12.35.mp4
Examples with no error:
01-26_12.38.mp4
01-26_12.39.mp4
Main:
01-26_12.43.mp4
Hi Elizabeth thank you for catching that!, the error still occurs in main but the difference in behavior is that the page does not automatically reload immediately anymore. From what I understand that error happens wherever there is a many to one relationship within the database. it has been. bit since I've started this pr so went back and looked at it and yeah its a real bug but I'm not unsure if it should still be included in this pr specifically now. as this pr addresses the request to add save blockers to each remove button. I think its on me for forgetting about the bug itself during my dev time on this tho, my apologies. |
bhumikaguptaa
left a comment
There was a problem hiding this comment.
- Verify that the save blocker dialog appears, and the page should only automatically refresh after the save button is pressed
- Make sure save buttons on forms, record sets, attachment gallery, app resource editor, resource dialogs work as expected
- Verify that no save blockers are present nor extra dialogue when removing unsaved ranks/ resources
Save blocker works as expected.
Taking over this old PR and finishing the fix. Marco Martinez
Fixes #5025
Previously you were able to delete Tree ranks with associated nodes through the tree def Items menu. Now these remove buttons are implemented as delete buttons and properly trigger a save blocker warning when needed.
Previous Behavior
previous.behavior-5025.mp4
Current behavior.
Screen.Recording.2026-01-08.at.2.03.22.PM.mov
Expected behavior for new ranks, unsaved ranks
Screen.Recording.2026-01-22.at.11.52.26.AM.mov
Checklist
and self-explanatory (or properly documented)
Testing instructions