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

BrAPI: set default germplasm acquisitionDate and use in filtering #5304

Merged
merged 8 commits into from
Feb 10, 2025

Conversation

dwaring87
Copy link
Member

Description

This adds more support for the acquisitionDate germplasm property in BrAPI endpoints:

  • The germplasm acquisitionDate property will use the acquisition date stock property if it was manually added for a particular accession. When this is NOT present, it will use the stock create_date field (automatically set when a stock is added to the database) for the acquisitionDate. This ensures that every stock will have an acquisitionDate set (either the create_date by default or the acquisition date stock property, if set).
  • Add additional filter parameters to the GET /germplasm and POST /search/germplasm BrAPI endpoints:
    • acquisitionDate - filter germplasm for an exact acquisition date
    • minAcquisitionDate - filter germplasm that have an acquisition date >= the param value
    • maxAcquisitionDate - filter germplasm that have an acquisition date <= the param value

Fixes #5303

Related to plantbreeding/BrAPI#624

Checklist

  • Refactoring only
  • Documentation only
  • Fixture update only
  • Bug fix
    • The relevant issue has been closed.
    • Further work is required.
  • New feature
    • Relevant tests have been created and run.
    • Data was added to the fixture
      • Data was added via a patch in /t/data/fixture/patches/.
    • User-Facing Change
      • The user manual in /docs has been updated.
    • Any new Perl has been documented using perldoc.
    • Any new JavaScript has been documented using JSDoc.
    • Any new legacy JavaScript has been moved from /js to /js/source/legacy.

@dwaring87 dwaring87 changed the title Topic/germplasm acquisition date BrAPI: set default germplasm acquisitionDate and use in filtering Feb 5, 2025
Copy link
Member

@lukasmueller lukasmueller left a comment

Choose a reason for hiding this comment

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

it's not clear how the search works with acquisition_date, as it is just a match and not a smaller or larger than comparison

@dwaring87
Copy link
Member Author

it's not clear how the search works with acquisition_date, as it is just a match and not a smaller or larger than comparison

@lukasmueller acquisitionDate is an exact match, minAcquisitionDate is a >= match and maxAcquisitionDate is a <= match.

Copy link
Contributor

@chris263 chris263 left a comment

Choose a reason for hiding this comment

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

:-)

@lukasmueller lukasmueller merged commit 5b768e4 into master Feb 10, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get Cassavabase to work with the BrAPI Germplasm Search Tool
3 participants