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

Add group number support in Taxon queries #4724

Open
wants to merge 2 commits into
base: production
Choose a base branch
from

Conversation

grantfitzsimmons
Copy link
Contributor

@grantfitzsimmons grantfitzsimmons commented Apr 2, 2024

Fixes #4723

This has been tested between both Specify 6 and 7. Existing queries that previously were non-functional created in 6 work now as well!

image

The previous configuration expected <RankName> GroupNumber, but Specify 6 constructs the string ID for these query items as <RankName> groupNumber.

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

Note: To properly test some of these, you will need to use Specify 6 locally to configure such a query or you can import this query that was created in Specify 6:
GroupNumber 6 Query.json

  • Run a query that had the field "Group Number" added at the Family level in Specify 6
    • Verify the output is consistent with Specify 6 and that all query functions work as expected
  • Add "Group Number" to various ranks in the Taxon tree and ensure it can be searched on and results are displayed properly
  • Verify that hiding and unhiding "Group Number" in the schema configuration make it appear as expected

@grantfitzsimmons grantfitzsimmons added 2 - Trees Issues that are related to the tree system and related functionalities. 2 - Queries Issues that are related to the query builder or queries in general labels Apr 2, 2024
@grantfitzsimmons grantfitzsimmons added this to the 7.9.x milestone Apr 2, 2024
@CarolineDenis CarolineDenis modified the milestones: 7.9.x, 7.9.6 Apr 2, 2024
Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

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

🎉

@@ -22,7 +22,7 @@
DATE_PART_RE = re.compile(r'(.*)((NumericDay)|(NumericMonth)|(NumericYear))$')

# Pull out author or groupnumber field from taxon query fields.
TAXON_FIELD_RE = re.compile(r'(.*) ((Author)|(GroupNumber))$')
TAXON_FIELD_RE = re.compile(r'(.*) ((Author)|(groupNumber))$')
Copy link
Member

Choose a reason for hiding this comment

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

FYI: from what Ben told me, the only reason we limit what fields are accessible in tree queries is because that's what sp6 did
that reason might be less good today compared to how it was in 2013.
@realVinayak interested in tackling this at some point?

Copy link
Collaborator

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

Note: To properly test some of these, you will need to use Specify 6 locally to configure such a query or you can import this query that was created in Specify 6:
GroupNumber 6 Query.json

  • Run a query that had the field "Group Number" added at the Family level in Specify 6
    • Verify the output is consistent with Specify 6 and that all query functions work as expected
  • Add "Group Number" to various ranks in the Taxon tree and ensure it can be searched on and results are displayed properly
  • Verify that hiding and unhiding "Group Number" in the schema configuration make it appear as expected

Looks good, group number can now be queried in 7
Screenshot 2024-05-08 094447

@emenslin emenslin requested a review from a team May 8, 2024 15:01
Copy link
Collaborator

@combs-a combs-a 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

  • Run a query that had the field "Group Number" added at the Family level in Specify 6
    • Verify the output is consistent with Specify 6 and that all query functions work as expected
  • Add "Group Number" to various ranks in the Taxon tree and ensure it can be searched on and results are displayed properly
  • Verify that hiding and unhiding "Group Number" in the schema configuration make it appear as expected

Everything looks to be working correctly, used it between a local specify 6 DB and used the query Grant posted for instructions on sdnhmherps as well.

Results in 6 and 7:
image

image

When hidden:
image

And the query I made for the local DB (worked on sdnhmherps as well):
GroupNumberTest.json

Good work!

@alesan99 alesan99 self-requested a review May 14, 2024 15:54
Copy link

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

  • Run a query that had the field "Group Number" added at the Family level in Specify 6
    • Verify the output is consistent with Specify 6 and that all query functions work as expected
  • Add "Group Number" to various ranks in the Taxon tree and ensure it can be searched on and results are displayed properly
  • Verify that hiding and unhiding "Group Number" in the schema configuration make it appear as expected

Query results are different between SP 6 and 7.
chrome_NEDW2TPmcw
With one of the group number lines removed SP 7 matches.
chrome_fC4fTIQBdF
And this is how it looks on v7 (without the GroupNumber lines)
chrome_9KyKNglaPq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - Queries Issues that are related to the query builder or queries in general 2 - Trees Issues that are related to the tree system and related functionalities.
Projects
Status: Dev Attention Needed
Development

Successfully merging this pull request may close these issues.

Add support for 'Group Number' in Taxon queries
6 participants