if (Ticket.State.CLOSED.equals(ticket.getState())) { Comment comment = Comment.valueOf("Issue resolved by OpenNMS."); for (Transition transition : transitions) { } else if (Ticket.State.OPEN.equals(ticket.getState())) { Comment comment = Comment.valueOf("Issue reopened by OpenNMS."); for (Transition transition : transitions) {
if (Ticket.State.CLOSED.equals(ticket.getState())) { Comment comment = Comment.valueOf("Issue resolved by OpenNMS."); for (Transition transition : transitions) { } else if (Ticket.State.OPEN.equals(ticket.getState())) { Comment comment = Comment.valueOf("Issue reopened by OpenNMS."); for (Transition transition : transitions) {
private void updateOTRSState(Ticket ticket, TicketServicePort_PortType port, Credentials creds) throws RemoteException { Integer otrsStateId = openNMSToOTRSState(ticket.getState()); TicketStateUpdate stateUpdate = new TicketStateUpdate(); stateUpdate.setStateID(otrsStateId); stateUpdate.setTicketNumber(Long.parseLong(ticket.getId())); stateUpdate.setUser(m_configDao.getDefaultUser()); LOG.debug("Updating ticket with new state"); LOG.debug("Ticket ID: {}", ticket.getId()); LOG.debug("OpenNMS State: {}", ticket.getState().toString()); LOG.debug("OTRS state: {}", otrsStateId.toString()); port.ticketStateUpdate(stateUpdate, creds); }