Skip to content

Commit

Permalink
Merge pull request #758 from AtlasOfLivingAustralia/dev
Browse files Browse the repository at this point in the history
Preparing 3.8
chrisala authored Jun 21, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 7fa46b4 + a6ffa32 commit 90e21af
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ plugins {
id 'com.craigburke.client-dependencies' version '1.4.0'
}

version "3.7"
version "3.8-SNAPSHOT"
group "au.org.ala"
description "Ecodata"

2 changes: 1 addition & 1 deletion grails-app/domain/au/org/ala/ecodata/ExternalId.groovy
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import groovy.transform.EqualsAndHashCode
@EqualsAndHashCode
class ExternalId implements Comparable {

enum IdType { INTERNAL_ORDER_NUMBER, TECH_ONE_CODE, WORK_ORDER, GRANT_AWARD }
enum IdType { INTERNAL_ORDER_NUMBER, TECH_ONE_CODE, WORK_ORDER, GRANT_AWARD, GRANT_OPPORTUNITY }

static constraints = {
}
Original file line number Diff line number Diff line change
@@ -18,9 +18,9 @@ class ManagementUnitXlsExporter extends TabbedExporter {
List<String> reportProperties = ['reportId', 'reportName', 'reportDescription', 'fromDate', 'toDate', 'financialYear']
List<String> activityHeaders = ['Activity Type','Activity Description','Activity Progress', 'Activity Last Updated' ]
List<String> activityProperties = ['type','description','progress', 'lastUpdated']
List<String> commonActivityHeadersSummary = ["Management Unit ID",'Management Unit Name', 'Report ID', 'Report name', 'Report Description', 'From Date', 'To Date', 'Financial Year', 'Current Report Status', 'Date of status change', 'Changed by']
List<String> commonActivityHeadersSummary = ["Management Unit ID",'Management Unit Name','Management Unit Short ID','Management Unit State', 'Report ID', 'Report name', 'Report Description', 'From Date', 'To Date', 'Financial Year', 'Current Report Status', 'Date of status change', 'Changed by']
List<String> commonActivityHeaders = commonActivityHeadersSummary + activityHeaders
List<String> commonActivityPropertiesSummary = ["managementUnitId",'managementUnitName', REPORT_PREFIX+'reportId', REPORT_PREFIX+'reportName', REPORT_PREFIX+'reportDescription', REPORT_PREFIX+'fromDate', REPORT_PREFIX+'toDate', REPORT_PREFIX+'financialYear', REPORT_PREFIX+'reportStatus', REPORT_PREFIX+'dateChanged', REPORT_PREFIX+'changedBy']
List<String> commonActivityPropertiesSummary = ["managementUnitId",'managementUnitName','managementUnitShortName','managementUnitState', REPORT_PREFIX+'reportId', REPORT_PREFIX+'reportName', REPORT_PREFIX+'reportDescription', REPORT_PREFIX+'fromDate', REPORT_PREFIX+'toDate', REPORT_PREFIX+'financialYear', REPORT_PREFIX+'reportStatus', REPORT_PREFIX+'dateChanged', REPORT_PREFIX+'changedBy']
List<String> commonActivityProperties = commonActivityPropertiesSummary +
activityProperties.collect {
ACTIVITY_DATA_PREFIX+it
@@ -38,6 +38,8 @@ class ManagementUnitXlsExporter extends TabbedExporter {
if (report){
activity['managementUnitId'] = mu.managementUnitId
activity['managementUnitName'] = mu.name
activity['managementUnitShortName'] = mu?.shortName
activity['managementUnitState'] = mu?.geographicInfo?.primaryState

Map reportData = getReportSummaryInfo(report)
reportProperties.each { String prop ->
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ class ManagementUnitXlsExporterSpec extends Specification implements GrailsUnitT

and: "The management unit and report data is included"
List muData = ExportTestUtils.readRow(3, activitySheet).subList(0, managementUnitXlsExporter.commonActivityHeaders.size())
muData == ['mu1', 'Test MU', 'r1', 'Report 1', 'Report 1 description', startDate, endDate, '2020/2021', 'Unpublished (no action – never been submitted)', '', '', 'Core Services Annual Report', 'Core Services Annual Report', 'finished', '2021-08-12T14:00:00Z']
muData == ['mu1', 'Test MU', 'MU01', 'ACT', 'r1', 'Report 1', 'Report 1 description', startDate, endDate, '2020/2021', 'Unpublished (no action – never been submitted)', '', '', 'Core Services Annual Report', 'Core Services Annual Report', 'finished', '2021-08-12T14:00:00Z']

and: "The data in the subsequent rows matches the data in the activity"
List dataRow1 = ExportTestUtils.readRow(3, activitySheet).subList(managementUnitXlsExporter.commonActivityHeaders.size(), headers.size())
@@ -144,7 +144,7 @@ class ManagementUnitXlsExporterSpec extends Specification implements GrailsUnitT

and: "The management unit and report data is included"
List muData = ExportTestUtils.readRow(3, activitySheet).subList(0, managementUnitXlsExporter.commonActivityHeadersSummary.size())
muData == ['mu1', 'Test MU', 'r1', 'Report 1', 'Report 1 description', startDate, endDate, '2020/2021', 'Unpublished (no action – never been submitted)', '', '']
muData == ['mu1', 'Test MU', 'MU01', 'ACT', 'r1', 'Report 1', 'Report 1 description', startDate, endDate, '2020/2021', 'Unpublished (no action – never been submitted)', '', '']

and: "The data in the subsequent rows matches the data in the activity"
List dataRow1 = ExportTestUtils.readRow(3, activitySheet).subList(managementUnitXlsExporter.commonActivityHeadersSummary.size(), headers.size())
@@ -165,6 +165,7 @@ class ManagementUnitXlsExporterSpec extends Specification implements GrailsUnitT
}

private Map managementUnit() {
[name:'Test MU', managementUnitId:'mu1']
Map geoInfo = [primaryState:'ACT']
[name:'Test MU', managementUnitId:'mu1', shortName:'MU01',geographicInfo:geoInfo]
}
}

0 comments on commit 90e21af

Please sign in to comment.