Merge branch 'main' of https://dev.azure.com/asfinag/Tech-Supporting.ITSM/_git/Tech-Supporting.ITSM.ChangeKalender
commit
fbd207b31a
|
|
@ -49,13 +49,15 @@ public class SupportGroup {
|
|||
var querySupportGroups = new Query.QueryBuilder(formAssoc)
|
||||
.addFieldId("SupportGroup", 1000000015)
|
||||
.addFieldId("SupportGroupId", 1000000079)
|
||||
.addFieldId("FunctionalRole", 1000000172)
|
||||
.build();
|
||||
|
||||
System.out.println(api.isAdministrator());
|
||||
|
||||
if (api.isAdministrator()) {
|
||||
|
||||
if (!api.isAdministrator()) {
|
||||
this.supportGroups = api
|
||||
.queryFieldsById("\'4\' != \"_\"", querySupportGroups.getFieldIds(),
|
||||
.queryFieldsById("\'1000000172\' == 5000 OR \'1000000172\' == 6000", querySupportGroups.getFieldIds(),
|
||||
querySupportGroups.getFormName(), null, 0, 0)
|
||||
.stream()
|
||||
.map(entry -> new SupportGroupGetResponse(
|
||||
|
|
@ -63,9 +65,16 @@ public class SupportGroup {
|
|||
entry.get(querySupportGroups.getFieldId("SupportGroupId")).toString()))
|
||||
.distinct()
|
||||
.collect(Collectors.toCollection(ArrayList::new));
|
||||
|
||||
// nur zum testen
|
||||
var test = api
|
||||
.queryFieldsById("\'1000000172\' == 5000 OR \'1000000172\' == 6000", querySupportGroups.getFieldIds(),
|
||||
querySupportGroups.getFormName(), null, 0, 0);
|
||||
for (var t : test) System.out.println(t);
|
||||
|
||||
} else {
|
||||
this.supportGroups = api
|
||||
.queryFieldsById("\'4\' == \"" + api.getUser() + "\"", querySupportGroups.getFieldIds(),
|
||||
.queryFieldsById("\'4\' != \"_\"", querySupportGroups.getFieldIds(),
|
||||
querySupportGroups.getFormName(), null, 0, 0)
|
||||
.stream()
|
||||
.map(entry -> new SupportGroupGetResponse(
|
||||
|
|
|
|||
Loading…
Reference in New Issue