Automatic change in Transitions (Status) in JIRA Workflow

Does JIRA has the Functionality to automatically change the Status (Transition) of an Issue based on Post-Functions. I am aware, we can change the Resolution of Issues, but it does not allow to Change the Status of an issue.

Alternatively, is there any plugin which helps in changing the status of an issue; if not a post-function.

3 answers

3 votes

I suspect this question is actually one about automation. This crops up irregularly because it's not obvious that Status (of an issue) is NOT a field, it is an indicator of position in the workflow.

Developers keep adding post-functions to Jira that say "in this case, change the status", without understanding that the point of a transition is to move from state A to state B and that post-functions run inside a transition, so subverting the transition end-point from the inside is asking for trouble.

Gaurav is steps ahead of most here, stating "cannot change status in transition". Technically, you can, but I've yet to see stable working code that does it (and I've spent a lot of time cleaning up the horrid messes made when people try it). So I think the answer here is either

  • Do what C.Faysal says and set up multiple transitions

Or

  • Use a listener to capture the event that the transition fires, and tell the listener to execute a second transition when it detects the right circumstances. Events are processed AFTER transition completion, so they're perfectly safe to trigger another transition.

I'd like to have a rule along the lines of "If status has been 'Awiting Client' for 30 days or more then close". Can this be automated?

Yup. Set up the workflow as above, then write a filter that says "status = awaiting client and updated < -30d", then use a jelly escalation script to trigger the close transition.

See https://confluence.atlassian.com/display/JIRA/Jelly+Escalation

Thanks Nic - I've not yet tried Jelly scripts, but perhaps this is what will tip me over the edge.

I think it is time now to update this info as Jelly script is becoming obsolete for the JIRA latest versions and the support for the earlier Jelly Scripts is going to be stopped as well.

Jelly was removed a version ago, let alone 7. But we don't update answers - they're answers to questions, not documentation.

hi gaurav,

a transition moves the issue to a different "status"

i wonder what the backgroud of your question is about...

https://confluence.atlassian.com/display/JIRA/Configuring+Workflow

i.e.

Step A (Status=Open): possible transitions are

  • "Start" links to "status = In Progress"
  • "Reject" links to "status = REJECTED"

of course postfuctions can update issue fields too

what exactly do you mean?

I'd like to have a rule along the lines of "If status has been 'Awiting Client' for 30 days or more then close". Can this be automated?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

198 views 0 5
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