Hi..
I have JIRA Agile plugin installed in my jira and i want to read "issues in epic" for a given Epic from jira listener.
Is there any API i can use to read "Issues in Epic" from jira listener?
I tried reading like a subtask as follows but it didnt help!
Collection<Issue> subtasks= issue.getSubTaskObjects();
Any help?
Thanks in Advance!!
Ohm
This can be done on two steps:
1- Rest call
2- Extract issues from the Server Response JSON String
1-
public String getIssuesForEpic(long epicID) {
String ServerJSONOutput = NULL_DATA;
try{
Client client = Client.create();
client.addFilter(new HTTPBasicAuthFilter(JIRA_ADMIN_USERNAME, JIRA_ADMIN_PASSWORD));
WebResource webResource = client.resource(JIRA_URL + "/rest/agile/1.0/epic/" + epicID + "/issue");
ClientResponse response = webResource.type("application/json").get(ClientResponse.class);
log.trace("REST Response to getIssuesForEpic() = {}",response.getStatus());
ServerJSONOutput = response.getEntity(String.class);
log.trace("Output from Server .... {}", ServerJSONOutput);
} catch(Exception e){
e.printStackTrace();
}
return ServerJSONOutput;
}
2-
Use Java JSONObject to go through the issue array and convert them into issue object using IssueManager.getIssueObject(long id)
Looks like i found one workaround.
These links are stored in jira database as issue links.
select * from issuelinktype gives me
/10500Epic-Story Linkhas Epicis Epic ofjira_gh_epic_story/
so, for the moment I can read it from database table issuelink by querying on linktype.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I even tried accessing these like issue links. That didnt help either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.