Closed FedorSteeman closed 11 months ago
The way the data entry form is set up for a new record during saving was deviating from the MVC pattern: It no longer instantiated a new instance of the specimen model, but re-used the current instance, yet failing to clear all fields. It's been brought back to the original method of creating a new instance and transferring sticky field values to that instance.
Specific fix code:
newRecord = self.collobj.id == 0
...
...
# If so, prepare for new blank record
` if newRecord:
` self.collobj = specimen.Specimen(self.collectionId) `
Issue
Reported by @PipBrewer & @jlegind: "Once you check the Damaged Specimen tick box in the UI and save the record, the tick mark is unchecked for the next record, but it persists in the database with “Needs repair” appearing in subsequent records in the specimen table. If you go back in the UI, you can see that the check box has actually persisted. This goes for NHMD and NHMA."
This kind of 'invisible' value insertion is problematic. Fortunately it was caught before it could pollute Specify imports. It is paramount that we catch these kinds of bugs because they are expensive to correct.
What test are required ?
Continuously monitoring the DB specimen table for inconsistencies while testing the pre-release Digi App.