Indicia-Team / warehouse

GNU General Public License v3.0
5 stars 3 forks source link

Verification status inadvertently reset on updating occurrences #450

Closed JimBacon closed 1 year ago

JimBacon commented 2 years ago

Looks to me like a copy-paste error from the preceding line here. It doesn't make sense to be comparing the new taxa_taxon_list_id with the existing metadata value. $identChanging will (virtually) always be true

https://github.com/Indicia-Team/warehouse/blob/61f4cb321faf25b10b227fbdefa22bb5d46bc49e/application/models/occurrence.php#L136

When we reach the following conditions, if we update a verified occurrence with no changes (such as can happen when re-importing records from csv file) wantToUpdateMetaData, $isAlreadyReviewed and $identChanging will all be true, causing the verification to be reset when it should not be. https://github.com/Indicia-Team/warehouse/blob/61f4cb321faf25b10b227fbdefa22bb5d46bc49e/application/models/occurrence.php#L152-L157

johnvanbreda commented 2 years ago

Good spot @JimBacon. Will you push a hotfix?