Skip to content

BI-2789 - Create Germplasm: loosen breeding method and source requirement#513

Merged
davedrp merged 4 commits into
developfrom
feature/BI-2789
May 4, 2026
Merged

BI-2789 - Create Germplasm: loosen breeding method and source requirement#513
davedrp merged 4 commits into
developfrom
feature/BI-2789

Conversation

@humsika
Copy link
Copy Markdown
Contributor

@humsika humsika commented Apr 27, 2026

Description

Link to the story in Jira: https://breedinginsight.atlassian.net/browse/BI-2789?atlOrigin=eyJpIjoiZjEzZmIyMjNmNWVmNDIyYjk5ZjIxMzM4MTJiZDY3ZTkiLCJwIjoiaiJ9

This PR updates germplasm import validation behavior for BI-2789.

The change removes the unconditional required validation for Source and makes Breeding Method conditionally required only when parent information is provided through parent GIDs or parent entry numbers.

This PR also updates existing germplasm append behavior so that Source and Breeding Method can be appended when the corresponding database field is blank, while ensuring existing populated values are not overwritten.

In addition, backend tests were added and updated to cover the new validation and append scenarios introduced by this story.

Dependencies

bi-web: develop
bi-api: feature/BI-2789

No separate frontend changes are included in this PR.

Testing

  • Added/updated germplasm import backend tests for BI-2789 scenarios.
  • Verified locally that the added/updated tests are passing.
  • Tested new germplasm import with no parent data to confirm blank Breeding Method is allowed.
  • Tested germplasm import with parent GIDs / parent entry numbers to confirm Breeding Method is required when parent data is present.
  • Tested blank Source handling to confirm it is no longer always required.
  • Tested existing germplasm append behavior to confirm blank Source / Breeding Method fields can be filled.
  • Tested existing germplasm behavior to confirm populated Source / Breeding Method values are not overwritten.

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have create/modified unit and/or integration tests to cover this change or tests are not applicable
  • I have commented my code, particularly in hard-to-understand areas
  • I have either updated the source of truth or arranged for update with product owner if needed https://breedinginsight.atlassian.net/wiki/spaces/BI/pages/1559953409/Source+of+Truth

@humsika humsika requested review from a team and davedrp and removed request for a team April 27, 2026 17:00
@humsika humsika marked this pull request as ready for review April 27, 2026 17:00
@humsika humsika requested a review from a team April 27, 2026 17:19
@davedrp davedrp removed the request for review from a team April 29, 2026 14:12
@davedrp
Copy link
Copy Markdown
Contributor

davedrp commented Apr 29, 2026

Developer test passed

Copy link
Copy Markdown
Contributor

@davedrp davedrp left a comment

Choose a reason for hiding this comment

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

There are a couple of pre-existing issues. While they are pre-existing, they where in code that was newly updated. So, I think, it is a good idea to take this opportunity to address the issues.

Comment thread src/main/java/org/breedinginsight/brapps/importer/model/base/Germplasm.java Outdated
@davedrp davedrp self-requested a review May 4, 2026 14:02
@davedrp davedrp merged commit a84dc18 into develop May 4, 2026
1 check passed
@davedrp davedrp deleted the feature/BI-2789 branch May 4, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants