-
Notifications
You must be signed in to change notification settings - Fork 37
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
Support COT catalog number configurations in the Query Builder #5485
Conversation
Triggered by 5e2823e on branch refs/heads/issue-5232-qb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing instructions
- Ensure that by default, the Collection's default Catalog Number format is enforced
- [c] Ensure the input of the field is now validating based on the format defined on the chosen Collection Object Type
- Ensure each filter on the Catalog Number field with validation can independently have its own format
- [c] Save the Query and refresh the page: the Query should load successfully
- Ensure the query returns correct results when using filters with multiple Catalog Number formats
- If there is only one CollectionObjectType or all CollectionObjectTypes either don't specify a Catalog Number format or use the
- Briefly generally test other functionality of the Query Builder, such as: running old queries, selecting a different record formatter (Add support for explicitly choose a formatter in QB #4615), Query From Tree Node, etc.
The functionality looks good! 👍👍
I just have a minor note
If multiple COTs share the same formatter the selection dropdown always chooses the first one with that format. It's a little weird but the functionality works since it is the same formatter after all.
I imagine in practice most people will have a different formatter for each COT if they aren't sticking with the default, but if someone comes across this it may appear broken.
chrome_zfCxfAL2N3.mp4
The queries also not filtered very strictly and YEAR-###### includes ######## results, which is more noticeable when doing 'less than' queries.
Though this is in line with normal Catalog Number behavior and its easily solvable by adding COT to your query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made a separate report for the issue I encountered -> #5503
Looks good to go 👍👍👍
Fixes #5474
Related to #5232
Allows the selection of Collection Object Type (COT) Catalog Number formats in the Query Builder!:
Known edge case: #5487 and #5488
Checklist
self-explanatory (or properly documented)
Testing instructions
Create a CollectionObjectType with a Catalog Number Format Name which differs from that of the Collection's default Catalog Number format
Catalog Num Format Name
field to determine the default formatCreate a new Collection Object query, add Catalog Number to the query, and switch the type from
Any
to any of:Ensure that by default, the Collection's default Catalog Number format is enforced
Switch the Catalog Number format to the previously created Collection Object Type using the new gear icon and picklist
Ensure the input of the field is now validating based on the format defined on the chosen Collection Object Type
Add one or more OR filters to the Catalog Number field (this can be done through the
+
button) with a type from the list aboveEnsure each filter on the Catalog Number field with validation can independently have its own format
Save the Query and refresh the page: the Query should load successfully
Ensure the query returns correct results when using filters with multiple Catalog Number formats
If there is only one CollectionObjectType or all CollectionObjectTypes either don't specify a Catalog Number format or use the Collection's default, then the gear icon to select a formatter should not appear on Catalog Number
Collection Object -> Catalog Number
along with formatted/aggregated fields are the only filters which should have the gear icon to select a formatBriefly generally test other functionality of the Query Builder, such as: running old queries, selecting a different record formatter (Add support for explicitly choose a formatter in QB #4615), Query From Tree Node, etc.