Support Catalog Number ranges in Query Builder 'In' filters#7814
Support Catalog Number ranges in Query Builder 'In' filters#7814acwhite211 wants to merge 5 commits intomainfrom
Conversation
|
Currently working for CatalogNumberNumeric. Working on trying to add support for CatalogNumberAlphaNumByYear. |
alesan99
left a comment
There was a problem hiding this comment.
- See that the correct number of records are returned for the given catalog number range.
- See that the correct number of records are returned for the given catalog number range.
- See that one record is returned.
- See that the correct number of records are returned for the given catalog number range.
- Find or create a discipline/collection that uses the CatalogNumberAlphaNumByYear formatting. See that a range of catalog numbers still works for the "In" operator.
Everything worked for me in both CalalogNumberNumeric and CatalogNumberAlphaNumberByYear 👍
Input validation is missing, something like 1-99999999999 won't show any results but it won't let the user know its because 99999999999 doesn't follow the format. But I think its reasonable for users to assume that IN queries must follow the same formatting rules as other queries, so I think its fine for this PR at least
There was a problem hiding this comment.
-
See that the correct number of records are returned for the given catalog number range.
-
See that the correct number of records are returned for the given catalog number range.
-
See that one record is returned.
-
See that the correct number of records are returned for the given catalog number range.
after attempting a combination of ranges in the wrong order, the parser seems to go over based on the next interval of 10 numbers rather than backwards rather than the behavior seen with interval 6-1
NOTE: these are both rough cases so its understandable if it stays in. this is more of stress test. th only thing that worried be about it is the inconsistency between them since the 6-1 interval covered CO's 1-6 while the interval 10-7 seems to be interpreted as range 10 + 7 more after that rather than a backwards range as its seen with the first example.
- Find or create a discipline/collection that uses the CatalogNumberAlphaNumByYear formatting. See that a range of catalog numbers still works for the "In" operator.

Fixes #6399
Restore Specify 6-style Catalog Number Numberic range behavior for Query Builder In filters. Users can now enter values like 33043-33049, 352000-26, 352028-49, 33040 and get expected results.
Added supporting functions to the Query Operators to handle the parsing of catalog number ranges. Kept mixed-token behavior, so single values and ranges can be combined in one In clause. Added unit test coverage for the new range behavior.
Currently designed and working for CatalogNumberNumeric formats. Supporting the other CatalogNumber, CatalogNumberAlphaNumByYear, and CatalogNumberString formats could possibly be done in the future.
Checklist
self-explanatory (or properly documented)
Testing instructions
33043-3304933043-49.3304333043-48, 33049.