Hi all!
I have a scriptrunner custom listener. The goal - to catch "sprint started" event.
But I can't import:
import com.atlassian.greenhopper.api.events.sprint.SprintEvent
...
...
SprintEvent event = event as SprintEvent
Sprint sprint = event.sprint
...
because of an error:
unable to resolve class com.atlassian.greenhopper.api.events.sprint.SprintEvent
How can I resolve it?
Thanks!
ScriptRunner 5.5.0.
With SR 5.4.45 script worked fine.
I think it is not related to your version of scriptrunner. We are on 5.3.26 and when I add the import line to my Sprint Listener script I get the same error.
I did not found a decent way to cast the event to a proper SprintEvent, so I use in my Sprint Listener:
import com.atlassian.greenhopper.service.sprint.Sprint
def sprint = event.sprint as Sprint
and this works (it returns a static type checking "error" complaining that an issueEvent does not have a property sprint, but I ignore that "error" message).
The API interface to the former greenhopper part (Agile) remains a dark undocumented area :-(
Thanks, Marc! It works!
I also wrote to Adaptivist. Hope, they will update documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ji Nick, great!
I think it is not a problem of Adaptavist; my code comes from their examples (https://scriptrunner.adaptavist.com/latest/jira/listeners.html#_jira_software_events).
But Atlassian should have a decent documentation of the (former greenhopper) REST API and developers API. It is missing for many years already :-(
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.