Workflow to add a sprint to a new issue



For quite a while I am trying to add an issue of the state New automatically to the current sprint of a defined agile board (if there is no sprint set jet).
To check and change the sate is clear to me, aswell as the if-case to check whether the issue field has already a sprint set or not. 


But how can I get the current sprint of an Agile board as a variable into my workflow?

And how to set this to the sprint field of an issue?


Hope you can help me with this request.

Thanks in advance!

1 comment
Comment actions Permalink
Official comment

Hello Ina,

The easiest way to add issue to the current sprint is by using the applyCommand method:

ctx.issue.applyCommand('add Board '+ BOARD_NAME +' Current sprint');

Does it meet your scenario? Should you have any further questions, feel free to contact us.

Please sign in to leave a comment.