From 3d3418e44b439df8d8794249d055f53b81cc1ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Kl=C3=A4ger?= Date: Tue, 20 Feb 2018 11:33:33 +0100 Subject: [PATCH] TSK-267: Add category filter to reports --- .../java/pro/taskana/TaskMonitorService.java | 110 +++++++++++++----- .../taskana/impl/TaskMonitorServiceImpl.java | 65 ++++++----- .../taskana/mappings/TaskMonitorMapper.java | 38 +++--- .../ProvideCategoryReportAccTest.java | 49 +++++++- .../ProvideClassificationReportAccTest.java | 99 +++++++++------- .../ProvideCustomFieldValueReportAccTest.java | 57 ++++++++- ...deDetailedClassificationReportAccTest.java | 70 ++++++++++- .../ProvideWorkbasketLevelReportAccTest.java | 61 +++++++++- .../impl/TaskMonitorServiceImplTest.java | 76 +++++++----- 9 files changed, 468 insertions(+), 157 deletions(-) diff --git a/lib/taskana-core/src/main/java/pro/taskana/TaskMonitorService.java b/lib/taskana-core/src/main/java/pro/taskana/TaskMonitorService.java index 269f45968..92b070110 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/TaskMonitorService.java +++ b/lib/taskana-core/src/main/java/pro/taskana/TaskMonitorService.java @@ -17,17 +17,20 @@ public interface TaskMonitorService { /** * Returns a {@link Report} for a given list of {@link Workbasket}s and for a given list of {@link TaskState}s. The * report only contains the number of all tasks of the respective workbasket as well as the total sum of all tasks. - * Only tasks with a state in the list of TaskStates are provided. Task with Timestamp DUE = null are not - * considered. + * Only tasks with a state in the list of TaskStates and a category in the list of categories are provided. Task + * with Timestamp DUE = null are not considered. * * @param workbaskets * a list of {@link Workbasket} objects that should be listed in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @return a {@link Report} object that only contains the number of all tasks of the respective workbasket as well * as the total number of all tasks */ - Report getWorkbasketLevelReport(List workbaskets, List states); + Report getWorkbasketLevelReport(List workbaskets, List states, List categories); /** * Returns a {@link Report} for a given list of {@link Workbasket}s, a given list of {@link TaskState}s and a given @@ -40,6 +43,9 @@ public interface TaskMonitorService { * a list of {@link Workbasket} objects that should be listed in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param reportLineItemDefinitions * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster * of due dates. Days in past are represented as negative values and days in the future are represented @@ -49,7 +55,7 @@ public interface TaskMonitorService { * @return a {@link Report} object that represents an overview of all tasks in the */ Report getWorkbasketLevelReport(List workbaskets, List states, - List reportLineItemDefinitions); + List categories, List reportLineItemDefinitions); /** * Returns a {@link Report} for a given list of {@link Workbasket}s, a given list of {@link TaskState}s and a given @@ -61,6 +67,9 @@ public interface TaskMonitorService { * a list of {@link Workbasket} objects that should be listed in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param reportLineItemDefinitions * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster * of due dates. Days in past are represented as negative values and days in the future are represented @@ -73,7 +82,7 @@ public interface TaskMonitorService { * @return a {@link Report} object that represents an overview of all tasks in the */ Report getWorkbasketLevelReport(List workbaskets, List states, - List reportLineItemDefinitions, boolean inWorkingDays); + List categories, List reportLineItemDefinitions, boolean inWorkingDays); /** * Returns a {@link Report} with categories for a given list of {@link Workbasket}s and for a given list of @@ -82,13 +91,16 @@ public interface TaskMonitorService { * null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @return a {@link Report} object that only contains the number of all tasks of the respective category as well as * the total number of all tasks */ - Report getCategoryReport(List workbaskets, List states); + Report getCategoryReport(List workbaskets, List states, List categories); /** * Returns a {@link Report} with categories for a given list of {@link Workbasket}s, a given list of @@ -98,9 +110,12 @@ public interface TaskMonitorService { * Tasks with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param reportLineItemDefinitions * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster * of due dates. Days in past are represented as negative values and days in the future are represented @@ -109,7 +124,7 @@ public interface TaskMonitorService { * should represent a single day, lowerLimit and upperLimit have to be equal. * @return a {@link Report} object that represents an overview of all tasks of the respective category */ - Report getCategoryReport(List workbaskets, List states, + Report getCategoryReport(List workbaskets, List states, List categories, List reportLineItemDefinitions); /** @@ -119,9 +134,12 @@ public interface TaskMonitorService { * with a state in the list of TaskStates are provided. Tasks with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param reportLineItemDefinitions * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster * of due dates. Days in past are represented as negative values and days in the future are represented @@ -133,7 +151,7 @@ public interface TaskMonitorService { * working days. * @return a {@link Report} object that represents an overview of all tasks of the respective category */ - Report getCategoryReport(List workbaskets, List states, + Report getCategoryReport(List workbaskets, List states, List categories, List reportLineItemDefinitions, boolean inWorkingDays); /** @@ -143,13 +161,17 @@ public interface TaskMonitorService { * provided. Task with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @return a {@link ClassificationReport} object that only contains the number of all tasks of the respective * classification as well as the total number of all tasks */ - ClassificationReport getClassificationReport(List workbaskets, List states); + ClassificationReport getClassificationReport(List workbaskets, List states, + List categories); /** * Returns a {@link ClassificationReport} grouped by classifications for a given list of {@link Workbasket}s, a @@ -159,9 +181,12 @@ public interface TaskMonitorService { * TaskStates are provided. Tasks with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param reportLineItemDefinitions * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster * of due dates. Days in past are represented as negative values and days in the future are represented @@ -172,7 +197,7 @@ public interface TaskMonitorService { * classification */ ClassificationReport getClassificationReport(List workbaskets, List states, - List reportLineItemDefinitions); + List categories, List reportLineItemDefinitions); /** * Returns a {@link DetailedClassificationReport} grouped by classifications for a given list of @@ -182,9 +207,12 @@ public interface TaskMonitorService { * Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param reportLineItemDefinitions * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster * of due dates. Days in past are represented as negative values and days in the future are represented @@ -198,7 +226,7 @@ public interface TaskMonitorService { * classification */ DetailedClassificationReport getDetailedClassificationReport(List workbaskets, List states, - List reportLineItemDefinitions, boolean inWorkingDays); + List categories, List reportLineItemDefinitions, boolean inWorkingDays); /** * Returns a {@link DetailedClassificationReport} grouped by classifications for a given list of {@link Workbasket}s @@ -207,13 +235,17 @@ public interface TaskMonitorService { * provided. Task with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @return a {@link DetailedClassificationReport} object that only contains the number of all tasks of the * respective classification as well as the total number of all tasks */ - DetailedClassificationReport getDetailedClassificationReport(List workbaskets, List states); + DetailedClassificationReport getDetailedClassificationReport(List workbaskets, List states, + List categories); /** * Returns a {@link DetailedClassificationReport} grouped by classifications for a given list of @@ -223,9 +255,12 @@ public interface TaskMonitorService { * state in the list of TaskStates are provided. Tasks with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param reportLineItemDefinitions * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster * of due dates. Days in past are represented as negative values and days in the future are represented @@ -236,7 +271,7 @@ public interface TaskMonitorService { * classification */ DetailedClassificationReport getDetailedClassificationReport(List workbaskets, List states, - List reportLineItemDefinitions); + List categories, List reportLineItemDefinitions); /** * Returns a {@link ClassificationReport} grouped by classifications for a given list of {@link Workbasket}s, a @@ -246,9 +281,12 @@ public interface TaskMonitorService { * considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param reportLineItemDefinitions * a list of {@link ReportLineItemDefinition} objects that specify the subdivision into different cluster * of due dates. Days in past are represented as negative values and days in the future are represented @@ -262,7 +300,7 @@ public interface TaskMonitorService { * classification */ ClassificationReport getClassificationReport(List workbaskets, List states, - List reportLineItemDefinitions, boolean inWorkingDays); + List categories, List reportLineItemDefinitions, boolean inWorkingDays); /** * Returns a {@link Report} grouped by the value of a certain {@link CustomField} for a given list of @@ -271,15 +309,19 @@ public interface TaskMonitorService { * list of TaskStates are provided. Task with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param customField * a {@link CustomField} whose values should be listed in the report * @return a {@link Report} object that only contains the number of all tasks of the respective value of the custom * field as well as the total number of all tasks */ - Report getCustomFieldValueReport(List workbaskets, List states, CustomField customField); + Report getCustomFieldValueReport(List workbaskets, List states, List categories, + CustomField customField); /** * Returns a {@link Report} grouped by the value of a certain {@link CustomField} for a given list of @@ -289,9 +331,12 @@ public interface TaskMonitorService { * with a state in the list of TaskStates are provided. Tasks with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param customField * a {@link CustomField} whose values should be listed in the report * @param reportLineItemDefinitions @@ -304,8 +349,8 @@ public interface TaskMonitorService { * @return a {@link Report} object that represents an overview of all tasks of the respective value of the custom * field */ - Report getCustomFieldValueReport(List workbaskets, List states, CustomField customField, - List reportLineItemDefinitions); + Report getCustomFieldValueReport(List workbaskets, List states, List categories, + CustomField customField, List reportLineItemDefinitions); /** * Returns a {@link Report} grouped by the value of a certain {@link CustomField} for a given list of @@ -315,9 +360,12 @@ public interface TaskMonitorService { * with Timestamp DUE = null are not considered. * * @param workbaskets - * a list of {@link Workbasket} objects whose task should be considered in the report + * a list of {@link Workbasket} objects whose tasks should be considered in the report * @param states * a list of {@link TaskState} objects that specify the states of the tasks that are provided + * @param categories + * a list of categories. Only tasks with a classification of this these categories are listed in the + * report * @param customField * a {@link CustomField} whose values should be listed in the report * @param reportLineItemDefinitions @@ -332,6 +380,6 @@ public interface TaskMonitorService { * @return a {@link Report} object that represents an overview of all tasks of the respective value of the custom * field */ - Report getCustomFieldValueReport(List workbaskets, List states, CustomField customField, - List reportLineItemDefinitions, boolean inWorkingDays); + Report getCustomFieldValueReport(List workbaskets, List states, List categories, + CustomField customField, List reportLineItemDefinitions, boolean inWorkingDays); } diff --git a/lib/taskana-core/src/main/java/pro/taskana/impl/TaskMonitorServiceImpl.java b/lib/taskana-core/src/main/java/pro/taskana/impl/TaskMonitorServiceImpl.java index 38ba3fc1d..72bb8600f 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/impl/TaskMonitorServiceImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/impl/TaskMonitorServiceImpl.java @@ -27,19 +27,20 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { } @Override - public Report getWorkbasketLevelReport(List workbaskets, List states) { - return getWorkbasketLevelReport(workbaskets, states, null, false); + public Report getWorkbasketLevelReport(List workbaskets, List states, + List categories) { + return getWorkbasketLevelReport(workbaskets, states, categories, null, false); } @Override public Report getWorkbasketLevelReport(List workbaskets, List states, - List reportLineItemDefinitions) { - return getWorkbasketLevelReport(workbaskets, states, reportLineItemDefinitions, true); + List categories, List reportLineItemDefinitions) { + return getWorkbasketLevelReport(workbaskets, states, categories, reportLineItemDefinitions, true); } @Override public Report getWorkbasketLevelReport(List workbaskets, List states, - List reportLineItemDefinitions, boolean inWorkingDays) { + List categories, List reportLineItemDefinitions, boolean inWorkingDays) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( "entry to getWorkbasketLevelReport(workbaskets = {}, states = {}, reportLineItemDefinitions = {}," @@ -52,7 +53,7 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { Report report = new Report(); List monitorQueryItems = taskMonitorMapper - .getTaskCountOfWorkbasketsByWorkbasketsAndStates(workbaskets, states); + .getTaskCountOfWorkbasketsByWorkbasketsAndStates(workbaskets, states, categories); report.addMonitoringQueryItems(monitorQueryItems, reportLineItemDefinitions, inWorkingDays); return report; @@ -64,18 +65,18 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { } @Override - public Report getCategoryReport(List workbaskets, List states) { - return getCategoryReport(workbaskets, states, null, false); + public Report getCategoryReport(List workbaskets, List states, List categories) { + return getCategoryReport(workbaskets, states, categories, null, false); } @Override - public Report getCategoryReport(List workbaskets, List states, + public Report getCategoryReport(List workbaskets, List states, List categories, List reportLineItemDefinitions) { - return getCategoryReport(workbaskets, states, reportLineItemDefinitions, true); + return getCategoryReport(workbaskets, states, categories, reportLineItemDefinitions, true); } @Override - public Report getCategoryReport(List workbaskets, List states, + public Report getCategoryReport(List workbaskets, List states, List categories, List reportLineItemDefinitions, boolean inWorkingDays) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( @@ -89,7 +90,7 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { Report report = new Report(); List monitorQueryItems = taskMonitorMapper - .getTaskCountOfCategoriesByWorkbasketsAndStates(workbaskets, states); + .getTaskCountOfCategoriesByWorkbasketsAndStates(workbaskets, states, categories); report.addMonitoringQueryItems(monitorQueryItems, reportLineItemDefinitions, inWorkingDays); return report; @@ -100,19 +101,20 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { } @Override - public ClassificationReport getClassificationReport(List workbaskets, List states) { - return getClassificationReport(workbaskets, states, null, false); + public ClassificationReport getClassificationReport(List workbaskets, List states, + List categories) { + return getClassificationReport(workbaskets, states, categories, null, false); } @Override public ClassificationReport getClassificationReport(List workbaskets, List states, - List reportLineItemDefinitions) { - return getClassificationReport(workbaskets, states, reportLineItemDefinitions, true); + List categories, List reportLineItemDefinitions) { + return getClassificationReport(workbaskets, states, categories, reportLineItemDefinitions, true); } @Override public ClassificationReport getClassificationReport(List workbaskets, List states, - List reportLineItemDefinitions, boolean inWorkingDays) { + List categories, List reportLineItemDefinitions, boolean inWorkingDays) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( "entry to getClassificationReport(workbaskets = {}, states = {}, reportLineItemDefinitions = {}," @@ -125,7 +127,7 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { ClassificationReport report = new ClassificationReport(); List monitorQueryItems = taskMonitorMapper - .getTaskCountOfClassificationsByWorkbasketsAndStates(workbaskets, states); + .getTaskCountOfClassificationsByWorkbasketsAndStates(workbaskets, states, categories); report.addMonitoringQueryItems(monitorQueryItems, reportLineItemDefinitions, inWorkingDays); return report; @@ -137,19 +139,20 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { @Override public DetailedClassificationReport getDetailedClassificationReport(List workbaskets, - List states) { - return getDetailedClassificationReport(workbaskets, states, null, false); + List states, List categories) { + return getDetailedClassificationReport(workbaskets, states, categories, null, false); } @Override public DetailedClassificationReport getDetailedClassificationReport(List workbaskets, - List states, List reportLineItemDefinitions) { - return getDetailedClassificationReport(workbaskets, states, reportLineItemDefinitions, true); + List states, List categories, List reportLineItemDefinitions) { + return getDetailedClassificationReport(workbaskets, states, categories, reportLineItemDefinitions, true); } @Override public DetailedClassificationReport getDetailedClassificationReport(List workbaskets, - List states, List reportLineItemDefinitions, boolean inWorkingDays) { + List states, List categories, List reportLineItemDefinitions, + boolean inWorkingDays) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( @@ -163,7 +166,7 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { DetailedClassificationReport report = new DetailedClassificationReport(); List detailedMonitorQueryItems = taskMonitorMapper - .getTaskCountOfDetailedClassificationsByWorkbasketsAndStates(workbaskets, states); + .getTaskCountOfDetailedClassificationsByWorkbasketsAndStates(workbaskets, states, categories); report.addDetailedMonitoringQueryItems(detailedMonitorQueryItems, reportLineItemDefinitions, inWorkingDays); return report; @@ -176,19 +179,20 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { @Override public Report getCustomFieldValueReport(List workbaskets, List states, - CustomField customField) { - return getCustomFieldValueReport(workbaskets, states, customField, null, false); + List categories, CustomField customField) { + return getCustomFieldValueReport(workbaskets, states, categories, customField, null, false); } @Override public Report getCustomFieldValueReport(List workbaskets, List states, - CustomField customField, List reportLineItemDefinitions) { - return getCustomFieldValueReport(workbaskets, states, customField, reportLineItemDefinitions, true); + List categories, CustomField customField, List reportLineItemDefinitions) { + return getCustomFieldValueReport(workbaskets, states, categories, customField, reportLineItemDefinitions, true); } @Override public Report getCustomFieldValueReport(List workbaskets, List states, - CustomField customField, List reportLineItemDefinitions, boolean inWorkingDays) { + List categories, CustomField customField, List reportLineItemDefinitions, + boolean inWorkingDays) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( "entry to getCustomFieldValueReport(workbaskets = {}, states = {}, customField = {}, " @@ -201,7 +205,8 @@ public class TaskMonitorServiceImpl implements TaskMonitorService { Report report = new Report(); List monitorQueryItems = taskMonitorMapper - .getTaskCountOfCustomFieldValuesByWorkbasketsAndStatesAndCustomField(workbaskets, states, customField); + .getTaskCountOfCustomFieldValuesByWorkbasketsAndStatesAndCustomField(workbaskets, states, categories, + customField); report.addMonitoringQueryItems(monitorQueryItems, reportLineItemDefinitions, inWorkingDays); return report; diff --git a/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMonitorMapper.java b/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMonitorMapper.java index 1bbf80d86..bee941d6a 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMonitorMapper.java +++ b/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMonitorMapper.java @@ -24,6 +24,7 @@ public interface TaskMonitorMapper { + "FROM TASK " + "WHERE WORKBASKET_KEY IN (#{workbasket.key}) " + "AND STATE IN (#{state}) " + + "AND CLASSIFICATION_CATEGORY IN (#{category}) " + "AND DUE IS NOT NULL " + "GROUP BY WORKBASKET_KEY, (DAYS(DUE) - DAYS(CURRENT_TIMESTAMP)) " + "GROUP BY WORKBASKET_KEY, DATEDIFF('DAY', CURRENT_TIMESTAMP, DUE) " @@ -34,25 +35,28 @@ public interface TaskMonitorMapper { @Result(column = "NUMBER_OF_TASKS", property = "numberOfTasks") }) List getTaskCountOfWorkbasketsByWorkbasketsAndStates( @Param("workbaskets") List workbaskets, - @Param("states") List states); + @Param("states") List states, + @Param("categories") List categories); @Select("") @Results({ - @Result(column = "CATEGORY_NAME", property = "key"), + @Result(column = "CLASSIFICATION_CATEGORY", property = "key"), @Result(column = "AGE_IN_DAYS", property = "ageInDays"), @Result(column = "NUMBER_OF_TASKS", property = "numberOfTasks") }) List getTaskCountOfCategoriesByWorkbasketsAndStates( @Param("workbaskets") List workbaskets, - @Param("states") List states); + @Param("states") List states, + @Param("categories") List categories); @Select("