Skip to content

Conversation

@grantfitzsimmons
Copy link
Member

@grantfitzsimmons grantfitzsimmons commented Jan 30, 2026

Fixes #6279, #7680 (apologies for the PR branch name)

This PR adds proper defaults for GeoSpecify.

It also cleans up a lot of redundant or unused XML files that are currently making it more confusing internally (and externally). It also updates the structure for schema overrides to make them much more maintainable in the long run.

This also adds a new test that can be run manually that identifies any case where a schema override mentions a field that is not present in the schema_localization_en.json file. Without it, this was error-prone.

./venv/bin/python -m pytest specifyweb/specify/tests/test_schema_overrides.py -v

Great care was taken to ensure that all visible fields are unhidden in the schema, and default visible fields are hidden if they do not appear on the forms.

Testing instructions

New Disciplines/Collections

  • Create a new discipline and a new collection for every default discipline type
  • Verify that the schema and picklists are created successfully for each

Geology

  • Start with an empty database
  • Create a new 'Geology' discipline and collection using Guided Setup
  • Log into the collection
  • Verify that:
    • Schema defaults have been applied
    • Default pick lists are now present (see https://github.com/specify/specify7/blob/app-resources/config/geology/schema_overrides.json)
      "conservdescription": {
      "items": [
      { "text1": { "ishidden": false, "name": "Handling Requirements", "desc": "A summary of the procedural requirements employed to preserve and protect the specimen during physical interaction." } },
      { "backgroundinfo": { "ishidden": false, "name": "Background Info", "desc": "Any background information on the object or preparation." } },
      { "lightrecommendations": { "ishidden": false, "name": "Light Recommendations", "desc": "Information about the recommended lighting conditions for the object or preparation." } },
      { "displayrecommendations": { "ishidden": false, "name": "Display Recommendations", "desc": "Information about the recommended display technique for the object or preparation." } },
      { "otherrecommendations": { "ishidden": false, "name": "Other Recommendations", "desc": "Miscellaneous recommendations for the object or preparation." } },
      { "events": { "ishidden": false, "name": "Conservator Events", "desc": "Links to one or more Conservator Events." } },
      { "objLength": { "ishidden": true } },
      { "width": { "ishidden": true } },
      { "height": { "ishidden": true } },
      { "units": { "ishidden": true } },
      { "description": { "ishidden": true } }
      ]
      },
    • Verify that fields on the default forms are all unhidden in the Schema Config for that discipline (e.g. 'Quality', 'Hazard Type', etc.)
    • Verify that all Geology-specific pick lists are present and linked (see under "geology" in https://github.com/specify/specify7/blob/app-resources/config/common/picklists.json, e.g. 'CollectingMethod', 'Quality', 'HazardType')
  • Add the 'IMA Minerals' taxon tree and verify all appears as expected

General Defaults

  • Verify that the new schema field captions are desirable (see "Files Changed" at the top of this PR and review the new field descriptions and titles)
  • Check that the Discipline default form no longer shows 'data type'
  • Check that the Collection default form no longer shows "ABCD Field Descriptions" and instead shows "Collection Description Fields"
  • Compare the discipline and collection forms to issue-2931-2 and verify the changes are desirable

Form definitions

Go to create a new form definition in app resources

  • Verify that no desirable form definitions were removed
  • Verify that default forms are still being applied for all disciplines
  • In a database with an 'Invertebrates' discipline, create a new 'Collection Relationship' view definition
Current This PR
image image

@grantfitzsimmons grantfitzsimmons marked this pull request as ready for review January 30, 2026 18:47
@grantfitzsimmons grantfitzsimmons changed the title fix(defaults): Remove redundant XML files fix(defaults): cleanup resources and add geology Jan 30, 2026
@grantfitzsimmons grantfitzsimmons added this to the 7.12.0 milestone Feb 2, 2026
@grantfitzsimmons grantfitzsimmons changed the title fix(defaults): cleanup resources and add geology fix(defaults): add geology and cleanup defaults Feb 3, 2026
@grantfitzsimmons grantfitzsimmons requested review from CarolineDenis and removed request for acwhite211 February 4, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

3 participants