specify / specify7

Specify 7
https://www.specifysoftware.org/products/specify-7/
GNU General Public License v2.0
65 stars 36 forks source link

Improve UI handling when moving node to rank where node's children already exist #5089

Open bronwyncombs opened 3 months ago

bronwyncombs commented 3 months ago

Is your feature request related to a problem? Please describe. From Nate @ Ohio on the forum:

Encountered this error when trying to fix some records in our geography tree. When working with the tree, I was trying to move a node in the “State” rank to be a child of a node in the same rank.

I wanted to make “South Wales” (which is not a real geographic place) a child of “Wales”, or alternatively synonymize it with “Pembrokeshire” (since the only record we have in our database from “South Wales” is from the county of Pembrokeshire.)

The tree wouldn’t allow me to do this (“Can’t move this node here”) I assume because the node has a defined rank and cannot be moved into a rank that differs from the rank it is defined as currently. image

When “use auto generated form” is unchecked, I am unable to change the parent of geo of any record in the geography tree, and I am also unable to enter a value other than the existing value to the Rank picklist. I fixed my particular issue just by deleting the node and updating the locality record itself.


The problem stems from trying to move a node to a rank where the node's children already exist. However, there is no indication to the user that this is the problem. The only message is the "Bad Tree Structure" warning that appears when hovering over the parent field.

Screenshot 2024-07-10 at 11 27 44 AM

Describe the solution you'd like

It would be helpful if more information on what prevents a node from being moved. As noted in the quote above, this user attempted with the move node button before editing the record to achieve the desired placement.

Instead of "Can't move tree node here", this should be expanded on in some way to inform the user of the limitation/issue

Screenshot 2024-07-10 at 11 38 34 AM

Reported By Nate @ Ohio (Mollusk)

specifysoftware commented 3 months ago

This issue has been mentioned on Specify Community Forum. There might be relevant details there:

https://discourse.specifysoftware.org/t/specify-7-crashes-when-attempting-to-add-tree-record-from-co-ce-query-dialogs/1856/5