Search in sources :

Example 31 with TimeIntervalColumnHeader

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

the class ProvideDetailedClassificationReportAccTest method testGetDetailedClassificationReportWithReportLineItemDefinitions.

@Test
public void testGetDetailedClassificationReportWithReportLineItemDefinitions() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<TimeIntervalColumnHeader> columnHeaders = getListOfColumnHeaders();
    DetailedClassificationReport report = taskMonitorService.getDetailedClassificationReport(null, null, null, null, null, null, columnHeaders);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, columnHeaders));
    }
    assertNotNull(report);
    assertEquals(5, report.rowSize());
    assertEquals(10, report.getRow("L10000").getTotalValue());
    assertEquals(10, report.getRow("L20000").getTotalValue());
    assertEquals(7, report.getRow("L30000").getTotalValue());
    assertEquals(10, report.getRow("L40000").getTotalValue());
    assertEquals(13, report.getRow("L50000").getTotalValue());
    int[] sumRow = report.getSumRow().getCells();
    assertArrayEquals(new int[] { 10, 9, 11, 0, 4, 0, 7, 4, 5 }, sumRow);
    assertEquals(50, report.getSumRow().getTotalValue());
}
Also used : TaskMonitorService(pro.taskana.TaskMonitorService) DetailedClassificationReport(pro.taskana.impl.report.impl.DetailedClassificationReport) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 32 with TimeIntervalColumnHeader

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

the class ProvideDetailedClassificationReportAccTest method testEachItemOfDetailedClassificationReportWithDomainFilter.

@Test
public void testEachItemOfDetailedClassificationReportWithDomainFilter() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<String> domains = Collections.singletonList("DOMAIN_A");
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    DetailedClassificationReport report = taskMonitorService.getDetailedClassificationReport(null, null, null, domains, null, null, columnHeaders);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, columnHeaders));
    }
    assertNotNull(report);
    assertEquals(5, report.rowSize());
    DetailedReportRow line1 = report.getRow("L10000");
    assertArrayEquals(new int[] { 5, 2, 1, 0, 0 }, line1.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine1 = line1.getDetailRows().get("L11000");
    assertArrayEquals(new int[] { 1, 0, 1, 0, 0 }, detailedLine1.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment1 = line1.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 4, 2, 0, 0, 0 }, detailedLineNoAttachment1.getCells());
    DetailedReportRow line2 = report.getRow("L20000");
    assertArrayEquals(new int[] { 3, 1, 1, 1, 0 }, line2.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine2 = line2.getDetailRows().get("L22000");
    assertArrayEquals(new int[] { 1, 0, 1, 1, 0 }, detailedLine2.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment2 = line2.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 2, 1, 0, 0, 0 }, detailedLineNoAttachment2.getCells());
    DetailedReportRow line3 = report.getRow("L30000");
    assertArrayEquals(new int[] { 1, 0, 0, 1, 1 }, line3.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine3 = line3.getDetailRows().get("L33000");
    assertArrayEquals(new int[] { 0, 0, 0, 1, 1 }, detailedLine3.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment3 = line3.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 1, 0, 0, 0, 0 }, detailedLineNoAttachment3.getCells());
    DetailedReportRow line4 = report.getRow("L40000");
    assertArrayEquals(new int[] { 2, 0, 0, 0, 3 }, line4.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment4 = line4.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 2, 0, 0, 0, 3 }, detailedLineNoAttachment4.getCells());
    DetailedReportRow line5 = report.getRow("L50000");
    assertArrayEquals(new int[] { 0, 1, 0, 3, 0 }, line5.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment5 = line5.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 0, 1, 0, 3, 0 }, detailedLineNoAttachment5.getCells());
}
Also used : TaskMonitorService(pro.taskana.TaskMonitorService) DetailedClassificationReport(pro.taskana.impl.report.impl.DetailedClassificationReport) DetailedMonitorQueryItem(pro.taskana.impl.report.impl.DetailedMonitorQueryItem) DetailedReportRow(pro.taskana.impl.report.impl.DetailedReportRow) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 33 with TimeIntervalColumnHeader

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

the class ProvideDetailedClassificationReportAccTest method testEachItemOfDetailedClassificationReportWithStateFilter.

