We have a workflow at our organisation where everything is transition to all as it's a small team with fluid changes, so don't need a process.
However, we'd like some guard rails to ensure that when leaving a status, they provide some key details before moving to another status. How do I do this? I can see the transition to the status in question, but not possibility to limit it leaving?
Alternatively, is possible to (painfully) put conditions on all other transitions to validate from a certain status?
Hi @Alex Lock , first you will need to use a Company Managed Project and you will need to move away fro the "All" transition for the status where control is desired. Once this is done you can add validators and a screen to the transition out of the status. One other option, would be to use Automation to move the issue back to the previous status and send an email to the user to provide the necessary details. This is a bit of a kluge IMO.
Yeah, that sounds like a pain. There's no appetite to change the workflow and it's caused me a few headaches. I'll consider the automation though, but agreed, that's a bit of a kluge
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
edited reply as I misplaced my response...
You certainly could use Automation...
trigger - transition (from any to Done)
condition - field condition Root cause is empty
action - email user triggering rule "please enter Root cause"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alex Lock ,
So, your workflow has these transitions that go into a status from any other status. And you would like to restrict this in some cases, but not all cases. And you do not want to move away from the "All" transitions.
I believe you can do this using validators, although there might some extra work, depending on what exactly is needed. In any case, for the following approach you will need one of the many workflow apps that support Jira Expressions. My recommendation is Cloud Workflows, but I do work for that vendor. As far as I know, the other options work equally well. The important thing is, that Jira Expressions are supported.
Now, the great thing about Expression-based Validators is that you get to look at the current transition and therefore let the Validator behave differently, depending on the current status and the target status. Let me go on a quick Expressions deep dive to provide an example:
Say you have three status: New, In Progress and Done. You want every status to be able to go into every other status, so Done only has one incoming transition. But if someone goes from New to Done, you want at least one comment on that issue. If the issue has already been in In Progress, you do not care about that.
The way to achieve this would be a Validator on the incoming transition to Done that uses an Expression like this:
transition.from.name != "New" || issue.comments.length < 0
The expression has two parts, the first part (left of ||) tests if we are moving from the New status. If so, the first part becomes false and we have to look at the second part. That counts the number of comments and checks if there is more than 0 comments.
On the users side, this will look like any normal transition until they try to move from New to Done without a comment being present. In that case, the issue will be put back in its original state and the user sees an error message.
I hope that helps and makes sense for you. Let me know if I was unclear, I'm happy to help.
Cheers,
OIiver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.