Skip to content

Commit

Permalink
Merge pull request #1045 from AtlasOfLivingAustralia/feature/pwa2
Browse files Browse the repository at this point in the history
adding published survey flag to projectActivities
  • Loading branch information
jack-brinkman authored Dec 11, 2024
2 parents de75e7e + 3387de2 commit b3203b2
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class ElasticSearchService {
RestHighLevelClient client
ElasticSearchIndexManager indexManager
def indexingTempInactive = false // can be set to true for loading of dump files, etc
def ALLOWED_DOC_TYPES = [Project.class.name, Site.class.name, Document.class.name, Activity.class.name, Record.class.name, Organisation.class.name, UserPermission.class.name, Program.class.name, Output.class.name]
def ALLOWED_DOC_TYPES = [Project.class.name, Site.class.name, Document.class.name, Activity.class.name, Record.class.name, Organisation.class.name, UserPermission.class.name, Program.class.name, Output.class.name, ProjectActivity.class.name]
def DEFAULT_FACETS = 10
private static Queue<IndexDocMsg> _messageQueue = new ConcurrentLinkedQueue<IndexDocMsg>()

Expand Down Expand Up @@ -642,6 +642,14 @@ class ElasticSearchService {
indexHomePage(doc, Project.class.name)
}
break
case ProjectActivity.class.name:
// make sure updates to project activity updates project object.
// helps BioCollect mobile app show correct surveys.
ProjectActivity projectActivity = ProjectActivity.findByProjectActivityId(docId)
if (projectActivity?.projectId) {
indexDocType(projectActivity.projectId, Project.class.name)
}
break
}
}

Expand Down Expand Up @@ -1174,6 +1182,7 @@ class ElasticSearchService {
name: it.name,
startDate: it.startDate,
endDate: it.endDate,
published: it.published
]
})
}
Expand Down

0 comments on commit b3203b2

Please sign in to comment.