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

Handle scoping for Picklists based on Field in Table #5044

Open
wants to merge 5 commits into
base: production
Choose a base branch
from

Conversation

melton-jason
Copy link
Contributor

@melton-jason melton-jason commented Jun 25, 2024

Fixes #4989

The Issue here was that for Picklists based on field values for a table, the frontend was always trying to enforce scoping for for records of the table the "fictitious" Picklist Items were based off of.

See #4989 (comment)
Related: #3564

Checklist

  • Self-review the PR after opening it to make sure the changes look good
    and self-explanatory (or properly documented)
  • Add automated tests
  • Add relevant issue to release milestone

Testing instructions

  • Create a PickList with type "Field From Table"
  • Choose a Table which can not be scoped
    • Some examples include:
      • AccessionAuthorization
      • Author
      • CollectionRelationship
      • CollectionRelType
      • Disposal
      • SpecifyUser
      • SpQuery
      • TaxonTreeDefItem
  • Choose any field from the Table
  • In any field on any table (can be different from the table chosen above) in the Schema Configuration, assign the PickList to the field
  • Navigate to any form of the table which contains the field assigned to the PickList and ensure no error is thrown

  • Navigate to any existing CollectionRelationship form
    • Some Test Panel databases which contain CollectionRelationships:
      • mpabi_2024_06_04
      • KUFish_5_16_23
      • SAIAB_11_24_23
  • Ensure an error does not occur and the CollectionRelType is properly populated

Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

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

I think it's the back-end's job to figure out if a table can be scoped and if so scope it.
Front-end saying "domainFilter: true" should be interpreted as "scope these resources if you can, please"

@grantfitzsimmons
Copy link
Member

@CarolineDenis This was reported again today by MCNB, can we add this to our timeline? It looks like the work is (largely) done on it already

@CarolineDenis CarolineDenis modified the milestones: 7.9.x, 7.9.8 Jul 23, 2024
@CarolineDenis CarolineDenis modified the milestones: 7.9.8, 7.9.9 Oct 3, 2024
@grantfitzsimmons
Copy link
Member

Encountered today myself testing COR

Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

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

I think this should be done on the back-end, but I am ok with it as is

@CarolineDenis CarolineDenis requested a review from a team November 15, 2024 14:52
Copy link
Collaborator

@emenslin emenslin left a comment

Choose a reason for hiding this comment

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

Testing instructions

  • Create a PickList with type "Field From Table"
  • Choose a Table which can not be scoped
    • Some examples include:
      • AccessionAuthorization
      • Author
      • CollectionRelationship
      • CollectionRelType
      • Disposal
      • SpecifyUser
      • SpQuery
      • TaxonTreeDefItem
  • Choose any field from the Table
  • In any field on any table (can be different from the table chosen above) in the Schema Configuration, assign the PickList to the field
  • Navigate to any form of the table which contains the field assigned to the PickList and ensure no error is thrown

  • Navigate to any existing CollectionRelationship form
    • Some Test Panel databases which contain CollectionRelationships:
      • mpabi_2024_06_04
      • KUFish_5_16_23
      • SAIAB_11_24_23
  • Ensure an error does not occur and the CollectionRelType is properly populated

I get an error after creating a new picklist and when trying to open the collection relationship forms

chrome_gNU52V9ImU.mp4

Specify 7 Crash Report - 2024-11-15T16_54_25.575Z.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Dev Attention Needed
Development

Successfully merging this pull request may close these issues.

HierarchyException when loading Collectionreltype
5 participants