approval changes

main
Said Gedik 2024-03-21 13:08:43 +01:00
parent 7e1ca96d30
commit 11d413ff14
1 changed files with 9 additions and 10 deletions

View File

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