TheJacksonLaboratory / PhenopacketLab

An Angular/Springboot web application for the loading, editing, saving of data that follows the Phenopacket Schema
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Unable to clear onset and resolution from phenotypic feature in the stepper #143

Closed ielis closed 1 year ago

ielis commented 1 year ago

Removing onset or resolution (setting to null) does not work once either one is set.

For instance, after selecting Age, the P5Y is correctly shown in the Added phenotypic features table: image

The cross within the onset class selector (Age, Age range, etc.) should clear the onset for the selected phenotypic feature. After clicking on the cross icon, indeed, the onset is cleared. image

However, the change is not in sync with the Added phenotypic features table, and seemingly also with the underlying data model. The Onset table column is not cleared and the Phenotypic feature details | Onset field is reset to Age after selecting the term again. image

ielis commented 1 year ago

The same issue seems to be present in Stepper | Disease | Disease details. Onset and resolution cannot be cleared once set.

BethSundberg commented 1 year ago

@belkassaby There are two issues still.

  1. To clear the resolution if it is "Age", I have to first remove the data from the years, months, and days, then click the "x" on the Age. Removing Age with the "x" should also clear the years, months, and days.
  2. To clear the onset, if it is set to an "ontology class" you have to click "x" next to ontology class AND then change the control to something else, such as "Age" AND then click "x" next to Age. Otherwise the selected ontology class remains.
belkassaby commented 1 year ago

This should be fixed in the current branch im working on. I'll let you know once I have deployed it.

BethSundberg commented 1 year ago

@belkassaby The onset is clearing. However, I have a question about the resolution. It is clearing fine in the detail section, but sometimes it gives me "undefined" under the resolution heading in the top. It also is not clearing or changing that resolution heading.

Image

desais-jax commented 1 year ago

@belkassaby I tested this. As of now deleting Resolution results in showing Resolution column as blank. But if I delete Onset info, the phenotypic feature displays Onset column as undefined. Should it be undefined or should it be blank , once user has deleted onset info for phenotypic feature. Please see screenshot below.

Image

belkassaby commented 1 year ago

in the SQA instance, when deleting an onset, and then selecting another onset (age, agerange or gestationalAge) although the value is changed it is not display on the row of the table or in the detail expanded view of the phenotypic feature