The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Is it possible to get issue edit history using a Groovy script?

ETC TPM
September 16, 2020

I'm trying to build a Calculated Number field where the field value increases by one every time someone edits an issue, so that users can see how many times that particular issue has been edited. Is there a way to do this using a Groovy script that gets the edit history of the issue? Or perhaps a smarter way to go about the whole process?

 

Thanks!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
André Strachovsky
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 16, 2020

Hi there :)

This may do the trick:
def changes = ComponentAccessor.getChangeHistoryManager().getChangeHistories(issue)
changes.size

regards