From 94780006c34128337f03630b60ad7c3b8c6991b3 Mon Sep 17 00:00:00 2001 From: Jason Loux Date: Thu, 23 Jul 2026 15:39:17 -0400 Subject: [PATCH] Update dataset fe to use observationUnitDbId --- src/breeding-insight/service/StudyService.ts | 1 + src/views/import/Dataset.vue | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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