@Override public String toString() { return getName(); }
/** * Creates a status from a JSON payload. * * @param restclient REST client instance * @param json JSON payload */ protected Status(RestClient restclient, JSONObject json) { super(restclient); if (json != null) deserialise(json); }
/** * Retrieves the given status record. * * @param restclient REST client instance * @param id Internal JIRA ID of the status * * @return a status instance * * @throws JiraException when the retrieval fails */ public static Status get(RestClient restclient, String id) throws JiraException { JSON result = null; try { result = restclient.get(getBaseUri() + "status/" + id); } catch (Exception ex) { throw new JiraException("Failed to retrieve status " + id, ex); } if (!(result instanceof JSONObject)) throw new JiraException("JSON payload is malformed"); return new Status(restclient, (JSONObject)result); }
result = (T)new Resolution(restclient, (JSONObject)r); else if (type == Status.class) result = (T)new Status(restclient, (JSONObject)r); else if (type == User.class) result = (T)new User(restclient, (JSONObject)r);
/** * Retrieves the given status record. * * @param restclient REST client instance * @param id Internal JIRA ID of the status * * @return a status instance * * @throws JiraException when the retrieval fails */ public static Status get(RestClient restclient, String id) throws JiraException { JSON result = null; try { result = restclient.get(getBaseUri() + "status/" + id); } catch (Exception ex) { throw new JiraException("Failed to retrieve status " + id, ex); } if (!(result instanceof JSONObject)) throw new JiraException("JSON payload is malformed"); return new Status(restclient, (JSONObject)result); }
result = (T)new Resolution(restclient, (JSONObject)r); else if (type == Status.class) result = (T)new Status(restclient, (JSONObject)r); else if (type == Transition.class) result = (T)new Transition(restclient, (JSONObject)r);
@Override public String toString() { return getName(); }
/** * Creates a status from a JSON payload. * * @param restclient REST client instance * @param json JSON payload */ protected Status(RestClient restclient, JSONObject json) { super(restclient); if (json != null) deserialise(json); }
public boolean isIssueClosed(Issue issue) throws ServiceException { boolean isIssueClosed = false; String[] closeStatuses = settingsService.getSettingValue(JIRA_CLOSED_STATUS).split(";"); for (String closeStatus : closeStatuses) { if (issue.getStatus().getName().equalsIgnoreCase(closeStatus)) { isIssueClosed = true; } } return isIssueClosed; }
return String.format("Bug %s \"%s\" with status \"%s\" associated", bugUrl, bug.getSummary(), bug.getStatus().getName()); } catch (Exception e) { LOG.error("Exception during retrieving bug info", e);
return String.format("Bug %s \"%s\" with status \"%s\" associated", bugUrl, bug.getSummary(), bug.getStatus().getName()); } catch (Exception e) { LOG.error("Exception during retrieving bug info", e);