Auto Transition when an Issue is Added to a Sprint

For our Stories, for the default workflow we have is Draft > Planned > In Progress > Done.  We have other states but those are the key ones.  Draft is defined as a new Story to schedule.  Planned is defined as a Story that has been scheduled in a sprint.  In Progress is defined as a Story being worked on currently.  And Done is defined a completed Story. 

Right now we have Sprint as a mandatory field when moving from Draft to Planned.  Which works, but we would much rather have a Story moved into a sprint in the Scrum board and not while editing an issue.  Which we can do, but we are hoping there is a way that adding a Story into a sprint will automatically trigger a status change as well.  From Draft to Planned.  Is it possible to trigger a transition once a Story has been added into a Sprint?

Thanks.

Dante.

4 answers

I am not necessarily answering the question asked here but it sounds strange to me that you would want to do that. I assume that the goal here is to make sure that stories are ready to be executed into a sprint? The Draft > Planned > In Progress > Done workflow sounds good for a KanBan where no sprints are defined but you seem to be using Scrum.

What I do is that when I groom my backlog and that I feel a story is ready to be executed, I add a label "READY-ready" to it. I have also some quick filters allowing me to zoom in on stories that are not "READY-ready" so that they can be caught before starting the sprint during backlog grooming sessions. So before starting the sprint, you activate the quick filter and see if some stories in the sprint are not yet ready and you could even flag them in the board.

If you are really looking for a hardcore way of doing it while still using your workflow, you could use an add-on such as Checklist (shameless plug here smile). Use the checklist to list the items of your definition of ready and prevent the workflow transition to Planned until all items in the definition of ready are not completed.

If none of this satisfies you, then I think that you only solution would be to write a plugin for that as I don't think you will find this functionality out of the box.

Okay.  Thanks for the response.

My preference would be to just remove the Planned status.  And then only move from Draft to In Progress.  And have the action of assigning an issue into a Sprint corresponding to saying it is Planned.  So Draft + No Sprint assigned = Not Planned.  Draft + Spring Assigned = Planned.  

@Dante De Vellis

I took a look at the possible options and this is what I found:

Potential Solutions (current / future)

  1. Unfortunately "workflow triggers" only work with connected applications, which would likely be an ideal spot for this functionality to live. (see: Configuring workflow triggers)
  2. Auto Transition when an Issue is Added/Removed from Sprint talks about ScriptRunner (paid) and Jira Toolkit (free). Haven't tried these myself.
  3. Remove issue from a sprint when transitioned to certain states mentions an open feature request (Better JIRA Software integration) that is related to this.
  4. Workflow actions on sprint start in Agile mentions the same flow, but slightly different use case.
  5. How to change status on adding to sprint mentions toe articles: Adding a custom event and Listeners. This seems like a viable solution.
  6. Both of the articles: How to change status from backlog to open? and What are your thoughts on this Kanban + Scrum workflow? suggest keeping issues in the "backlog" state even when adding the issue to a sprint.

What I surmised is from this is as @Yves Riel suggested keeping issues in their current status is the best solution. An issue may be worked on in multiple sprints meaning it could already be "in progress" when added to the sprint. As I've read, sprints are a way to plan what you work on, and shouldn't necessarily affect the status of an issue.

If anything, upon adding to a sprint, the "Assignee" field could be requested as typically that is the time that issues are assigned anyway. You might be able to Associating a screen with an issue operation to do this.

I recently did this using a Scriptrunner script listener and I thought it might be valuable to share the details for anyone searching for this answer in the future.  My use case was changing the issue to "In Progress" if it was added to a Sprint.

In Administration | Add-ons | Scriptrunner | Script Listeners | Listeners, I created a Fast-track transition.

Fields and values were as follows.

  • Projects: entered the projects this should apply to
  • Events: Issue Updated
  • Condition: cfValues['Sprint'] != null
    • This was to indicate the status change should only happen if the Sprint field has a value.
  • Action: Start Progress (4) 
    • You will have to select from a dropdown the correct status (note that the UI for this is strange, it lists the workflows in Alphabetical order then the statuses, but it's not really obvious).  If you have any trouble with the listener, I suspect this will be the place to look first to make sure you have the right status.
  • Nothing further in the remaining fields.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

222 views 6 0
Join discussion

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