-
Notifications
You must be signed in to change notification settings - Fork 41
Support COT catalog number configurations in the Query Builder #5485
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
Conversation
Triggered by 5e2823e on branch refs/heads/issue-5232-qb
alesan99
left a comment
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 (#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.
alesan99
left a comment
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 👍👍👍
…eric Fixes #6464 See related #5485 and #6245 This handles the most common case. In the case where there exists both numeric and non-numeric formats for catalogNumber, the numeric formats will still be cast as a string. This also ONLY works with formats called CatalogNumberNumeric; i.e., any other purely numeric format will not be considered as numeric by the QueryBuilder
…0.2` (#6465) * Handle case where rank name has spaces * Use name as default tree rank query * Handle edge case for fullname query * Use name for fullname * Skip test temporarily * Revert mapping for fullname * Fix case for fullName query with 1 space in rank - Also adds a unit test to ensure this doesn't break again * Cast catalogNumber to Numeric in query results if all formats are numeric Fixes #6464 See related #5485 and #6245 This handles the most common case. In the case where there exists both numeric and non-numeric formats for catalogNumber, the numeric formats will still be cast as a string. This also ONLY works with formats called CatalogNumberNumeric; i.e., any other purely numeric format will not be considered as numeric by the QueryBuilder * Add comment to catalogNumber cast for queries --------- Co-authored-by: melton-jason <meltonjason12@yahoo.com>
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 Namefield to determine the default formatCreate a new Collection Object query, add Catalog Number to the query, and switch the type from
Anyto 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 Numberalong 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.