diff --git a/lib/taskana-core/src/main/java/pro/taskana/WorkbasketSummary.java b/lib/taskana-core/src/main/java/pro/taskana/WorkbasketSummary.java
index 2d5420720..d33e88db9 100644
--- a/lib/taskana-core/src/main/java/pro/taskana/WorkbasketSummary.java
+++ b/lib/taskana-core/src/main/java/pro/taskana/WorkbasketSummary.java
@@ -56,30 +56,58 @@ public interface WorkbasketSummary {
WorkbasketType getType();
/**
- * Gets the orglevel1 property of the task.
+ * Gets the custom1 property of the workbasket.
*
- * @return the task's orglevel1 property
+ * @return the workbasket's custom1 property.
+ */
+ String getCustom1();
+
+ /**
+ * Gets the custom2 property of the workbasket.
+ *
+ * @return the workbasket's custom2 property.
+ */
+ String getCustom2();
+
+ /**
+ * Gets the custom3 property of the workbasket.
+ *
+ * @return the workbasket's custom3 property.
+ */
+ String getCustom3();
+
+ /**
+ * Gets the custom4 property of the workbasket.
+ *
+ * @return the workbasket's custom4 property.
+ */
+ String getCustom4();
+
+ /**
+ * Gets the orglevel1 property of the workbasket.
+ *
+ * @return the workbasket's orglevel1 property
*/
String getOrgLevel1();
/**
- * Gets the orglevel2 property of the task.
+ * Gets the orglevel2 property of the workbasket.
*
- * @return the task's orglevel2 property
+ * @return the workbasket's orglevel2 property
*/
String getOrgLevel2();
/**
- * Gets the orglevel3 property of the task.
+ * Gets the orglevel3 property of the workbasket.
*
- * @return the task's orglevel3 property
+ * @return the workbasket's orglevel3 property
*/
String getOrgLevel3();
/**
- * Gets the orglevel4 property of the task.
+ * Gets the orglevel4 property of the workbasket.
*
- * @return the task's orglevel4 property
+ * @return the workbasket's orglevel4 property
*/
String getOrgLevel4();
diff --git a/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketSummaryImpl.java b/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketSummaryImpl.java
index 6ecc1a4bc..dde617e49 100644
--- a/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketSummaryImpl.java
+++ b/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketSummaryImpl.java
@@ -15,6 +15,10 @@ public class WorkbasketSummaryImpl implements WorkbasketSummary {
private String owner;
private String domain;
private WorkbasketType type;
+ private String custom1;
+ private String custom2;
+ private String custom3;
+ private String custom4;
private String orgLevel1;
private String orgLevel2;
private String orgLevel3;
@@ -114,6 +118,58 @@ public class WorkbasketSummaryImpl implements WorkbasketSummary {
this.type = type;
}
+ /*
+ * (non-Javadoc)
+ * @see pro.taskana.impl.WorkbasketSummary#getCustom1()
+ */
+ @Override
+ public String getCustom1() {
+ return custom1;
+ }
+
+ public void setCustom1(String custom1) {
+ this.custom1 = custom1;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see pro.taskana.impl.WorkbasketSummary#getCustom2()
+ */
+ @Override
+ public String getCustom2() {
+ return custom2;
+ }
+
+ public void setCustom2(String custom2) {
+ this.custom2 = custom2;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see pro.taskana.impl.WorkbasketSummary#getCustom3()
+ */
+ @Override
+ public String getCustom3() {
+ return custom3;
+ }
+
+ public void setCustom3(String custom3) {
+ this.custom3 = custom3;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see pro.taskana.impl.WorkbasketSummary#getCustom4()
+ */
+ @Override
+ public String getCustom4() {
+ return custom4;
+ }
+
+ public void setCustom4(String custom4) {
+ this.custom4 = custom4;
+ }
+
/*
* (non-Javadoc)
* @see pro.taskana.impl.WorkbasketSummary#getOrgLevel1()
diff --git a/lib/taskana-core/src/main/java/pro/taskana/mappings/QueryMapper.java b/lib/taskana-core/src/main/java/pro/taskana/mappings/QueryMapper.java
index d1095b800..d5d396131 100644
--- a/lib/taskana-core/src/main/java/pro/taskana/mappings/QueryMapper.java
+++ b/lib/taskana-core/src/main/java/pro/taskana/mappings/QueryMapper.java
@@ -356,7 +356,7 @@ public interface QueryMapper {
@Select("")
@Results(value = {
@@ -74,13 +74,17 @@ public interface WorkbasketMapper {
@Result(property = "owner", column = "OWNER"),
@Result(property = "domain", column = "DOMAIN"),
@Result(property = "type", column = "TYPE"),
+ @Result(property = "custom1", column = "CUSTOM_1"),
+ @Result(property = "custom2", column = "CUSTOM_2"),
+ @Result(property = "custom3", column = "CUSTOM_3"),
+ @Result(property = "custom4", column = "CUSTOM_4"),
@Result(property = "orgLevel1", column = "ORG_LEVEL_1"),
@Result(property = "orgLevel2", column = "ORG_LEVEL_2"),
@Result(property = "orgLevel3", column = "ORG_LEVEL_3"),
@Result(property = "orgLevel4", column = "ORG_LEVEL_4")})
List findDistributionTargets(@Param("id") String id);
- @Select("")
@@ -92,13 +96,17 @@ public interface WorkbasketMapper {
@Result(property = "owner", column = "OWNER"),
@Result(property = "domain", column = "DOMAIN"),
@Result(property = "type", column = "TYPE"),
+ @Result(property = "custom1", column = "CUSTOM_1"),
+ @Result(property = "custom2", column = "CUSTOM_2"),
+ @Result(property = "custom3", column = "CUSTOM_3"),
+ @Result(property = "custom4", column = "CUSTOM_4"),
@Result(property = "orgLevel1", column = "ORG_LEVEL_1"),
@Result(property = "orgLevel2", column = "ORG_LEVEL_2"),
@Result(property = "orgLevel3", column = "ORG_LEVEL_3"),
@Result(property = "orgLevel4", column = "ORG_LEVEL_4")})
List findDistributionSources(@Param("id") String id);
- @Select("")
@Results(value = {
@@ -109,6 +117,10 @@ public interface WorkbasketMapper {
@Result(property = "owner", column = "OWNER"),
@Result(property = "domain", column = "DOMAIN"),
@Result(property = "type", column = "TYPE"),
+ @Result(property = "custom1", column = "CUSTOM_1"),
+ @Result(property = "custom2", column = "CUSTOM_2"),
+ @Result(property = "custom3", column = "CUSTOM_3"),
+ @Result(property = "custom4", column = "CUSTOM_4"),
@Result(property = "orgLevel1", column = "ORG_LEVEL_1"),
@Result(property = "orgLevel2", column = "ORG_LEVEL_2"),
@Result(property = "orgLevel3", column = "ORG_LEVEL_3"),
@@ -126,6 +138,10 @@ public interface WorkbasketMapper {
@Result(property = "owner", column = "OWNER"),
@Result(property = "domain", column = "DOMAIN"),
@Result(property = "type", column = "TYPE"),
+ @Result(property = "custom1", column = "CUSTOM_1"),
+ @Result(property = "custom2", column = "CUSTOM_2"),
+ @Result(property = "custom3", column = "CUSTOM_3"),
+ @Result(property = "custom4", column = "CUSTOM_4"),
@Result(property = "orgLevel1", column = "ORG_LEVEL_1"),
@Result(property = "orgLevel2", column = "ORG_LEVEL_2"),
@Result(property = "orgLevel3", column = "ORG_LEVEL_3"),
diff --git a/lib/taskana-core/src/test/java/acceptance/classification/QueryClassificationAccTest.java b/lib/taskana-core/src/test/java/acceptance/classification/QueryClassificationAccTest.java
index 5a329ed85..098d9f84d 100644
--- a/lib/taskana-core/src/test/java/acceptance/classification/QueryClassificationAccTest.java
+++ b/lib/taskana-core/src/test/java/acceptance/classification/QueryClassificationAccTest.java
@@ -545,6 +545,7 @@ public class QueryClassificationAccTest extends AbstractAccTest {
List results = classificationService.createClassificationQuery()
.orderByCustom1(desc)
.orderByName(asc)
+ .orderByDomain(asc)
.list();
assertEquals("CLI:000000000000000000000000000000000002", results.get(0).getId());
}
diff --git a/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketAccTest.java b/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketAccTest.java
index 810575a4a..2a27cac76 100644
--- a/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketAccTest.java
+++ b/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketAccTest.java
@@ -8,7 +8,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -546,7 +545,7 @@ public class QueryWorkbasketAccTest extends AbstractAccTest {
List results = workbasketService.createWorkbasketQuery()
.custom4Like("%u%")
.list();
- assertEquals(4, results.size());
+ assertEquals(5, results.size());
}
@WithAccessId(
@@ -681,8 +680,6 @@ public class QueryWorkbasketAccTest extends AbstractAccTest {
assertEquals("WBI:100000000000000000000000000000000012", results.get(results.size() - 3).getId());
}
- // TODO Add custom1 - custom4 to the workbasketSummary then reenable this test.
- @Ignore
@WithAccessId(
userName = "admin")
@Test
@@ -694,8 +691,6 @@ public class QueryWorkbasketAccTest extends AbstractAccTest {
assertEquals("WBI:100000000000000000000000000000000015", results.get(results.size() - 4).getId());
}
- // TODO Add custom1 - custom4 to the workbasketSummary then reenable this test.
- @Ignore
@WithAccessId(
userName = "admin")
@Test
@@ -707,8 +702,6 @@ public class QueryWorkbasketAccTest extends AbstractAccTest {
assertEquals("WBI:100000000000000000000000000000000014", results.get(0).getId());
}
- // TODO Add custom1 - custom4 to the workbasketSummary then reenable this test.
- @Ignore
@WithAccessId(
userName = "admin")
@Test
@@ -717,11 +710,9 @@ public class QueryWorkbasketAccTest extends AbstractAccTest {
List results = workbasketService.createWorkbasketQuery()
.orderByCustom3(asc)
.list();
- assertEquals("WBI:100000000000000000000000000000000015", results.get(results.size() - 3).getId());
+ assertEquals("WBI:100000000000000000000000000000000015", results.get(results.size() - 4).getId());
}
- // TODO Add custom1 - custom4 to the workbasketSummary then reenable this test.
- @Ignore
@WithAccessId(
userName = "admin")
@Test
@@ -730,7 +721,7 @@ public class QueryWorkbasketAccTest extends AbstractAccTest {
List results = workbasketService.createWorkbasketQuery()
.orderByCustom4(desc)
.list();
- assertEquals("WBI:100000000000000000000000000000000001", results.get(0).getId());
+ assertEquals("WBI:100000000000000000000000000000000006", results.get(0).getId());
}
}
diff --git a/lib/taskana-core/src/test/resources/sql/workbasket.sql b/lib/taskana-core/src/test/resources/sql/workbasket.sql
index b63f024b4..e7714feb1 100644
--- a/lib/taskana-core/src/test/resources/sql/workbasket.sql
+++ b/lib/taskana-core/src/test/resources/sql/workbasket.sql
@@ -4,7 +4,7 @@ INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000002
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000003', 'GPK_KSC_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gruppenpostkorb KSC 2', 'DOMAIN_A', 'GROUP', 'Gruppenpostkorb KSC 2', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000004', 'TEAMLEAD_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK Teamlead KSC 1', 'DOMAIN_A', 'PERSONAL', 'PPK Teamlead KSC 1', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000005', 'TEAMLEAD_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK Teamlead KSC 2', 'DOMAIN_A', 'PERSONAL', 'PPK Teamlead KSC 2', '', '', '', '', '', '', '', '', '');
-INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000006', 'USER_1_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 1 KSC 1', 'DOMAIN_A', 'PERSONAL', 'PPK User 1 KSC 1', '', '', '', '', '', '', '', '', '');
+INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000006', 'USER_1_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 1 KSC 1', 'DOMAIN_A', 'PERSONAL', 'PPK User 1 KSC 1', '', '', '', '', 'custom4z', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000007', 'USER_1_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 2 KSC 1', 'DOMAIN_A', 'PERSONAL', 'PPK User 2 KSC 1', 'Peter Maier', 'custom1', 'custom2', 'custom3', 'custom4', 'versicherung', 'abteilung', 'projekt', 'team');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000008', 'USER_2_1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 1 KSC 2', 'DOMAIN_A', 'PERSONAL', 'PPK User 1 KSC 2', '', '', '', '', '', '', '', '', '');
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:100000000000000000000000000000000009', 'USER_2_2', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 2 KSC 2', 'DOMAIN_A', 'PERSONAL', 'PPK User 2 KSC 2', '', '', '', '', '', '', '', '', '');
diff --git a/rest/taskana-rest-spring-example/src/test/java/pro/taskana/doc/api/WorkbasketControllerRestDocumentation.java b/rest/taskana-rest-spring-example/src/test/java/pro/taskana/doc/api/WorkbasketControllerRestDocumentation.java
index adea9a986..864549b5d 100644
--- a/rest/taskana-rest-spring-example/src/test/java/pro/taskana/doc/api/WorkbasketControllerRestDocumentation.java
+++ b/rest/taskana-rest-spring-example/src/test/java/pro/taskana/doc/api/WorkbasketControllerRestDocumentation.java
@@ -161,16 +161,16 @@ public class WorkbasketControllerRestDocumentation {
fieldWithPath("type").description(workbasketFieldDescriptionsMap.get("type")),
fieldWithPath("description").description(workbasketFieldDescriptionsMap.get("description")),
fieldWithPath("owner").description(workbasketFieldDescriptionsMap.get("owner")),
+ fieldWithPath("custom1").description(workbasketFieldDescriptionsMap.get("custom1")),
+ fieldWithPath("custom2").description(workbasketFieldDescriptionsMap.get("custom2")),
+ fieldWithPath("custom3").description(workbasketFieldDescriptionsMap.get("custom3")),
+ fieldWithPath("custom4").description(workbasketFieldDescriptionsMap.get("custom4")),
fieldWithPath("orgLevel1").description(workbasketFieldDescriptionsMap.get("orgLevel1")),
fieldWithPath("orgLevel2").description(workbasketFieldDescriptionsMap.get("orgLevel2")),
fieldWithPath("orgLevel3").description(workbasketFieldDescriptionsMap.get("orgLevel3")),
fieldWithPath("orgLevel4").description(workbasketFieldDescriptionsMap.get("orgLevel4")),
fieldWithPath("created").ignored(),
fieldWithPath("modified").ignored(),
- fieldWithPath("custom1").ignored(),
- fieldWithPath("custom2").ignored(),
- fieldWithPath("custom3").ignored(),
- fieldWithPath("custom4").ignored(),
fieldWithPath("_links.distributionTargets.href").ignored(),
fieldWithPath("_links.removeDistributionTargets.href").ignored(),
fieldWithPath("_links.accessItems.href").ignored(),
diff --git a/rest/taskana-rest-spring/src/main/java/pro/taskana/rest/resource/WorkbasketSummaryResource.java b/rest/taskana-rest-spring/src/main/java/pro/taskana/rest/resource/WorkbasketSummaryResource.java
index 088c1dbc8..598f8decd 100644
--- a/rest/taskana-rest-spring/src/main/java/pro/taskana/rest/resource/WorkbasketSummaryResource.java
+++ b/rest/taskana-rest-spring/src/main/java/pro/taskana/rest/resource/WorkbasketSummaryResource.java
@@ -29,6 +29,10 @@ public class WorkbasketSummaryResource extends ResourceSupport {
public String description;
public String owner;
+ public String custom1;
+ public String custom2;
+ public String custom3;
+ public String custom4;
public String orgLevel1;
public String orgLevel2;
public String orgLevel3;
@@ -90,6 +94,38 @@ public class WorkbasketSummaryResource extends ResourceSupport {
this.owner = owner;
}
+ public String getCustom1() {
+ return custom1;
+ }
+
+ public void setCustom1(String custom1) {
+ this.custom1 = custom1;
+ }
+
+ public String getCustom2() {
+ return custom2;
+ }
+
+ public void setCustom2(String custom2) {
+ this.custom2 = custom2;
+ }
+
+ public String getCustom3() {
+ return custom3;
+ }
+
+ public void setCustom3(String custom3) {
+ this.custom3 = custom3;
+ }
+
+ public String getCustom4() {
+ return custom4;
+ }
+
+ public void setCustom4(String custom4) {
+ this.custom4 = custom4;
+ }
+
public String getOrgLevel1() {
return orgLevel1;
}
diff --git a/rest/taskana-rest-spring/src/test/java/pro/taskana/rest/resource/assembler/WorkbasketSummaryAssemblerTest.java b/rest/taskana-rest-spring/src/test/java/pro/taskana/rest/resource/assembler/WorkbasketSummaryAssemblerTest.java
index e3b859aea..fea290c85 100644
--- a/rest/taskana-rest-spring/src/test/java/pro/taskana/rest/resource/assembler/WorkbasketSummaryAssemblerTest.java
+++ b/rest/taskana-rest-spring/src/test/java/pro/taskana/rest/resource/assembler/WorkbasketSummaryAssemblerTest.java
@@ -37,6 +37,10 @@ public class WorkbasketSummaryAssemblerTest {
workbasketSummary.setDescription("WorkbasketSummaryImplTes");
workbasketSummary.setId("1");
workbasketSummary.setName("WorkbasketSummary");
+ workbasketSummary.setCustom1("custom1");
+ workbasketSummary.setCustom2("custom2");
+ workbasketSummary.setCustom3("custom3");
+ workbasketSummary.setCustom4("custom4");
workbasketSummary.setOrgLevel1("Org1");
workbasketSummary.setOrgLevel2("Org2");
workbasketSummary.setOrgLevel3("Org3");
@@ -51,6 +55,10 @@ public class WorkbasketSummaryAssemblerTest {
Assert.assertEquals(workbasketSummary.getId(), workbasketSummaryResource.workbasketId);
Assert.assertEquals(workbasketSummary.getKey(), workbasketSummaryResource.key);
Assert.assertEquals(workbasketSummary.getName(), workbasketSummaryResource.name);
+ Assert.assertEquals(workbasketSummary.getCustom1(), workbasketSummaryResource.custom1);
+ Assert.assertEquals(workbasketSummary.getCustom2(), workbasketSummaryResource.custom2);
+ Assert.assertEquals(workbasketSummary.getCustom3(), workbasketSummaryResource.custom3);
+ Assert.assertEquals(workbasketSummary.getCustom4(), workbasketSummaryResource.custom4);
Assert.assertEquals(workbasketSummary.getOrgLevel1(), workbasketSummaryResource.orgLevel1);
Assert.assertEquals(workbasketSummary.getOrgLevel2(), workbasketSummaryResource.orgLevel2);
Assert.assertEquals(workbasketSummary.getOrgLevel3(), workbasketSummaryResource.orgLevel3);