Skip to content

Add series tool in query builder#4952

Merged
CarolineDenis merged 73 commits into
productionfrom
issue-2000
May 8, 2025
Merged

Add series tool in query builder#4952
CarolineDenis merged 73 commits into
productionfrom
issue-2000

Conversation

@CarolineDenis

@CarolineDenis CarolineDenis commented May 24, 2024

Copy link
Copy Markdown
Contributor

Fixes #2000
Fixes #6166

Checklist

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

Testing instructions

  • Open the QB with CO table
  • Add catalog num field and some other field
  • verify series checkbox is present only when Cat num is one of the field
  • Check Series
  • verify Distinct is read only
  • Uncheck Series
  • Verify you can check Distinct and that Series become readonly
  • Uncheck Distinct and check Series
  • Run the query
  • Verify that all the records that have the same data for each field in your query and that have consecutive cat num are group together
  • Verify that the consecutive cat numbers are displayed as a range

Tips:

  • Create a new CO with a determination and a preparation in a db with auto-numbering for cat num
  • Save
  • Use bulk Carry and create 5 identical copies
  • Create another new CO with all the exact same info as the previous one but skip one cat num
  • This will give you some record to test with series

With Series
Screenshot 2025-02-03 at 8 50 57 AM

Without Series
Screenshot 2025-02-03 at 8 50 49 AM

NOTES:
Sorting the column cat num is not available for series

@CarolineDenis CarolineDenis changed the title Issue 2000 Add series tool in query builder May 24, 2024
@CarolineDenis CarolineDenis added this to the 7.9.x milestone Jun 18, 2024
@grantfitzsimmons

Copy link
Copy Markdown
Member

This is the second component of #4804

@realVinayak

Copy link
Copy Markdown
Contributor

FYI: backend, after #4929, will support server-side record cloning

@pashiav pashiav left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • verify series checkbox is present only when Cat num is one of the field
  • verify Distinct is read only
  • Verify you can check Distinct and that Series become readonly
  • Verify that all the records that have the same data for each field in your query and that have consecutive cat num are group together
  • Verify that the consecutive cat numbers are displayed as a range

Looks good! This PR is working as expected.

@pashiav
pashiav requested a review from a team April 30, 2025 13:25

@Areyes42 Areyes42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • verify series checkbox is present only when Cat num is one of the field
  • verify Distinct is read only
  • Verify you can check Distinct and that Series become readonly
  • Verify that all the records that have the same data for each field in your query and that have consecutive cat num are group together
  • Verify that the consecutive cat numbers are displayed as a range

Everything looks good for the most part! I noticed that a TypeError occurs if you run a query using series, but have the catalog number disabled in the results.

Screen.Recording.2025-04-30.at.12.57.37.PM.mov

Specify 7 Crash Report - 2025-04-30T17_58_11.334Z.txt

@acwhite211

Copy link
Copy Markdown
Collaborator

@CarolineDenis I think we need to hide the series button in the QB if the user hides the Catalog Number from the results. This should fix the issue encountered by @Areyes42

I have a solution that I can commit that will only run the series query logic if the Catalog Number field sets its display value to true. But, from the user side, I think if would be better to just not allow the user to request a series query with the Catalog Number display set to false.

@CarolineDenis
CarolineDenis requested a review from Areyes42 May 6, 2025 12:18
@CarolineDenis
CarolineDenis requested a review from a team May 6, 2025 17:00

@Areyes42 Areyes42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • verify series checkbox is present only when Cat num is one of the field
  • verify Distinct is read only
  • Verify you can check Distinct and that Series become readonly
  • Verify that all the records that have the same data for each field in your query and that have consecutive cat num are group together
  • Verify that the consecutive cat numbers are displayed as a range

Re-running the same query I mentioned earlier now throws an IndexErrorwhenever the formatted field is included. I’ve tried replicating the issue on other databases, but it only seems to occur in ciscollections. Also, the series button no longer appears when the catalog number is excluded from the results ✅.

Specify 7 Crash Report - 2025-05-07T17_29_08.129Z.txt

@acwhite211

Copy link
Copy Markdown
Collaborator

@Areyes42 @specify/ux-testing Pushed a fix for the series QB that was found on ciscollections. Ready for retesting on that DB, thanks!

@acwhite211
acwhite211 requested review from a team, Areyes42 and acwhite211 May 8, 2025 14:47

@Areyes42 Areyes42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • verify series checkbox is present only when Cat num is one of the field
  • verify Distinct is read only
  • Verify you can check Distinct and that Series become readonly
  • Verify that all the records that have the same data for each field in your query and that have consecutive cat num are group together
  • Verify that the consecutive cat numbers are displayed as a range

Looks good!

@Areyes42
Areyes42 requested a review from a team May 8, 2025 18:16
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.

Add series tool in the QB Query builder does not support "Always","Prompt" or "Series results" checkboxes

8 participants