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

Automatically create a new Collector upon CE creation #5359

Open
grantfitzsimmons opened this issue Oct 31, 2024 · 1 comment
Open

Automatically create a new Collector upon CE creation #5359

grantfitzsimmons opened this issue Oct 31, 2024 · 1 comment
Labels
1 - Request Improvements or extensions to existing behavior 2 - Forms Issues that are related to the form system

Comments

@grantfitzsimmons
Copy link
Member

grantfitzsimmons commented Oct 31, 2024

Requested by: Philippe Verley at IRD on the Speciforum

The title purposefully mimics Automatically create a new Preparation, Determination, or Collection Object Attribute upon CO creation and says it all.

The Embedded Collecting Event option and the three remote preferences CO_CREATE_COA, CO_CREATE_DET & CO_CREATE_PREP proved very useful for easing up and securing new CO entry. Number of clicks is decreased and mandatory fields are clearly identified.

image

A Collecting Event does not make sense without a Collector in CAY herbarium. When I set up the CO_CREATE preps, my colleagues immediately asked whether a new Collector could be automatically created as well, since it is mandatory in our data entry process.

☝️ Can one automatically creates a new Collector upon CE creation ?

A quick look at CollectionObject initialization and CollectionObject Resources initialization seems to indicate that presently answer is no and that it may not be straightforward to implement.

🤔 I'm also wondering why you decided to implement COA, DET & PRE creation through Remote Preferences ? (genuine question) Have you thought of a generalized approach in viewdef resources, with for instance and XML attribute that would control the underlying resource creation ?

<!-- COA subview with 'create' attribute -->
<cell type="subview" viewname="CollectionObjectAttribute" id="10" name="collectionobjectattribute" colspan="14" initialize="" create="onDataEntry"/>
<!-- Collector subview with 'create' attribute -->
<cell type="subview" viewname="Collector" id="12" name="collectors" colspan="12" rows="3" create="onDataEntry" />

The create attribute could accept several values:

  • never (default)
  • onDataEntry : create the underlying object on new data entry only
  • ifEmpty : create the underlying object on new data entry or on data edition if empty
  • ?

Feel free to split the last bit to a separate thread "Generalizing automatic object creation on Data Entry" if the thought interferes with my 1st question on collector creation.

@grantfitzsimmons grantfitzsimmons added 1 - Request Improvements or extensions to existing behavior 2 - Forms Issues that are related to the form system labels Oct 31, 2024
@specifysoftware
Copy link

This issue has been mentioned on Specify Community Forum. There might be relevant details there:

https://discourse.specifysoftware.org/t/automatically-create-a-new-collector-upon-ce-creation/2051/2

@grantfitzsimmons grantfitzsimmons changed the title Automatically create a new Collector upon CE creation Automatically create a new Collector upon CE creation Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Request Improvements or extensions to existing behavior 2 - Forms Issues that are related to the form system
Projects
None yet
Development

No branches or pull requests

2 participants