-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
7.74.1.Final
-
None
-
False
-
None
-
False
-
NEW
-
NEW
-
---
-
---
-
-
When executing TotalCompletionTimeAssignmentStrategyTest with postgres as db, we obtain the following exception:
Caused by: org.postgresql.util.PSQLException: ERROR: column "bamtasksum0_.taskname" must appear in the GROUP BY clause or be used in an aggregate function
Position: 119
This is the query:
private static String TASK_AVG_DURATION = ""
+ "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";
Usual approach to fixing this error is to simply write all the columns from SELECT in the GROUP BY clause, therefore including "bts.taskName" in the group by clause.