Skip to content

Conversation

@alesan99
Copy link
Contributor

@alesan99 alesan99 commented Jan 14, 2026

Fixes #7593

Changes:

  • Adds preload option to Geography and Taxon trees during setup. This will trigger the background tree creation like normal (for simplicity).
  • Adds rank configuration to setup forms (Ugly, but can be improved)
  • In empty taxon trees (with no root), there is now an import button that allows you to import a populated tree into an existing tree.
  • Fix full name direction not being reverse for new chronostrat trees
  • Fix nested subviews in setup forms
  • Also some helpful refactoring
image

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list
  • Add automated tests
  • Add a reverse migration if a migration is present in the PR

Testing instructions

  • Guided Setup on a blank database
  • Use a blank DB to test this PR.
  • Configure ranks for the geography and taxon trees.
  • Test the new pre-load tree check box for geography and taxon trees.
  • After the setup, make sure the default tree creation process started for the trees you selected to pre-load. (You will see notifications)
    • If you chose a paleo/geo database then a chronostrat tree should also be imported automatically.
    • Note: A taxon tree will only be preloaded if defaults exist. If there exists no default tree, it will do nothing.
  • If you chose to -not- pre-load the taxon tree, the taxon tree that was created should not have a root node.
  • After the setup, check all the new trees, make sure the ranks respect your configuration.
  • Configuration tool and existing trees
  • Creating a new discipline with the configuration tool should create an empty taxon tree.
  • An empty taxon tree should have an import button
  • Make sure you can import a taxon tree into the existing empty tree
  • Make sure you can still create a new populated tree

@alesan99 alesan99 added this to the 7.12.0 milestone Jan 14, 2026
@github-project-automation github-project-automation bot moved this to 📋Back Log in General Tester Board Jan 14, 2026
@alesan99 alesan99 changed the title [Guided Setup] Create default trees automatically during setup [Guided Setup] Add configuration for default trees in guided setup Jan 14, 2026
@alesan99 alesan99 linked an issue Jan 14, 2026 that may be closed by this pull request
@alesan99 alesan99 changed the base branch from issue-2931-1 to issue-6294 January 14, 2026 17:19
Base automatically changed from issue-6294 to issue-2931-1 January 14, 2026 17:49
@alesan99 alesan99 marked this pull request as ready for review January 15, 2026 18:19
@alesan99 alesan99 requested review from a team January 15, 2026 19:09
Copy link
Collaborator

@emenslin emenslin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Configure ranks for the geography and taxon trees.
  • After the setup, make sure the default tree creation process started for the trees you selected to pre-load. (You will see notifications)
    • If you chose a paleo/geo database then a chronostrat tree should also be imported automatically.
  • If you chose to -not- pre-load the taxon tree, the taxon tree that was created should not have a root node.
  • After the setup, check all the new trees, make sure the ranks respect your configuration.
  • Creating a new discipline with the configuration tool should create an empty taxon tree.
  • An empty taxon tree should have an import button
  • Make sure you can import a taxon tree into the existing empty tree
  • Make sure you can still create a new populated tree

I ran into some problems with the test panel so I could not test super thoroughly, however, I tested Vert Paleo without a pre-loaded tree and Ichthyology with a pre-loaded tree.

The main issue I ran into is that taxon tree separators are set to , by default when they should just be . This happens both when uploading a blank tree and after uploading a pre-loaded taxon tree.
image

@github-project-automation github-project-automation bot moved this from 📋Back Log to Dev Attention Needed in General Tester Board Jan 15, 2026
@CarolineDenis
Copy link
Contributor

Running sometimes into specifyweb.backend.setup_tool.api.SetupError: (1205, 'Lock wait timeout exceeded; try restarting transaction')
when creating a discipline in the system config.
(Locally)

@grantfitzsimmons grantfitzsimmons self-requested a review January 16, 2026 15:22
@CarolineDenis
Copy link
Contributor

  • Preloading geography works as expected.
  • Configuring ranks and separators works and is correctly reflected in the tree viewer afterward.
  • The “Preload tree” checkbox never works (tested across all disciplines) locally.
  • If I configure a tree, remove some ranks, continue, and then open the tree viewer to populate it, a new tree is created with all default ranks and settings. The original tree remains empty, resulting in two trees. ==> Sometimes it does work though
  • I’m also frequently encountering runtime errors when creating a discipline in the system configuration.

