From df0a914d75b8c2963ac186386f0a7f8b976cf495 Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Mon, 1 Jul 2024 12:25:07 +1000 Subject: [PATCH 1/5] revert downloadReasons change --- .../au/org/ala/specieslist/SpeciesListItemController.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-app/controllers/au/org/ala/specieslist/SpeciesListItemController.groovy b/grails-app/controllers/au/org/ala/specieslist/SpeciesListItemController.groovy index 9e7bf075..92b02187 100644 --- a/grails-app/controllers/au/org/ala/specieslist/SpeciesListItemController.groovy +++ b/grails-app/controllers/au/org/ala/specieslist/SpeciesListItemController.groovy @@ -147,7 +147,7 @@ class SpeciesListItemController { distinctCount: queryService.getDistinctCountByParams(requestParams, baseQueryAndParams), hasUnrecognised: noMatchCount > 0, keys: queryService.getSpeciesListKVPKeysByDataResourceUid(requestParams.id), - downloadReasons: null, + downloadReasons: loggerService.getReasons(), users: queryService.getUsersForList(), userId: authService.getUserId(), facets: queryService.generateFacetValues(fqs, baseQueryAndParams, requestParams.id, requestParams.q, maxLengthForFacet), From 4d7672920cd33411a9492c568034a91137d0ebc5 Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Mon, 1 Jul 2024 12:25:50 +1000 Subject: [PATCH 2/5] 5.2.2-SNAPSHOT --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 01c6651b..eba72f46 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ buildscript { - version "5.2.0-SNAPSHOT" + version "5.2.2-SNAPSHOT" group "au.org.ala" } From 3275ea2daeab67d63db1da9b76f5bf0657fc58e4 Mon Sep 17 00:00:00 2001 From: QBai <31238531+qifeng-bai@users.noreply.github.com> Date: Mon, 8 Jul 2024 09:25:20 +1000 Subject: [PATCH 3/5] #309 update 'lastMatched' date of SpeciesList --- .../services/au/org/ala/specieslist/HelperService.groovy | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/grails-app/services/au/org/ala/specieslist/HelperService.groovy b/grails-app/services/au/org/ala/specieslist/HelperService.groovy index 4a6ac8aa..819cc964 100644 --- a/grails-app/services/au/org/ala/specieslist/HelperService.groovy +++ b/grails-app/services/au/org/ala/specieslist/HelperService.groovy @@ -953,6 +953,14 @@ class HelperService { scrollableResults.close() String msg = "${listDRId} [ ${totalRows} ] completed, time cost : ${TimeCategory.minus(new Date(), startProcessing)}" log.info(msg) + + SpeciesList speciesListToUpdate = session.get(SpeciesList.class, speciesList.id) + if (speciesListToUpdate != null) { + speciesListToUpdate.lastMatched = new Date(); + session.update(speciesListToUpdate) + session.flush() + } + message = [status: 0, message: msg] } catch (Exception e) { session.getTransaction().rollback() From eb696aa89e2da3b9b38d5a980d8c5cbecb9ced8e Mon Sep 17 00:00:00 2001 From: hamzajaved-csiro <163800875+hamzajaved-csiro@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:52:16 +1000 Subject: [PATCH 4/5] Keep used kvp values for list (#312) --- .../au/org/ala/specieslist/EditorController.groovy | 8 -------- 1 file changed, 8 deletions(-) diff --git a/grails-app/controllers/au/org/ala/specieslist/EditorController.groovy b/grails-app/controllers/au/org/ala/specieslist/EditorController.groovy index 3c0ebf33..e88b0899 100644 --- a/grails-app/controllers/au/org/ala/specieslist/EditorController.groovy +++ b/grails-app/controllers/au/org/ala/specieslist/EditorController.groovy @@ -165,7 +165,6 @@ class EditorController { if (sli) { // check for changed values def keys = SpeciesListKVP.executeQuery("select distinct key from SpeciesListKVP where dataResourceUid= :dataResourceUid", [dataResourceUid: sli.dataResourceUid]) - def kvpRemoveList = [] as Set def changed = false keys.each { key -> @@ -179,7 +178,6 @@ class EditorController { if (kvp) { // old value was not empty - remove from this SLI sli.removeFromKvpValues(kvp) - kvpRemoveList.add(kvp) sl.lastUploaded = new Date() } @@ -203,12 +201,6 @@ class EditorController { } } - // remove KVP items that have changed (need to do this separately to avoid java.util.ConcurrentModificationException) - kvpRemoveList.each { - log.debug "Removing outdated kvp value: ${it}" - it.delete() - } - //check if name information has changed if (params.rawScientificName.trim() != sli.rawScientificName.trim()) { log.debug "rawScientificName is different: " + params.rawScientificName + " VS " + sli.rawScientificName From 9826382a79f39a349cf64754fcb6ada2269a2c78 Mon Sep 17 00:00:00 2001 From: hamzajaved-csiro <163800875+hamzajaved-csiro@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:52:40 +1000 Subject: [PATCH 5/5] Fix regex condition for urls only (#314) --- grails-app/views/speciesListItem/list.gsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-app/views/speciesListItem/list.gsp b/grails-app/views/speciesListItem/list.gsp index 00f50302..aee0e820 100644 --- a/grails-app/views/speciesListItem/list.gsp +++ b/grails-app/views/speciesListItem/list.gsp @@ -1035,7 +1035,7 @@ - + ${fieldValue(bean: result, field: "rawScientificName")}