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

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

Suggest an answer

Log in or Sign up to answer