Skip to content

Restrict creating Host Taxons#3431

Open
melton-jason wants to merge 1 commit intomainfrom
restrict-host-taxon
Open

Restrict creating Host Taxons#3431
melton-jason wants to merge 1 commit intomainfrom
restrict-host-taxon

Conversation

@melton-jason
Copy link
Contributor

This restriction needs to be put into place until a proper fix for the Host Taxon relationship is implemented

The issue is that any Host Taxon uploaded through the WorkBench or created using the + button on the QueryCombobox will always be created in the current discipline.

This was solved by removing the HostTaxon relationship from CollectingEventAtrribute in the Workbench and removing the + button for the HostTaxon QueryCombobox when the rightSideCollection as specified in the form definition is different then the current collection

Related: #3240 (comment), #2675

This restriction needs to be put into place until a proper fix for
the Host Taxon relationship is implemented

The issue is that any Host Taxon uploaded through the WorkBench or
created using the '+' button on the QueryCombobox will always be
created in the current collection.

Related: #3240, #2675
relatedModel={schema.models.Taxon}
resource={resource}
typeSearch={hostTaxonTypeSearch}
disableCanAdd={
Copy link
Member

Choose a reason for hiding this comment

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

This is not a good fix.
The query combo box receives forceCollection prop, which it can use to figure out if current collection is equal to forceCollection

In fact, this fix is already implemented. See #3283

In there, I added support for properly creating resource into a correct discipline: https://github.com/specify/specify7/pull/3283/files#diff-11908f1e0fbcca3761cf5d0d0635a57bbedbb34f38675283d64fa843a9af23f0R263-R268

But also, it disables the add feature (temporary). It's disabled only because tree rank pick list is loading data from a wrong discipline:
https://github.com/specify/specify7/pull/3283/files#diff-11908f1e0fbcca3761cf5d0d0635a57bbedbb34f38675283d64fa843a9af23f0R359-R364

Can you please review the code change on that pull request, and undo the query combo box changes on this branch

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

Successfully merging this pull request may close these issues.

2 participants