Automatic change in Transitions (Status) in JIRA Workflow

Gaurav Nawathey January 27, 2013

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

4 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2013

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.
Mark Love
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.
March 4, 2014

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?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 4, 2014

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

Mark Love
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.
March 4, 2014

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

Dipanwita Ghosh October 8, 2015

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2015

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

Like Sarah Kladstrup likes this
Sarah Kladstrup December 19, 2019

There's an app called "Automation for Jira" that can do similar things to the Jelly scripts: https://marketplace.atlassian.com/apps/1215460/automation-for-jira?hosting=server&tab=overview

It's also accessible to the project admins with a very user-friendly interface. That may be a double-edged sword, however.

0 votes
Mark Love
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.
March 4, 2014

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?

0 votes
C_ Faysal
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.
January 27, 2013

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?

Suggest an answer

Log in or Sign up to answer