BI-2887: Germplasm download error with blank source or breeding method#520
Conversation
nickpalladino
left a comment
There was a problem hiding this comment.
Looks good, just had a request on value set in test for clarity. Also updated the acceptance criteria slightly in the card so we don't have to deal with the External UID case when having a blank source and will do that in a future card.
| testGermplasm.setAccessionNumber("1"); | ||
|
|
||
| JsonObject additionalInfo = new JsonObject(); | ||
| additionalInfo.addProperty(GERMPLASM_BREEDING_METHOD, false); |
There was a problem hiding this comment.
For clarity I think this should be set to a breeding method like "Autopolyploid"
There was a problem hiding this comment.
I intentionally excluded the Breeding Method field here because this test is meant to cover the case where that field is not set in the data being downloaded.
There was a problem hiding this comment.
It looks like this would be adding the breeding method property and setting the value to false. There is an assertTrue(processedData.get(0).containsKey("Breeding Method")); at the end.
There was a problem hiding this comment.
Thanks for the clarification. That makes sense, I’ll make the changes accordingly.
There was a problem hiding this comment.
Made changes as per the instructions.
Description
Story: BI-2887
This PR fixes a backend-only regression in germplasm export/download behavior introduced after BI-2789 made
SourceandBreeding Methodoptional for records without parent information.Previously, germplasm downloads could fail when a record had:
Breeding MethodSourceThis change makes the export processing null-safe so downloads succeed and blank optional values are exported as blank cells.
Dependencies
bi-api: bug/BI-2887
bi-web: develop
Testing
Checklist: