Hello,
I am using Jira Server version and I have a requirement of getting all the changes done for some fields since the issue created. I have implemented this using rest api (changelog), but the response from the rest api is taking too much time (almost 15 seconds) and this is a performance issue in my application. So thinking that, is there any alternative for rest api to get the issue history. For example, is there a way to get the issue history using Jira server SDK?
Thanks in advance!
Kumar
Hello,
Here is how you can get Issue History using Jira Java API:
Hi Alexey!
Thanks for your prompt reply. This is what exactly I am looking for. Now I can get the change history for the fields.
Along with the change log of the field, is it possible to get the name of the person who changed its value ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, it is possible:
You need to use getChangeHistories(Issue issue) method of the ChangeHistoryManager class.
def changes = ComponentAccessor.getChangeHistoryManager().getChangeHistories(issue);
changes.each {change ->
log.error(change.getAuthorObject())
change.getChangeItemsBeans().each {item ->
your logic here.
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.