Skip to content

Commit

Permalink
Fixed code review issue around filtering #2971
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Nov 26, 2023
1 parent 543c774 commit 127723f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class NHTOutputReportData extends ReportData {
Map getContextData(Map project) {
// Side effect - filter data sets.
project.custom.dataSets = new JSONArray(project.custom.dataSets?.findAll {
it.progress == ActivityService.PROGRESS_FINISHED
// This is a side effect and a workaround for the problem that selected outcomes
// are an array and the knockout binding doesn't support arrays as a value.
if (it.projectOutcomes) {
it.outcomesLabel = new ArrayList(it.projectOutcomes).join(',')
}
it.progress == ActivityService.PROGRESS_FINISHED
})
return [
protocols:projectService.listProjectProtocols(project).collect {
Expand Down

0 comments on commit 127723f

Please sign in to comment.