diff --git a/.travis.yml b/.travis.yml index 3857513fb..1866e7e15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,12 @@ language: groovy sudo: false jdk: -- openjdk7 +- openjdk8 branches: only: - master - dev + - grails_2_5_6 services: - mongodb diff --git a/application.properties b/application.properties index 7e7851bd9..eb8a78d65 100644 --- a/application.properties +++ b/application.properties @@ -1,5 +1,5 @@ #Grails Metadata file #Tue Oct 30 15:43:18 AEDT 2018 -app.grails.version=2.4.5 +app.grails.version=2.5.6 app.name=ecodata -app.version=1.44.1 +app.version=1.45-SNAPSHOT \ No newline at end of file diff --git a/grails-app/conf/BootStrap.groovy b/grails-app/conf/BootStrap.groovy index a22ff7bfb..e9af29424 100644 --- a/grails-app/conf/BootStrap.groovy +++ b/grails-app/conf/BootStrap.groovy @@ -1,8 +1,10 @@ import au.org.ala.ecodata.AccessLevel import au.org.ala.ecodata.AuditEventType import au.org.ala.ecodata.GormEventListener +import au.org.ala.ecodata.Hub import au.org.ala.ecodata.Program import grails.converters.JSON +import groovy.json.JsonSlurper import net.sf.json.JSONNull import org.bson.BSON import org.bson.Transformer @@ -18,6 +20,7 @@ class BootStrap { def elasticSearchService def grailsApplication def auditService + def hubService def init = { servletContext -> // Add custom GORM event listener for ES indexing @@ -73,6 +76,13 @@ class BootStrap { JSON.registerObjectMarshaller(JSONNull, {return ""}) + // Setup the default ALA hub if necessary as BioCollect won't load without it. + Hub alaHub = Hub.findByUrlPath('ala') + if (!alaHub) { + Map alaHubData = new JsonSlurper().parseText(getClass().getResourceAsStream("/data/alaHub.json").getText()) + hubService.create(alaHubData) + } + //Add a default project for individual sightings (unless disabled) def individualSightingsProject = au.org.ala.ecodata.Project.findByProjectId(grailsApplication.config.records.default.projectId) if(!individualSightingsProject){ diff --git a/grails-app/conf/BuildConfig.groovy b/grails-app/conf/BuildConfig.groovy index f81084c0e..ae29d1f24 100644 --- a/grails-app/conf/BuildConfig.groovy +++ b/grails-app/conf/BuildConfig.groovy @@ -55,6 +55,8 @@ grails.project.dependency.resolution = { compile 'org.codehaus.jackson:jackson-core-asl:1.9.13' compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13' + compile 'org.mongodb:mongo-java-driver:2.12.3' + compile 'com.twelvemonkeys.imageio:imageio-jpeg:3.3.2' runtime "javax.transaction:jta:1.1" // Required as a side effect of ehcache field walking. diff --git a/grails-app/conf/UrlMappings.groovy b/grails-app/conf/UrlMappings.groovy index 912277325..e2210592c 100644 --- a/grails-app/conf/UrlMappings.groovy +++ b/grails-app/conf/UrlMappings.groovy @@ -170,7 +170,7 @@ class UrlMappings { "/ws/$controller/findByName"{ action = [GET:"findByName"] } - "/"(view:"/index") + "/"(redirect:[controller:"documentation"]) "500"(view:'/error') } } diff --git a/grails-app/conf/data/alaHub.json b/grails-app/conf/data/alaHub.json new file mode 100644 index 000000000..4babac9e6 --- /dev/null +++ b/grails-app/conf/data/alaHub.json @@ -0,0 +1,268 @@ +{ + "adminFacets": [], + "availableFacets": [ + "status", + "organisationFacet" + ], + "availableMapFacets": [ + "status", + "organisationFacet" + ], + "bannerUrl": "", + "content": { + "hideBreadCrumbs": false, + "hideCancelButtonOnForm": false, + "showNote": false, + "hideProjectAndSurvey": false, + "industries": false, + "isContainer": false, + "recordNote": "" + }, + "customBreadCrumbs": [], + "defaultFacetQuery": [ + "isCitizenScience:true" + ], + "defaultProgram": "Citizen Science Projects", + "homePageControllerAndAction": { + "controller": "project", + "action": "citizenScience" + }, + "logoUrl": "", + "pages": { + "allRecords": { + "facets": [ + { + "isNotHistogram": true, + "helpText": "Name of the project", + "facetTermType": "Default", + "formattedName": "Project (projectNameFacet)", + "name": "projectNameFacet", + "interval": 10, + "state": "Expanded", + "title": "Project" + }, + { + "isNotHistogram": true, + "helpText": "Name of survey", + "facetTermType": "Default", + "formattedName": "Survey name (projectActivityNameFacet)", + "name": "projectActivityNameFacet", + "interval": 10, + "state": "Expanded", + "title": "Survey name" + }, + { + "isNotHistogram": true, + "helpText": "Organisations either running projects or associated with projects (eg. as partners).", + "facetTermType": "Default", + "formattedName": "Organisation (organisationNameFacet)", + "name": "organisationNameFacet", + "interval": 10, + "state": "Expanded", + "title": "Organisation" + }, + { + "isNotHistogram": true, + "helpText": "Sighting's scientific name", + "facetTermType": "Default", + "formattedName": "Species name (recordNameFacet)", + "name": "recordNameFacet", + "interval": 10, + "state": "Expanded", + "title": "Species name" + }, + { + "isNotHistogram": true, + "helpText": "User who created the record", + "facetTermType": "Default", + "formattedName": "Owner (userId)", + "name": "userId", + "interval": 10, + "state": "Expanded", + "title": "Owner" + }, + { + "isNotHistogram": true, + "helpText": "Month the sighting was observed", + "facetTermType": "Default", + "formattedName": "Month (surveyMonthFacet)", + "name": "surveyMonthFacet", + "interval": 10, + "state": "Expanded", + "title": "Month" + }, + { + "isNotHistogram": true, + "helpText": "Year the sighting was observed", + "facetTermType": "Default", + "formattedName": "Year (surveyYearFacet)", + "name": "surveyYearFacet", + "interval": 10, + "state": "Expanded", + "title": "Year" + } + ] + }, + "userProjectActivityRecords": { + "facets": [] + }, + "myRecords": { + "facets": [] + }, + "project": { + "facets": [] + }, + "projectFinder": { + "facets": [ + { + "isNotHistogram": true, + "helpText": "Active projects are still running, whereas 'completed' projects have ended and are no longer 'active'", + "facetTermType": "Default", + "formattedName": "Status (status)", + "name": "status", + "interval": 10, + "state": "Collapsed", + "title": "Status" + }, + { + "isNotHistogram": true, + "helpText": "Classifications for citizen science projects to assist decision making for participation", + "facetTermType": "Default", + "formattedName": "Tags (tags)", + "name": "tags", + "interval": 10, + "state": "Expanded", + "title": "Tags" + }, + { + "isNotHistogram": true, + "helpText": "A general level of difficulty for citizen science participation", + "facetTermType": "Default", + "formattedName": "Difficulty (difficulty)", + "name": "difficulty", + "interval": 10, + "state": "Expanded", + "title": "Difficulty" + }, + { + "isNotHistogram": true, + "helpText": "Categories of science which survey-based projects are addressing.", + "facetTermType": "Default", + "formattedName": "Science Type (scienceType)", + "name": "scienceType", + "interval": 10, + "state": "Collapsed", + "title": "Science Type" + }, + { + "isNotHistogram": true, + "helpText": "Countries in which people can participate in the project.", + "facetTermType": "Default", + "formattedName": "Countries (countries)", + "name": "countries", + "interval": 10, + "state": "Collapsed", + "title": "Countries" + }, + { + "isNotHistogram": true, + "helpText": "The continental regions in which projects occur according to the United Nations regional classification scheme.", + "facetTermType": "Default", + "formattedName": "UN Regions (uNRegions)", + "name": "uNRegions", + "interval": 10, + "state": "Collapsed", + "title": "UN Regions" + }, + { + "isNotHistogram": true, + "helpText": "The project catalogue system in which the project is registered.", + "facetTermType": "Default", + "formattedName": "Source System (origin)", + "name": "origin", + "interval": 10, + "state": "Collapsed", + "title": "Source System" + }, + { + "isNotHistogram": true, + "helpText": "Name of the project", + "facetTermType": "Default", + "formattedName": "Contributing Data to ALA (isExternal)", + "name": "isExternal", + "interval": 10, + "state": "Collapsed", + "title": "Contributing Data to ALA" + } + ] + }, + "projectRecords": { + "facets": [] + }, + "myProjectRecords": { + "facets": [] + } + }, + "quickLinks": [], + "skin": "ala2", + "status": "active", + "supportedPrograms": [ + "Citizen Science Projects", + "None" + ], + "templateConfiguration": { + "footer": { + "links": [], + "socials": [], + "type": "" + }, + "header": { + "links": [], + "type": "" + }, + "banner": { + "transitionSpeed": 4000, + "images": [] + }, + "styles": { + "bannerBackgroundColor": "#323334", + "titleTextColor": "#5f5d60", + "bodyBackgroundColor": "#ffffff", + "facetBackgroundColor": "#f5f5f5", + "defaultButtonTextColor": "#000", + "defaultButtonColorActive": "#fff", + "tileBackgroundColor": "#f5f5f5", + "defaultButtonBackgroundColor": "#f5f5f5", + "menuTextColor": "#efefef", + "primaryButtonBackgroundColor": "#009080", + "defaultButtonBackgroundColorActive": "#000", + "wellBackgroundColor": "#f5f5f5", + "navBackgroundColor": "#e5e6e7", + "headerBannerBackgroundColor": "#ffffff", + "hrefColor": "#009080", + "footerBackgroundColor": "#323334", + "breadCrumbBackGroundColour": "", + "navTextColor": "#5f5d60", + "primaryButtonTextColor": "#fff", + "insetTextColor": "", + "menuBackgroundColor": "#009080", + "footerTextColor": "#efefef", + "bodyTextColor": "#637073", + "socialTextColor": "#000", + "insetBackgroundColor": "" + }, + "homePage": { + "homePageConfig": "projectfinder", + "buttonsConfig": { + "buttons": [], + "numberOfColumns": "3" + }, + "projectFinderConfig": { + "defaultView": "grid", + "showProjectRegionSwitch": false + } + } + }, + "title": "BioCollect", + "urlPath": "ala" +} \ No newline at end of file diff --git a/grails-app/controllers/au/org/ala/ecodata/ProjectController.groovy b/grails-app/controllers/au/org/ala/ecodata/ProjectController.groovy index 2b1ba3ce6..9aee300d3 100644 --- a/grails-app/controllers/au/org/ala/ecodata/ProjectController.groovy +++ b/grails-app/controllers/au/org/ala/ecodata/ProjectController.groovy @@ -242,15 +242,38 @@ class ProjectController { def projectMetrics(String id) { - // TODO this is temporarily hardcoded, but we can maybe define a meta model for reporting - // Need to add targets to this also. def p = Project.findByProjectId(id) - boolean approvedOnly = params.getBoolean('approvedOnly') - List scoreIds = params.getList('scoreIds') + boolean approvedOnly = true + boolean targetsOnly = false + boolean includeTargets = true + List scoreIds + Map aggregationConfig = null + + Map paramData = request.JSON + if (!paramData) { + approvedOnly = params.getBoolean('approvedOnly') + scoreIds = params.getList('scoreIds') + targetsOnly = params.getBoolean('targetsOnly') + includeTargets = params.getBoolean('includeTargets', true) + } + else { + + if (paramData.approvedOnly != null) { + approvedOnly = paramData.approvedOnly + } + if (paramData.targetsOnly != null) { + approvedOnly = paramData.targetsOnly + } + if (paramData.includeTargets != null) { + includeTargets = paramData.includeTargets + } + scoreIds = paramData.scoreIds + aggregationConfig = paramData.aggregationConfig + } if (p) { - render projectService.projectMetrics(id, false, approvedOnly, scoreIds) as JSON + render projectService.projectMetrics(id, targetsOnly, approvedOnly, scoreIds, aggregationConfig, includeTargets) as JSON } else { render (status: 404, text: 'No such id') diff --git a/grails-app/controllers/au/org/ala/ecodata/ReportController.groovy b/grails-app/controllers/au/org/ala/ecodata/ReportController.groovy index 77cac85fe..371c1dd15 100644 --- a/grails-app/controllers/au/org/ala/ecodata/ReportController.groovy +++ b/grails-app/controllers/au/org/ala/ecodata/ReportController.groovy @@ -85,6 +85,15 @@ class ReportController { respond reportingService.returnForRework(id, params.comment, params.category) } + @RequireApiKey + def adjust(String id) { + Map params = request.JSON + if (params.comment == JSONObject.NULL) { + params.comment = null + } + respond reportingService.adjust(id, params.comment, params.adjustmentActivityType) + } + @RequireApiKey def runReport() { Map params = request.JSON diff --git a/grails-app/domain/au/org/ala/ecodata/Document.groovy b/grails-app/domain/au/org/ala/ecodata/Document.groovy index e4e2a71c9..4f9a8977f 100644 --- a/grails-app/domain/au/org/ala/ecodata/Document.groovy +++ b/grails-app/domain/au/org/ala/ecodata/Document.groovy @@ -17,13 +17,13 @@ class Document { static final String ALA_IMAGE_SERVER = 'images.ala.org.au' static mapping = { - name index: true projectId index: true siteId index: true activityId index: true projectActivityId index: true outputId index: true organisationId index: true + programId index: true status index: true role index: true version false @@ -47,6 +47,7 @@ class Document { String projectActivityId String outputId String organisationId + String programId String externalUrl Boolean isSciStarter = false String hosted @@ -128,6 +129,7 @@ class Document { siteId nullable: true activityId nullable: true outputId nullable: true + programId nullable: true filename nullable: true dateCreated nullable: true lastUpdated nullable: true diff --git a/grails-app/domain/au/org/ala/ecodata/Report.groovy b/grails-app/domain/au/org/ala/ecodata/Report.groovy index 5dd555b28..8fd7d3426 100644 --- a/grails-app/domain/au/org/ala/ecodata/Report.groovy +++ b/grails-app/domain/au/org/ala/ecodata/Report.groovy @@ -21,6 +21,12 @@ class Report { */ public static final String TYPE_ACTIVITY = 'Activity' + /** + * An adjustment report is created to amend the values entered into a submitted report without requiring the + * report to have approvals withdrawn and the report edited. + */ + public static final String TYPE_ADJUSTMENT = 'Adjustment' + ObjectId id /** UUID for this report */ @@ -75,6 +81,10 @@ class Report { Date dateReturned /** The user ID of the grant manager who returned this Report */ String returnedBy + /** The Date the report adjustment was initiated */ + Date dateAdjusted + /** The user ID of the grant manager who initiated the adjustment for this Report */ + String adjustedBy /** Number of days before (-ve) or after the due date the report was submitted. Calculated at submit time to make reporting easier. */ Integer submissionDeltaInWeekdays /** Number of days after a report is submitted that it's approved. Calculated at approval time to make reporting easier. */ @@ -83,6 +93,9 @@ class Report { /** REPORT_NOT_APPROVED, REPORT_SUBMITTED, REPORT_APPROVED */ String publicationStatus = REPORT_NOT_APPROVED + /** Only non-null for reports of type 'Adjustment' - references the id of the Report that the adjustment applies to */ + String adjustedReportId + /** active, deleted */ String status = 'active' @@ -112,10 +125,18 @@ class Report { } public boolean isSubmittedOrApproved() { - return publicationStatus == REPORT_SUBMITTED || + return publicationStatus == REPORT_SUBMITTED || publicationStatus == REPORT_APPROVED } + public boolean isApproved() { + return publicationStatus == REPORT_APPROVED + } + + public boolean isAdjusted() { + return dateAdjusted != null + } + public boolean isActivityReport() { return type == TYPE_ACTIVITY } @@ -157,6 +178,18 @@ class Report { dateReturned = change.dateChanged } + public void adjust(String userId, String comment, Date changeDate = new Date()) { + + if (!isApproved() || isAdjusted()) { + throw new IllegalArgumentException("Only approved reports can be adjusted") + } + StatusChange change = changeStatus(userId, 'adjusted', changeDate, comment) + + publicationStatus = REPORT_APPROVED + adjustedBy = change.changedBy + dateAdjusted = change.dateChanged + } + private StatusChange changeStatus(String userId, String status, Date changeDate = new Date(), String comment = '', String category = '') { StatusChange change = new StatusChange(changedBy:userId, dateChanged: changeDate, status: status, comment: comment, category:category) statusChangeHistory << change @@ -180,6 +213,8 @@ class Report { approvedBy nullable:true dateReturned nullable:true returnedBy nullable:true + adjustedBy nullable:true + dateAdjusted nullable:true projectId nullable:true dueDate nullable:true organisationId nullable:true @@ -194,10 +229,28 @@ class Report { activityType nullable:true type nullable:false category nullable:true + adjustedReportId nullable:true, validator: { value, report -> + // Adjustment reports must reference another report + if (report.type == TYPE_ADJUSTMENT) { + if (value == null) { + return 'nullable' + } + } + else { + if (value != null) { + return 'nullable' + } + } + } } static embedded = ['statusChangeHistory'] static mapping = { + reportId index: true + projectId index: true + adjustedReportId index: true + programId index: true + version false } diff --git a/grails-app/i18n/messages.properties b/grails-app/i18n/messages.properties index 0961d4a2d..18ec21ab9 100644 --- a/grails-app/i18n/messages.properties +++ b/grails-app/i18n/messages.properties @@ -302,5 +302,6 @@ organisation.name.unique=The name you have used is already in use by another org report.type.immutable = Changing the type of a report is not supported report.activity.creationFailed = Failed to create an activity for the report {0} report.cannotUpdateSubmittedOrApprovedReport = Submitted or approved reports cannot be modified +report.adjustment.invalid = Report {0} cannot be adjusted projectAcitivity.attribution={0}. ({1}) {2} dataset download. Retrieved from {3}. {4}. \ No newline at end of file diff --git a/grails-app/services/au/org/ala/ecodata/LockService.groovy b/grails-app/services/au/org/ala/ecodata/LockService.groovy index 5a33c9530..204af9f6f 100644 --- a/grails-app/services/au/org/ala/ecodata/LockService.groovy +++ b/grails-app/services/au/org/ala/ecodata/LockService.groovy @@ -84,7 +84,7 @@ class LockService { def user = userService.getCurrentUserDetails() boolean unlocked = false - if (force || user?.userId == lock.userId) { + if (lock && (force || user?.userId == lock.userId)) { unlocked = lock.delete(flush:true) } diff --git a/grails-app/services/au/org/ala/ecodata/ProjectService.groovy b/grails-app/services/au/org/ala/ecodata/ProjectService.groovy index 4d37694d5..806749b51 100644 --- a/grails-app/services/au/org/ala/ecodata/ProjectService.groovy +++ b/grails-app/services/au/org/ala/ecodata/ProjectService.groovy @@ -419,10 +419,10 @@ class ProjectService { * Returns the reportable metrics for a project as determined by the project output targets and activities * that have been undertaken. * @param id identifies the project. - * @return a Map containing the aggregated results. TODO document me better, but it is likely this structure will change. + * @return a Map containing the aggregated results. * */ - def projectMetrics(String id, targetsOnly = false, approvedOnly = false, List scoreIds = null) { + def projectMetrics(String id, targetsOnly = false, approvedOnly = false, List scoreIds = null, Map aggregationConfig = null, boolean includeTargets = true) { def p = Project.findByProjectId(id) if (p) { def project = toMap(p, ProjectService.FLAT) @@ -438,35 +438,37 @@ class ProjectService { toAggregate = targetsOnly ? Score.findAllByIsOutputTarget(true) : Score.findAll() } - def outputSummary = reportService.projectSummary(id, toAggregate, approvedOnly) + List outputSummary = reportService.projectSummary(id, toAggregate, approvedOnly, aggregationConfig) // Add project output target information where it exists. - - project.outputTargets?.each { target -> - // Outcome targets are text only and not mapped to a score. - if (target.outcomeTarget != null) { - return - } - def result = outputSummary.find { it.scoreId == target.scoreId } - if (result) { - if (!result.target || result.target == "0") { - // Workaround for multiple outputs inputting into the same score. Need to update how scores are defined. - result.target = target.target + if (includeTargets) { + project.outputTargets?.each { target -> + // Outcome targets are text only and not mapped to a score. + if (target.outcomeTarget != null) { + return } + def result = outputSummary.find { it.scoreId == target.scoreId } + if (result) { + if (!result.target || result.target == "0") { + // Workaround for multiple outputs inputting into the same score. Need to update how scores are defined. + result.target = target.target + } - } else { - // If there are no Outputs recorded containing the score, the results won't be returned, so add - // one in containing the target. - def score = toAggregate.find { it.scoreId == target.scoreId } - if (score) { - outputSummary << [scoreId:score.scoreId, label: score.label, target: target.target, isOutputTarget:score.isOutputTarget, description: score.description, outputType:score.outputType, category:score.category] } else { - // This can happen if the meta-model is changed after targets have already been defined for a project. - // Once the project output targets are re-edited and saved, the old targets will be deleted. - log.warn "Can't find a score for existing output target: $target.outputLabel $target.scoreLabel, projectId: $project.projectId" + // If there are no Outputs recorded containing the score, the results won't be returned, so add + // one in containing the target. + def score = toAggregate.find { it.scoreId == target.scoreId } + if (score) { + outputSummary << [scoreId:score.scoreId, label: score.label, target: target.target, isOutputTarget:score.isOutputTarget, description: score.description, outputType:score.outputType, category:score.category] + } else { + // This can happen if the meta-model is changed after targets have already been defined for a project. + // Once the project output targets are re-edited and saved, the old targets will be deleted. + log.warn "Can't find a score for existing output target: $target.outputLabel $target.scoreLabel, projectId: $project.projectId" + } } } } + return outputSummary } else { def error = "Error retrieving metrics for project - no such id ${id}" diff --git a/grails-app/services/au/org/ala/ecodata/ReportService.groovy b/grails-app/services/au/org/ala/ecodata/ReportService.groovy index 2a5ffef93..17c002850 100644 --- a/grails-app/services/au/org/ala/ecodata/ReportService.groovy +++ b/grails-app/services/au/org/ala/ecodata/ReportService.groovy @@ -25,11 +25,6 @@ class ReportService { Score.findAllByScoreIdInList(scoreIds) } - - def findScoresByCategory(String category) { - Score.findAllByCategory(category) - } - def runActivityReport(String searchTerm, List filters, Map reportConfig, boolean approvedActivitiesOnly) { AggregatorIf aggregator = new AggregatorFactory().createAggregator(reportConfig) @@ -90,7 +85,7 @@ class ReportService { def aggregate(List filters, String searchTerm, List toAggregate, topLevelGrouping = null, boolean approvedActivitiesOnly = true) { - GroupingAggregationConfig topLevelConfig = aggregationConfigFromScores(toAggregate, topLevelGrouping) + AggregationConfig topLevelConfig = aggregationConfigFromScores(toAggregate, topLevelGrouping) AggregatorIf aggregator = new AggregatorFactory().createAggregator(topLevelConfig) @@ -127,7 +122,7 @@ class ReportService { processedOutputData } - private GroupingAggregationConfig aggregationConfigFromScores(List scores = null, Map topLevelGrouping = null) { + private AggregationConfig aggregationConfigFromScores(List scores = null, Map topLevelGrouping = null) { if (!scores) { scores = Score.findAll() } @@ -137,80 +132,15 @@ class ReportService { it.configuration } GroupingConfig topLevelGroupingConfig = new GroupingConfig(topLevelGrouping?:[:]) - new GroupingAggregationConfig(childAggregations: config, groups:topLevelGroupingConfig) - } - - private def outputType(List scores) { - def result = scores.find{it.score.outputName != 'Output Details'}?.score?.outputName - if (!result) { - result = scores[0].score.outputName - } - - result - } - - - private def generateScores(List> toAggregate, Map topLevelGrouping = null) { - - Map groupedScores = toAggregate.groupBy { it.score.label } AggregationConfig aggregationConfig - groupedScores.collect { label, scores -> - - List config = scores.collect {configFor(it.score)} - if (config.size() > 1) { - aggregationConfig = new CompositeAggregationConfig(childAggregations: config, label:label) - } - else { - aggregationConfig = config[0] - } - - [ - label:label, - description:scores[0].score.description, - config:aggregationConfig, - isOutputTarget:scores[0].score.isOutputTarget, - category:scores[0].score.category, - outputType:outputType(scores), - displayType:scores[0].score.displayType, - entity:Activity.class.name, - entityTypes:scores.collect{it.activities}.flatten() - - ] + if (topLevelGrouping?.filterValue) { + aggregationConfig = new FilteredAggregationConfig(childAggregations: config, filter:topLevelGroupingConfig) } - - } - - private AggregationConfig configFor(au.org.ala.ecodata.reporting.Score score) { - AggregationConfig aggregationConfig - - String property = 'data.' - if (score.listName) { - property+=score.listName+'.' - } - property+=score.name - - Aggregation aggregation = new Aggregation([type: score.aggregationType?.name(), property: property, label:score.label]) - if (score.filterBy) { - Map groupingProperties = score.defaultGrouping() - aggregationConfig = new FilteredAggregationConfig( - label: score.label, - childAggregations: [aggregation], - filter: new GroupingConfig([property: groupingProperties.property, filterValue: groupingProperties.filterBy, type: groupingProperties.type])) - } else if (score.groupBy) { - Map groupingProperties = score.defaultGrouping() - aggregationConfig = new GroupingAggregationConfig( - label: score.label, - childAggregations: [aggregation], - groups: new GroupingConfig([property: groupingProperties.property, type: groupingProperties.type])) - } else { - aggregationConfig = aggregation + else { + aggregationConfig = new GroupingAggregationConfig(childAggregations: config, groups:topLevelGroupingConfig) } - // All scores need to be filtered by output - GroupingConfig outputFilter = new GroupingConfig(property: 'name', filterValue: score.outputName, type:'filter') - FilteredAggregationConfig filteredConfig = new FilteredAggregationConfig([label:score.label, filter:outputFilter, childAggregations:[aggregationConfig]]) - - filteredConfig + aggregationConfig } private def aggregateActivity (AggregatorIf aggregator, Map activity) { @@ -242,11 +172,11 @@ class ReportService { * @param aggregationSpec defines the scores to be aggregated and if any grouping needs to occur. * [{score:{name: , units:, aggregationType}, groupBy: {entity: , property: String }, ...] * - * @return the results of the aggregration. The results will be an array of maps, the structure of each Map is + * @return the results of the aggregration. The results will be a List of Maps, the structure of each Map is * described in @see au.org.ala.ecodata.reporting.Aggregation.results() * */ - def projectSummary(String projectId, List aggregationSpec, boolean approvedActivitiesOnly = false) { + List projectSummary(String projectId, List aggregationSpec, boolean approvedActivitiesOnly = false, Map topLevelAggregationConfig = null) { // We definitely could be smarter about this query - only getting activities with outputs of particular @@ -256,7 +186,7 @@ class ReportService { activities = activities.findAll{it.publicationStatus == 'published'} } - AggregationConfig aggregationConfig = aggregationConfigFromScores(aggregationSpec) + AggregationConfig aggregationConfig = aggregationConfigFromScores(aggregationSpec, topLevelAggregationConfig) AggregatorIf aggregator = new AggregatorFactory().createAggregator(aggregationConfig) activities.each { activity -> @@ -265,7 +195,10 @@ class ReportService { GroupedAggregationResult allResults = aggregator.result() - return postProcessOutputData(allResults.groups[0]?.results?:[], aggregationSpec) + allResults.groups.each { group -> + group?.results = postProcessOutputData(allResults.groups[0]?.results?:[], aggregationSpec) + } + return topLevelAggregationConfig ? allResults.groups : allResults.groups[0]?.results } def outputTargetReport(List filters, String searchTerm = null) { diff --git a/grails-app/services/au/org/ala/ecodata/ReportingService.groovy b/grails-app/services/au/org/ala/ecodata/ReportingService.groovy index cf148930b..944eee4bf 100644 --- a/grails-app/services/au/org/ala/ecodata/ReportingService.groovy +++ b/grails-app/services/au/org/ala/ecodata/ReportingService.groovy @@ -234,6 +234,60 @@ class ReportingService { return r } + /** + * A report adjustment can be performed to modify the results of an approved report via the creation of + * another report that contributes to the same scores as the original report. This is sometimes required in + * MERIT if changes need to be made after a report has been approved and the original report is for some + * reason unable to have the approval withdrawn and the data updated via the standard workflow. + * This routine adds a status change to the report to indicate the adjustment and also creates a new + * report of the supplied type to record the required adjustments. + * + * @param id the reportId of the report that needs to be adjusted. + * @param comment the reason for the adjustment + * @param adjustmentActivityType the type of activity to be associated with the adjustment report that is to be created. + * @return the new adjustment report, or the original report if it is unable to be adjusted + */ + Report adjust(String id, String comment = '', String adjustmentActivityType) { + def user = userService.getCurrentUserDetails() + Report toAdjust = get(id) + if (!toAdjust) { + return null + } + + if (toAdjust.type == Report.TYPE_ADJUSTMENT || toAdjust.isAdjusted() || !toAdjust.isApproved()) { + toAdjust.errors.reject('report.adjustment.invalid', toAdjust.name) + return toAdjust + } + + Report adjustmentReport = null + if (toAdjust.type != Report.TYPE_ADJUSTMENT && toAdjust.dateAdjusted == null) { + + Map adjustmentReportProps = [ + name : "Adjustment: " + toAdjust.name, + description : "Adjustment: " + toAdjust.description, + fromDate : toAdjust.fromDate, + toDate : toAdjust.toDate, + type : Report.TYPE_ADJUSTMENT, + adjustedReportId: toAdjust.reportId, + category : "Adjustments", + activityType : adjustmentActivityType, + projectId : toAdjust.projectId, + programId : toAdjust.programId, + organisationId : toAdjust.organisationId, + submissionDate : toAdjust.submissionDate + ] + adjustmentReport = create(adjustmentReportProps) + + if (!adjustmentReport.hasErrors()) { + + toAdjust.adjust(user.userId, comment) + toAdjust.save() + } + } + + return adjustmentReport + } + /** * @param criteria a Map of property name / value pairs. Values may be primitive types or arrays. * Multiple properties will be ANDed together when producing results. diff --git a/models/programs-model.json b/models/programs-model.json index 85b46a1b3..3620a4915 100644 --- a/models/programs-model.json +++ b/models/programs-model.json @@ -129,6 +129,62 @@ "speciesFieldsSettings": null, "optionalProjectContent": ["MERI Plan"], "startDate": "" + }, + { + "weekDaysToCompleteReport": 0, + "themes": [], + "reportingPeriod": "6", + "projectDatesContracted": false, + "endDate": "", + "activities": [ + "Indigenous Employment and Businesses", + "Outcomes, Evaluation and Learning - final report", + "Project Administration", + "Progress, Outcomes and Learning - stage report", + "Fauna Survey - general", + "Flora Survey - general", + "Pest Animal Survey", + "Plant Survival Survey", + "Site Monitoring Plan", + "Water Quality Survey", + "Weed Mapping & Monitoring", + "Vegetation Assessment - Commonwealth government methodology", + "Vegetation Assessment - Habitat Hectares v2 (VIC)", + "TasVeg - Native Vegetation Assessment - Forest Vegetation", + "Community Participation and Engagement", + "Debris Removal", + "Disease Management", + "Erosion Management", + "Fencing", + "Conservation Grazing Management", + "Ecological Fire Management", + "Heritage Conservation", + "Management Plan Development", + "Management Practice Change", + "Conservation Actions for Species and Communities", + "Pest Management", + "Plant Propagation", + "Public Access and Infrastructure", + "Research", + "Revegetation", + "Site Preparation", + "Seed Collection", + "Water Management", + "Weed Treatment", + "Works Planning and Risk", + "Indigenous Knowledge Transfer", + "Training and Skills Development", + "Fire Management" + ], + "name": "Round 1 ext", + "speciesFieldsSettings": null, + "optionalProjectContent": [ + "Risks and Threats", + "MERI Plan" + ], + "overridesProgramData": true, + "reportingPeriodAlignedToCalendar": true, + "startDate": "" } ], "reportingPeriodAlignedToCalendar": true, @@ -349,7 +405,6 @@ "name": "Green Army Round 1", "speciesFieldsSettings": null, "optionalProjectContent": [], - "overridesProgramData": false, "startDate": "2014-06-30T14:00:00Z" }, { @@ -481,8 +536,8 @@ "Multiple Sightings", "Aerial fauna survey - distance sampler method", "2-ha Track Plot Datasheet", - "General Weed Monitoring", - "Flying Fox Survey" + "Site Monitoring Plan", + "General Weed Monitoring" ], "name": "None", "speciesFieldsSettings": null, @@ -528,7 +583,8 @@ "Works Planning and Risk", "Indigenous Knowledge Transfer", "Training and Skills Development", - "Vegetation Assessment - Commonwealth government methodology" + "Vegetation Assessment - Commonwealth government methodology", + "Post revegetation site management" ], "name": "National Landcare Programme", "speciesFieldsSettings": null, @@ -692,7 +748,6 @@ "Training and Skills Development", "Vegetation Assessment - Commonwealth government methodology", "Community Grants", - "Regional Funding Final Report KEQ", "Regional Funding Final Report", "Stage Report" ], @@ -769,12 +824,57 @@ "startDate": "" }, { + "weekDaysToCompleteReport": 0, "themes": [], + "reportingPeriod": "6", + "projectDatesContracted": true, "endDate": "", - "activities": [], + "activities": [ + "Indigenous Employment and Businesses", + "Outcomes, Evaluation and Learning - final report", + "Project Administration", + "Progress, Outcomes and Learning - stage report", + "Fauna Survey - general", + "Flora Survey - general", + "Pest Animal Survey", + "Plant Survival Survey", + "Site Monitoring Plan", + "Water Quality Survey", + "Weed Mapping & Monitoring", + "Community Participation and Engagement", + "Debris Removal", + "Disease Management", + "Erosion Management", + "Fencing", + "Conservation Grazing Management", + "Fire Management", + "Heritage Conservation", + "Management Plan Development", + "Management Practice Change", + "Conservation Actions for Species and Communities", + "Pest Management", + "Plant Propagation", + "Public Access and Infrastructure", + "Research", + "Revegetation", + "Seed Collection", + "Site Preparation", + "Water Management", + "Weed Treatment", + "Works Planning and Risk", + "Indigenous Knowledge Transfer", + "Training and Skills Development", + "Vegetation Assessment - Commonwealth government methodology", + "Post revegetation site management" + ], "name": "20 Million Trees Service Providers Tranche 1", "speciesFieldsSettings": null, - "optionalProjectContent": [], + "optionalProjectContent": [ + "MERI Plan", + "Risks and Threats" + ], + "overridesProgramData": true, + "reportingPeriodAlignedToCalendar": true, "startDate": "" }, { @@ -895,12 +995,57 @@ "startDate": "" }, { + "weekDaysToCompleteReport": 0, "themes": [], + "reportingPeriod": "6", + "projectDatesContracted": true, "endDate": "", - "activities": [], + "activities": [ + "Indigenous Employment and Businesses", + "Outcomes, Evaluation and Learning - final report", + "Project Administration", + "Progress, Outcomes and Learning - stage report", + "Fauna Survey - general", + "Flora Survey - general", + "Pest Animal Survey", + "Plant Survival Survey", + "Site Monitoring Plan", + "Water Quality Survey", + "Weed Mapping & Monitoring", + "Community Participation and Engagement", + "Debris Removal", + "Disease Management", + "Erosion Management", + "Fencing", + "Conservation Grazing Management", + "Fire Management", + "Heritage Conservation", + "Management Plan Development", + "Management Practice Change", + "Conservation Actions for Species and Communities", + "Pest Management", + "Plant Propagation", + "Public Access and Infrastructure", + "Research", + "Revegetation", + "Seed Collection", + "Site Preparation", + "Water Management", + "Weed Treatment", + "Works Planning and Risk", + "Indigenous Knowledge Transfer", + "Training and Skills Development", + "Vegetation Assessment - Commonwealth government methodology", + "Post revegetation site management" + ], "name": "20 Million Trees Service Providers Tranche 3", "speciesFieldsSettings": null, - "optionalProjectContent": [], + "optionalProjectContent": [ + "MERI Plan", + "Risks and Threats" + ], + "overridesProgramData": true, + "reportingPeriodAlignedToCalendar": false, "startDate": "" } ], @@ -1022,6 +1167,15 @@ "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Reef Trust Phase 6 Investment", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" } ], "reportingPeriodAlignedToCalendar": true, @@ -1062,30 +1216,87 @@ "Flying Fox Survey", "Pollinator Sighting", "VNPA ReefWatch Survey", + "Post Biodiversity-works Site Monitoring Methodology", + "WarrumbungleSnap", + "Steaming to Success", "Seagrass Bed Monitoring", "Koala Count - South Australia", - "Intertidal Reef Survey", "Sea Search - Seagrass Bed Monitoring", "Sea Search - Intertidal Reef Survey", - "Sea Search - Fixed Photo Points", "General Seed Collection Activity", - "Logan Fauna Sightings", "General Fauna Sightings v1", - "TasVeg - Native Vegetation Assessment - Forest Vegetation", + "General Flora Sightings v1", + "NT Systematic Terrestrial Fauna Survey", + "North Sydney Wildlife Watch", + "North Sydney Wildlife Watch - Multi-species", + "Dunewatch Activity Summary", + "Dunewatch Survey - Emery Method", + "Dunewatch - Human Impact Survey", + "Dunewatch Flora Survey", + "Dunewatch Fauna Survey", + "Dunewatch - Human Impact Assessment", + "Nest Box Monitoring", + "EPA Water Quality and Illegal Dumping", + "Sea Search - Sea Search Patrol", "Local Species Inventory", - "Frog Test", + "General Multi-species Sightings - Alternate format v2", + "Bird Survey - Curl Curl", + "Wolli Creek Birdos - Current Surveys", + "Wolli Creek Birdos - CBOC Observations", + "Wolli Creek Birdos - Neil Rankin observations", + "Environmental Assets Register", + "Single Species Weed Monitoring Form", + "Tropical Butterfly Sightings", "Mapping Butterflies and Host Vines", - "Froglet Calls", - "Weed Biological Control - Agent Record - Non cane rust and fungi agents", - "Weed Biological Control - Agent Record - Insect agents", - "Weed Biological Control - Agent Record - Target species with canes", + "Froglet calls", "Echidna CSI", + "Redlands Weed Spotter", "Bird Survey - SAMD", "Bat Survey - SAMD", + "Cape York Incidental Sightings", + "Cape York Terrestrial Fauna Survey", + "Dieback Observation", "Echidna CSI - Sample collection", - "Wild Macadamia Survey", + "Sea Search - Fixed Photo Points", + "Sea Search - Seagrass Boundary Mapping", "Sea Search - Image Library", - "Ray and Sharks Survey" + "MEGA Bat project - SAMD", + "Goanna Watch - Discovery Circle", + "Bird Survey - Western Sydney", + "Echidna CSI - Other evidence", + "Urban Bird Movements Research", + "Urban Bird Movements Research - Incidental Sighting", + "Urban Bird Movements Research - Systematic Survey", + "Significant Trees v2", + "Wild Macadamia Survey", + "Fungi Research", + "Western Ringtail Possum Reporting", + "Blue Mountains WHI - Boardwalk Transect", + "Blue Mountains WHI - Photo Points", + "Blue Mountains WHI - Camera Traps", + "Single Sighting - optional photo", + "Single Sighting - verification + optional photo ", + "Ray and Shark Monitoring Survey", + "1000m transect x 8 quadrat bird survey", + "Single Bird Sighting with additional information", + "Dung Beetle Monitoring", + "Raptor Nest Monitoring (ver. 2.0)", + "Single Sighting - verification + mandatory photo", + "Water Quality Survey - with map", + "Simple Weed Sighting", + "ACT Waterwatch - Water Quality Monitoring", + "ACT Waterwatch - Water Bug Survey", + "Rapid Appraisal of Riparian Condition (RARC)", + "Tree Dieback Survey - WSU", + "Single Sighting - verification + optional photo", + "Single Sighting - verification - optional photo", + "Koala Survey - Whitsundays", + "Beach Sand Photo Point Monitoring", + "Fitzroy Turtle Monitoring", + "Outback Waterholes", + "Elm Leaf Beetle Survey", + "Beach Sand Photo Point Monitoring v2", + "Beach Sand Photo Point monitoring v3" ], "name": "Citizen Science Projects", "speciesFieldsSettings": null, @@ -1109,44 +1320,44 @@ "reportingPeriod": "3", "projectDatesContracted": true, "activities": [ - "ESP Overview", - "ESP PMU or Zone reporting", - "ESP SMU Reporting" + "Indigenous Employment and Businesses", + "Outcomes, Evaluation and Learning - final report", + "Project Administration", + "Progress, Outcomes and Learning - stage report", + "Fauna Survey - general", + "Flora Survey - general", + "Pest Animal Survey", + "Plant Survival Survey", + "Site Monitoring Plan", + "Water Quality Survey", + "Weed Mapping & Monitoring", + "Vegetation Assessment - Commonwealth government methodology", + "Community Participation and Engagement", + "Debris Removal", + "Disease Management", + "Erosion Management", + "Fencing", + "Conservation Grazing Management", + "Fire Management", + "Heritage Conservation", + "Management Plan Development", + "Management Practice Change", + "Conservation Actions for Species and Communities", + "Pest Management", + "Plant Propagation", + "Public Access and Infrastructure", + "Research", + "Revegetation", + "Seed Collection", + "Site Preparation", + "Water Management", + "Weed Treatment", + "Works Planning and Risk", + "Indigenous Knowledge Transfer", + "Training and Skills Development" ], "name": "Environmental Stewardship", - "speciesFieldsSettings": { - "surveysConfig": [{ - "speciesFields": [ - { - "output": "ESP Weed management", - "dataFieldName": "species", - "context": "", - "label": "Species:", - "config": { - "speciesLists": [{"dataResourceUid": "dr7394"}], - "type": "GROUP_OF_SPECIES", - "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" - } - }, - { - "output": "ESP Feral animal management", - "dataFieldName": "species", - "context": "", - "label": "Species:", - "config": { - "speciesLists": [{"dataResourceUid": "dr7484"}], - "type": "GROUP_OF_SPECIES", - "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" - } - } - ], - "name": "ESP PMU or Zone reporting" - }], - "defaultSpeciesConfig": { - "type": "ALL_SPECIES", - "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" - } - }, + "speciesFieldsSettings": null, "subprograms": [ { "themes": [], @@ -1155,7 +1366,7 @@ "name": "Environmental Stewardship 1318", "speciesFieldsSettings": null, "optionalProjectContent": [], - "reportingPeriodAlignedToCalendar": true, + "overridesProgramData": false, "startDate": "" }, { @@ -1165,59 +1376,6 @@ "name": "Environmental Stewardship 1319", "speciesFieldsSettings": null, "optionalProjectContent": [], - "overridesProgramData": false, - "startDate": "" - }, - { - "reportingPeriod": "12", - "projectDatesContracted": true, - "endDate": "", - "speciesFieldsSettings": { - "surveysConfig": [{ - "speciesFields": [ - { - "output": "ESP Weed management", - "dataFieldName": "species", - "context": "", - "label": "Species:", - "config": { - "speciesLists": [{"dataResourceUid": "dr7394"}], - "type": "GROUP_OF_SPECIES", - "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" - } - }, - { - "output": "ESP Feral animal management", - "dataFieldName": "species", - "context": "", - "label": "Species:", - "config": { - "speciesLists": [{"dataResourceUid": "dr7484"}], - "type": "GROUP_OF_SPECIES", - "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" - } - } - ], - "name": "ESP PMU or Zone reporting" - }], - "defaultSpeciesConfig": { - "type": "ALL_SPECIES", - "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" - } - }, - "projectTemplate": "esp", - "weekDaysToCompleteReport": 0, - "themes": [], - "activities": [ - "ESP Overview", - "ESP PMU or Zone reporting", - "ESP SMU Reporting", - "ESP Optional Reporting" - ], - "name": "ESP Test", - "optionalProjectContent": [], - "overridesProgramData": true, - "reportingPeriodAlignedToCalendar": true, "startDate": "" }, { @@ -1296,10 +1454,7 @@ "ESP Species" ], "name": "LMCW1", - "optionalProjectContent": [ - "Risks and Threats", - "MERI Plan" - ], + "optionalProjectContent": [], "overridesProgramData": true, "reportingPeriodAlignedToCalendar": false, "startDate": "" @@ -1380,10 +1535,7 @@ "ESP Species" ], "name": "LHQS-QLD", - "optionalProjectContent": [ - "Risks and Threats", - "MERI Plan" - ], + "optionalProjectContent": [], "overridesProgramData": true, "reportingPeriodAlignedToCalendar": false, "startDate": "" @@ -1464,10 +1616,7 @@ "ESP Species" ], "name": "LM1", - "optionalProjectContent": [ - "Risks and Threats", - "MERI Plan" - ], + "optionalProjectContent": [], "overridesProgramData": true, "reportingPeriodAlignedToCalendar": false, "startDate": "" @@ -1548,10 +1697,7 @@ "ESP Species" ], "name": "LM2", - "optionalProjectContent": [ - "Risks and Threats", - "MERI Plan" - ], + "optionalProjectContent": [], "overridesProgramData": true, "reportingPeriodAlignedToCalendar": false, "startDate": "" @@ -1632,10 +1778,7 @@ "ESP Species" ], "name": "MEC1", - "optionalProjectContent": [ - "Risks and Threats", - "MERI Plan" - ], + "optionalProjectContent": [], "overridesProgramData": true, "reportingPeriodAlignedToCalendar": false, "startDate": "" @@ -1797,10 +1940,88 @@ "ESP Species" ], "name": "LHQS-NSW", - "optionalProjectContent": [ - "Risks and Threats", - "MERI Plan" + "optionalProjectContent": [], + "overridesProgramData": true, + "reportingPeriodAlignedToCalendar": false, + "startDate": "" + }, + { + "reportingPeriod": "12", + "projectDatesContracted": true, + "endDate": "", + "speciesFieldsSettings": { + "surveysConfig": [ + { + "speciesFields": [ + { + "output": "ESP Weed management", + "dataFieldName": "species", + "context": "", + "label": "Species:", + "config": { + "speciesLists": [{"dataResourceUid": "dr7394"}], + "type": "GROUP_OF_SPECIES", + "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" + } + }, + { + "output": "ESP Feral animal management", + "dataFieldName": "species", + "context": "", + "label": "Species:", + "config": { + "speciesLists": [{"dataResourceUid": "dr7484"}], + "type": "GROUP_OF_SPECIES", + "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" + } + } + ], + "name": "ESP PMU or Zone reporting" + }, + { + "speciesFields": [ + { + "output": "ESP Weed management", + "dataFieldName": "species", + "context": "", + "label": "Species:", + "config": { + "speciesLists": [{"dataResourceUid": "dr7394"}], + "type": "GROUP_OF_SPECIES", + "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" + } + }, + { + "output": "ESP Feral animal management", + "dataFieldName": "species", + "context": "", + "label": "Species:", + "config": { + "speciesLists": [{"dataResourceUid": "dr7484"}], + "type": "GROUP_OF_SPECIES", + "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" + } + } + ], + "name": "ESP SMU Reporting" + } + ], + "defaultSpeciesConfig": { + "type": "ALL_SPECIES", + "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" + } + }, + "projectTemplate": "esp", + "weekDaysToCompleteReport": 0, + "themes": [], + "activities": [ + "ESP SMU Reporting", + "ESP Overview", + "ESP PMU or Zone reporting", + "ESP Species" ], + "name": "", + "optionalProjectContent": [], "overridesProgramData": true, "reportingPeriodAlignedToCalendar": false, "startDate": "" @@ -1808,8 +2029,8 @@ ], "reportingPeriodAlignedToCalendar": false, "optionalProjectContent": [ - "Risks and Threats", - "MERI Plan" + "MERI Plan", + "Risks and Threats" ], "isMeritProgramme": true }, @@ -1874,7 +2095,40 @@ "Multiple Sightings", "Single Sighting", "2-ha Track Plot Datasheet", - "Aerial fauna survey - distance sampler method" + "Aerial fauna survey - distance sampler method", + "Cape York Terrestrial Fauna Survey", + "Cape York Incidental Sightings", + "Urban Bird Movements Research - Systematic Survey", + "Marine Turtle Monitoring Nest Presence and Depredation Survey", + "BDBSA Fauna observations", + "BDBSA Flora observations", + "VNPA ReefWatch Survey", + "Post Biodiversity-works Site Monitoring Methodology", + "Dunewatch Activity Summary", + "Dunewatch Survey - Emery Method", + "Dunewatch - Human Impact Assessment", + "Dunewatch Flora Survey", + "Dunewatch Fauna Survey", + "Nest Box Monitoring", + "Local Species Inventory", + "Froglet calls", + "Water Quality Survey - with map", + "Sea Search - Fixed Photo Points", + "Sea Search - Seagrass Bed Monitoring", + "Sea Search - Seagrass Boundary Mapping", + "Ray and Shark Monitoring Survey", + "1000m transect x 8 quadrat bird survey", + "Single Bird Sighting with additional information", + "Dung Beetle Monitoring", + "Rapid Appraisal of Riparian Condition (RARC)", + "Aquatic Macro-invertebrate Assessment - ALT method", + "ACT Waterwatch - Water Quality Monitoring", + "ACT Waterwatch - Water Bug Survey", + "Tree Dieback Survey - WSU", + "Quadrat Sampling - Presence Only", + "Marine Metre Squared Transect Survey", + "Marine Metre Squared Shore Survey", + "Beach Sand Photo Point Monitoring" ], "name": "Ecological Science Projects", "speciesFieldsSettings": null, @@ -1916,11 +2170,25 @@ "Floristic survey - plot and transect", "Outcomes, Evaluation and Learning - General", "Project Administration", + "Indigenous Knowledge Transfer", + "Training and Skills Development", + "Outcomes, Evaluation and Learning - final report", + "Camera Trap Monitoring", + "Significant Trees Survey", + "2-ha Track Plot Datasheet", + "Aerial fauna survey - distance sampler method", + "Flying Fox Survey", + "Sea Search - Seagrass Bed Monitoring", + "Sea Search - Intertidal Reef Survey", + "General Seed Collection Activity", + "Nest Box Monitoring", + "Local Species Inventory", "Pest Animal Survey - with map", "Plant Survival Survey - with map", "Site Monitoring Plan - with map", "Water Quality Survey - with map", - "Weed Mapping & Monitoring - with map", + "Weed Mapping and Monitoring - with map", + "Dieback Observation", "Community Participation and Engagement - with map", "Debris removal - with map", "Disease Management - with map", @@ -1941,9 +2209,6 @@ "Water Management - with map", "Weed Treatment - with map", "Works Planning and Risk - with map", - "Indigenous Knowledge Transfer", - "Training and Skills Development", - "Weed Mapping and Monitoring - with map", "Post Revegetation Site Management - with map" ], "name": "General Works Projects", @@ -1970,7 +2235,11 @@ "Fauna survey - trap and transect", "General Weed Monitoring", "Aerial fauna survey - distance sampler method", - "Camera Trap Monitoring" + "Camera Trap Monitoring", + "Cape York Incidental Sightings", + "Cape York Terrestrial Fauna Survey", + "Nest Box Monitoring", + "Marine Turtle Monitoring Nest Presence and Depredation Survey" ], "name": "National Environmental Science Programme", "speciesFieldsSettings": null, @@ -2035,57 +2304,105 @@ "Risks and Threats" ] }, - { - "weekDaysToCompleteReport": 0, - "activities": [ - "Habitat Condition Assessment Tool", - "Ecological Condition Score Moderation" - ], - "name": "Habitat Condition Assessment", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [], - "name": "European Citizen Science Association", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [ - "CRISP - Project Assessment", - "CRISP - Audit" - ], - "name": "CRISP", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [] - }, { "weekDaysToCompleteReport": 0, "reportingPeriod": "6", "projectDatesContracted": true, "activities": [ - "Reef 2050 Plan Action Reporting", - "Reef 2050 Action Reporting 2018" + "Outcomes, Evaluation and Learning - final report", + "Indigenous Employment and Businesses", + "Project Administration", + "Flora Survey - general", + "Fauna Survey - general", + "Pest Animal Survey", + "Plant Survival Survey", + "Site Monitoring Plan", + "Water Quality Survey", + "Weed Mapping & Monitoring", + "Vegetation Assessment - Commonwealth government methodology", + "Community Participation and Engagement", + "Debris Removal", + "Disease Management", + "Erosion Management", + "Fencing", + "Conservation Grazing Management", + "Fire Management", + "Heritage Conservation", + "Management Plan Development", + "Management Practice Change", + "Conservation Actions for Species and Communities", + "Pest Management", + "Plant Propagation", + "Public Access and Infrastructure", + "Research", + "Revegetation", + "Seed Collection", + "Site Preparation", + "Water Management", + "Weed Treatment", + "Works Planning and Risk", + "Post revegetation site management", + "Indigenous Knowledge Transfer", + "Training and Skills Development", + "Progress, Outcomes and Learning - stage report" ], "name": "Reef 2050 Plan", "speciesFieldsSettings": null, "subprograms": [ { + "weekDaysToCompleteReport": 0, "themes": [], + "reportingPeriod": "6", + "projectDatesContracted": true, "endDate": "", - "activities": [], + "activities": [ + "Outcomes, Evaluation and Learning - final report", + "Indigenous Employment and Businesses", + "Project Administration", + "Flora Survey - general", + "Fauna Survey - general", + "Pest Animal Survey", + "Plant Survival Survey", + "Site Monitoring Plan", + "Water Quality Survey", + "Weed Mapping & Monitoring", + "Vegetation Assessment - Commonwealth government methodology", + "Community Participation and Engagement", + "Debris Removal", + "Disease Management", + "Erosion Management", + "Fencing", + "Conservation Grazing Management", + "Fire Management", + "Heritage Conservation", + "Management Plan Development", + "Management Practice Change", + "Conservation Actions for Species and Communities", + "Pest Management", + "Plant Propagation", + "Public Access and Infrastructure", + "Research", + "Revegetation", + "Seed Collection", + "Site Preparation", + "Water Management", + "Weed Treatment", + "Works Planning and Risk", + "Post revegetation site management", + "Indigenous Knowledge Transfer", + "Training and Skills Development", + "Stage Report", + "Annual Stage Report", + "Progress, Outcomes and Learning - stage report" + ], "name": "Reef 2050 Implementation", "speciesFieldsSettings": null, - "optionalProjectContent": [], + "optionalProjectContent": [ + "MERI Plan", + "Risks and Threats" + ], + "overridesProgramData": true, + "reportingPeriodAlignedToCalendar": true, "startDate": "" }, { @@ -2096,7 +2413,7 @@ "endDate": "", "activities": [ "Reef 2050 Plan Action Reporting", - "Reef 2050 Action Reporting 2018" + "Reef 2050 Plan Action Reporting 2018" ], "name": "Reef 2050 Plan Action Reporting", "speciesFieldsSettings": null, @@ -2107,82 +2424,16 @@ } ], "reportingPeriodAlignedToCalendar": true, - "optionalProjectContent": [], + "optionalProjectContent": ["MERI Plan"], "isMeritProgramme": true }, { "weekDaysToCompleteReport": 0, "activities": [ - "Indigenous Employment and Businesses", - "Outcomes, Evaluation and Learning - General", - "Project Administration v2", - "Pest Animal Survey v2", - "Plant Survival Survey v2", - "Site Monitoring Plan v2", - "Water Quality Survey v2", - "Weed Mapping & Monitoring v2", - "Weed Mapping & Monitoring", - "TasVeg - Native Vegetation Assessment - Forest Vegetation", - "Vegetation Assessment - Habitat Hectares v2 (VIC)", - "Vegetation Assessment - Commonwealth government methodology", - "Water Quality Survey", - "Fauna Survey - general", - "Flora Survey - general", - "Pest Animal Survey", - "Plant Survival Survey", - "Site Monitoring Plan", - "Post Biodiversity-works Site Monitoring Methodology", - "Community Participation and Engagement v2", - "Debris removal v2", - "Disease Management v2", - "Erosion Management v2", - "Fencing v2", - "Conservation Grazing Management v2", - "Ecological Fire Management v2", - "Heritage Conservation v2", - "Management Plan Development v2", - "Conservation Actions for Species and Communities v2", - "Pest Management v2", - "Plant Propagation v2", - "Public Access and Infrastructure v2", - "Research v2", - "Revegetation v2", - "Seed Collection v2", - "Site Preparation v2", - "Water Management v2", - "Weed Treatment v2", - "Works Planning and Risk v2", - "Post revegetation site management", - "Training and Skills Development v2", - "Indigenous Knowledge Transfer" - ], - "name": "Greening Australia Projects", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [], - "name": "Threatened Species Hub", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [ - "Seed Collection v2", - "Seedbank - Accession of new stock", - "Plant Propagation v2" + "Martu Wangka Sightings", + "Leonora DHS Biodiversity Surveys" ], - "name": "Seed Banks", + "name": "Schools WA", "speciesFieldsSettings": null, "subprograms": [], "optionalProjectContent": [] @@ -2190,9 +2441,7 @@ { "weekDaysToCompleteReport": 0, "activities": [ - "Weed Biological Control - Record of Agent", "Weed Biological Control - Agent Record - Target species with canes", - "Weed Biological Control - Agent Record - Target species - Herbs", "Weed Biological Control - Agent Record - Insect agents", "Weed Biological Control - Agent Record - Non cane rust and fungi agents" ], @@ -2203,44 +2452,39 @@ }, { "weekDaysToCompleteReport": 0, - "activities": [ - "Pest Animal Survey - with map", - "Plant Survival Survey - with map", - "Site Monitoring Plan - with map", - "Water Quality Survey - with map", - "Weed Mapping and Monitoring - with map", - "Post Biodiversity-works Site Monitoring Methodology", - "Camera Trap Monitoring", - "Project Administration", - "Progress, Outcomes and Learning - stage report", - "Outcomes, Evaluation and Learning - General", - "Indigenous Employment and Businesses", - "Outcomes, Evaluation and Learning - final report", - "Community Participation and Engagement - with map", - "Debris removal - with map", - "Disease Management - with map", - "Erosion Management - with map", - "Fencing - with map", - "Conservation Grazing Management - with map", - "Ecological Fire Management - with map", - "Heritage Conservation - with map", - "Management Plan Development - with map", - "Conservation Actions for Species and Communities - with map", - "Pest Management - with map", - "Plant Propagation - with map", - "Research - with map", - "Public Access and Infrastructure - with map", - "Revegetation - with map", - "Seed Collection - with map", - "Site Preparation - with map", - "Water Management - with map", - "Works Planning and Risk - with map", - "Weed Treatment - with map", - "Post revegetation site management", - "Indigenous Knowledge Transfer", - "Training and Skills Development" + "reportingPeriod": "12", + "projectDatesContracted": true, + "activities": [], + "name": "Improving Your Local Parks and Environment", + "speciesFieldsSettings": null, + "subprograms": [{ + "weekDaysToCompleteReport": 0, + "themes": [], + "reportingPeriod": "6", + "projectDatesContracted": true, + "endDate": "", + "activities": [], + "name": "Improving Your Local Parks and Environment sub-program", + "speciesFieldsSettings": null, + "optionalProjectContent": [ + "Risks and Threats", + "MERI Plan" + ], + "overridesProgramData": true, + "reportingPeriodAlignedToCalendar": true, + "startDate": "" + }], + "reportingPeriodAlignedToCalendar": false, + "optionalProjectContent": [ + "Risks and Threats", + "MERI Plan" ], - "name": "Landcare Australia Ltd.", + "isMeritProgramme": true + }, + { + "weekDaysToCompleteReport": 0, + "activities": ["CLC 2Ha Track Plot"], + "name": "CLC Tracker Hub", "speciesFieldsSettings": null, "subprograms": [], "optionalProjectContent": [ @@ -2251,49 +2495,28 @@ { "weekDaysToCompleteReport": 0, "activities": [ - "Indigenous Employment and Businesses", - "Outcomes, Evaluation and Learning - final report", - "Project Administration", - "Outcomes, Evaluation and Learning - General", + "Weed Mapping & Monitoring", "Fauna survey - trap and transect", "Floristic survey - plot and transect", + "Camera Trap Monitoring", + "2-ha Track Plot Datasheet", + "Flying Fox Survey", + "Aerial fauna survey - distance sampler method", + "General Seed Collection Activity", + "NT Systematic Terrestrial Fauna Survey", + "Nest Box Monitoring", + "Local Species Inventory", + "Cape York Incidental Sightings", + "Cape York Terrestrial Fauna Survey", + "Mapping Butterflies and Host Vines", + "Froglet calls", + "Dieback Observation", "Pest Animal Survey - with map", - "Plant Survival Survey - with map", "Site Monitoring Plan - with map", "Water Quality Survey - with map", - "Weed Mapping and Monitoring - with map", - "Community Participation and Engagement - with map", - "Debris removal - with map", - "Disease Management - with map", - "Erosion Management - with map", - "Fencing - with map", - "Conservation Grazing Management - with map", - "Ecological Fire Management - with map", - "Heritage Conservation - with map", - "Management Plan Development - with map", - "Conservation Actions for Species and Communities - with map", - "Pest Management - with map", - "Plant Propagation - with map", - "Public Access and Infrastructure - with map", - "Research - with map", - "Revegetation - with map", - "Seed Collection - with map", - "Site Preparation - with map", - "Water Management - with map", - "Weed Treatment - with map", - "Works Planning and Risk - with map", - "Post revegetation site management", - "Indigenous Knowledge Transfer", - "Training and Skills Development", - "EHP Incentives", - "EHP Products", - "EHP - Works", - "EHP - Events", - "Progress, Outcomes and Learning - stage report", - "Milestone - payment", - "Milestone - non payment" + "Weed Mapping and Monitoring - with map" ], - "name": "Major Integrated Project - Burdekin", + "name": "CSIRO Land & Water", "speciesFieldsSettings": null, "subprograms": [], "optionalProjectContent": [ @@ -2304,16 +2527,14 @@ { "weekDaysToCompleteReport": 0, "activities": [ - "Indigenous Employment and Businesses", + "Progress, Outcomes and Learning - stage report", "Outcomes, Evaluation and Learning - final report", "Project Administration", - "Outcomes, Evaluation and Learning - General", - "Fauna survey - trap and transect", - "Floristic survey - plot and transect", "Pest Animal Survey - with map", "Plant Survival Survey - with map", "Site Monitoring Plan - with map", "Water Quality Survey - with map", + "Weed Mapping and Monitoring - with map", "Community Participation and Engagement - with map", "Debris removal - with map", "Disease Management - with map", @@ -2334,19 +2555,9 @@ "Water Management - with map", "Weed Treatment - with map", "Works Planning and Risk - with map", - "Post revegetation site management", - "Indigenous Knowledge Transfer", - "Training and Skills Development", - "Weed Mapping and Monitoring - with map", - "EHP Incentives", - "EHP Products", - "EHP - Works", - "EHP - Events", - "Progress, Outcomes and Learning - stage report", - "Milestone - payment", - "Milestone - non payment" + "Post Revegetation Site Management - with map" ], - "name": "Major Integrated Project - Wet Tropics", + "name": "CSIRO NRM Interventions Programmes", "speciesFieldsSettings": null, "subprograms": [], "optionalProjectContent": [ @@ -2357,88 +2568,33 @@ { "weekDaysToCompleteReport": 0, "activities": [ - "EHP Incentives", - "EHP Products", - "EHP - Works", - "EHP - Events", - "Debris removal - with map", - "Disease Management - with map", - "Erosion Management - with map", - "Fencing - with map", - "Conservation Grazing Management - with map", - "Ecological Fire Management - with map", - "Heritage Conservation - with map", - "Management Plan Development - with map", - "Conservation Actions for Species and Communities - with map", - "Pest Management - with map", - "Plant Propagation - with map", - "Public Access and Infrastructure - with map", - "Research - with map", - "Revegetation - with map", - "Seed Collection - with map", - "Site Preparation - with map", - "Water Management - with map", - "Weed Treatment - with map", - "Works Planning and Risk - with map", - "Post Revegetation Site Management - with map", - "Post revegetation site management", - "Indigenous Knowledge Transfer", - "Training and Skills Development", - "Reef 2050 Plan Action Reporting", - "Outcomes, Evaluation and Learning - final report", - "Progress, Outcomes and Learning - stage report", - "Milestone - payment", - "Milestone - non payment" + "Habitat Condition Assessment Tool", + "Ecological Condition Score Moderation" ], - "name": "EHP - QLD", + "name": "Habitat Condition Assessment", "speciesFieldsSettings": null, "subprograms": [], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] + "optionalProjectContent": [] }, { "weekDaysToCompleteReport": 0, - "activities": [ - "Outcomes, Evaluation and Learning - General", - "Fauna survey - trap and transect", - "Floristic survey - plot and transect", - "Camera Trap Monitoring", - "Site Monitoring Plan - with map", - "Water Quality Survey - with map", - "Weed Mapping and Monitoring - with map", - "Pest Animal Survey - with map", - "Plant Survival Survey - with map", - "Management Practice Change", - "Disease Management - with map", - "Erosion Management - with map", - "Fencing - with map", - "Conservation Grazing Management - with map", - "Ecological Fire Management - with map", - "Pest Management - with map", - "Research - with map", - "Revegetation - with map", - "Seed Collection - with map", - "Site Preparation - with map", - "Water Management - with map", - "Weed Treatment - with map", - "Indigenous Knowledge Transfer", - "EHP Incentives", - "EHP Products", - "EHP - Works", - "EHP - Events", - "Milestone - payment", - "Milestone - non payment" - ], - "name": "Industry BMP Programs", + "activities": [], + "name": "Demonstration/ Test Projects", "speciesFieldsSettings": null, - "subprograms": [ + "subprograms": [{ + "themes": [], + "endDate": "", + "activities": [], + "name": "Applied R&D", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, { "themes": [], "endDate": "", "activities": [], - "name": "Cane BMP Program", + "name": "BMPs", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2447,7 +2603,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Grazing BMP Program", + "name": "Catchment restoration", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2456,7 +2612,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Bananas BMP Program", + "name": "Communications", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2465,209 +2621,66 @@ "themes": [], "endDate": "", "activities": [], - "name": "Grains BMP Program", + "name": "Data & information", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" - } - ], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [], - "name": "WA Biodiversity Science Institute partnerships", - "speciesFieldsSettings": null, - "subprograms": [ + }, { - "themes": [ - {"name": "Stakeholder engagement"}, - {"name": "Transdisciplinary research"}, - {"name": "Social and economic analysis"}, - {"name": "Aboriginal knowledge"}, - {"name": "Communication and adoption"} - ], + "themes": [], "endDate": "", "activities": [], - "name": "Restoration and ex-situ conservation", + "name": "Extension", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" }, { - "themes": [ - {"name": "Stakeholder engagement"}, - {"name": "Transdisciplinary research"}, - {"name": "Social and economic analysis"}, - {"name": "Aboriginal knowledge"}, - {"name": "Communication and adoption"} - ], + "themes": [], "endDate": "", "activities": [], - "name": "Information management systems", + "name": "Governance", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" }, { - "themes": [ - {"name": "Stakeholder engagement"}, - {"name": "Transdisciplinary research"}, - {"name": "Social and economic analysis"}, - {"name": "Aboriginal knowledge"}, - {"name": "Communication and adoption"} - ], + "themes": [], "endDate": "", "activities": [], - "name": "Biodiversity survey", + "name": "Innovative engagement", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" }, { - "themes": [ - {"name": "Stakeholder engagement"}, - {"name": "Transdisciplinary research"}, - {"name": "Social and economic analysis"}, - {"name": "Aboriginal knowledge"}, - {"name": "Communication and adoption"} - ], + "themes": [], "endDate": "", "activities": [], - "name": "Processes and threat mitigation", + "name": "Regulation & compliance", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" - } - ], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [], - "name": "Non-WABSI projects", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "activities": ["CLC 2Ha Track Plot"], - "name": "CLC Tracker Hub", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [ - "Outcomes, Evaluation and Learning - final report", - "Progress, Outcomes and Learning - stage report", - "Milestone - payment", - "Milestone - non payment", - "EHP Incentives", - "EHP Products", - "EHP - Works", - "EHP - Events", - "Debris removal - with map", - "Disease Management - with map", - "Erosion Management - with map", - "Fencing - with map", - "Conservation Grazing Management - with map", - "Ecological Fire Management - with map", - "Heritage Conservation - with map", - "Management Plan Development - with map", - "Conservation Actions for Species and Communities - with map", - "Pest Management - with map", - "Plant Propagation - with map", - "Public Access and Infrastructure - with map", - "Research - with map", - "Revegetation - with map", - "Seed Collection - with map", - "Site Preparation - with map", - "Water Management - with map", - "Weed Treatment - with map", - "Works Planning and Risk - with map", - "Post Revegetation Site Management - with map", - "Post revegetation site management", - "Reef 2050 Plan Action Reporting", - "Indigenous Knowledge Transfer", - "Training and Skills Development" - ], - "name": "EHP - Test Projects", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [ - "Fauna survey - trap and transect", - "Floristic survey - plot and transect", - "2-ha Track Plot Datasheet", - "Flying Fox Survey", - "Pest Animal Survey - with map", - "General Seed Collection Activity", - "Ecological Condition Score Moderation" - ], - "name": "CSIRO Land & Water", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [ - "Outcomes, Evaluation and Learning - General", - "Project Administration", - "Fauna survey - trap and transect", - "Floristic survey - plot and transect", - "Pest Animal Survey - with map", - "Plant Survival Survey - with map", - "Site Monitoring Plan - with map", - "Water Quality Survey - with map", - "Weed Mapping and Monitoring - with map", - "Community Participation and Engagement - with map", - "Debris removal - with map", - "Disease Management - with map", - "Erosion Management - with map", - "Fencing - with map", - "Conservation Grazing Management - with map", - "Ecological Fire Management - with map", - "Heritage Conservation - with map", - "Management Plan Development - with map", - "Conservation Actions for Species and Communities - with map", - "Pest Management - with map", - "Plant Propagation - with map", - "Public Access and Infrastructure - with map", - "Research - with map", - "Revegetation - with map", - "Seed Collection - with map", - "Site Preparation - with map", - "Water Management - with map", - "Weed Treatment - with map", - "Works Planning and Risk - with map", - "Post Revegetation Site Management - with map", - "Post revegetation site management" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Reporting", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Other", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + } ], - "name": "CSIRO NRM Interventions Programmes", - "speciesFieldsSettings": null, - "subprograms": [], "optionalProjectContent": [ "MERI Plan", "Risks and Threats" @@ -2675,34 +2688,23 @@ }, { "weekDaysToCompleteReport": 0, - "activities": [ - "Vegetation Assessment - BioCondition (QLD)", - "Vegetation Assessment - Habitat Hectares v2 (VIC)", - "TasVeg - Native Vegetation Assessment - Forest Vegetation", - "Fauna survey - trap and transect", - "Floristic survey - plot and transect", - "OzAtlas Sightings", - "Aerial fauna survey - distance sampler method", - "Sea Search - Seagrass Bed Monitoring", - "Mapping Butterflies and Host Vines", - "Sea Search - Seagrass Boundary Monitoring", - "2-ha Track Plot Datasheet", - "Pest Animal Survey - with map", - "Weed Mapping and Monitoring - with map", - "VNPA ReefWatch Survey", - "Weed Biological Control - Agent Record - Target species with canes", - "Froglet Calls", - "Bat Survey - SAMD", - "Water Quality Survey - with map" - ], - "name": "DSITI - QLD", + "activities": [], + "name": "QRWQ Program Management", "speciesFieldsSettings": null, - "subprograms": [ + "subprograms": [{ + "themes": [], + "endDate": "", + "activities": [], + "name": "Applied R&D", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, { "themes": [], "endDate": "", "activities": [], - "name": "Bio-security", + "name": "BMPs", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2711,7 +2713,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Threatened Species", + "name": "Catchment restoration", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2720,7 +2722,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Biodiversity", + "name": "Communications", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2729,7 +2731,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Agriculture", + "name": "Data & information", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2738,65 +2740,16 @@ "themes": [], "endDate": "", "activities": [], - "name": "Great Barrier Reef", + "name": "Extension", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" - } - ], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [ - "Regional Funding Final Report", - "Outcomes, Evaluation and Learning - General", - "Regional Funding Final Report KEQ", - "Milestone - payment", - "Milestone - non payment", - "Vegetation Assessment - BioCondition (QLD)", - "Pest Animal Survey - with map", - "Plant Survival Survey - with map", - "Site Monitoring Plan - with map", - "Water Quality Survey - with map", - "Weed Mapping and Monitoring - with map", - "Fauna survey - trap and transect", - "Floristic survey - plot and transect", - "Community Participation and Engagement - with map", - "Debris removal - with map", - "Disease Management - with map", - "Erosion Management - with map", - "Fencing - with map", - "Conservation Grazing Management - with map", - "Ecological Fire Management - with map", - "Heritage Conservation - with map", - "Management Plan Development - with map", - "Conservation Actions for Species and Communities - with map", - "Pest Management - with map", - "Plant Propagation - with map", - "Public Access and Infrastructure - with map", - "Research - with map", - "Revegetation - with map", - "Seed Collection - with map", - "Site Preparation - with map", - "Water Management - with map", - "Weed Treatment - with map", - "Works Planning and Risk - with map", - "Post Revegetation Site Management - with map", - "Post revegetation site management", - "Post Biodiversity-works Site Monitoring Methodology" - ], - "name": "DSITI - QLD - Intervention Programmes", - "speciesFieldsSettings": null, - "subprograms": [ + }, { "themes": [], "endDate": "", "activities": [], - "name": "Agriculture", + "name": "Governance", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2805,7 +2758,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Bio-security", + "name": "Innovative engagement", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2814,7 +2767,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Threatened Species", + "name": "Regulation & compliance", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2823,7 +2776,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Great Barrier Reef", + "name": "Reporting", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2832,7 +2785,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Biodiversity", + "name": "Other", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -2846,17 +2799,9 @@ { "weekDaysToCompleteReport": 0, "activities": [], - "name": "QLD CORE-VEG", + "name": "Stakeholder Engagement and Communications", "speciesFieldsSettings": null, - "subprograms": [{ - "themes": [], - "endDate": "", - "activities": [], - "name": "Biodiversity", - "speciesFieldsSettings": null, - "optionalProjectContent": [], - "startDate": "" - }], + "subprograms": [], "optionalProjectContent": [ "MERI Plan", "Risks and Threats" @@ -2864,169 +2809,104 @@ }, { "weekDaysToCompleteReport": 0, - "activities": [ - "Training and Skills Development", - "Indigenous Knowledge Transfer", - "Post revegetation site management", - "Post Revegetation Site Management - with map", - "Works Planning and Risk - with map", - "Weed Treatment - with map", - "Water Management - with map", - "Site Preparation - with map", - "Seed Collection - with map", - "Revegetation - with map", - "Research - with map", - "Public Access and Infrastructure - with map", - "Plant Propagation - with map", - "Pest Management - with map", - "Conservation Actions for Species and Communities - with map", - "Management Plan Development - with map", - "Heritage Conservation - with map", - "Ecological Fire Management - with map", - "Conservation Grazing Management - with map", - "Fencing - with map", - "Erosion Management - with map", - "Disease Management - with map", - "Debris removal - with map", - "Community Participation and Engagement - with map", - "Floristic survey - plot and transect", - "Fauna survey - trap and transect", - "Vegetation Assessment - Habitat Hectares v2 (VIC)", - "Pest Animal Survey - with map", - "Plant Survival Survey - with map", - "Site Monitoring Plan - with map", - "Water Quality Survey - with map", - "Weed Mapping and Monitoring - with map", - "Post Biodiversity-works Site Monitoring Methodology", - "Indigenous Employment and Businesses", - "Project Administration", - "Outcomes, Evaluation and Learning - General" - ], - "name": "Dja Dja Wurrung Country Projects", + "activities": [], + "name": "Research Development and Innovation Projects (RD&I)", "speciesFieldsSettings": null, - "subprograms": [ + "subprograms": [{ + "themes": [], + "endDate": "", + "activities": [], + "name": "Applied R&D", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, { - "themes": [ - {"name": "Jaara People"}, - {"name": "Cultural Practices & Customs"}, - {"name": "Cultural Heritage"}, - {"name": "Bush Tucker"}, - {"name": "Rivers & Waterways"}, - {"name": "Land"}, - {"name": "Self-Determination"}, - {"name": "Enterprise"} - ], + "themes": [], "endDate": "", "activities": [], - "name": "Water management", + "name": "BMPs", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" }, { - "themes": [ - {"name": "Jaara People"}, - {"name": "Cultural Practices & Customs"}, - {"name": "Cultural Heritage"}, - {"name": "Bush Tucker"}, - {"name": "Rivers & Waterways"}, - {"name": "Land"}, - {"name": "Self-Determination"}, - {"name": "Enterprise"} - ], + "themes": [], "endDate": "", "activities": [], - "name": "Fire management", + "name": "Catchment restoration", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" }, { - "themes": [ - {"name": "Jaara People"}, - {"name": "Cultural Practices & Customs"}, - {"name": "Cultural Heritage"}, - {"name": "Bush Tucker"}, - {"name": "Rivers & Waterways"}, - {"name": "Land"}, - {"name": "Self-Determination"}, - {"name": "Enterprise"} - ], + "themes": [], "endDate": "", "activities": [], - "name": "Joint management", + "name": "Communications", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" }, { - "themes": [ - {"name": "Jaara People"}, - {"name": "Cultural Practices & Customs"}, - {"name": "Cultural Heritage"}, - {"name": "Bush Tucker"}, - {"name": "Rivers & Waterways"}, - {"name": "Land"}, - {"name": "Self-Determination"}, - {"name": "Enterprise"} - ], + "themes": [], "endDate": "", "activities": [], - "name": "Land remediation", + "name": "Data & information", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" }, { - "themes": [ - {"name": "Jaara People"}, - {"name": "Cultural Practices & Customs"}, - {"name": "Cultural Heritage"}, - {"name": "Bush Tucker"}, - {"name": "Rivers & Waterways"}, - {"name": "Land"}, - {"name": "Self-Determination"}, - {"name": "Enterprise"} - ], + "themes": [], "endDate": "", "activities": [], - "name": "NRM service delivery", + "name": "Extension", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" }, { - "themes": [ - {"name": "Jaara People"}, - {"name": "Cultural Practices & Customs"}, - {"name": "Cultural Heritage"}, - {"name": "Bush Tucker"}, - {"name": "Rivers & Waterways"}, - {"name": "Land"}, - {"name": "Self-Determination"}, - {"name": "Enterprise"} - ], + "themes": [], "endDate": "", "activities": [], - "name": "Resource rents", + "name": "Governance", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" }, { - "themes": [ - {"name": "Jaara People"}, - {"name": "Cultural Practices & Customs"}, - {"name": "Cultural Heritage"}, - {"name": "Bush Tucker"}, - {"name": "Rivers & Waterways"}, - {"name": "Land"}, - {"name": "Self-Determination"}, - {"name": "Enterprise"} - ], + "themes": [], + "endDate": "", + "activities": [], + "name": "Innovative engagement", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Regulation & compliance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], "endDate": "", "activities": [], - "name": "Traditional knowledge", + "name": "Reporting", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Other", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3039,103 +2919,8 @@ }, { "weekDaysToCompleteReport": 0, - "reportingPeriod": "12", "activities": [], - "name": "Meri Plan Test", - "speciesFieldsSettings": null, - "projectTemplate": "meri", - "subprograms": [], - "reportingPeriodAlignedToCalendar": true, - "optionalProjectContent": ["MERI Plan"], - "isMeritProgramme": true - }, - { - "weekDaysToCompleteReport": 0, - "activities": [ - "OzAtlas Sightings", - "General Weed Sighting", - "Koala Count - Redlands", - "Significant Trees Survey", - "Camera Trap Monitoring", - "Floristic survey - plot and transect", - "Fauna survey - trap and transect", - "Redland CC raptor nest monitoring", - "General Weed Monitoring", - "Multiple Sightings", - "Pest Animal Survey - with map", - "Water Quality Survey - with map", - "Weed Mapping and Monitoring - with map", - "Pollinator Sighting", - "Local Species Inventory", - "Mapping Butterflies and Host Vines", - "Echidna CSI", - "Bird Survey - SAMD", - "Bat Survey - SAMD", - "Echidna CSI - Sample collection", - "Vegetation Assessment - BioCondition (QLD)", - "Nest Box Establishment", - "Nest Box Survey", - "Nest Box Maintenance" - ], - "name": "Brisbane City Environmental Surveys", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "activities": [ - "Outcomes, Evaluation and Learning - General", - "Milestone - non payment", - "Milestone - payment", - "Vegetation Assessment - BioCondition (QLD)", - "Fauna survey - trap and transect", - "Floristic survey - plot and transect", - "Significant Trees Survey", - "Camera Trap Monitoring", - "Redland CC raptor nest monitoring", - "Weed Mapping and Monitoring - with map", - "Pest Animal Survey - with map", - "Plant Survival Survey - with map", - "Site Monitoring Plan - with map", - "Water Quality Survey - with map", - "Post Biodiversity-works Site Monitoring Methodology", - "Pollinator Sighting", - "General Seed Collection Activity", - "Local Species Inventory", - "Bird Survey - SAMD", - "Bat Survey - SAMD", - "Community Participation and Engagement - with map", - "Debris removal - with map", - "Disease Management - with map", - "Erosion Management - with map", - "Fencing - with map", - "Conservation Grazing Management - with map", - "Ecological Fire Management - with map", - "Heritage Conservation - with map", - "Management Plan Development - with map", - "Conservation Actions for Species and Communities - with map", - "Pest Management - with map", - "Plant Propagation - with map", - "Public Access and Infrastructure - with map", - "Research - with map", - "Revegetation - with map", - "Seed Collection - with map", - "Site Preparation - with map", - "Water Management - with map", - "Weed Treatment - with map", - "Works Planning and Risk - with map", - "Post Revegetation Site Management - with map", - "Indigenous Knowledge Transfer", - "Training and Skills Development", - "Nest Box Establishment", - "Nest Box Survey", - "Nest Box Maintenance" - ], - "name": "BCC Community Conservation Assistance Grants", + "name": "Regional Report Cards and Partnerships", "speciesFieldsSettings": null, "subprograms": [], "optionalProjectContent": [ @@ -3145,60 +2930,23 @@ }, { "weekDaysToCompleteReport": 0, - "activities": [ - "Nest Box Establishment", - "Nest Box Survey", - "Nest Box Maintenance", - "Outcomes, Evaluation and Learning - General", - "Milestone - payment", - "Milestone - non payment", - "Vegetation Assessment - BioCondition (QLD)", - "Redland CC raptor nest monitoring", - "Fauna survey - trap and transect", - "Floristic survey - plot and transect", - "Pest Animal Survey - with map", - "Plant Survival Survey - with map", - "Site Monitoring Plan - with map", - "Water Quality Survey - with map", - "Weed Mapping and Monitoring - with map", - "Pollinator Sighting", - "Post Biodiversity-works Site Monitoring Methodology", - "General Seed Collection Activity", - "Local Species Inventory", - "Bird Survey - SAMD", - "Bat Survey - SAMD", - "Community Participation and Engagement - with map", - "Debris removal - with map", - "Disease Management - with map", - "Erosion Management - with map", - "Fencing - with map", - "Conservation Grazing Management - with map", - "Ecological Fire Management - with map", - "Heritage Conservation - with map", - "Management Plan Development - with map", - "Conservation Actions for Species and Communities - with map", - "Pest Management - with map", - "Plant Propagation - with map", - "Public Access and Infrastructure - with map", - "Research - with map", - "Revegetation - with map", - "Seed Collection - with map", - "Site Preparation - with map", - "Water Management - with map", - "Weed Treatment - with map", - "Works Planning and Risk - with map", - "Post Revegetation Site Management - with map", - "Indigenous Knowledge Transfer", - "Training and Skills Development" - ], - "name": "BCC Environment and Sustainability Grants", + "activities": [], + "name": "Policy Analysis and Support", "speciesFieldsSettings": null, - "subprograms": [ + "subprograms": [{ + "themes": [], + "endDate": "", + "activities": [], + "name": "Applied R&D", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, { "themes": [], "endDate": "", "activities": [], - "name": "Environmental Grants", + "name": "BMPs", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3207,7 +2955,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Sustainability Grants", + "name": "Catchment restoration", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3216,7 +2964,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Cultivating Community Gardens Grants", + "name": "Communications", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3225,7 +2973,61 @@ "themes": [], "endDate": "", "activities": [], - "name": "Native Wildlife Carers Grants", + "name": "Data & information", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Extension", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Governance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Innovative engagement", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Regulation & compliance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Reporting", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Other", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3238,124 +3040,315 @@ }, { "weekDaysToCompleteReport": 0, - "reportingPeriod": "12", - "activities": ["Recovery Team Annual Progress Report"], - "name": "Threatened Species Recovery Team Reporting", - "speciesFieldsSettings": { - "surveysConfig": [{ - "speciesFields": [{ - "output": "Recovery Team Annual Progress Report", - "dataFieldName": "threatenedSpecies", - "context": "", - "label": "Species:", - "config": { - "speciesLists": [{"dataResourceUid": "dr656"}], - "type": "GROUP_OF_SPECIES", - "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" - } - }], - "name": "Recovery Team Annual Progress Report" - }], - "defaultSpeciesConfig": { - "type": "ALL_SPECIES", - "speciesDisplayFormat": "SCIENTIFICNAME(COMMONNAME)" - } - }, - "subprograms": [], - "reportingPeriodAlignedToCalendar": true, - "optionalProjectContent": [], - "isMeritProgramme": true - }, - { - "weekDaysToCompleteReport": 0, - "activities": [ - "OzAtlas Sightings", - "Froglet Calls", - "Nest Box Survey", - "Water Quality Survey - with map" - ], - "name": "Yarra River Keeper", - "speciesFieldsSettings": null, - "subprograms": [], - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ] - }, - { - "weekDaysToCompleteReport": 0, - "reportingPeriod": "6", "activities": [], - "name": "Test Programme", + "name": "Paddock to Reef Program/ Reef Report Card", "speciesFieldsSettings": null, - "projectTemplate": "nrm2", - "subprograms": [], - "reportingPeriodAlignedToCalendar": true, - "optionalProjectContent": [ - "MERI Plan", - "Risks and Threats" - ], - "isMeritProgramme": true - }, + "subprograms": [{ + "themes": [], + "endDate": "", + "activities": [], + "name": "Applied R&D", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "BMPs", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Catchment restoration", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Communications", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Data & information", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Extension", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Governance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Innovative engagement", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Regulation & compliance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Reporting", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Other", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + } + ], + "optionalProjectContent": [ + "MERI Plan", + "Risks and Threats" + ] + }, { "weekDaysToCompleteReport": 0, - "activities": [ - "Indigenous Employment and Businesses", - "Outcomes, Evaluation and Learning - final report", - "Project Administration", - "Outcomes, Evaluation and Learning - General", - "Progress, Outcomes and Learning - stage report", - "Fauna survey - trap and transect", - "Floristic survey - plot and transect", - "Camera Trap Monitoring", - "Significant Trees Survey", - "OzAtlas Sightings", - "Pest Animal Survey - with map", - "Plant Survival Survey - with map", - "Site Monitoring Plan - with map", - "Water Quality Survey - with map", - "Weed Mapping and Monitoring - with map", - "Pollinator Sighting", - "Post Biodiversity-works Site Monitoring Methodology", - "General Seed Collection Activity", - "Local Species Inventory", - "Weed Biological Control - Agent Record - Target species with canes", - "Weed Biological Control - Agent Record - Insect agents", - "Weed Biological Control - Agent Record - Non cane rust and fungi agents", - "Nest Box Survey", - "Debris removal - with map", - "Disease Management - with map", - "Erosion Management - with map", - "Fencing - with map", - "Community Participation and Engagement - with map", - "Conservation Grazing Management - with map", - "Ecological Fire Management - with map", - "Heritage Conservation - with map", - "Management Plan Development - with map", - "Conservation Actions for Species and Communities - with map", - "Pest Management - with map", - "Plant Propagation - with map", - "Public Access and Infrastructure - with map", - "Research - with map", - "Revegetation - with map", - "Seed Collection - with map", - "Site Preparation - with map", - "Water Management - with map", - "Weed Treatment - with map", - "Works Planning and Risk - with map", - "Post Revegetation Site Management - with map", - "Post revegetation site management", - "Indigenous Knowledge Transfer", - "Training and Skills Development" + "activities": [], + "name": "Major Integrated Projects (MIP’s)", + "speciesFieldsSettings": null, + "subprograms": [{ + "themes": [], + "endDate": "", + "activities": [], + "name": "Applied R&D", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "BMPs", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Catchment restoration", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Communications", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Data & information", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Extension", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Governance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Innovative engagement", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Regulation & compliance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Reporting", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Other", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + } ], - "name": "The Mulloon Institute", + "optionalProjectContent": [ + "MERI Plan", + "Risks and Threats" + ] + }, + { + "weekDaysToCompleteReport": 0, + "activities": [], + "name": "Industry BMP Programs", "speciesFieldsSettings": null, - "subprograms": [ + "subprograms": [{ + "themes": [], + "endDate": "", + "activities": [], + "name": "Applied R&D", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "BMPs", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Catchment restoration", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Communications", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Data & information", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Extension", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Governance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Innovative engagement", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Regulation & compliance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, { "themes": [], "endDate": "", "activities": [], - "name": "Hydro-Geology", + "name": "Reporting", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3364,7 +3357,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Biological", + "name": "Other", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3377,19 +3370,23 @@ }, { "weekDaysToCompleteReport": 0, - "activities": [ - "Water Quality Survey - with map", - "Froglet Calls", - "Basin Champions - Aquatic insects" - ], - "name": "ACT Waterwatch", + "activities": [], + "name": "Education and Extension", "speciesFieldsSettings": null, - "subprograms": [ + "subprograms": [{ + "themes": [], + "endDate": "", + "activities": [], + "name": "Applied R&D", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, { "themes": [], "endDate": "", "activities": [], - "name": "Molonglo Catchment", + "name": "BMPs", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3398,7 +3395,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Ginninderra Catchment", + "name": "Catchment restoration", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3407,7 +3404,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Yass Catchment", + "name": "Communications", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3416,7 +3413,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Southern ACT", + "name": "Data & information", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3425,7 +3422,43 @@ "themes": [], "endDate": "", "activities": [], - "name": "Cooma Region", + "name": "Extension", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Governance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Innovative engagement", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Regulation & compliance", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Reporting", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3434,7 +3467,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Lake George", + "name": "Other", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3512,7 +3545,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Works approval and licence", + "name": "Proposal", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3521,7 +3554,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Proposal", + "name": "Strategic proposal", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3530,7 +3563,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Strategic proposal", + "name": "Scheme or scheme amendment", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3539,7 +3572,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Scheme or scheme amendment", + "name": "Native vegetation clearing permit", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3548,7 +3581,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Native vegetation clearing permit", + "name": "Works approval and licence", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3618,15 +3651,47 @@ }, { "weekDaysToCompleteReport": 0, - "activities": ["APN Feral Pig Shooting"], - "name": "APN Feral Pest Tracking", + "activities": [ + "Basin Champions - Aquatic insects", + "Rapid Appraisal of Riparian Condition (RARC)", + "ACT Waterwatch - Water Quality Monitoring", + "ACT Waterwatch - Water Bug Survey" + ], + "name": "Waterwatch ACT", "speciesFieldsSettings": null, "subprograms": [ { "themes": [], "endDate": "", "activities": [], - "name": "Feral Pig Tracking", + "name": "Ginninderra Catchment", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Molonglo Catchment", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "ACT Southern Region", + "speciesFieldsSettings": null, + "optionalProjectContent": [], + "startDate": "" + }, + { + "themes": [], + "endDate": "", + "activities": [], + "name": "Cooma Region", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3635,7 +3700,7 @@ "themes": [], "endDate": "", "activities": [], - "name": "Buffalo Tracking", + "name": "Yass Region", "speciesFieldsSettings": null, "optionalProjectContent": [], "startDate": "" @@ -3649,10 +3714,196 @@ { "weekDaysToCompleteReport": 0, "activities": [ - "APN Feral Pig Shooting", - "Aerial fauna survey - distance sampler method" + "Basin Champions - Aquatic insects", + "Water Quality Survey - with map", + "Rapid Appraisal of Riparian Condition (RARC)", + "Aquatic Macro-invertebrate Assessment - SIGNAL2" + ], + "name": "Waterwatch NSW", + "speciesFieldsSettings": null, + "subprograms": [], + "optionalProjectContent": [ + "MERI Plan", + "Risks and Threats" + ] + }, + { + "weekDaysToCompleteReport": 0, + "activities": [ + "Basin Champions - Aquatic insects", + "Water Quality Survey - with map", + "Rapid Appraisal of Riparian Condition (RARC)", + "Aquatic Macro-invertebrate Assessment - ALT method" + ], + "name": "Melbourne Water", + "speciesFieldsSettings": null, + "subprograms": [], + "optionalProjectContent": [ + "MERI Plan", + "Risks and Threats" + ] + }, + { + "weekDaysToCompleteReport": 0, + "activities": [ + "Aquatic Macro-invertebrate Assessment - SIGNAL2", + "Camera Trap Monitoring", + "Fauna survey - trap and transect", + "Floristic survey - plot and transect", + "General Weed Monitoring", + "Significant Trees Survey", + "OzAtlas Sightings", + "General Seed Collection Activity", + "Nest Box Monitoring", + "Local Species Inventory", + "General Multi-species Sightings - Alternate format v2", + "Dieback Observation", + "Sea Search - Seagrass Bed Monitoring", + "Sea Search - Fixed Photo Points", + "Sea Search - Seagrass Boundary Mapping", + "Sea Search - Image Library", + "Fungi Research", + "Single Sighting - verification - optional photo", + "Single Sighting - verification + mandatory photo", + "Ray and Shark Monitoring Survey", + "1000m transect x 8 quadrat bird survey", + "Single Bird Sighting with additional information", + "Dung Beetle Monitoring", + "Simple Weed Sighting", + "Aquatic Macro-invertebrate Assessment - ALT method", + "Rapid Appraisal of Riparian Condition (RARC)", + "Pest Animal Survey - with map", + "Plant Survival Survey - with map", + "Site Monitoring Plan - with map", + "Water Quality Survey - with map", + "Weed Mapping and Monitoring - with map", + "Quadrat Sampling - Presence Only", + "Marine Metre Squared Transect Survey", + "Marine Metre Squared Shore Survey" + ], + "name": "Schools Citizen Science NZ", + "speciesFieldsSettings": null, + "subprograms": [], + "optionalProjectContent": [] + }, + { + "weekDaysToCompleteReport": 0, + "activities": [ + "Project Administration", + "Progress, Outcomes and Learning - stage report", + "Annual Stage Report", + "Pest Animal Survey - with map", + "Plant Survival Survey - with map", + "Site Monitoring Plan - with map", + "Water Quality Survey - with map", + "Weed Mapping and Monitoring - with map", + "Debris removal - with map", + "Disease Management - with map", + "Erosion Management - with map", + "Fencing - with map", + "Conservation Grazing Management - with map", + "Ecological Fire Management - with map", + "Heritage Conservation - with map", + "Management Plan Development - with map", + "Conservation Actions for Species and Communities - with map", + "Pest Management - with map", + "Plant Propagation - with map", + "Public Access and Infrastructure - with map", + "Research - with map", + "Revegetation - with map", + "Seed Collection - with map", + "Site Preparation - with map", + "Water Management - with map", + "Weed Treatment - with map", + "Works Planning and Risk - with map", + "Post Revegetation Site Management - with map" + ], + "name": "Environmental Restoration NZ", + "speciesFieldsSettings": null, + "subprograms": [], + "optionalProjectContent": [ + "MERI Plan", + "Risks and Threats" + ] + }, + { + "weekDaysToCompleteReport": 0, + "activities": [ + "Stage Report", + "Outcomes, Evaluation and Learning - final report", + "Progress, Outcomes and Learning - stage report", + "Camera Trap Monitoring", + "Significant Trees Survey", + "OzAtlas Sightings", + "Pollinator Sighting", + "Nest Box Monitoring", + "Local Species Inventory", + "MEGA Bat project - SAMD", + "Fungi Research", + "Single Bird Sighting with additional information", + "Simple Weed Sighting", + "Tree Dieback Survey - WSU", + "Community Participation and Engagement - with map", + "Debris removal - with map", + "Disease Management - with map", + "Erosion Management - with map", + "Fencing - with map", + "Conservation Grazing Management - with map", + "Ecological Fire Management - with map", + "Heritage Conservation - with map", + "Management Plan Development - with map", + "Conservation Actions for Species and Communities - with map", + "Pest Management - with map", + "Plant Propagation - with map", + "Public Access and Infrastructure - with map", + "Research - with map", + "Revegetation - with map", + "Seed Collection - with map", + "Site Preparation - with map", + "Water Management - with map", + "Weed Treatment - with map", + "Works Planning and Risk - with map", + "Post Revegetation Site Management - with map", + "1000m transect x 8 quadrat bird survey" + ], + "name": "Lachlan Landcare Projects", + "speciesFieldsSettings": null, + "subprograms": [], + "optionalProjectContent": [ + "MERI Plan", + "Risks and Threats" + ] + }, + { + "weekDaysToCompleteReport": 0, + "activities": [ + "Camera Trap Monitoring", + "Significant Trees Survey", + "OzAtlas Sightings", + "Pollinator Sighting", + "Nest Box Monitoring", + "Local Species Inventory", + "Single Species Weed Monitoring Form", + "Froglet calls", + "Bat Survey - SAMD", + "MEGA Bat project - SAMD", + "Fungi Research", + "Tree Dieback Survey - WSU", + "1000m transect x 8 quadrat bird survey", + "Single Bird Sighting with additional information" ], - "name": "APN Feral Pig Shooting", + "name": "Lachlan Landcare Citizen Science", + "speciesFieldsSettings": null, + "subprograms": [], + "optionalProjectContent": [ + "MERI Plan", + "Risks and Threats" + ] + }, + { + "weekDaysToCompleteReport": 0, + "activities": [], + "name": "WA Biodiversity Science Institute partnerships", "speciesFieldsSettings": null, "subprograms": [], "optionalProjectContent": [ @@ -3663,7 +3914,7 @@ { "weekDaysToCompleteReport": 0, "activities": [], - "name": "APN Marine Turtle Monitoring", + "name": "Non-WABSI projects", "speciesFieldsSettings": null, "subprograms": [], "optionalProjectContent": [ diff --git a/models/rlpAnnualReport/dataModel.json b/models/rlpAnnualReport/dataModel.json index dd3661dab..2a096cd97 100644 --- a/models/rlpAnnualReport/dataModel.json +++ b/models/rlpAnnualReport/dataModel.json @@ -1,36 +1,54 @@ { "modelName": "RLP Annual Report", - "title":"Annual project report", + "title": "Annual project report", "dataModel": [ { "dataType": "text", "name": "keyAchievements", "validate": "required,maxSize[1250]" }, - { - "name": "minimumAnnualTargetsMet", "dataType": "text", - "description":"Annual minimum targets are outlined in the MERI plan", - "validate": "required", - "constraints": [ - "Yes", - "No" - ] + "name": "keyIssues", + "validate": "required,maxSize[1250]" }, { - "name": "reasonsMinimumAnnualTargetsNotMet", - "dataType": "text", - "validate": "required,maxSize[1250]", - "behaviour": [ + "name": "minimumAnnualTargetsNotMet", + "dataType": "list", + "columns": [ { - "condition": "minimumAnnualTargetsMet == \"No\"", - "type": "enable" + "dataType": "text", + "name": "serviceName" + }, + { + "dataType": "text", + "name": "targetMeasure", + "description": "The output target measure to be adjusted." + }, + { + "dataType": "text", + "name": "scoreId", + "description": "Identifier for the target measure" + }, + { + "dataType": "text", + "name": "annualTarget", + "description": "The minimum annual target specified in the MERI plan for the target measure" + }, + { + "dataType": "text", + "name": "result", + "description": "The actual progress towards the target this financial year" + }, + { + "name": "reasonTargetNotMet", + "dataType": "text", + "validate": "required,maxSize[500]" } ] }, { - "name": "weatherDisturbanceOccurred", + "name": "adaptiveManagementImplemented", "dataType": "text", "validate": "required", "constraints": [ @@ -39,32 +57,38 @@ ] }, { - "name": "weatherDisturbanceImpact", + "name": "adaptiveManagementActions", "dataType": "text", "validate": "required,maxSize[1250]", "behaviour": [ { - "condition": "weatherDisturbanceOccurred == \"Yes\"", + "condition": "adaptiveManagementImplemented == \"Yes\"", "type": "enable" } ] }, { - "name": "adaptiveManagementImplemented", + "name": "meriPlanChangesRequired", "dataType": "text", "validate": "required", "constraints": [ "Yes", "No" + ], + "behaviour": [ + { + "condition": "adaptiveManagementImplemented == \"Yes\"", + "type": "enable" + } ] }, { - "name": "adaptiveManagementActions", + "name": "meriPlanChangesDetails", "dataType": "text", "validate": "required,maxSize[1250]", "behaviour": [ { - "condition": "adaptiveManagementImplemented == \"Yes\"", + "condition": "meriPlanChangesRequired == \"Yes\"", "type": "enable" } ] @@ -90,47 +114,130 @@ ] } ], - "viewModel":[ + "pre-populate": [ { - "type":"row", - "items":[{ - "preLabel":"1. Please outline the project's key achievements met within the past 12 months (1250 character, [approx. 250 word] limit)", - "source":"keyAchievements", - "type":"textarea", - "rows":4 - }] - }, + "mapping": [ + { + "target": "minimumAnnualTargetsNotMet", + "source-path": "targets", + "mapping": [ + { + "source-path": "service", + "target": "serviceName" + }, + { + "source-path": "targetMeasure", + "target": "targetMeasure" + }, + { + "source-path": "scoreId", + "target": "scoreId" + }, + { + "source-path": "financialYearTarget", + "target": "annualTarget" + }, + { + "source-path": "financialYearResult", + "target": "result" + } + ] + } + ], + "source": { + "url": "/project/scoresByFinancialYear/", + "params": [ + { + "name": "id", + "type": "computed", + "expression": "owner.projectId" + }, + { + "name": "financialYearEndDate", + "type": "computed", + "expression": "activity.plannedEndDate" + } + ] + } + } + ], + "viewModel": [ { "type": "row", "items": [ { - "css":"span6", - "type": "selectOne", - "source": "minimumAnnualTargetsMet", - "preLabel": "2. Have all project minimum annual targets for projects services been met?" + "preLabel": "1. Please outline the key achievements met by the project and progress towards outcomes in the past 12 months (1250 character, [approx. 250 word] limit)", + "source": "keyAchievements", + "type": "textarea", + "rows": 4 } ] }, { "type": "row", "items": [ + { + "preLabel": "2. Please outline any key issues in the delivery of the project in the past 12 months and how they were managed/rectified. (1250 character, [approx. 250 word] limit)", + "source": "keyIssues", + "type": "textarea", + "rows": 4 + } + ] + }, + { + "title": "3. Please outline which minimum annual target services have not been met and why.
", + "type": "table", + "source": "minimumAnnualTargetsNotMet", + "userAddedRows": false, + "disableTableUpload": true, + "columns": [ + { + "type": "textarea", + "rows": 3, + "source": "serviceName", + "title": "Service", + "width": "15%", + "readonly": true + }, { "type": "textarea", - "rows":5, - "source": "reasonsMinimumAnnualTargetsNotMet", - "preLabel": "2. a) Please outline which minimum annual target services, and why they have not been met." + "width": "20%", + "rows": 3, + "source": "targetMeasure", + "title": "Target not met", + "readonly": true + }, + { + "type": "text", + "source": "annualTarget", + "width": "13%", + "title": "Minimum annual target", + "readonly": true + }, + { + "type": "text", + "source": "result", + "title": "Progress achieved", + "width": "12%", + "readonly": true + }, + { + "type": "textarea", + "rows": 3, + "width": "40%", + "source": "reasonTargetNotMet", + "title": "Reasons why the target has not been met (500 character, [approx. 100 word] limit)" } ] - }, { "type": "row", "items": [ { - "css":"span6", + "css": "span6", "type": "selectOne", - "source": "weatherDisturbanceOccurred", - "preLabel": "3. In the past 12 months, have any disturbances or weather events occurred on, or to, any of the project sites which may hinder the project's success?" + "source": "adaptiveManagementImplemented", + "preLabel": "4. In the past 12 months, have any adaptive management actions been implemented to improve the project?" } ] }, @@ -139,21 +246,20 @@ "items": [ { "type": "textarea", - "source": "weatherDisturbanceImpact", - "rows":4, - "preLabel": "3. a) Please describe these events and degree of impact they have had on or to the project sites (1250 character, [approx. 250 word] limit)" + "rows": 4, + "source": "adaptiveManagementActions", + "preLabel": "4. a) Please describe these adaptive management actions (1250 character [approx. 250 word] limit)." } ] - }, { "type": "row", "items": [ { - "css":"span6", + "css": "span6", "type": "selectOne", - "source": "adaptiveManagementImplemented", - "preLabel": "4. In the past 12 months, have any adaptive management actions been implemented to improve the project?" + "source": "meriPlanChangesRequired", + "preLabel": "4. b) Are changes to the project MERI plan required?" } ] }, @@ -162,21 +268,20 @@ "items": [ { "type": "textarea", - "rows":4, - "source": "adaptiveManagementActions", - "preLabel": "4. a) Please describe these adaptive management actions (1250 character [approx. 250 word] limit)." + "rows": 4, + "source": "meriPlanChangesDetails", + "preLabel": "4. b) ii) Please outline changes to the project MERI plan required and why they are required. (1250 character [approx. 250 word] limit)." } ] - }, { "type": "row", "items": [ { - "css":"span6", + "css": "span6", "type": "selectOne", "source": "whsIncidentsOccurred", - "preLabel": "5. In the past 12 months, have any notifiable project Workplace Health and Safety incidents occurred?" + "preLabel": "5. In the past 12 months, have any notifiable project Workplace Health and Safety incidents occurred during the delivery of the project?" } ] }, @@ -185,12 +290,11 @@ "items": [ { "type": "textarea", - "rows":4, + "rows": 4, "source": "whsIncidentsDescription", - "preLabel": "5. a) Please describe the project Workplace Health and Safety incidents" + "preLabel": "5. a) Please describe the Workplace Health and Safety incidents, were they reported and what was the outcome of any investigation." } ] - } ] } \ No newline at end of file diff --git a/models/rlpCoreServicesAnnualReport/dataModel.json b/models/rlpCoreServicesAnnualReport/dataModel.json index 45a71403e..928bddfee 100644 --- a/models/rlpCoreServicesAnnualReport/dataModel.json +++ b/models/rlpCoreServicesAnnualReport/dataModel.json @@ -8,7 +8,12 @@ "validate": "required,maxSize[1250]" }, { - "name": "deliveryImpactOccurred", + "name": "coreServicesIssues", + "dataType": "text", + "validate": "required,maxSize[1250]" + }, + { + "name": "governanceFrameworksMaintained", "dataType": "text", "validate": "required", "constraints": [ @@ -17,12 +22,32 @@ ] }, { - "name": "deliveryImpactDescription", + "name": "managementActionsForGovernanceFrameworks", "dataType": "text", "validate": "required,maxSize[1250]", "behaviour": [ { - "condition": "deliveryImpactOccurred == \"Yes\"", + "condition": "governanceFrameworksMaintained == \"No\"", + "type": "enable" + } + ] + }, + { + "name": "governanceIssuesOccurred", + "dataType": "text", + "validate": "required", + "constraints": [ + "Yes", + "No" + ] + }, + { + "name": "managementActionsForGovernanceRisksAndIssues", + "dataType": "text", + "validate": "required,maxSize[1250]", + "behaviour": [ + { + "condition": "governanceIssuesOccurred == \"Yes\"", "type": "enable" } ] @@ -46,6 +71,91 @@ "type": "enable" } ] + }, + { + "name": "whsIncidentsOccurred", + "description": "Include only incidents that have not been reported in project annual reports", + "dataType": "text", + "validate": "required", + "constraints": [ + "Yes", + "No" + ] + }, + { + "name": "whsIncidents", + "dataType": "text", + "validate": "required,maxSize[1250]", + "behaviour": [ + { + "condition": "whsIncidentsOccurred == \"Yes\"", + "type": "enable" + } + ] + }, + { + "name": "plansSubmitted", + "dataType": "text", + "validate": "required", + "constraints": [ + "Yes", + "No" + ] + }, + { + "name": "planDetails", + "dataType": "text", + "validate": "required,maxSize[1250]" + }, + { + "name": "communityParticipation", + "dataType": "text", + "validate": "required,maxSize[1250]", + "description": "Quantitative figures can include number of participants, timeframes, dollar value etc)" + }, + { + "name": "communityParticipationFor20PercentRequirement", + "dataType": "text", + "validate": "required,maxSize[1250]", + "description": "" + }, + { + "name": "indigenousParticipation", + "dataType": "text", + "validate": "required,maxSize[1250]", + "description": "Quantitative figures can include number of participants, timeframes, dollar value etc)" + }, + { + "name": "indigenousParticipationForClause40Point2", + "dataType": "text", + "validate": "required,maxSize[1250]", + "description": "Quantitative figures are to include number of procurements and value of each procurement, number employed full time equivalent" + }, + { + "name": "keyCommunicationActivities", + "dataType": "text", + "validate": "required,maxSize[1250]", + "description": "Include communications activities specifically related to Projects" + }, + { + "name": "waterPlansSubmitted", + "dataType": "text", + "validate": "required", + "constraints": [ + "Yes", + "No" + ] + }, + { + "name": "waterPlansNotSubmittedReason", + "dataType": "text", + "validate": "required,maxSize[1250]", + "behaviour": [ + { + "condition": "waterPlansSubmitted == \"No\"", + "type": "enable" + } + ] } ], "viewModel": [ @@ -55,18 +165,50 @@ { "type": "textarea", "source": "coreServicesProgress", - "preLabel": "1. Please outline progress in delivering the Core Services, highlighting key achievements within the past 12 months (1250 character, [approx. 250 word] limit)" + "preLabel": "1. Please outline the key achievements in the delivery of Core Services in the past 12 months. (1250 character, [approx. 250 word] limit)" } ] }, + { + "type": "row", + "items": [ + { + "type": "textarea", + "source": "coreServicesIssues", + "preLabel": "2. Please outline any key issues in the delivery of Core Services in the past 12 months and how they were managed/rectified. (1250 character, [approx. 250 word] limit)" + } + ] + }, + { + "type": "row", + "items": [ + { + "css":"span6", + "type": "selectOne", + "source": "governanceFrameworksMaintained", + "preLabel": "3. In the past 12 months, have appropriate governance frameworks been maintained, as required in the Statement of Work?" + } + ] + }, + { + "type": "row", + "items": [ + { + "type": "textarea", + "source": "managementActionsForGovernanceFrameworks", + "preLabel": "3. a) Please describe what management actions have been taken. (1250 character [approx. 250 word] limit)." + } + ] + + }, { "type": "row", "items": [ { "css":"span6", "type": "selectOne", - "source": "deliveryImpactOccurred", - "preLabel": "2. In the past 12 months, have there been any issues that have impacted on delivery of Core Services?" + "source": "governanceIssuesOccurred", + "preLabel": "4. In the past 12 months, have any governance risks or issues occurred?" } ] }, @@ -75,8 +217,8 @@ "items": [ { "type": "textarea", - "source": "deliveryImpactDescription", - "preLabel": "2. a) Please describe these issues and degree of impact they have had on delivery of Core Services (1250 character [approx. 250 word] limit)." + "source": "managementActionsForGovernanceRisksAndIssues", + "preLabel": "4. a) Please describe what management actions have been taken. (1250 character [approx. 250 word] limit)." } ] @@ -88,7 +230,7 @@ "css":"span6", "type": "selectOne", "source": "adaptiveManagementImplemented", - "preLabel": "3. In the past 12 months, have any adaptive management actions been implemented to improve delivery of Core Services?" + "preLabel": "5. In the past 12 months, have any adaptive management actions been implemented, or are planned to be implemented, to improve the delivery of Core Services?" } ] }, @@ -98,7 +240,149 @@ { "type": "textarea", "source": "adaptiveManagementActions", - "preLabel": "3. a) Please describe these adaptive management actions (1250 character [approx. 250 word] limit)." + "preLabel": "5. a) Please describe these adaptive management actions and how they are/ will be implemented. (1250 character [approx. 250 word] limit)." + } + ] + + }, + { + "type": "row", + "items": [ + { + "css":"span6", + "type": "selectOne", + "source": "whsIncidentsOccurred", + "preLabel": "6. In the past 12 months, have any notifiable Workplace Health and Safety incidents occurred?" + } + ] + }, + { + "type": "row", + "items": [ + { + "type": "textarea", + "source": "whsIncidents", + "preLabel": "6. a) Please describe the Workplace Health and Safety incidents, were they reported and what was the outcome of any investigation. (1250 character [approx. 250 word] limit)." + } + ] + + }, + { + "type": "row", + "items": [ + { + "css":"span6", + "type": "selectOne", + "source": "plansSubmitted", + "preLabel": "7. In the past 12 months, have all plans been submitted as required under the executed Services Agreement?" + } + ] + }, + { + "type": "row", + "items": [ + { + "type": "textarea", + "source": "planDetails", + "preLabel": "7. a) Please provide the name of the plans and the date submitted. If you haven't submitted a plan as required, please provide a reason and proposed timeline for submission. (1250 character [approx. 250 word] limit)." + } + ] + + }, + { + "type": "row", + "items": [ + { + "css":"span6", + "type": "literal", + "source": "8. In the past 12 months, what has been the level of community participation and investment in the RLP?" + } + ] + }, + { + "type": "row", + "items": [ + { + "type": "textarea", + "source": "communityParticipation", + "preLabel": "8. a) Please describe how the community has participated in the delivery of any of the Core Services and projects over the past 12 months, including quantitative figures. (1250 character [approx. 250 word] limit)." + } + ] + + }, + { + "type": "row", + "items": [ + { + "type": "textarea", + "source": "communityParticipationFor20PercentRequirement", + "preLabel": "8. b) Please provide the level of community investment that has occurred over the past 12 months that contributes to the requirement that at least 20% of the combined value of RLP Projects delivered by a Service Provider must directly support the delivery of small on-ground projects and related activities that are delivered by, or directly engage with, the local landcare community (the Requirement). Also include whether you are on track to meet the Requirement over the life of the agreed Services Agreement. (1250 character [approx. 250 word] limit)." + } + ] + + }, + + { + "type": "row", + "items": [ + { + "css":"span6", + "type": "literal", + "source": "9. In the past 12 months, what has been the level of Indigenous participation, employment and procurement in the RLP?" + } + ] + }, + { + "type": "row", + "items": [ + { + "type": "textarea", + "source": "indigenousParticipation", + "preLabel": "9. a) Please describe how Indigenous people have participated in the delivery of any of the Core Services and projects over the past 12 months, including quantitative figures. (1250 character [approx. 250 word] limit)." + } + ] + + }, + { + "type": "row", + "items": [ + { + "type": "textarea", + "source": "indigenousParticipationForClause40Point2", + "preLabel": "9. b) Please provide the level of Indigenous employment and procurement investment that has occurred over the past 12 months, including quantitative figures, that contributes to the requirement of clause 40.2 of the agreed Services Agreement. Also include whether you are on track to meet the requirement of clause 40.2 of the agreed Services Agreement over the life of the agreed Services Agreement. (1250 character [approx. 250 word] limit)." + } + ] + + }, + { + "type": "row", + "items": [ + { + "type": "textarea", + "source": "keyCommunicationActivities", + "preLabel": "10. In the past 12 months, what have been the key communications activities undertaken? (1250 character [approx. 250 word] limit)." + } + ] + + }, + { + "type": "row", + "items": [ + { + "css":"span6", + "type": "selectOne", + "source": "waterPlansSubmitted", + "preLabel": "11. In the past 12 months, have you submitted all of the required reports to the Department of Agriculture and Water Resources in relation to the Regional Agriculture Landcare Facilitator position?" + } + ] + }, + { + "type": "row", + "items": [ + { + "type": "textarea", + "source": "waterPlansNotSubmittedReason", + "preLabel": "11. a) Please provide a reason why and describe what management actions have been implemented to rectify this. (1250 character [approx. 250 word] limit)." } ] diff --git a/models/rlpNegotiations/dataModel.json b/models/rlpNegotiations/dataModel.json index 3cb91f253..164963f33 100644 --- a/models/rlpNegotiations/dataModel.json +++ b/models/rlpNegotiations/dataModel.json @@ -32,7 +32,7 @@ { "dataType": "text", "name": "negotiationObjective", - "description": "Please provide a brief description of negotiations. Separate multiple with a ‘,’", + "description": "Please provide a brief description of negotiations. Separate multiple with a ‘;’", "validate": "required,maxSize[300]" } ], diff --git a/models/rlpOutputReportAdjustment/dataModel.json b/models/rlpOutputReportAdjustment/dataModel.json new file mode 100644 index 000000000..fb681c913 --- /dev/null +++ b/models/rlpOutputReportAdjustment/dataModel.json @@ -0,0 +1,164 @@ +{ + "dataModel": [ + { + "columns": [ + { + "dataType": "text", + "name": "service" + }, + { + "dataType": "text", + "name": "scoreId" + }, + { + "dataType": "text", + "name": "targetMeasure", + "description": "The output target measure to be adjusted." + }, + { + "dataType": "number", + "name": "currentContribution", + "description": "The quantity the report being adjusted contributed to the target measure" + }, + { + "dataType": "number", + "name": "correctedValue", + "description": "The value the report should have produced for this target measure", + "validate": "required,min[-999999999]" + }, + { + "dataType": "number", + "name": "adjustment", + "description": "Amount of adjustment required (may be a negative number to reduce the amount reported against a target)", + "validate": "required,min[-999999999]", + "computed": { + "expression": "correctedValue - currentContribution" + }, + "behaviour": [ + { + "condition": "adjustment != \"0\"", + "type": "enable" + } + ] + }, + { + "dataType": "text", + "name": "reason", + "description": "The reason this value needs to be adjusted", + "validate": "required,maxSize[1125]", + "behaviour": [ + { + "condition": "adjustment != \"0\"", + "type": "enable" + } + ] + } + ], + "dataType": "list", + "name": "adjustments", + "description": "" + } + ], + "modelName": "RLP Output Report Adjustment", + "pre-populate": [ + { + "mapping": [ + { + "mapping": [ + { + "source-path": "name", + "target": "service" + }, + { + "source-path": "targetMeasure", + "target": "targetMeasure" + }, + { + "source-path": "scoreId", + "target": "scoreId" + }, + { + "source-path": "result", + "target": "currentContribution" + }, + { + "source-path": "result", + "target": "correctedValue" + } + ], + "source-path": "targets", + "target": "adjustments" + } + ], + "merge": true, + "source": { + "url": "/project/getProjectTargetsForAdjustmentsReport/", + "params": [ + { + "name": "id", + "type": "computed", + "expression": "owner.projectId" + }, + { + "name": "reportId", + "type": "computed", + "expression": "reportId" + } + ] + } + } + ], + "title": "Adjustment of target measures", + "viewModel": [ + { + "source": "adjustments", + "type": "table", + "disableTableUpload":true, + "columns": [ + { + "title": "Project Service", + "readonly": true, + "source": "service", + "type": "textarea", + "rows": 3, + "width": "15%" + }, + { + "title": "Output Measure", + "readonly": true, + "source": "targetMeasure", + "type": "textarea", + "rows": 3, + "width": "22%" + }, + { + "title": "Reported measure requiring adjustment", + "readonly": true, + "source": "currentContribution", + "type": "number", + "width": "11%" + }, + { + "title": "Correct value", + "source": "correctedValue", + "type": "number", + "width": "11%" + }, + { + "title": "Adjustment", + "source": "adjustment", + "type": "number", + "width": "11%", + "readonly": true + }, + { + "title": "Describe why the value requires adjustment", + "source": "reason", + "type": "textarea", + "rows": 3, + "width": "30%" + } + ] + } + ] +} \ No newline at end of file diff --git a/scripts/misc/fixStageReportDates.js b/scripts/misc/fixStageReportDates.js new file mode 100644 index 000000000..3a8571810 --- /dev/null +++ b/scripts/misc/fixStageReportDates.js @@ -0,0 +1,5 @@ +db.report.remove({reportId:'9785677d-498d-422a-937d-c8c5cd63aa27'}); + +db.report.remove({reportId:'870be9b7-3188-41ba-aab0-4ced7bcafd75'}); + +db.report.update({reportId:'93550066-323f-4b51-8c05-95a6b4b3d8f2'}, {$set:{name:'Stage 2', fromDate:ISODate('2012-12-31T01:00:00Z'), toDate:ISODate('2013-07-01T02:00:00Z')}}); \ No newline at end of file diff --git a/scripts/misc/loadRlpScores.js b/scripts/misc/loadRlpScores.js index e9be5a867..24b8fa3ef 100644 --- a/scripts/misc/loadRlpScores.js +++ b/scripts/misc/loadRlpScores.js @@ -30,5 +30,47 @@ for (var i=0; i 1) { + throw "Uhoh"; + } + + score.configuration = { + label: original.label, + childAggregations : [ + adjustmentConfiguration, + { + filter:original.filter, + childAggregations: original.childAggregations + } + ] + }; + + db.score.save(score); + } diff --git a/scripts/misc/makeRlpOutputReportsAdjustable.js b/scripts/misc/makeRlpOutputReportsAdjustable.js new file mode 100644 index 000000000..8e2989896 --- /dev/null +++ b/scripts/misc/makeRlpOutputReportsAdjustable.js @@ -0,0 +1,17 @@ +var programs = db.program.find({parent:{$exists:true}}); +while (programs.hasNext()) { + var program = programs.next(); + + if (program.config && program.config.projectReports) { + for (var i=0; i activity2.plannedEndDate) { + throw "Activity 1 finishes after activity 2"; +} + +var outputs = db.output.find({activityId:activity2Id}); +while (outputs.hasNext()) { + var output = outputs.next(); + output.activityId = activity1.activityId; + db.output.save(output); + audit(output, output.outputId, 'au.org.ala.ecodata.Output'); +} + +var documents = db.document.find({activityId:activity2Id}); +while (documents.hasNext()) { + var document = documents.next(); + document.activityId = activity1.activityId; + db.document.save(document); + audit(document, document.documentId, 'au.org.ala.ecodata.Document'); +} + +// Now update. +var activity2Progress = activity2.progress; +activity2.progress = activity1.progress; +activity1.progress = activity2Progress; + +db.activity.save(activity1); +audit(activity1, activity1.activityId, 'au.org.ala.ecodata.Activity'); + +db.activity.save(activity2); +audit(activity2, activity2.activityId, 'au.org.ala.ecodata.Activity'); + + + + + + + + + diff --git a/scripts/misc/rlpScores.js b/scripts/misc/rlpScores.js index 94064550d..73544be37 100644 --- a/scripts/misc/rlpScores.js +++ b/scripts/misc/rlpScores.js @@ -1115,11 +1115,11 @@ scores = [ "childAggregations": [{ "filter": { "filterValue": "Initial", - "property": "data.weedSpeciesTreated.initialOrFollowup", + "property": "data.weedTreatmentSites.initialOrFollowup", "type": "filter" }, "childAggregations": [{ - "property": "data.weedSpeciesTreated.areaTreatedHa", + "property": "data.weedTreatmentSites.areaTreatedHa", "type": "SUM" }] }], @@ -1143,11 +1143,11 @@ scores = [ "childAggregations": [{ "filter": { "filterValue": "Follow-up", - "property": "data.weedSpeciesTreated.initialOrFollowup", + "property": "data.weedTreatmentSites.initialOrFollowup", "type": "filter" }, "childAggregations": [{ - "property": "data.weedSpeciesTreated.areaTreatedHa", + "property": "data.weedTreatmentSites.areaTreatedHa", "type": "SUM" }] }], @@ -1171,11 +1171,11 @@ scores = [ "childAggregations": [{ "filter": { "filterValue": "Initial", - "property": "data.weedSpeciesTreated.initialOrFollowup", + "property": "data.weedTreatmentSites.initialOrFollowup", "type": "filter" }, "childAggregations": [{ - "property": "data.weedSpeciesTreated.lengthTreatedKm", + "property": "data.weedTreatmentSites.lengthTreatedKm", "type": "SUM" }] }], @@ -1199,11 +1199,11 @@ scores = [ "childAggregations": [{ "filter": { "filterValue": "Follow-up", - "property": "data.weedSpeciesTreated.initialOrFollowup", + "property": "data.weedTreatmentSites.initialOrFollowup", "type": "filter" }, "childAggregations": [{ - "property": "data.weedSpeciesTreated.lengthTreatedKm", + "property": "data.weedTreatmentSites.lengthTreatedKm", "type": "SUM" }] }], diff --git a/scripts/misc/undeleteProject.js b/scripts/misc/undeleteProject.js new file mode 100644 index 000000000..d17423b0e --- /dev/null +++ b/scripts/misc/undeleteProject.js @@ -0,0 +1,42 @@ +// Attempt to restore a project that was deleted. +var project = db.project.find({externalId:'MEC2_NY_030'}).next(); +print(project.projectId); + +db.project.update({projectId:project.projectId}, {$set:{status:'active'}}); + +var sites = db.auditMessage.find({entityType:'au.org.ala.ecodata.Site', 'entity.projects':project.projectId}); +while (sites.hasNext()) { + var am = sites.next(); + + var site = db.site.find({siteId:am.entity.siteId}).next(); + + print("Found site: "+site.siteId); + var projects = [project.projectId]; + + db.site.update({siteId:site.siteId}, {$set:{status:'active', projects: projects}}); + +} + +var activities = db.activity.find({projectId:project.projectId}); +while(activities.hasNext()) { + var activity = activities.next(); + print("Found activity: "+activity.activityId); + db.activity.update({activityId:activity.activityId}, {$set:{status:'active'}}); + + var outputs = db.output.find({activityId:activity.activityId}); + while (outputs.hasNext()) { + var output= outputs.next(); + print("Found output: "+output.outputId); + db.output.update({outputId:output.outputId}, {$set:{status:'active'}}); + } +} + +var documents = db.document.find({projectId:project.projectId}); +while(documents.hasNext()) { + var document = documents.next(); + print("Found document: "+document.documentId); + + db.document.update({documentId:document.documentId}, {$set:{status:'active'}}); +} + +db.userPermission.update({entityId:project.project}, {$set:{status:'active'}}); \ No newline at end of file diff --git a/scripts/misc/updateRlpScores.js b/scripts/misc/updateRlpScores.js new file mode 100644 index 000000000..705b1f0ea --- /dev/null +++ b/scripts/misc/updateRlpScores.js @@ -0,0 +1,47 @@ +var scores = db.score.find({category:'RLP'}); +while (scores.hasNext()) { + var score = scores.next(); + + var adjustmentConfiguration = { + filter: { + filterValue: 'RLP - Output Report Adjustment', + type:'filter', + property:'name' + }, + childAggregations: [ + { + filter: { + filterValue: score.scoreId, + type:'filter', + property:'data.adjustments.scoreId' + }, + childAggregations: [ + { + property:'data.adjustments.adjustment', + type:'SUM' + } + ] + + } + ] + }; + + var original = score.configuration; + if (original.childAggregations.length > 1) { + throw "Uhoh"; + } + + score.configuration = { + label: original.label, + childAggregations : [ + adjustmentConfiguration, + { + filter:original.filter, + childAggregations: original.childAggregations + } + ] + }; + + db.score.save(score); + +} diff --git a/src/groovy/au/org/ala/ecodata/reporting/ReportGroups.groovy b/src/groovy/au/org/ala/ecodata/reporting/ReportGroups.groovy index 1270da01c..65749e238 100644 --- a/src/groovy/au/org/ala/ecodata/reporting/ReportGroups.groovy +++ b/src/groovy/au/org/ala/ecodata/reporting/ReportGroups.groovy @@ -1,5 +1,6 @@ package au.org.ala.ecodata.reporting +import org.joda.time.DateTime import org.joda.time.DateTimeZone import org.joda.time.format.DateTimeFormat import org.joda.time.format.DateTimeFormatter @@ -120,9 +121,10 @@ class ReportGroups { static DateTimeFormatter parser = ISODateTimeFormat.dateTimeNoMillis().withZone(DateTimeZone.default) DateTimeFormatter dateFormatter - def buckets - def bucketStartLabels - def bucketEndLabels + List buckets + List bucketStartLabels + List bucketEndLabels + List dateBuckets /** * @param nestedProperty the name of the property to use to get the value that will be sorted into a bucket. @@ -134,18 +136,20 @@ class ReportGroups { super(nestedProperty) this.buckets = new ArrayList(buckets) + Collections.sort(this.buckets) this.dateFormatter = DateTimeFormat.forPattern(dateFormat).withZone(DateTimeZone.default) - this.bucketStartLabels = buckets.collect{ - this.dateFormatter.print(parser.parseDateTime(it)) + this.dateBuckets = buckets.collect { parser.parseDateTime(it) } + this.bucketStartLabels = dateBuckets.collect{ + this.dateFormatter.print(it) } - this.bucketEndLabels = buckets.collect { + this.bucketEndLabels = dateBuckets.collect { DateTime date -> // Because the buckets are half open, we subtract one day from the end dates so // that a range of 1 Jan - 1 Feb is printed as Jan (otherwise it would be Jan - Feb which is // incorrect). The day is so we don't have to worry about time zone problems - this.dateFormatter.print(parser.parseDateTime(it).minusDays(1)) + this.dateFormatter.print(date.minusDays(1)) } } @@ -153,11 +157,20 @@ class ReportGroups { def group(data) { def value = propertyAccessor.getPropertyValue(data) - int result = Collections.binarySearch(buckets, value) + int result = bucketIndex(value) return result >= 0 ? groupName(result) : groupName((-result)-2) } + int bucketIndex(String value) { + Collections.binarySearch(buckets, value) + } + + int bucketIndex(Date value) { + Collections.binarySearch(dateBuckets, new DateTime(value)) + } + + def groupName(index) { if (index == -1) { diff --git a/test/unit/au/org/ala/ecodata/ReportSpec.groovy b/test/unit/au/org/ala/ecodata/ReportSpec.groovy index f90e53095..a9d986b70 100644 --- a/test/unit/au/org/ala/ecodata/ReportSpec.groovy +++ b/test/unit/au/org/ala/ecodata/ReportSpec.groovy @@ -38,12 +38,12 @@ class ReportSpec extends Specification { void "when a report is submitted, history should be recorded"() { when: - Report report = new Report(reportId:'blah', name:'My report', type:Report.TYPE_ACTIVITY, fromDate:new Date(), toDate: new Date(), dueDate: new Date()) + Report report = new Report(reportId:'aReportId', name:'My report', type:Report.TYPE_ACTIVITY, fromDate:new Date(), toDate: new Date(), dueDate: new Date()) report.submit('1234') report.save(flush:true, failOnError:true) then: - def savedReport = Report.findByReportId('blah') + def savedReport = Report.findByReportId('aReportId') savedReport.submittedBy == '1234' savedReport.publicationStatus == Report.REPORT_SUBMITTED savedReport.dateSubmitted != null @@ -52,13 +52,13 @@ class ReportSpec extends Specification { void "when a report is approved, history should be recorded"() { when: - Report report = new Report(reportId:'blah', name:'My report', type:Report.TYPE_ACTIVITY, fromDate:new Date(), toDate: new Date(), dueDate: new Date()) + Report report = new Report(reportId:'aReportId', name:'My report', type:Report.TYPE_ACTIVITY, fromDate:new Date(), toDate: new Date(), dueDate: new Date()) report.submit('1234') report.approve('1234') report.save(flush:true, failOnError:true) then: - def savedReport = Report.findByReportId('blah') + def savedReport = Report.findByReportId('aReportId') savedReport.approvedBy == '1234' savedReport.publicationStatus == Report.REPORT_APPROVED savedReport.dateApproved != null @@ -67,17 +67,33 @@ class ReportSpec extends Specification { void "when a report is returned to a user, history should be recorded"() { when: - Report report = new Report(reportId:'blah', name:'My report', type:Report.TYPE_ACTIVITY, fromDate:new Date(), toDate: new Date(), dueDate: new Date()) + Report report = new Report(reportId:'aReportId', name:'My report', type:Report.TYPE_ACTIVITY, fromDate:new Date(), toDate: new Date(), dueDate: new Date()) report.returnForRework('1234') report.save(flush:true, failOnError:true) then: - def savedReport = Report.findByReportId('blah') + def savedReport = Report.findByReportId('aReportId') savedReport.returnedBy == '1234' savedReport.publicationStatus == Report.REPORT_NOT_APPROVED savedReport.dateReturned != null savedReport.statusChangeHistory.size() == 1 } + void "an adjustment report needs to reference another report"() { + when: + Report report = new Report(reportId:'aReportId', name:'My report', type:Report.TYPE_ADJUSTMENT, fromDate:new Date(), toDate: new Date(), dueDate: new Date()) + + then: + report.validate() == false + report.getErrors().getFieldError('adjustedReportId') != null + + when: + report.adjustedReportId = 'otherId' + + then: + report.validate() == true + + } + } diff --git a/test/unit/au/org/ala/ecodata/ReportingServiceSpec.groovy b/test/unit/au/org/ala/ecodata/ReportingServiceSpec.groovy index 9f2496b47..a170a00f5 100644 --- a/test/unit/au/org/ala/ecodata/ReportingServiceSpec.groovy +++ b/test/unit/au/org/ala/ecodata/ReportingServiceSpec.groovy @@ -5,6 +5,7 @@ import grails.test.mixin.TestMixin import grails.test.mixin.domain.DomainClassUnitTestMixin import grails.test.mixin.gorm.Domain import grails.test.mixin.mongodb.MongoDbTestMixin +import org.h2.engine.User import org.springframework.context.MessageSource import org.springframework.transaction.PlatformTransactionManager import org.springframework.transaction.TransactionStatus @@ -17,22 +18,27 @@ class ReportingServiceSpec extends Specification { CommonService commonService = new CommonService() ActivityService activityService = Mock(ActivityService) + UserService userService = Mock(UserService) def setup() { commonService.grailsApplication = grailsApplication commonService.messageSource = Mock(MessageSource) service.commonService = commonService service.activityService = activityService + service.userService = userService service.transactionManager = Mock(PlatformTransactionManager) { getTransaction(_) >> Mock(TransactionStatus) } + userService.getCurrentUserDetails() >> ['userId':'1234'] + Report.findAll().each { it.delete(flush:true) } } def cleanup() { Report.findAll().each { it.delete(flush:true) } + Activity.findAll().each {it.delete(flush:true) } } void "Resetting a single activity report should delete associated output data"() { @@ -40,6 +46,9 @@ class ReportingServiceSpec extends Specification { String reportId = '1' Date now = new Date() + Activity activity = new Activity(activityId:'activity1', name:"Activity", description:"activity 1") + activity.save(flush:true, failOnError:true) + Report report = new Report(reportId: reportId, name: 'test 1', description: 'description 1', activityType: "Activity", activityId:'activity1', type: Report.TYPE_ACTIVITY, fromDate: now, toDate: now) report.save(flush: true, failOnError: true) @@ -101,4 +110,67 @@ class ReportingServiceSpec extends Specification { } + void "A report of type adjustment cannot be adjusted"() { + setup: + String reportId = '1' + Date now = new Date() + Activity activity = new Activity(activityId:'a1', name:"Activity", description:"activity 1") + activity.save(flush:true, failOnError:true) + Report report = new Report(reportId: reportId, adjustedReportId: '2', name: 'test 1', description: 'description 1', activityType: "Activity", type: Report.TYPE_ADJUSTMENT, fromDate: now, toDate: now, activityId:activity.activityId) + report.save(flush:true, failOnError: true) + + when: + Report adjustmentReport = service.adjust(reportId, "", "test") + + then: + adjustmentReport.hasErrors() == true + adjustmentReport.statusChangeHistory.find{it.status == 'adjusted'} == null + } + + void "A report that is already adjusted cannot be adjusted again"() { + setup: + String reportId = '1' + Date now = new Date() + Activity activity = new Activity(activityId:'a1', name:"Activity", description:"activity 1") + activity.save(flush:true, failOnError:true) + Report report = new Report(reportId: reportId, name: 'test 1', description: 'description 1', activityType: "Activity", type: Report.TYPE_ACTIVITY, fromDate: now, toDate: now, activityId:activity.activityId, dateAdjusted: now, adjustedBy:'1234') + report.save(flush:true, failOnError: true) + + when: + Report adjustmentReport = service.adjust(reportId, "", "test") + + then: + adjustmentReport.hasErrors() == true + + } + + void "Adjusting a report will create a new report of type Adjustment and update the status history of the original report"() { + setup: + String reportId = '1' + Date now = new Date() + Activity activity = new Activity(activityId:'a1', name:"Activity", description:"activity 1") + activity.save(flush:true, failOnError:true) + Report report = new Report(reportId: reportId, name: 'test 1', description: 'description 1', publicationStatus:'published', activityType: "Activity", type: Report.TYPE_ACTIVITY, fromDate: now, toDate: now, activityId:activity.activityId) + report.save(flush:true, failOnError: true) + Report adjustmentReport = null + Report original = null + + when: + Report.withSession { session -> + adjustmentReport = service.adjust(reportId, "", "test") + session.flush() + original = Report.findByReportId(report.reportId) + } + + then: + adjustmentReport.hasErrors() == false + adjustmentReport.type == Report.TYPE_ADJUSTMENT + adjustmentReport.adjustedReportId == reportId + adjustmentReport.activityType == "test" + 1 * activityService.create(_) >> [:] + original.isAdjusted() == true + original.adjustedBy == "1234" + original.dateAdjusted != null + } + }