NHMDenmark / Mass-Digitizer

Common repo for the DaSSCo team
Apache License 2.0
1 stars 0 forks source link

Copy pasting a later container ID does not update earlier record correctly. #420

Closed jlegind closed 9 months ago

jlegind commented 9 months ago

Issue

When copying the value of the Container ID field and adding this to an earlier record, by copying it into the container ID, and then saving: Does not persist the copied value.

The copied value is replaced with a new auto-generated value.

Why is it needed/relevant ?

Container ID ties specimens and object together. If the digitizer sees that an earlier record was not associated with the relevant container ID then it should be possible to go back in record order and copy/paste the right container ID into that field.

Estimate level of effort required.

'Easy'

Give a clear approach/potential solution on how to resolve it.

If the specimen model was updated with the paste action then that would be an ideal way of solving this. A quicker way would be to read the value from the App UI directly when saving. It is less elegant though. In both cases container random ID value assignment should only be explicitly triggered on the radio button push and not from state.

FedorSteeman commented 9 months ago

The container ID or name was not updated when editing an older record. Event handler was added and made to be triggered whenever the field is edited or even just left again. Now when pressing save, the new value is persisted to the record.

The field name was also redubbed "inpContainerName" to better reflect the Specify concept.

jlegind commented 9 months ago

Version 1.1.18 from 27-09-2023. The identifier value copied into the Container ID field of a previous record does not travel to the specimen table containername column. A different value is set.

FedorSteeman commented 9 months ago

We need to review or add an event trigger when editing this field. Estimated to take a couple of hours or half a day.

FedorSteeman commented 9 months ago

Fixed.