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

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
Accepted answer

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.

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

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?

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
Community showcase
Published Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

356 views 0 1
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you