Skip to content

[BI-2803] Fix broken preview table on Sub Entity Appends and Observation Variable Stat#461

Merged
jloux-brapi merged 7 commits intodevelopfrom
bug/BI-2803
Mar 23, 2026
Merged

[BI-2803] Fix broken preview table on Sub Entity Appends and Observation Variable Stat#461
jloux-brapi merged 7 commits intodevelopfrom
bug/BI-2803

Conversation

@jloux-brapi
Copy link
Copy Markdown
Contributor

@jloux-brapi jloux-brapi commented Mar 18, 2026

Description

Story: BI-2803

Please include a summary of the change that was made.

ImportExperiment:

  • Add a mount function to fetch the traits for the activeProgram on load of the Import Experiment tab
  • Utilize the traits on initial upload preview to filter out dynamic columns which are not traits/ontology terms. This was effectively preventing the table from being initialized in the sub entity dataset appends use case.
  • Utilize new backend obsVarCount statistic instead of a filter on the dynamicCols to display the observation variable count. The old variable count filter was displaying the wrong number of observation variables in the sub entity dataset appends use case.

ImportTemplate:

  • Remove the filter on obsUnitId dynamic columns, as the new code introduced takes care of this use case.

Dependencies

bi-api PR

Testing

Prerequisites

To test, you will want to try creating a program from scratch, and complete a germplasm and ontology upload. You will need to reference the ontology terms you created as "observation variables" during the testing.

Tests

  • Verify that on Experiment Import creation workflow, the table preview correctly displays in multiple use cases:

    • When no observation variables are present in the import
    • When observation variables are present in the import; additionally verify the observations appear in the import preview
  • Verify that on Experiment Import appends workflow on a top level dataset, the table preview correctly displays in multiple use cases:

    • When no observation variables are present in the import
    • When observation variables are present in the import: additionally verify the observations appear in the import preview
  • Verify that on Experiment Import appends workflow on a sub entity level dataset, the table preview correctly displays in multiple use cases:

    • When no observation variables are present in the import
    • When observation variables are present in the import: additionally verify the observations appear in the import preview
  • Verify Observation Variable count is correct in the preview in multiple use cases in the Experiment Import Creation workflow:

    • No obs vars
    • Singular obs vars
    • Multiple obs vars
      *Verify Observation Variable count is correct in the preview in multiple use cases in the Experiment Import Appends workflow, for both top-level and sub-entity dataset appends:
    • No obs vars
    • Singular obs vars
    • Multiple obs vars

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have commented my code, particularly in hard-to-understand areas
  • I have either updated the source of truth or arranged for update with product owner if needed https://breedinginsight.atlassian.net/wiki/spaces/BI/pages/1559953409/Source+of+Truth
  • I have run SiteImprove on pages impacted by changes

OUIDs will now be filtered by function which filters on dynCols
that exist in the associated trait list for a program.
Copy link
Copy Markdown
Member

@nickpalladino nickpalladino left a comment

Choose a reason for hiding this comment

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

Testing looked good, couple comments

if (this.traits.includes(dynCol)) {
this.phenotypeColumns.push(dynCol);
} else {
console.log(`Dynamic column [${dynCol}] not found in the list of available traits for program [${this.activeProgram.name}]`);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For logging we have the vuejs-logger available that supports log levels and gives more control of how we manage messages. You can use it like: this.$log.error(msg); It is configured in main.ts and available on all Vue components.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done.

export default class ImportExperiment extends ProgramsBase {

async mounted() {
// Hopefully no more than 100 ontology terms
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

100 is probably reasonable, but we might want to have some sort of indication if there are more than 100 and we're not going to paginate. Could just be a log message.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I kept the funny comment and added a log message.


this.createObservationIndexMap();

return this.phenotypeColumns.length;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a reason this was added, doesn't look like it is used

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was from some testing I was doing, removed.

@jloux-brapi jloux-brapi merged commit 57dbf15 into develop Mar 23, 2026
1 check passed
@jloux-brapi jloux-brapi deleted the bug/BI-2803 branch March 23, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants