Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ public final class BrAPIAdditionalInfoFields {
public static final String OBS_UNIT_ID = "obsUnitID";
public static final String GERMPLASM_NAME = "germplasmName";
public static final String SUBMISSION_NAME = "submissionName";
public static final String EXP_UNIT_ID = "expUnitID";
}
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ public BrAPIObservationUnit createSubObservationUnit(
levelRelationships.add(expUnitLevel);
position.setObservationLevelRelationships(levelRelationships);

observationUnit.putAdditionalInfoItem(BrAPIAdditionalInfoFields.EXP_UNIT_ID, expUnit.getObservationUnitName());

Copy link
Member

Choose a reason for hiding this comment

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

I think it may be worth standardizing how the level relationships are stored for the ExpUnit and SubObsUnit. The subObsUnit level code is set like this:

level.setLevelCode(Utilities.appendProgramKey(subUnitId, program.getKey(), seqVal));

The ExpUnit level is set like this:

expUnitLevel.setLevelCode(Utilities.appendProgramKey(expUnitUUID, program.getKey(), seqVal));

If they both stored the unitID in the level code I think you could use that instead of adding an additionalInfo field for it. It would be slightly more difficult to work with, wondering your thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

ok merging this and moving work related to comment to a new card

// Set ObservationUnitPosition.
observationUnit.setObservationUnitPosition(position);

Expand Down