Skip to content

Commit

Permalink
Merge pull request #897 from AtlasOfLivingAustralia/feature/paratoo
Browse files Browse the repository at this point in the history
Feature/paratoo
  • Loading branch information
salomon-j authored Dec 7, 2023
2 parents bde19b1 + eea4fff commit 85d1fd5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion grails-app/services/au/org/ala/ecodata/ParatooService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ParatooService {
static final String PARATOO_APP_NAME = "Monitor"
static final String MONITOR_AUTH_HEADER = "Authorization"
static final List DEFAULT_MODULES =
['Plot Selection and Layout', 'Plot Description']
['Plot Selection and Layout', 'Plot Description', 'Opportune']

GrailsApplication grailsApplication
SettingService settingService
Expand Down Expand Up @@ -422,6 +422,7 @@ class ParatooService {
site.projects = [] // get all projects for the user I suppose - not sure why this isn't in the payload as it's in the UI...
site.type = Site.TYPE_SURVEY_AREA
site.externalIds = [new ExternalId(idType:ExternalId.IdType.MONITOR_PLOT_GUID, externalId:geoJson.properties.externalId)]
site.publicationStatus = PublicationStatus.PUBLISHED // Mark the plot as read only as it is managed by the Monitor app

site
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class OrganisationXlsExporter extends TabbedExporter {
List<String> activityProperties = ['type','description','progress', 'lastUpdated']
List<String> commonActivityHeadersSummary = ["Organisation ID",'Organisation Name','Organisation ABN', '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 = ["organisationId",'organisationName','organisationABN', 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 = ["organisationId",'organisationName','abn', 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class ParatooServiceSpec extends MongoSpec implements ServiceUnitTest<ParatooSer
"uuid":"lmpisy5p9g896lad4ut",
"comment":"Test"]

Map expected = ['name':'CTMAUA2222', 'description':'CTMAUA2222', 'externalIds':[new ExternalId(externalId:'lmpisy5p9g896lad4ut', idType:ExternalId.IdType.MONITOR_PLOT_GUID)], 'notes':'Test', 'extent':['geometry':['type':'Point', 'coordinates':[149.0651439, -35.2592424], 'decimalLatitude':-35.2592424, 'decimalLongitude':149.0651439], 'source':'point'], 'projects':[], 'type':'surveyArea']
Map expected = ['name':'CTMAUA2222', 'description':'CTMAUA2222', publicationStatus:'published', 'externalIds':[new ExternalId(externalId:'lmpisy5p9g896lad4ut', idType:ExternalId.IdType.MONITOR_PLOT_GUID)], 'notes':'Test', 'extent':['geometry':['type':'Point', 'coordinates':[149.0651439, -35.2592424], 'decimalLatitude':-35.2592424, 'decimalLongitude':149.0651439], 'source':'point'], 'projects':[], 'type':'surveyArea']

String userId = 'u1'

Expand Down

0 comments on commit 85d1fd5

Please sign in to comment.