From 01475424bbd65b909f44395f87a786fda0daa077 Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Mon, 22 Jan 2024 07:04:37 +1000 Subject: [PATCH 1/3] bump version 5.2.0-SNAPSHOT --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3cdf25d0..21dfd783 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ buildscript { - version "5.1.0-SNAPSHOT" + version "5.2.0-SNAPSHOT" group "au.org.ala" } From 7f6af58e4b8e458373826124af578fc0af3a66ef Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Wed, 24 Jan 2024 14:23:20 +1000 Subject: [PATCH 2/3] fix for LookupController --- .../au/org/ala/collectory/LookupController.groovy | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/grails-app/controllers/au/org/ala/collectory/LookupController.groovy b/grails-app/controllers/au/org/ala/collectory/LookupController.groovy index 6c1c02a1..45525215 100644 --- a/grails-app/controllers/au/org/ala/collectory/LookupController.groovy +++ b/grails-app/controllers/au/org/ala/collectory/LookupController.groovy @@ -146,9 +146,9 @@ class LookupController { if (pg) { if (pg.uid[0..1] == 'co') { render collectionService.buildSummary(pg) as JSON - } else if (pg[0..1] == 'in') { + } else if (pg.uid[0..1] == 'in') { render institutionService.buildSummary(pg) as JSON - } else if (pg[0..1] == 'dr') { + } else if (pg.uid[0..1] == 'dr') { render dataResourceService.buildSummary(pg) as JSON } else { render pg.buildSummary() as JSON @@ -164,9 +164,9 @@ class LookupController { domain.list().each { if (it.uid[0..1] == 'co') { list << collectionService.buildSummary(it) - } else if (pg[0..1] == 'in') { + } else if (it.uid[0..1] == 'in') { list << institutionService.buildSummary(it) - } else if (pg[0..1] == 'dr') { + } else if (it.uid[0..1] == 'dr') { list << dataResourceService.buildSummary(it) } else { list << it.buildSummary() @@ -235,9 +235,9 @@ class LookupController { if (instance) { if (instance.uid[0..1] == 'co') { render collectionService.buildSummary(instance) as JSON - } else if (pg[0..1] == 'in') { + } else if (instance.uid[0..1] == 'in') { render institutionService.buildSummary(instance) as JSON - } else if (pg[0..1] == 'dr') { + } else if (instance.uid[0..1] == 'dr') { render dataResourceService.buildSummary(instance) as JSON } else { render instance.buildSummary() as JSON From b8aa17187f671aae136fb5bdf290c26c034c982a Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Tue, 13 Feb 2024 07:22:59 +1000 Subject: [PATCH 3/3] #230 Fix childInstitution fetch --- grails-app/domain/au/org/ala/collectory/Institution.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grails-app/domain/au/org/ala/collectory/Institution.groovy b/grails-app/domain/au/org/ala/collectory/Institution.groovy index d556c1f8..e8f10287 100644 --- a/grails-app/domain/au/org/ala/collectory/Institution.groovy +++ b/grails-app/domain/au/org/ala/collectory/Institution.groovy @@ -104,11 +104,11 @@ class Institution implements ProviderGroup, Serializable { * @return List of Collection */ def listCollections() { - List result = collections.collect {it} + List result = collections.collect { it } if (childInstitutions) { def list = childInstitutions.tokenize(' ') - Collections.createCriteria().list (fetch: [collections: 'join']) { - in ('id', list) + Institution.createCriteria().list(fetch: [collections: 'join']) { + in ('uid', list ) }.each { result.addAll it.listCollections() }