Skip to content

Consolidate Setup Tool, Configuration Tool, and Preloaded Tree Creation#7674

Open
CarolineDenis wants to merge 314 commits intomainfrom
issue-2931-2
Open

Consolidate Setup Tool, Configuration Tool, and Preloaded Tree Creation#7674
CarolineDenis wants to merge 314 commits intomainfrom
issue-2931-2

Conversation

@CarolineDenis
Copy link
Contributor

@CarolineDenis CarolineDenis commented Jan 28, 2026

Fixes #7673
See issue description

(Cloned from #6671)

alesan99 and others added 30 commits October 8, 2025 14:36
Triggered by 6f42b01 on branch refs/heads/issue-2931-1
Triggered by 1f3cadc on branch refs/heads/issue-2931-1
Triggered by e49e80b on branch refs/heads/issue-2931-1
Triggered by a38a8c0 on branch refs/heads/issue-2931-1
Triggered by 097614c on branch refs/heads/issue-2931-1
Triggered by 2054b7d on branch refs/heads/issue-2931-1
Triggered by 2f77e8f on branch refs/heads/issue-2931-1
@acwhite211
Copy link
Member

acwhite211 commented Feb 3, 2026

I created a helper function for wrapping the bulk_create function called in bulk_create_splocaleitemstr_idempotent This avoids the error that occurs for duplicate schema config records, but it seemed to slow the run_key_migrations schema config process. I worked on another commit that tries to speed up the bulk_create_splocaleitemstr_idempotent along with the update_table_schema_config_with_defaults and update_table_field_schema_config_with_defaults functions.

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.

1. Setup Flow
Setup Forms

  • All setup forms must display correctly in both light mode and dark mode (based on system settings).
  • Users can only progress to the next form once all required fields are completed.
  • User selections must be reflected in the Overview sidebar in real time.
  • The setup flow must be submittable at the end.
  • Users must be able to log into the database after setup completes.

Default Data & Configuration

  • Default schema configuration captions and descriptions must be populated (not blank).
  • Default picklists must be created correctly.
    • Note: The Agent Type picklist does not exist in the schema config, this is expected.
  • Default preparation types must be created correctly.
  • All tree viewer pages must load without errors.
  • The admin user’s agent must be created correctly and must always include a last name.
  • An empty Global Preferences file must be created in App Resources.

2. Tree Configuration During Setup
Storage Tree

  • Users must be able to modify the storage tree configuration during setup.
  • Changes must be correctly reflected in the application after setup.

Geography Tree

  • Users must be able to modify the geography tree configuration during setup.
  • [] Both options must work:
    Preloaded tree
    Empty tree

After switching between preloading a not preloading a few times locally, I noticed that when I did select preload, I had to wait a few minutes and refresh my page before it loaded successfully. I believe on the first iteration it was already loaded when I clicked into the tree.

Taxon Tree

  • Users must be able to select a preloaded default tree when one exists.
  • The selected tree must be correctly preloaded and visible when the app opens.

Similar to the Geography tree, I had load issues with Taxon. I had to wait and refresh to eventually get it to load after multiple guided setup iterations.

Geology Discipline

  • Relevant tectonic and chronostratigraphic (chrono) trees must be created automatically.

3. Tree Viewer: Preloaded & Empty Trees

  • Users can create an empty tree from the tree viewer.
  • Users can modify rank configuration in the tree viewer.
  • Users can create a preloaded tree from the tree viewer.
  • Empty trees now have an upload button. The Upload Tree icon under root creation must work as expected.
  • Users can delete a rank with no associated nodes.
  • If ranks are deleted and a tree is then loaded, the tree configuration must be respected.
  • Users receive notifications for:
    Tree creation start
    Successful completion
    Errors or cancellation

Minor comment: Even though it is obvious, it might be helpful to indicate which tree got cancelled for verification. In the screenshot, I cancelled the creation of a Fungi tree but that is not explicitly declared.
Image

4. Configuration Tool
Institution Tree Viewer

  • Users can click and drag to view all nodes in the institution tree.
  • Clicking a resource node opens the resource form.
  • Users can:
    • Edit a resource
    • Create new resources
    • Delete collections (created in 7)

Upon deletion of a collection, I received the following error:

Details Environment:

Request Method: GET
Request URL: http://localhost/specify/

Django Version: 4.2.27
Python Version: 3.12.3
Installed Applications:
('django.contrib.sessions',
'django.contrib.staticfiles',
'django.contrib.contenttypes',
'django.contrib.auth',
'specifyweb.specify',
'specifyweb.backend.permissions',
'specifyweb.backend.accounts',
'specifyweb.backend.stored_queries',
'specifyweb.backend.businessrules',
'specifyweb.backend.express_search',
'specifyweb.backend.context',
'specifyweb.backend.attachment_gw',
'specifyweb.frontend',
'specifyweb.backend.barvis',
'specifyweb.backend.patches',
'specifyweb.backend.report_runner',
'specifyweb.backend.interactions',
'specifyweb.backend.workbench',
'specifyweb.backend.notifications',
'specifyweb.backend.export',
'specifyweb.backend.setup_tool',
'specifyweb.backend.raven_placeholder',
'specifyweb.backend.stats',
'specifyweb.backend.inheritance',
'specifyweb.backend.trees',
'specifyweb.backend.backup_tool',
'specifyweb.backend.merge',
'specifyweb.backend.locality_update_tool',
'specifyweb.backend.bulk_copy',
'specifyweb.backend.series',
'specifyweb.backend.delete_blockers',
'specifyweb.backend.table_rows')
Installed Middleware:
['django.middleware.gzip.GZipMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'specifyweb.backend.context.middleware.ContextMiddleware',
'specifyweb.backend.permissions.middleware.PermissionsMiddleware',
'specifyweb.middleware.general.GeneralMiddleware']

Traceback (most recent call last):
File "/opt/specify7/ve/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/specify7/ve/lib/python3.12/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = middleware_method(

File "/opt/specify7/specifyweb/backend/permissions/middleware.py", line 20, in process_view
if not skip_collection_access_check and user != None and col != None:
^^^^^^^^^^^
File "/opt/specify7/ve/lib/python3.12/site-packages/django/utils/functional.py", line 266, in inner
self._setup()
^^^^^^^^^^^^^
File "/opt/specify7/ve/lib/python3.12/site-packages/django/utils/functional.py", line 419, in _setup
self._wrapped = self._setupfunc()
^^^^^^^^^^^^^^^^^
File "/opt/specify7/specifyweb/backend/context/middleware.py", line 57, in
request.specify_collection = SimpleLazyObject(lambda: get_cached('_cached_collection', get_collection, request))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/specify7/specifyweb/backend/context/middleware.py", line 15, in get_cached
setattr(request, attr, func(request))
^^^^^^^^^^^^^
File "/opt/specify7/specifyweb/backend/context/middleware.py", line 36, in get_collection
return qs.get(id=collection_id)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/specify7/ve/lib/python3.12/site-packages/django/db/models/query.py", line 639, in get
raise self.model.DoesNotExist(
^

Exception Type: DoesNotExist at /specify/
Exception Value: Collection matching query does not exist.

  • Users can collapse and expand sections in the left panel.
  • Users can switch between vertical and horizontal views in the institution tree viewer.

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.

Consolidate Setup Tool, Configuration Tool, and Preloaded Tree Creation

5 participants