private void setTicketState(String ticketId, State state) throws PluginException { try { Ticket ticket = m_ticketerPlugin.get(ticketId); ticket.setState(state); m_ticketerPlugin.saveOrUpdate(ticket); } catch (PluginException e) { LOG.error("Unable to set ticket state"); throw e; } }
private void setTicketState(String ticketId, State state) throws PluginException { try { Ticket ticket = m_ticketerPlugin.get(ticketId); ticket.setState(state); m_ticketerPlugin.saveOrUpdate(ticket); } catch (PluginException e) { LOG.error("Unable to set ticket state"); throw e; } }
opennmsTicket.setState(otrsToOpenNMSState(otrsTicket.getStateID()));
/** * {@inheritDoc} * * Gets ticket details from the RT trouble ticket system */ @Override public Ticket get(final String ticketId) throws PluginException { Ticket ticket = null; RTTicket rtt = null; try { rtt = m_requestTracker.getTicket(Long.valueOf(ticketId), false); } catch (final RequestTrackerException e) { throw new PluginException(e); } if (rtt != null) { ticket = new Ticket(); ticket.setState(rtToOpenNMSState(rtt.getStatus())); ticket.setId(rtt.getId().toString()); ticket.setUser(StringUtils.join(rtt.getRequestors(), ", ")); ticket.setSummary(rtt.getSubject()); ticket.setDetails(rtt.getText()); } else { throw new PluginException("could not find ticket in RT for Ticket: " + ticketId); } return ticket; }
private Ticket getInternal(String ticketId, JiraRestClient jira) throws PluginException { // w00t Issue issue; try { issue = jira.getIssueClient().getIssue(ticketId).get(); } catch (InterruptedException|ExecutionException e) { throw new PluginException("Failed to get issue with id: " + ticketId, e); } if (issue != null) { Ticket ticket = new Ticket(); ticket.setId(issue.getKey()); ticket.setModificationTimestamp(String.valueOf(issue.getUpdateDate().toDate().getTime())); ticket.setSummary(issue.getSummary()); ticket.setDetails(issue.getDescription()); ticket.setState(getStateFromStatusName(issue.getStatus().getName())); return ticket; } else { return null; } }
/** * {@inheritDoc} * * Gets ticket details from the RT trouble ticket system */ @Override public Ticket get(final String ticketId) throws PluginException { Ticket ticket = null; RTTicket rtt = null; try { rtt = m_requestTracker.getTicket(Long.valueOf(ticketId), false); } catch (final RequestTrackerException e) { throw new PluginException(e); } if (rtt != null) { ticket = new Ticket(); ticket.setState(rtToOpenNMSState(rtt.getStatus())); ticket.setId(rtt.getId().toString()); ticket.setUser(StringUtils.join(rtt.getRequestors(), ", ")); ticket.setSummary(rtt.getSubject()); ticket.setDetails(rtt.getText()); } else { throw new PluginException("could not find ticket in RT for Ticket: " + ticketId); } return ticket; }
private Ticket getInternal(String ticketId, JiraRestClient jira) throws PluginException { // w00t Issue issue; try { issue = jira.getIssueClient().getIssue(ticketId).get(); } catch (InterruptedException|ExecutionException e) { throw new PluginException("Failed to get issue with id: " + ticketId, e); } if (issue != null) { Ticket ticket = new Ticket(); ticket.setId(issue.getKey()); ticket.setModificationTimestamp(String.valueOf(issue.getUpdateDate().toDate().getTime())); ticket.setSummary(issue.getSummary()); ticket.setDetails(issue.getDescription()); ticket.setState(getStateFromStatusName(issue.getStatus().getName())); return ticket; } else { return null; } }
opennmsTicket.setSummary(outputmap.getSummary()); opennmsTicket.setDetails(outputmap.getNotes()); opennmsTicket.setState(remedyToOpenNMSState(outputmap.getStatus())); opennmsTicket.setUser(outputmap.getAssigned_Group()); } catch (RemoteException e) {
opennmsTicket.setState(otrsToOpenNMSState(ticketWithArticles.getTicket().getStateID()));
if ((status != null) && (status.getValue() != null) && (status.getValue().equals(getProperties().getProperty("tsrm.status.open")))) { ticket.setState(Ticket.State.OPEN); } else if ((status != null) && (status.getValue() != null) && (status.getValue().equals(getProperties().getProperty("tsrm.status.close")))) { ticket.setState(Ticket.State.CLOSED);
if ((status != null) && (status.getValue() != null) && (status.getValue().equals(getProperties().getProperty("tsrm.status.open")))) { ticket.setState(Ticket.State.OPEN); } else if ((status != null) && (status.getValue() != null) && (status.getValue().equals(getProperties().getProperty("tsrm.status.close")))) { ticket.setState(Ticket.State.CLOSED);