From 711e13b192e602aa0a14a075ca108e1ca0caae98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Mu=C3=B1oz?= Date: Wed, 13 Sep 2023 16:05:54 +0200 Subject: [PATCH] [JBPM-10194] Fix TASK_AVG_DURATION query for postgres (#2331) --- .../task/assignment/impl/TotalCompletionTimeLoadCalculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jbpm-human-task/jbpm-human-task-audit/src/main/java/org/jbpm/services/task/assignment/impl/TotalCompletionTimeLoadCalculator.java b/jbpm-human-task/jbpm-human-task-audit/src/main/java/org/jbpm/services/task/assignment/impl/TotalCompletionTimeLoadCalculator.java index b657d96bfa..a0901faae9 100644 --- a/jbpm-human-task/jbpm-human-task-audit/src/main/java/org/jbpm/services/task/assignment/impl/TotalCompletionTimeLoadCalculator.java +++ b/jbpm-human-task/jbpm-human-task-audit/src/main/java/org/jbpm/services/task/assignment/impl/TotalCompletionTimeLoadCalculator.java @@ -50,7 +50,7 @@ public class TotalCompletionTimeLoadCalculator extends AbstractLoadCalculator { + "select new org.jbpm.services.task.assignment.impl.TaskAverageDuration(avg(bts.duration),t.taskData.deploymentId,t.taskData.processId,bts.taskName) " + "from BAMTaskSummaryImpl bts left join TaskImpl t on (bts.taskId = t.id) " + "where (bts.duration is not null) and t.taskData.processId = :procid and t.taskData.deploymentId = :depid and t.name = :taskname " - + "group by t.taskData.deploymentId, t.taskData.processId, t.name"; + + "group by t.taskData.deploymentId, t.taskData.processId, t.name, bts.taskName"; /** * Initialize the cache