Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Auto transition from one status to the next?

Tim H_
Contributor
October 22, 2024

I want to implement a SLA "Time to approval" and SLAs measure the time that an issue remains in status A before moving to status B, C or D. Unfortunately, I can't find a way of just measuring from unapproved to approved, because those are fields and not statuses.

So, I have to work with status and transition. Right now, I have a status "Waiting for approval" in many workflows. That's a good starting point for the SLA. However, at the moment the follow-up statuses differ, e.g.:

  • prepare equipment
  • grant permission
  • ...
  • (depending on the kind of workflow)

Thus, my SLA has to have lots of stop conditions. One for each of these statuses. I think that this cumbersome and error-prone. That's why I'm thinking about introducing a status "approved" and all workflows go from "waiting for approval" to "approved". This would make things much smoother.

However, I'd like to automatically transition from "approved" to the status that's actually the next one, like "prepare equipment" and so on. Perhaps that could be implemented via automation!!? Unfortunately, I only see the option to transition from A to B. What I need would be "transition from A to the next status available" (as this depends on the respective workflow).

Has anyone an idea how to achieve that? Any help is greatly appreciated!

1 answer

1 accepted

2 votes
Answer accepted
Stefan Stadler
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.
October 24, 2024

Hi @Tim H_ ,

first of all: There is a way to calculate the time between field value changes using ScriptRunner (not sure, if you are using this) and then going over the change history of the issue. Each change item has its own timestamp and an old and a new value. That would allow you to calculate the time between two such actions for the fields you mentioned.

Despite that, I understand that you would like to introduce an "Approved" status in each workflow and then move it on to the following status - which can differ by workflow.

Again, there is a solution using ScriptRunner and its shipped Post Functions in a workflow. The post function to be used is "Fast-track transition an issue [ScriptRunner]" (more can be found here ). This allows to select the target status right after a transition has been completed.

Because you anyway have to add the "Approved" status to every workflow, you could also add this post function in the same editing step. Not much overhead and maintainable.

If you have further questions, feel free to let me know, but I hope this already helps in solving this issue.

Regards,

Stefan

Tim H_
Contributor
October 25, 2024

Thank you, @Stefan Stadler. I don't have scriptrunner, but now I have implemented a similar approach with the JMWE add-on!

Stefan Stadler
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.
October 25, 2024

yes, JMWE offers similar functions compared to ScriptRunner. I just do not have it by hand to offer some example. Glad that you could solve it :-)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12.13
TAGS
AUG Leaders

Atlassian Community Events