How can I put all bugs into current (started) sprint on creation using JJUPIN/JJUPIN Agile?

Moriah Chandler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 27, 2014

I can't find the script for doing this... Basically, if the issue type is "Bug" we want JIRA to automatically place it in the top started sprint. We usually have 2 sprints open at the same time (for at least a part of any given release), so this may not be easy. I want the bugs to go into the "next" sprint - the one at the top of my agile board.

I need this for multiple boards/multiple projects and would add it as a post-function.

2 answers

1 accepted

0 votes
Answer accepted
Moriah Chandler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2014

This is what I cobbled together from this: http://confluence.kepler-rominfo.com/display/TR/Moving+unclosed+issues+from+last+closed+sprint+on+next+sprint+and+updating+story+points+for+JIRA+Agile

number nextSprintInSprints=-1;
number brd = 35;

if (size(startedSprints(brd))>0)
{
 nextSprintInSprints=getElement(startedSprints(brd), 0);
}
if (elementExists(issueType,"Bug"))
 {
  addIssueToSprint(key,nextSprintInSprints);
 }
;

In this case, the agile board number is stated so there has to be a separate script for each board/workflow.

It creates an error if there are no started sprints (not really a concern since we always have one going).

I will admit, I don't know what it is actually doing code wise - but added as a post-function to the Create Issue step, it adds any bugs to the sprint at the top of the agile board.

0 votes
Silviu Burcea
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 28, 2014

Hi Moriah,

You need JJupin Agile to do that. It comes with some useful routines that will help you doing this task like addIssueToSprint, startedSprints and more. Check them here: http://confluence.kepler-rominfo.com/display/JJUPA/Routines.

Best regards,

Silviu

Moriah Chandler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 28, 2014

Yes, we bought the addon last week. I can't figure out how to do this though. How can I find the ID of the next sprint (when we have multiple open sprints)? I can get a list of all started sprints, but how do I know what the next one is?

Silviu Burcea
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 29, 2014

Hi,

You will have to iterate through sprints ids returned by startedSprints/notStartedSprints(not sure if 'next' sprint is the 2nd started or 1st not started) and decide which one is the sprint you want. sprintInfo/sprintStartDate will help you for this task. It's not pretty, but it will do the job.

I understand that this is not simple enough, we will add some more helpful routines like firstFutureSprint for a board or a way to sort sprints.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events