Search in sources :

Example 71 with TimeIntervalColumnHeader

use of pro.taskana.impl.report.impl.TimeIntervalColumnHeader in project taskana by Taskana.

the class ProvideWorkbasketLevelReportAccTest method testEachItemOfWorkbasketLevelReportWithDomainFilter.

@Test
public void testEachItemOfWorkbasketLevelReportWithDomainFilter() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<String> domains = Collections.singletonList("DOMAIN_A");
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    WorkbasketLevelReport report = taskMonitorService.getWorkbasketLevelReport(null, null, null, domains, null, null, 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[] { 8, 1, 0, 1, 2 }, row1);
    int[] row2 = report.getRow("USER_1_2").getCells();
    assertArrayEquals(new int[] { 2, 2, 2, 4, 0 }, row2);
    int[] row3 = report.getRow("USER_1_3").getCells();
    assertArrayEquals(new int[] { 1, 1, 0, 0, 2 }, row3);
}
Also used : WorkbasketLevelReport(pro.taskana.impl.report.impl.WorkbasketLevelReport) TaskMonitorService(pro.taskana.TaskMonitorService) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 72 with TimeIntervalColumnHeader

use of pro.taskana.impl.report.impl.TimeIntervalColumnHeader in project taskana by Taskana.

the class ProvideWorkbasketLevelReportAccTest method testEachItemOfWorkbasketLevelReportWithCategoryFilter.

@Test
public void testEachItemOfWorkbasketLevelReportWithCategoryFilter() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<String> categories = Arrays.asList("AUTOMATIC", "MANUAL");
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    WorkbasketLevelReport report = taskMonitorService.getWorkbasketLevelReport(null, null, categories, null, null, null, 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[] { 3, 1, 1, 1, 2 }, row1);
    int[] row2 = report.getRow("USER_1_2").getCells();
    assertArrayEquals(new int[] { 1, 1, 1, 0, 1 }, row2);
    int[] row3 = report.getRow("USER_1_3").getCells();
    assertArrayEquals(new int[] { 0, 1, 0, 0, 4 }, row3);
}
Also used : WorkbasketLevelReport(pro.taskana.impl.report.impl.WorkbasketLevelReport) TaskMonitorService(pro.taskana.TaskMonitorService) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 73 with TimeIntervalColumnHeader

use of pro.taskana.impl.report.impl.TimeIntervalColumnHeader in project taskana by Taskana.

the class ProvideWorkbasketLevelReportAccTest method getShortListOfColumnHeaders.

private List<TimeIntervalColumnHeader> getShortListOfColumnHeaders() {
    List<TimeIntervalColumnHeader> columnHeaders = new ArrayList<>();
    columnHeaders.add(new TimeIntervalColumnHeader(Integer.MIN_VALUE, -6));
    columnHeaders.add(new TimeIntervalColumnHeader(-5, -1));
    columnHeaders.add(new TimeIntervalColumnHeader(0));
    columnHeaders.add(new TimeIntervalColumnHeader(1, 5));
    columnHeaders.add(new TimeIntervalColumnHeader(6, Integer.MAX_VALUE));
    return columnHeaders;
}
Also used : ArrayList(java.util.ArrayList) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader)

Example 74 with TimeIntervalColumnHeader

use of pro.taskana.impl.report.impl.TimeIntervalColumnHeader 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);
}
Also used : WorkbasketLevelReport(pro.taskana.impl.report.impl.WorkbasketLevelReport) TaskMonitorService(pro.taskana.TaskMonitorService) CustomField(pro.taskana.CustomField) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 75 with TimeIntervalColumnHeader

use of pro.taskana.impl.report.impl.TimeIntervalColumnHeader in project taskana by Taskana.

the class ProvideWorkbasketLevelReportAccTest method testEachItemOfWorkbasketLevelReportNotInWorkingDays.

@Test
public void testEachItemOfWorkbasketLevelReportNotInWorkingDays() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    WorkbasketLevelReport report = taskMonitorService.getWorkbasketLevelReport(null, null, null, null, null, null, columnHeaders, false);
    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[] { 16, 0, 1, 0, 3 }, row1);
    int[] row2 = report.getRow("USER_1_2").getCells();
    assertArrayEquals(new int[] { 10, 0, 3, 0, 7 }, row2);
    int[] row3 = report.getRow("USER_1_3").getCells();
    assertArrayEquals(new int[] { 4, 0, 0, 0, 6 }, row3);
}
Also used : WorkbasketLevelReport(pro.taskana.impl.report.impl.WorkbasketLevelReport) TaskMonitorService(pro.taskana.TaskMonitorService) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Aggregations

TimeIntervalColumnHeader (pro.taskana.impl.report.impl.TimeIntervalColumnHeader)75 Test (org.junit.Test)57 TaskMonitorService (pro.taskana.TaskMonitorService)46 TaskanaEngineConfigurationTest (pro.taskana.impl.configuration.TaskanaEngineConfigurationTest)46 ArrayList (java.util.ArrayList)25 CustomField (pro.taskana.CustomField)19 DetailedMonitorQueryItem (pro.taskana.impl.report.impl.DetailedMonitorQueryItem)13 TaskState (pro.taskana.TaskState)12 DetailedClassificationReport (pro.taskana.impl.report.impl.DetailedClassificationReport)10 CategoryReport (pro.taskana.impl.report.impl.CategoryReport)9 ClassificationReport (pro.taskana.impl.report.impl.ClassificationReport)9 CustomFieldValueReport (pro.taskana.impl.report.impl.CustomFieldValueReport)9 WorkbasketLevelReport (pro.taskana.impl.report.impl.WorkbasketLevelReport)9 DetailedReportRow (pro.taskana.impl.report.impl.DetailedReportRow)8 SelectedItem (pro.taskana.impl.SelectedItem)6 AbstractAccTest (acceptance.AbstractAccTest)4 DaysToWorkingDaysConverter (pro.taskana.impl.DaysToWorkingDaysConverter)4 MonitorQueryItem (pro.taskana.impl.report.impl.MonitorQueryItem)4 WithAccessId (pro.taskana.security.WithAccessId)4 Task (pro.taskana.Task)3