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

Support COT catalog number configurations in the Query Builder #5485

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

melton-jason
Copy link
Contributor

@melton-jason melton-jason commented Dec 18, 2024

Fixes #5474
Related to #5232

Allows the selection of Collection Object Type (COT) Catalog Number formats in the Query Builder!:

Screenshot 2024-12-17 at 11 34 05 PM

Known edge case: #5487 and #5488

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 CollectionObjectType with a Catalog Number Format Name which differs from that of the Collection's default Catalog Number format

    • You can run a query on the Collection table with the Catalog Num Format Name field to determine the default format
  • Create a new Collection Object query, add Catalog Number to the query, and switch the type from Any to any of:

    • Equal
    • Greater than
    • Less than
    • Greater or Equal to
    • Less or Equal to
    • Between
    • In
    • (all other types-like Contains or Starts With- have validation disabled by default)
  • 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 above

  • Ensure 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 format

  • 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.

@melton-jason melton-jason added this to the 7.9.10 milestone Dec 18, 2024
@melton-jason melton-jason requested review from a team December 18, 2024 06:33
Copy link
Contributor

@alesan99 alesan99 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

  • 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.

@alesan99 alesan99 requested a review from a team December 18, 2024 19:02
Copy link
Contributor

@alesan99 alesan99 left a 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 👍👍👍

@CarolineDenis CarolineDenis merged commit f009a39 into production Dec 20, 2024
12 checks passed
@CarolineDenis CarolineDenis deleted the issue-5232-qb branch December 20, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Support COT-based Catalog Numbering Configurations in the Query Builder
5 participants