Skip to content

Commit

Permalink
Updated the SciStarter initiator to use the projectArea
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-brinkman committed Oct 3, 2024
1 parent ec01f60 commit 16e030f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,10 @@ class BioCollect {
]
}

Map siteGeom;
doc?.sites?.each { site ->
if (doc?.projectSiteId == site.siteId) {
siteGeom = site.extent?.geometry;
}
}

[
projectId : doc.projectId,
aim : doc.aim,
coverage : siteGeom,
coverage : doc.projectArea?.geoIndex,
description : doc.description,
difficulty : doc.difficulty,
endDate : doc.plannedEndDate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ class SciStarter {
]
}

Map siteGeom;
doc?.sites?.each { site ->
if (doc?.projectSiteId == site.siteId) {
siteGeom = site.geoIndex
}
}

[
projectId : doc.projectId,
name : doc.name,
Expand Down Expand Up @@ -76,7 +69,7 @@ class SciStarter {
plannedStartDate : doc.plannedStartDate,
plannedEndDate : doc.plannedEndDate,
endDate : doc.plannedEndDate,
coverage : siteGeom,
coverage : doc.projectArea?.geoIndex,
links : trimmedLinks,
startDate : doc.plannedStartDate,
url : params.url + "/acsa/project/index/" + doc.projectId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ class Seed {
]
}

Map siteGeom;
doc?.sites?.each { site ->
if (doc?.projectSiteId == site.siteId) {
siteGeom = site.extent?.geometry;
}
}

def projectActivities = doc.projectActivities?.collect {
def pActivity = [
name: it.name,
Expand All @@ -63,7 +56,7 @@ class Seed {
[
projectId : doc.projectId,
aim : doc.aim,
coverage : siteGeom,
coverage : doc.projectArea?.geoIndex,
description : doc.description,
difficulty : doc.difficulty,
endDate : doc.plannedEndDate,
Expand Down

0 comments on commit 16e030f

Please sign in to comment.