diff --git a/src/breeding-insight/service/StudyService.ts b/src/breeding-insight/service/StudyService.ts index e2ecc15a7..e52bc5e3d 100644 --- a/src/breeding-insight/service/StudyService.ts +++ b/src/breeding-insight/service/StudyService.ts @@ -40,6 +40,7 @@ export class StudyService { let response: Result; if (trial !== undefined && trial.externalReferences !== undefined) { + // TODO: Change to trialDbId when fixing bi-brapi study endpoint [BI-2962] let externalReferenceId = BrAPIUtils.getBreedingInsightId(trial.externalReferences, '/trials'); // Throw if trial is missing ExternalReferenceId. if (externalReferenceId === undefined) throw new Error("Trial is missing external reference."); diff --git a/src/views/import/Dataset.vue b/src/views/import/Dataset.vue index b31eb9904..6a194cbaa 100644 --- a/src/views/import/Dataset.vue +++ b/src/views/import/Dataset.vue @@ -510,13 +510,13 @@ export default class Dataset extends ProgramsBase { if(!this.isSubEntity){ datasetTableRow.expUnitId = this.removeUnique(unit.observationUnitName); - datasetTableRow.obsUnitId = BrAPIUtils.getBreedingInsightId(unit.externalReferences, "/observationunits"); + datasetTableRow.obsUnitId = unit.observationUnitDbId; } else { let parentObsInfo = unit.observationUnitPosition.observationLevelRelationships.find((val) => val.levelOrder === 0); if (parentObsInfo) datasetTableRow.obsUnitId = this.removeUnique(parentObsInfo.levelCode); datasetTableRow.expUnitId = unit.additionalInfo.expUnitID; datasetTableRow.subExpUnitId = this.removeUnique(unit.observationUnitName); - datasetTableRow.subObsUnitId = BrAPIUtils.getBreedingInsightId(unit.externalReferences, "/observationunits"); + datasetTableRow.subObsUnitId = unit.observationUnitDbId; } // Env Year