Conversation
alesan99
left a comment
There was a problem hiding this comment.
- See that is the request, in the network tab, in the body of the request the discipline being sent is the current discipline of the current collection, not the discipline related to the tree. See screenshot for example.
- If you are able, check the TaxonTreeDef record that was created in the database, to make sure that it was added to the correct discipline.
I haven't fully tested this PR, but it seems to be working so far 👍
| resource.mappingFile, | ||
| connectedCollection, | ||
| resource.discipline, | ||
| connectedDiscipline, |
There was a problem hiding this comment.
The intent of disciplineName in the request when I was working on tree importing was for it to be the name of the preloaded tree's discipline. It doesn't really seem like its needed anymore, so I think the property can be renamed to just 'discipline', and perhaps the ids of the collection and discipline can be sent directly.
Though disciplineName is used to support non-taxon trees also (it could be set to 'geography', 'geologictimeperiod', etc), so that should be considered if the property is changed.
bhumikaguptaa
left a comment
There was a problem hiding this comment.
- Watch it until completion and verify notification is received that it has been created.
- See that is the request, in the network tab, in the body of the request the discipline being sent is the current discipline of the current collection, not the discipline related to the tree. See the screenshot for example.
It works as expected. I received the creation and completion notification. I tried it by adding Ichthyology and Entomology to the Botany Discipline.
Fixes #7776
This fixes a bug where creating/importing a default tree from Tree Viewer could create the tree under the wrong discipline. For example, using the downloadable tree metadata discipline like botany instead of the logged-in collection’s discipline.
In tree view CreateTree code, send disciplineName from getSystemInfo().discipline, instead of resource.discipline from the selected default-tree file.
In create_default_tree_view, always resolve tree discipline from the destination collection.discipline. Use the resolved destination collection.id when queuing create_default_tree_task.
Checklist
self-explanatory (or properly documented)
Testing instructions