Merge branch 'approvalflag'

main
manueltauber 2023-05-30 15:10:10 +02:00
commit 36a5a9be34
6 changed files with 302 additions and 12 deletions

View File

@ -0,0 +1,60 @@
2023-05-30-13:20:05 ERROR []
2023-05-30-14:56:19 ERROR ERROR (6663003): ; User can not be used as a change implementer for this ticket
ERROR (6663003): ; User can not be used as a change implementer for this ticket
at com.bmc.arsys.apitransport.ApiProxyJRpcBase.arCall(ApiProxyJRpcBase.java:300)
at com.bmc.arsys.apitransport.ApiProxyJRpcBase.arCall(ApiProxyJRpcBase.java:172)
at com.bmc.arsys.api.ProxyJRpc.ARCreateEntry(ProxyJRpc.java:1302)
at com.bmc.arsys.api.ARServerUser.createEntry(ARServerUser.java:4418)
at com.nttdata.calender.api.RemedyJavaAPI.createEntry(RemedyJavaAPI.java:136)
at com.nttdata.calender.implementer.Implementer.update(Implementer.java:46)
at com.nttdata.calender.api.KalenderRestController.updateImplementer(KalenderRestController.java:236)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:665)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)

View File

@ -33,7 +33,6 @@ public class Approval {
*/
public String update(ApprovalUpdateRequest request) throws ARException {
remedyJavaAPI.impersonateUser("ext_StanzPa");
String user = remedyJavaAPI.getUser();
String action = "APPROVAL";
var queryUpdate = new Query.QueryBuilder("ASF:CHG_CAL_Interactions")
@ -42,19 +41,24 @@ public class Approval {
.addFieldValue("ApprovalAction", 1000003264, request.getApprovalActionValue())
.build();
/*
String user = remedyJavaAPI.getUser();
var queryChanges = new Query.QueryBuilder("ASF:WI_TAS_Paket")
.addFieldId("ChangeNr", 1000000182)
.addFieldId("ActualStatus", 7)
.build();
Entry change = remedyJavaAPI
.queryFieldsById("\'Infrastructure Change ID\' = \"" + request.getChangeNrValue().toString() + "\"",
queryChanges.getFieldIds(), queryChanges.getFormName(), null, 0, 0)
.get(0);
int approvalAction = queryUpdate.getFieldValue("ApprovalAction").getIntValue();
var actualStatus = change.get(queryChanges.getFieldId("ActualStatus"));
if (approvalAction == 1 || approvalAction == 2) {
if (inApprovalList(user, request.getChangeNr()))
return this.remedyJavaAPI.createEntry(queryUpdate);
@ -70,6 +74,9 @@ public class Approval {
} else {
return "invalid approval status (must be 1, 2 or 3)";
}
*/
return this.remedyJavaAPI.createEntry(queryUpdate);
}
/**
@ -80,6 +87,7 @@ public class Approval {
* @return True if the user is in the approval list, false otherwise
* @throws ARException If an error occurs during the query
*/
/*
public boolean inApprovalList(String user, String changeNr) throws ARException {
var queryApprovalList = new Query.QueryBuilder("ASF:OverviewConsole_TicketsJoinAPDetailSignature")
.addFieldId("Approvers", 13207).build();
@ -90,4 +98,5 @@ public class Approval {
String approvers = approversOI.get(0).get(queryApprovalList.getFieldId("Approvers")).toString();
return approvers.contains(user);
}
*/
}

View File

@ -112,7 +112,8 @@ public class Change {
var entriesSize = api.getFormSize(qualifier, this.queryChange.getFormName());
System.out.println(entriesSize);
var changes = new ArrayList<ChangeItem>();
entries.forEach(entry -> {
for (var entry : entries) {
var change = new ChangeItem(entry.getEntryId());
change.setChangeNr(getValueStringByID(entry, "ChangeNr"));
change.setSupportGroup(getValueStringByID(entry, "SupportGroup"));
@ -135,26 +136,97 @@ public class Change {
change.setChangeImplementerPersonId(getValueStringByID(entry, "ChangeImplementerPersonId"));
change.setPackageType(getValueStringByID(entry, "PackageType"));
change.setContract(getValueStringByID(entry, "Contract"));
change.setImplementerEdit(
Optional.ofNullable(entry.get(queryChange.getFieldId("ChangeCoordinator")))
.map(Object::toString)
.filter(peopleFullName::equals)
.isPresent());
var state = getValue(entry, "State").getIntValue();
var inApproval = inApprovalList(api.getUser(), getValueStringByID(entry, "ChangeNr"));
change.setFlagPermit(flagPermit(state));
change.setFlagApprove(flagApproval(inApproval, state));
change.setFlagReject(flagApproval(inApproval, state));
change.setFlagCancel(flagCancel(getValueStringByID(entry, "SupportGroupId"), state));
changes.add(change);
});
}
api.freeImpersonatedUser();
return new ChangeResponse(entriesSize, changes);
}
/**
* Determines if the change item can be approved based on the approval status
* and the current state.
*
* @param approval The flag indicating whether the change item has been
* approved.
* @param state The current state of the change item.
* @return {@code true} if the change item can be approved, {@code false}
* otherwise.
*/
public boolean flagApproval(boolean approval, int state) {
boolean approvableState = (state == 1 || state == 10);
return approval && approvableState;
}
/**
* Determines if the change item can be canceled based on the support group ID
* and the current state.
*
* @param supportGroupId The ID of the support group associated with the change item
* @param state The current state of the change item
* @return {@code true} if the change item can be canceled, {@code false} otherwise.
* @throws ARException if an error occurs during the operation
*/
public boolean flagCancel(String supportGroupId, int state) throws ARException {
var queryRoles = new Query.QueryBuilder("CTM:SupportGroupFuncRoleLookUp").addFieldId("Role", 1000000014)
.build();
var role = api.queryFieldsById("\'Support Group ID\' = \"" + supportGroupId + "\"",
queryRoles.getFieldIds(), queryRoles.getFormName(), null, 0, 0)
.get(0).get(queryRoles.getFieldId("Role")).toString();
boolean approvableState = state == 1;
boolean isChangeManager = role.equals("Change Manager");
return approvableState && isChangeManager;
}
/**
* Determines if the change item has a permit based on the current state.
*
* @param state The current state of the change item.
* @return {@code true} if the change item has a permit, {@code false} otherwise.
*/
public boolean flagPermit(int state) {
return state == 0;
}
/**
* Checks if the logged in user is in the approval list for the specified change item.
*
* @param user The username of the user to check
* @param changeNr The change number of the change item
* @return {@code true} if the user is in the approval list, {@code false} otherwise.
* @throws ARException if an error occurs during the operation
*/
public boolean inApprovalList(String user, String changeNr) throws ARException {
var queryApprovalList = new Query.QueryBuilder("ASF:OverviewConsole_TicketsJoinAPDetailSignature")
.addFieldId("Approvers", 13207).build();
var approversOI = api.queryFieldsById("\'Ticketnumber\' = \"" + changeNr + "\"",
queryApprovalList.getFieldIds(), queryApprovalList.getFormName(), null, 0, 0);
var approvers = approversOI.isEmpty() ? null
: approversOI.get(0).get(queryApprovalList.getFieldId("Approvers")).toString();
return approvers != null ? approvers.contains(user) : false;
}
/**
* Returns the {@link Value} of an entry based on the provided description.
*
* @param entry the {@link Entry} from which a value will be retrieved
* @param description the name of the field from which the value should be
* retrieved
* @param description the name of the field from which the value should be retrieved
* @return the value of the entry
*/
private Value getValue(Entry entry, String description) {
@ -166,8 +238,7 @@ public class Change {
* timestamp is null.
*
* @param entry the {@link Entry} containing the timestamp value
* @param description the description of the field containing the timestamp
* value
* @param description the description of the field containing the timestamp value
* @return the converted {@link Date} or null if the timestamp is null
*/
private Date timestampToDateById(Entry entry, String description) {

View File

@ -31,6 +31,10 @@ public class ChangeItem {
private Date D2;
private Date D3;
private Date D4;
private boolean flagPermit;
private boolean flagApprove;
private boolean flagReject;
private boolean flagCancel;
/**
*
@ -157,7 +161,86 @@ public class ChangeItem {
}
/**
*
* Retrieves the flag indicating whether the change item has a permit.
*
* @return {@code true} if the change item has a permit, {@code false}
* otherwise.
*/
public boolean getFlagPermit() {
return this.flagPermit;
}
/**
* Sets the flag indicating whether the change item has a permit.
*
* @param flagPermit {@code true} if the change item has a permit, {@code false}
* otherwise.
*/
public void setFlagPermit(boolean flagPermit) {
this.flagPermit = flagPermit;
}
/**
* Retrieves the flag indicating whether the change item has been approved.
*
* @return {@code true} if the change item has been approved, {@code false}
* otherwise.
*/
public boolean getFlagApprove() {
return this.flagApprove;
}
/**
* Sets the flag indicating whether the change item has been approved.
*
* @param flagApprove {@code true} if the change item has been approved,
* {@code false} otherwise.
*/
public void setFlagApprove(boolean flagApprove) {
this.flagApprove = flagApprove;
}
/**
* Retrieves the flag indicating whether the change item has been rejected.
*
* @return {@code true} if the change item has been rejected, {@code false}
* otherwise.
*/
public boolean getFlagReject() {
return this.flagReject;
}
/**
* Sets the flag indicating whether the change item has been rejected.
*
* @param flagReject {@code true} if the change item has been rejected,
* {@code false} otherwise.
*/
public void setFlagReject(boolean flagReject) {
this.flagReject = flagReject;
}
/**
* Retrieves the flag indicating whether the change item has been canceled.
*
* @return {@code true} if the change item has been canceled, {@code false}
* otherwise.
*/
public boolean getFlagCancel() {
return this.flagCancel;
}
/**
* Sets the flag indicating whether the change item has been canceled.
*
* @param flagCancel {@code true} if the change item has been canceled,
* {@code false} otherwise.
*/
public void setFlagCancel(boolean flagCancel) {
this.flagCancel = flagCancel;
}
/**
* Gets the status reason of the change item.
*
* @return String that represents the status reason of the change item.

View File

@ -0,0 +1,60 @@
2023-05-30-13:20:05 ERROR []
2023-05-30-14:56:19 ERROR ERROR (6663003): ; User can not be used as a change implementer for this ticket
com.bmc.arsys.api.ARException: ERROR (6663003): ; User can not be used as a change implementer for this ticket
at com.bmc.arsys.apitransport.ApiProxyJRpcBase.arCall(ApiProxyJRpcBase.java:300) ~[arapi-91_build009.jar:9.1.10-SNAPSHOT]
at com.bmc.arsys.apitransport.ApiProxyJRpcBase.arCall(ApiProxyJRpcBase.java:172) ~[arapi-91_build009.jar:9.1.10-SNAPSHOT]
at com.bmc.arsys.api.ProxyJRpc.ARCreateEntry(ProxyJRpc.java:1302) ~[arapi-91_build009.jar:9.1.10-SNAPSHOT]
at com.bmc.arsys.api.ARServerUser.createEntry(ARServerUser.java:4418) ~[arapi-91_build009.jar:9.1.10-SNAPSHOT]
at com.nttdata.calender.api.RemedyJavaAPI.createEntry(RemedyJavaAPI.java:136) ~[classes/:?]
at com.nttdata.calender.implementer.Implementer.update(Implementer.java:46) ~[classes/:?]
at com.nttdata.calender.api.KalenderRestController.updateImplementer(KalenderRestController.java:236) ~[classes/:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-5.3.25.jar:5.3.25]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) ~[spring-web-5.3.25.jar:5.3.25]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-5.3.25.jar:5.3.25]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.25.jar:5.3.25]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.25.jar:5.3.25]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.25.jar:5.3.25]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071) [spring-webmvc-5.3.25.jar:5.3.25]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964) [spring-webmvc-5.3.25.jar:5.3.25]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [spring-webmvc-5.3.25.jar:5.3.25]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) [spring-webmvc-5.3.25.jar:5.3.25]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:665) [javax.servlet-api-4.0.1.jar:4.0.1]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [spring-webmvc-5.3.25.jar:5.3.25]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) [javax.servlet-api-4.0.1.jar:4.0.1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-embed-websocket-9.0.71.jar:9.0.71]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.3.25.jar:5.3.25]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.25.jar:5.3.25]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) [spring-web-5.3.25.jar:5.3.25]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.25.jar:5.3.25]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.3.25.jar:5.3.25]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.25.jar:5.3.25]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-embed-core-9.0.71.jar:9.0.71]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.71.jar:9.0.71]
at java.lang.Thread.run(Thread.java:834) [?:?]

View File

@ -231,7 +231,7 @@ export class DataService {
console.log(dataJson);
this.http.post('http://localhost:8080/api/getChanges', dataJson)
.subscribe((response:any)=>{
// console.log(response);
console.log(response);
this.totalSize = response.totalSize;
response.changes.forEach(resp=>{
let tasks : any[] = [];
@ -275,7 +275,14 @@ export class DataService {
);
}
res.push({resourceId: resp.resourceId, approvalStatus: this.validateApproval(resp.approvalStatus), statusReason: resp.statusReason , changeNr: resp.changeNr, resourceName: resp.resourceName, vertrag: resp.contract, vertragName: this.getContractName(resp.contract), isExpand: false ,isRes: true, state: resp.state, stateName: this.getStateNameById(resp.state), supportGroup: resp.supportGroup, tasks: tasks, supportGroupId: resp.supportGroupId, implementerEdit: resp.implementerEdit});
res.push({resourceId: resp.resourceId, approvalStatus: this.validateApproval(resp.approvalStatus), statusReason: resp.statusReason,
changeNr: resp.changeNr, resourceName: resp.resourceName,
vertrag: resp.contract, vertragName: this.getContractName(resp.contract), isExpand: false,
isRes: true, state: resp.state, stateName: this.getStateNameById(resp.state),
supportGroup: resp.supportGroup, tasks: tasks, supportGroupId: resp.supportGroupId,
implementerEdit: resp.implementerEdit, flagApprove: resp.flagApprove, flagCancel: resp.flagChancel, flagPermit: resp.flagPermit, flagReject: resp.flagReject
});
})