[BI-1473] - Append existing germplasm with optional details#211
[BI-1473] - Append existing germplasm with optional details#211nickpalladino merged 27 commits intodevelopfrom
Conversation
src/main/java/org/breedinginsight/brapi/v2/dao/BrAPIGermplasmDAO.java
Outdated
Show resolved
Hide resolved
| public static String duplicateEntryNoMsg = "Entry numbers must be unique. Duplicated entry numbers found: %s"; | ||
| public static String circularDependency = "Circular dependency in the pedigree tree"; | ||
| public static String listNameAlreadyExists = "Import group name already exists"; | ||
| public static String missingGID = "No germplasm of GID %s was found in the database"; |
There was a problem hiding this comment.
missingGID and pedigreeAlreadyExists could be private.
There was a problem hiding this comment.
There are some other pre-exisiting ones that could be as well. Would you mind if they're just all kept public?
src/main/java/org/breedinginsight/brapps/importer/services/processors/GermplasmProcessor.java
Outdated
Show resolved
Hide resolved
src/main/java/org/breedinginsight/brapps/importer/services/processors/GermplasmProcessor.java
Show resolved
Hide resolved
| if (!StringUtils.isBlank(existingGermplasm.getPedigree())) { | ||
| ValidationError ve = new ValidationError("Pedigree", pedigreeAlreadyExists, HttpStatus.UNPROCESSABLE_ENTITY); | ||
| validationErrors.addError(i+2, ve ); // +2 instead of +1 to account for the column header row. | ||
| continue; | ||
| } |
There was a problem hiding this comment.
If a germplasm record has pedigree, and I include it in a second upload to append synonyms, it looks like this check would prevent that from happening. Is that correct?
There was a problem hiding this comment.
Ya thanks, I updated the logic.
Error conditions:
- has existing pedigree and file pedigree is different
Valid conditions:
- no existing pedigree and file different pedigree (not blank though, will fail other validations)
- existing pedigree and file pedigree same
| ImportUpload upload, | ||
| Function<List<T>, ApiResponse> putMethod, | ||
| Consumer<ImportUpload> progressUpdateMethod) throws ApiException { | ||
|
|
There was a problem hiding this comment.
If this isn't implemented, you may want to have this method throw an UnsupportedOperationException for now
There was a problem hiding this comment.
Added UnsupportedOperationException
Description
Story: BI-1473 - Allow user to append existing germplasm with optional details
A new card was created to reduce the scope of this one: https://breedinginsight.atlassian.net/browse/BI-1735?atlOrigin=eyJpIjoiYzJmNjgzZjU1YjBlNGNlNzk4YTFiYzVjZGU2YzA1NDkiLCJwIjoiaiJ9
Dependencies
bi-web/BI-1473
Testing
see bi-web
Checklist: