Open realVinayak opened 2 years ago
You are right, in most cases, you don't want to delete root node. And you are not able to do this, unless the root node doesn't have any children. Most trees have nodes in them. Storage is the exception, which is often empty for institutions that don't use it.
Also, if you delete all tree nodes, you might be able to add a new root though the WorkBench.
There may also be some use cases for deleting root tree node:
Maybe ability to remove tree roots should be part of the "No Restrictions mode" for the tree viewer.
Or even better, this could be implemented using record-level permission system, once we have it.
From @carlosmbe:
Describe the bug In the rare case that a tree has nothing using it. When you delete the root, behaviour can vary.
Performed in Litho Strat
- 404 Error with tree still present under it
- Crash - Protected Error
This next one was performed in a Taxon Tree
- Successful Deletion but prevented from creating a new child or interacting with the tree once more. Although 3 is expected behaviour. Be great if it was not possible since not having any parent available in LifoStrat makes it difficult to create anything where that is a required it's a required field.
To Reproduce Steps to reproduce the behavior:
- Go to
morpaleo
or another mostly empty database- Delete root of a tree
- See error
Suggestion Block delete similar to how it is blocked when children are present
Screen Recording, Crash Reports and Crash Reports
- Crash - Protected Error Specify 7 Crash Report - 2023-05-02T21_11_35.261Z (1).txt Specify 7 Crash Report - 2023-05-02T21_11_35.261Z.txt
- 404 Error with tree still present under it
- Successful Deletion but prevented from creating a new child or interacting with the tree once more. <The UI Doesn’t allow it>
Desktop: OS: Mac OSx Ventura Browser: Chrome Specify 7 Version: 7.8.10-prerelease
Database Name: Morpaleo or ANY
Reported By Carlos @carlosmbe
Can recreate in edge (7.9.6). Deleted the storage tree root and it looked like the node had not been deleted but when I clicked on it I got a 404. Navigating back just shows a blank tree
Describe the bug Deletion of 'Root' Storage shouldn't be supported since creating new Storage objects require a Parent Storage object. I was able to delete the 'Root' Storage object through the Specify 7 UI.
To Reproduce Steps to reproduce the behavior:
Expected behavior Specify UI should not support deletion of 'Root' Storage object