@emenslin
Copy link
Collaborator

Preloading Taxon trees seems to generally work for me but sometimes if you edit the defaults the tree won't upload. I also ran into an issue where I preloaded the botany tree and all ranks uploaded are checked as enforced, but when uploaded there's no node in the phylum which causes an error for the node in the Class rank.

01-16_12.24.mp4

Also I have just a few concerns with the preloading taxon trees in general. First, if we do not have the taxon defaults for a discipline can we remove the preload tree checkbox? I feel like making it appear like a tree can be preloaded and then nothing happens could be very confusing.

Second, as I said above sometimes when editing the taxon tree setup and then checking preload tree it doesn't upload even for a tree that has defaults. I think it might have to do with either checking enforced for ranks that aren't a part of the defaults or with removing ranks that are included in the defaults, but I am not sure which. I think we need to find someway either for the tree to upload anyway or to prevent the user from continuing if the tree isn't going to upload. I am not sure what the best solution here is but I think something needs to be done so the user won't be led to believe a tree will be preloaded if it's not going to be.

@grantfitzsimmons
Copy link
Member

Also I have just a few concerns with the preloading taxon trees in general. First, if we do not have the taxon defaults for a discipline can we remove the preload tree checkbox? I feel like making it appear like a tree can be preloaded and then nothing happens could be very confusing.

Yes, that should not be present if the user will end up needing to populate it after the discipline is created.

Second, as I said above sometimes when editing the taxon tree setup and then checking preload tree it doesn't upload even for a tree that has defaults. I think it might have to do with either checking enforced for ranks that aren't a part of the defaults or with removing ranks that are included in the defaults, but I am not sure which. I think we need to find someway either for the tree to upload anyway or to prevent the user from continuing if the tree isn't going to upload. I am not sure what the best solution here is but I think something needs to be done so the user won't be led to believe a tree will be preloaded if it's not going to be.

@CarolineDenis has changed the work plan for this feature, so for now I think that option will be removed. It will be handled in the fix for #7641. For now the user will have to go to the taxon tree viewer to populate it.

Copy link
Contributor

@kwhuber kwhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing with the Geology and Botany databases...

  • Configure ranks for the geography and taxon trees.
    • Modifications to ranks applied correctly
  • After the setup, make sure the default tree creation process started for the trees you selected to pre-load. (You will see notifications)
    • Verified in notifications, however Taxon did not pre-load a tree (Geography, Storage, and Chronostrat did pre-load)
    • If you chose a paleo/geo database then a chronostrat tree should also be imported automatically.
    • Verified with Geology database
  • If you chose to -not- pre-load the taxon tree, the taxon tree that was created should not have a root node.
  • After the setup, check all the new trees, make sure the ranks respect your configuration.
  • Creating a new discipline with the configuration tool should create an empty taxon tree.
  • An empty taxon tree should have an import button
  • Make sure you can import a taxon tree into the existing empty tree
  • Make sure you can still create a new populated tree

Add collapsible tree rank sections
Add separator to Geography tree
Add description to pre-load tree option
@alesan99
Copy link
Contributor Author

Also I have just a few concerns with the preloading taxon trees in general. First, if we do not have the taxon defaults for a discipline can we remove the preload tree checkbox? I feel like making it appear like a tree can be preloaded and then nothing happens could be very confusing.

As @grantfitzsimmons mentioned I have now hidden the option to pre-load the taxon tree.

If I configure a tree, remove some ranks, continue, and then open the tree viewer to populate it, a new tree is created with all default ranks and settings. The original tree remains empty, resulting in two trees. ==> Sometimes it does work though

Note from discussion: this might be because its still being created

I’m also frequently encountering runtime errors when creating a discipline in the system configuration.

I believe this is because of the schema config creation, which would be solved by this: #7615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Dev Attention Needed

Development

Successfully merging this pull request may close these issues.

[Guided Setup] Add configuration for default trees to guided setup

7 participants