approval changes
parent
7e1ca96d30
commit
11d413ff14
|
|
@ -85,6 +85,7 @@ public class Change {
|
||||||
*/
|
*/
|
||||||
public ChangeResponse get(ChangeRequest request) throws ARException, NotFoundError, ValidationError {
|
public ChangeResponse get(ChangeRequest request) throws ARException, NotFoundError, ValidationError {
|
||||||
|
|
||||||
|
api.impersonateUser("FabianDa");
|
||||||
LoggerTemplates log = new LoggerTemplates(api);
|
LoggerTemplates log = new LoggerTemplates(api);
|
||||||
|
|
||||||
var peopleFullName = processPeopleInfo(request);
|
var peopleFullName = processPeopleInfo(request);
|
||||||
|
|
@ -115,7 +116,8 @@ public class Change {
|
||||||
|
|
||||||
if (approval) {
|
if (approval) {
|
||||||
var queryApproval = new Query.QueryBuilder("CHG:ChangeAPDetailSignature")
|
var queryApproval = new Query.QueryBuilder("CHG:ChangeAPDetailSignature")
|
||||||
.addFieldId("ApprovalProcessName", 301322300).build();
|
.addFieldId("Approvers", 13207).build();
|
||||||
|
|
||||||
var queryApprovalProcessName = api.queryFieldsById(
|
var queryApprovalProcessName = api.queryFieldsById(
|
||||||
"(\'1000000182\' = \""
|
"(\'1000000182\' = \""
|
||||||
+ getValueStringByID(entry, "ChangeNr")
|
+ getValueStringByID(entry, "ChangeNr")
|
||||||
|
|
@ -125,16 +127,13 @@ public class Change {
|
||||||
+ "%\")",
|
+ "%\")",
|
||||||
queryApproval.getFieldIds(), queryApproval.getFormName(), sort, 0, 0);
|
queryApproval.getFieldIds(), queryApproval.getFormName(), sort, 0, 0);
|
||||||
|
|
||||||
System.out.println("(\'1000000182\' = \""
|
if (!queryApprovalProcessName.isEmpty() && queryApprovalProcessName != null
|
||||||
+ getValueStringByID(entry, "ChangeNr")
|
&& queryApprovalProcessName.size() > 0)
|
||||||
+ "\") AND (\'10000\' = \""
|
change.setApproval(true);
|
||||||
+ getValueStringByID(entry, "ApprovalProcessName")
|
else
|
||||||
+ "\") AND (\'13207\' LIKE \"%" + api.getUser()
|
change.setApproval(false);
|
||||||
+ "%\")");
|
|
||||||
System.out.println(queryApprovalProcessName.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
change.setApproval(approval);
|
}
|
||||||
|
|
||||||
change.setChangeNr(getValueStringByID(entry, "ChangeNr"));
|
change.setChangeNr(getValueStringByID(entry, "ChangeNr"));
|
||||||
change.setSupportGroup(getValueStringByID(entry, "SupportGroup"));
|
change.setSupportGroup(getValueStringByID(entry, "SupportGroup"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue