use of pro.taskana.CustomField in project taskana by Taskana.
the class ProvideWorkbasketLevelReportAccTest method testEachItemOfWorkbasketLevelReportWithCustomFieldValueFilter.
@Test
public void testEachItemOfWorkbasketLevelReportWithCustomFieldValueFilter() throws InvalidArgumentException {
TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
CustomField customField = CustomField.CUSTOM_1;
List<String> customFieldValues = Collections.singletonList("Geschaeftsstelle A");
List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
WorkbasketLevelReport report = taskMonitorService.getWorkbasketLevelReport(null, null, null, null, customField, customFieldValues, columnHeaders);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(reportToString(report, columnHeaders));
}
assertNotNull(report);
assertEquals(3, report.rowSize());
int[] row1 = report.getRow("USER_1_1").getCells();
assertArrayEquals(new int[] { 6, 1, 1, 1, 1 }, row1);
int[] row2 = report.getRow("USER_1_2").getCells();
assertArrayEquals(new int[] { 3, 2, 2, 3, 1 }, row2);
int[] row3 = report.getRow("USER_1_3").getCells();
assertArrayEquals(new int[] { 2, 1, 0, 0, 1 }, row3);
}
Aggregations