Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve history details of an issue from jira using "jira-rest-java-client"?

nipun d January 29, 2013

I am not able to retrieve history details of an issue using jira rest api.

How I can retrieve history details ?

2 answers

1 accepted

0 votes
Answer accepted
rmcdow March 2, 2013

You can ignore my question. I figured it out :)

getIssueClient().getIssue(bi.getKey(),Arrays.asList(IssueRestClient.Expandos.CHANGELOG));

leetcat January 14, 2016

How does this work? The second argument is ProgressMonitor progressMonitor not an array list.

leetcat January 14, 2016

FOUNT OUT!. getIssueClient().getIssue(bi.getKey(),Arrays.asList(IssueRestClient.Expandos.CHANGELOG), null);

georgiossalon
Contributor
November 15, 2018 edited

As what kind of type of object/List am I suppose to "save" the data from the history?

 

I am getting a suggestion of:

Promise<Issue> issueHistory=  restClient.getIssueClient().getIssue(issue.getKey(),Arrays.asList(IssueRestClient.Expandos.CHANGELOG));

when I am in debugging mode and analyzing the variable "isseHistory" i cannt find any useful information.

georgiossalon
Contributor
November 15, 2018

Found it!! :)))

 

It is of type Issue ->>

Issue issueHistory =  restClient.getIssueClient().getIssue(issue.getKey(),Arrays.asList(IssueRestClient.Expandos.CHANGELOG)).claim();
0 votes
C_ Faysal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2013

try

<jira_host>/rest/api/2/issue/<ISSUE-KEY>?expand=changelog

nipun d January 30, 2013

I am new to this. i want to retrieve history details using java rest api.

how can I retrieve history details using java rest api.?

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 30, 2013

You have posted the question again as comment. Faysal's comment was the answer for your question. Read the REST API docs at https://jira.atlassian.com/plugins/servlet/restbrowser#/, search google for how to make REST calls using you language of programming.

For history as Faysal says, pass the extra argument expand=changelog.

Also search this forum for many post on the same topic, for example https://answers.atlassian.com/questions/64708/is-it-possible-to-get-the-issue-history-using-the-rest-api

rmcdow February 23, 2013

I believe what nipun was specifically asking was if/how he can do this using the JIRA REST Java Client Library. Is this possible?

Christian Lipp
Contributor
July 10, 2016

Yes, this is what he wanted to know. He didn't post the question as comment, he tried to clarify since the answer has nothing to do with his question.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events