Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner - Retrieve sprint changelog

With using Scriptrunner, you can built listeners and browse through the changelog of what has been modified in an issue. 

I don't see a similar option to do this for sprints, see https://scriptrunner.adaptavist.com/5.6.8/jira/listeners.html for example.

I have a script listener listening on ScriptUpdatedEvent but I only want to continue in my code if the start and or end date have been modified, but I'm not able to retrieve the previous sprint information, is that correct?

2 answers

2 accepted

0 votes
Answer accepted

Downloaded the source and browsed the .jar file. Found my answer in case it helps others:

log.error "### current " + event.sprint.endDate
log.error "### previous " + event.previousValue.endDate
0 votes
Answer accepted

You get a changeLog with an issueUpdated event because that changelog was needed to generate the Change History data.

There is no change history for sprints. That data simply doesn't exist anywhere.

But it does seem like the event itself contains both the current and previous version of the sprint entity.

So you need to examine if the sprint start date changed, you could try this:

if(event.previousValue.startDate != event.sprint.startDate){
//do something becuase the sprint start date is changed.
}

FYI, since the greenhopper javadoc has not been updated since version 6.x, the best way to find this sort of thing is just with the scriptrunner's script editor:2020-10-09 09_08_16-Listeners.png

As there was no doc online about the SprintUpdatedEvent I had to decompile the greenhopper.jar to retrieve those attributes, I didn't know about the autocomplete.. life saver! 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

175 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you