/** * Creates a new sub-task. * * @return a fluent create instance * * @throws JiraException when the client fails to retrieve issue metadata */ public FluentCreate createSubtask() throws JiraException { return Issue.create(restclient, getProject().getKey(), "Sub-task") .field(Field.PARENT, getKey()); }
/** * Creates a new sub-task. * * @return a fluent create instance * * @throws JiraException when the client fails to retrieve issue metadata */ public FluentCreate createSubtask() throws JiraException { return Issue.create(restclient, getProject().getKey(), "Sub-task") .field(Field.PARENT, getKey()); }
/** * Copies the version to the given project * * @param project * The project the version will be copied to */ public void copyTo(Project project) { JSONObject req = new JSONObject(); req.put("description", getDescription()); req.put("name", getName()); req.put("archived", isArchived()); req.put("released", isReleased()); req.put("releaseDate", getReleaseDate()); req.put("project", project.getKey()); req.put("projectId", project.getId()); try { restclient.post(Resource.getBaseUri() + "version/", req); } catch (Exception ex) { throw new RuntimeException("Failed to copy to project '" + project.getKey() + "'", ex); } }
/** * Copies the version to the given project * * @param project * The project the version will be copied to */ public void copyTo(Project project) throws JiraException { JSONObject req = new JSONObject(); req.put("description", getDescription()); req.put("name", getName()); req.put("archived", isArchived()); req.put("released", isReleased()); req.put("releaseDate", getReleaseDate()); req.put("project", project.getKey()); req.put("projectId", project.getId()); try { restclient.post(Resource.getBaseUri() + "version/", req); } catch (Exception ex) { throw new JiraException("Failed to copy to project '" + project.getKey() + "'", ex); } }