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

Subforms with [initialize="addsearch=true"] not allowing data entry on Specify 7 #5129

Open
totallynotleo opened this issue Jul 23, 2024 · 1 comment
Labels
1 - Bug Incorrect behavior of the product

Comments

@totallynotleo
Copy link

Hello,
I asked about this on the speciforum a few months ago but didn't get any response: https://discourse.specifysoftware.org/t/appraisal-co-subform-not-allowing-cos-to-be-added/1776

Describe the bug
It might be an issue with our configuration of Specify 7, but none of the subforms that contain the initialize="addsearch=true" search feature allow for either searching or adding of fields. I've noticed it on all subforms that have the addsearch, but the most pressing one for us is the collectionobjectsub. The functionality works correctly on our Specify 6 instance, and the xml for collectionobjectsub matches the example xml. Let me know if there's something simple that I'm missing.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a form that contains a subform with the addsearch=true field.
  2. Try to click the add a Collection Object from the subform

Expected behavior
A search button/space to add a collection object appears. The add/minus buttons are not greyed out.

Screenshots
Appraisal Form with greyed out CollectionObjectSub:
image
XML for Appraisal Form (slightly different to the actual form, but the subview is the same)
image
Search Functionality in Specify 6 working as expected:
image

  • OS: Windows 10
  • Browser: Chrome
  • Specify 7 Version: v7.9.3.1
  • Database Name: Botany
  • Collection name: QLD Herbarium Test
  • User Name: SpAdmin

Reported By
Queensland Herbarium
Additional context
Also noticed on the CollectingTrip collectingeventsubform as well as the Institution contentContacts subform.

@totallynotleo totallynotleo added the 1 - Bug Incorrect behavior of the product label Jul 23, 2024
@grantfitzsimmons
Copy link
Member

Hi @totallynotleo

Thank you for following up on your initial post!

This issue affects all independent subviews, where adding the base record (CO) to the parent record (Appraisal) requires updating the base record (CO) at a database level. This is because the collectionobject table in the database has a foreign key to the appraisal table.

Dependent subviews are not affected by this as the dependent records are newly created, therefore it does not need to update the other table in the database.

You can see which relationships are "dependent" or "independent" using the Data Model Viewer within Specify (https://sp7demofish.specifycloud.org/specify/data-model/):

image

Adding new records to independent subviews is currently not supported in Specify 7, which is why the plus and minus buttons are greyed out. The only option now is to add the Collection Object to the Appraisal by linking it via the Collection Object form, not the Appraisal form.

We have the following issue open to track this:
#2181

Our developers are working on a solution to this issue. The fix is expected to arrive within the next few months. Thank you again for your issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product
Projects
None yet
Development

No branches or pull requests

2 participants