@Test
public void testEachItemOfDetailedClassificationReportWithStateFilter() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<TaskState> states = Collections.singletonList(TaskState.READY);
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    DetailedClassificationReport report = taskMonitorService.getDetailedClassificationReport(null, states, null, null, null, null, columnHeaders);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, columnHeaders));
    }
    assertNotNull(report);
    assertEquals(5, report.rowSize());
    DetailedReportRow line1 = report.getRow("L10000");
    assertArrayEquals(new int[] { 7, 2, 1, 0, 0 }, line1.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine1 = line1.getDetailRows().get("L11000");
    assertArrayEquals(new int[] { 2, 0, 1, 0, 0 }, detailedLine1.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment1 = line1.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 5, 2, 0, 0, 0 }, detailedLineNoAttachment1.getCells());
    DetailedReportRow line2 = report.getRow("L20000");
    assertArrayEquals(new int[] { 5, 3, 1, 1, 0 }, line2.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine2 = line2.getDetailRows().get("L22000");
    assertArrayEquals(new int[] { 1, 1, 1, 1, 0 }, detailedLine2.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment2 = line2.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 4, 2, 0, 0, 0 }, detailedLineNoAttachment2.getCells());
    DetailedReportRow line3 = report.getRow("L30000");
    assertArrayEquals(new int[] { 2, 1, 0, 1, 0 }, line3.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine3a = line3.getDetailRows().get("L33000");
    assertArrayEquals(new int[] { 0, 1, 0, 1, 0 }, detailedLine3a.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment3 = line3.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 2, 0, 0, 0, 0 }, detailedLineNoAttachment3.getCells());
    DetailedReportRow line4 = report.getRow("L40000");
    assertArrayEquals(new int[] { 2, 2, 2, 0, 0 }, line4.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment4 = line4.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 2, 2, 2, 0, 0 }, detailedLineNoAttachment4.getCells());
    DetailedReportRow line5 = report.getRow("L50000");
    assertArrayEquals(new int[] { 3, 3, 0, 5, 0 }, line5.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment5 = line5.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 3, 3, 0, 5, 0 }, detailedLineNoAttachment5.getCells());
}
Also used : TaskMonitorService(pro.taskana.TaskMonitorService) DetailedClassificationReport(pro.taskana.impl.report.impl.DetailedClassificationReport) DetailedMonitorQueryItem(pro.taskana.impl.report.impl.DetailedMonitorQueryItem) DetailedReportRow(pro.taskana.impl.report.impl.DetailedReportRow) TaskState(pro.taskana.TaskState) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 34 with TimeIntervalColumnHeader

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

the class ProvideDetailedClassificationReportAccTest method testEachItemOfDetailedClassificationReport.

@Test
public void testEachItemOfDetailedClassificationReport() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<TimeIntervalColumnHeader> reportLineItemDefinitions = getShortListOfColumnHeaders();
    DetailedClassificationReport report = taskMonitorService.getDetailedClassificationReport(null, null, null, null, null, null, reportLineItemDefinitions);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, reportLineItemDefinitions));
    }
    assertNotNull(report);
    assertEquals(5, report.rowSize());
    DetailedReportRow line1 = report.getRow("L10000");
    assertArrayEquals(new int[] { 7, 2, 1, 0, 0 }, line1.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine1 = line1.getDetailRows().get("L11000");
    assertArrayEquals(new int[] { 2, 0, 1, 0, 0 }, detailedLine1.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment1 = line1.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 5, 2, 0, 0, 0 }, detailedLineNoAttachment1.getCells());
    DetailedReportRow line2 = report.getRow("L20000");
    assertArrayEquals(new int[] { 5, 3, 1, 1, 0 }, line2.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine2 = line2.getDetailRows().get("L22000");
    assertArrayEquals(new int[] { 1, 1, 1, 1, 0 }, detailedLine2.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment2 = line2.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 4, 2, 0, 0, 0 }, detailedLineNoAttachment2.getCells());
    DetailedReportRow line3 = report.getRow("L30000");
    assertArrayEquals(new int[] { 2, 1, 0, 1, 3 }, line3.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine3a = line3.getDetailRows().get("L33000");
    assertArrayEquals(new int[] { 0, 1, 0, 1, 1 }, detailedLine3a.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine3b = line3.getDetailRows().get("L99000");
    assertArrayEquals(new int[] { 0, 0, 0, 0, 1 }, detailedLine3b.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment3 = line3.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 2, 0, 0, 0, 1 }, detailedLineNoAttachment3.getCells());
    DetailedReportRow line4 = report.getRow("L40000");
    assertArrayEquals(new int[] { 2, 2, 2, 0, 4 }, line4.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment4 = line4.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 2, 2, 2, 0, 4 }, detailedLineNoAttachment4.getCells());
    DetailedReportRow line5 = report.getRow("L50000");
    assertArrayEquals(new int[] { 3, 3, 0, 5, 2 }, line5.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment5 = line5.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 3, 3, 0, 5, 2 }, detailedLineNoAttachment5.getCells());
}
Also used : TaskMonitorService(pro.taskana.TaskMonitorService) DetailedClassificationReport(pro.taskana.impl.report.impl.DetailedClassificationReport) DetailedMonitorQueryItem(pro.taskana.impl.report.impl.DetailedMonitorQueryItem) DetailedReportRow(pro.taskana.impl.report.impl.DetailedReportRow) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 35 with TimeIntervalColumnHeader

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

the class ProvideWorkbasketLevelReportAccTest method testEachItemOfWorkbasketLevelReportWithWorkbasketFilter.

@Test
public void testEachItemOfWorkbasketLevelReportWithWorkbasketFilter() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<String> workbasketIds = Collections.singletonList("WBI:000000000000000000000000000000000001");
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    WorkbasketLevelReport report = taskMonitorService.getWorkbasketLevelReport(workbasketIds, null, null, null, null, null, columnHeaders);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, columnHeaders));
    }
    assertNotNull(report);
    assertEquals(1, report.rowSize());
    int[] row1 = report.getRow("USER_1_1").getCells();
    assertArrayEquals(new int[] { 13, 3, 1, 1, 2 }, row1);
}
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