From e8973a65de483ad50628705a823ad5957ec845d0 Mon Sep 17 00:00:00 2001 From: John van Breda Date: Fri, 3 Apr 2020 14:41:45 +0100 Subject: [PATCH 1/2] Fixes case where occurrences not queued for verification If a verified occurrence in a sample and the sample gets edited without changing anything in the occurrence entity, the occurrence did not get requeued for verification. Fixes https://github.com/BiologicalRecordsCentre/iRecord/issues/820 --- application/models/occurrence.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/models/occurrence.php b/application/models/occurrence.php index bc29932c28..82a7c698f8 100644 --- a/application/models/occurrence.php +++ b/application/models/occurrence.php @@ -129,6 +129,7 @@ public function validate(Validation $array, $save = FALSE) { $metadataFieldChanging = !empty($fields['metadata']) && $fields['metadata']['value'] !== $this->metadata; $identChanging = !empty($fields['taxa_taxon_list_id']) && $fields['taxa_taxon_list_id']['value'] !== $this->metadata; $isAlreadyReviewed = preg_match('/[RDV]/', $this->record_status) || $this->record_substatus === 3; + $sampleUpdating = $this->sample && $this->sample->wantToUpdateMetadata; // Is this post going to change the record status or substatus? if ($newStatus !== $this->record_status || $newSubstatus !== $this->record_substatus) { if ($newStatus === 'V' || $newStatus === 'R') { @@ -143,7 +144,7 @@ public function validate(Validation $array, $save = FALSE) { $array->verified_on = NULL; } } - elseif ($this->wantToUpdateMetadata && $isAlreadyReviewed) { + elseif (($sampleUpdating || $this->wantToUpdateMetadata) && $isAlreadyReviewed) { // We are making a change to a previously reviewed record that doesn't // explicitly set the status. If the change is to the release status // or occurrence metadata field, then we don't do anything, otherwise From 2b011e306eddd4c2ceab5eebdea36d6f47aaf7a3 Mon Sep 17 00:00:00 2001 From: John van Breda Date: Fri, 3 Apr 2020 14:42:21 +0100 Subject: [PATCH 2/2] Version bump --- application/config/version.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/config/version.php b/application/config/version.php index 6b16a0a1d8..9ac972286b 100644 --- a/application/config/version.php +++ b/application/config/version.php @@ -29,14 +29,14 @@ * * @var string */ -$config['version'] = '3.2.1'; +$config['version'] = '3.2.2'; /** * Version release date. * * @var string */ -$config['release_date'] = '2020-03-30'; +$config['release_date'] = '2020-04-03'; /** * Link to the code repository downloads page.