From 63d6e893f4a2ca85d971061f512dce5ffae733f9 Mon Sep 17 00:00:00 2001 From: chrisala Date: Tue, 14 May 2024 13:28:21 +1000 Subject: [PATCH] Fixed locale dependency, remove project name from data set name #942 --- .../au/org/ala/ecodata/ParatooService.groovy | 2 +- .../org/ala/ecodata/ParatooServiceSpec.groovy | 20 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/grails-app/services/au/org/ala/ecodata/ParatooService.groovy b/grails-app/services/au/org/ala/ecodata/ParatooService.groovy index 7a0bd4ef3..ca8709715 100644 --- a/grails-app/services/au/org/ala/ecodata/ParatooService.groovy +++ b/grails-app/services/au/org/ala/ecodata/ParatooService.groovy @@ -196,7 +196,7 @@ class ParatooService { private static String buildName(String protocolId, String displayDate, Project project) { ActivityForm protocolForm = ActivityForm.findByExternalId(protocolId) - String dataSetName = protocolForm?.name + " - " + displayDate + " (" + project.name + ")" + String dataSetName = protocolForm?.name + " - " + displayDate dataSetName } diff --git a/src/test/groovy/au/org/ala/ecodata/ParatooServiceSpec.groovy b/src/test/groovy/au/org/ala/ecodata/ParatooServiceSpec.groovy index 5a4b2d038..d6a5351b3 100644 --- a/src/test/groovy/au/org/ala/ecodata/ParatooServiceSpec.groovy +++ b/src/test/groovy/au/org/ala/ecodata/ParatooServiceSpec.groovy @@ -12,6 +12,9 @@ import org.codehaus.jackson.map.ObjectMapper import org.grails.web.converters.marshaller.json.CollectionMarshaller import org.grails.web.converters.marshaller.json.MapMarshaller +import java.time.format.DateTimeTextProvider +import java.time.temporal.TemporalField + import static grails.async.Promises.waitAll /** * Tests for the ParatooService. @@ -33,6 +36,10 @@ class ParatooServiceSpec extends MongoSpec implements ServiceUnitTest