Skip to content

Commit

Permalink
project activity change trigger update of project
Browse files Browse the repository at this point in the history
  • Loading branch information
temi authored and chrisala committed Dec 11, 2024
1 parent b756005 commit 1fdd361
Showing 1 changed file with 9 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

0 comments on commit 1fdd361

Please sign in to comment.