Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new APIs for creating Institution, Division, Discipline, Collection #6210

Open
CarolineDenis opened this issue Feb 7, 2025 · 0 comments
Milestone

Comments

@CarolineDenis
Copy link
Contributor

Summary

This enhancement aims to allow users to create the new resources via API. The feature will after used in the setup panel when starting SP for the first time.

Draft Requirements

  • Create one API for each resource

Scoping Considerations

We cannot create a new Institution/Division/Discipline/Collection without creating the appropriate records scoped to each level in that hierarchy. For a good idea of what the table scoping in Specify looks like, see this document.

You can read about which trees need to be created at each level in #4976. This should be fully analyzed by a developer before moving forward:

When creating a new institution, for example, you need to create:

  • Initial Specify user
  • Storage tree

When creating a new division, for example, you need to create:

  • An agent for the user creating the division (as agents are scoped at this level)
  • App resource directories

When creating a discipline, you need to pre-populate:

  • Schema configuration (based on discipline)
  • Geography, Taxon, Tectonic Unit, Lithostratigraphy, and Chronostratigraphy trees
  • App resource directories

When creating a new collection, for example, you need to pre-populate:

  • Pick lists
  • Prep types
  • App resource directories

These are just some of the many considerations to keep in mind, so I expect to create additional issues outlining these in the future.

First Run

The user must provide the necessary information for institution creation:

  1. The user can enter information about the institution:
    1. Name
    2. Code
    3. Address
    4. City
    5. State
    6. Country
    7. Zip Code
    8. Phone
    9. Define the accession scope (global or divisional)
    10. Define if Geography tree is global
  2. The user can enter information about the division:
    1. Name
    2. Code
  3. The user can enter information about the discipline:
    1. Type (standard picklist for discipline types)
    2. Name
  4. The user can enter information about the collection:
    1. Name
    2. Code
    3. Catalog Number Format (MVP; there should be a picklist of default field formats for the catalog number from which the user can choose. Ideally, this would integrate the visual editor once Add support for customizing field formats #23 is closed.)
  5. Create an admin user:
    1. Username
    2. Password
    3. Agent (in the current division)
  6. Once completed, the user is directed to the home page.

Requested Changes

  • Create a new route for the institution, division, discipline, collection, and admin user creation during signup.
@CarolineDenis CarolineDenis added this to the 7.11 milestone Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant