Skip status with approval if there are no approvers

Ryan Butler
Contributor
April 5, 2018

Hello, I'm setting up a custom workflow for purchase requests in Jira Service Desk. Here's a screenshot of the workflow:

Screen Shot 2018-04-05 at 2.36.17 PM.png

I have three stages of approvals that I have set up. One is "Other approvers", which is a field specified by the user on creation of the ticket. This is where the user can include a supervisor if they need to. This field is totally optional, they can leave it blank if they don't need supervisor approval. The second stage is IT approval (field is hidden and auto-defined) where the IT team can verify the request is warranted, and the third stage is the fiscal team (field is hidden and auto-defined) that verifies the purchase is within budget. It's staged in this manner so people don't need to be bugged to approve something if it doesn't make it past the previous stage.

The problem is, when the "Other approvers" field is left blank by the user, the ticket sits on the "Awaiting other approvers" status with no way to transition to the next status. In the sidebar of the ticket, there's an approval section that says:

"Awaiting other approvers

1 approval needed

 No approvers selected"

Is there a way to skip that status if there are no approvers selected? I'm pretty new to all this, so I appreciate the help!

 

1 answer

1 vote
Vyacheslav Ryzhov April 5, 2018

Hi @Ryan Butler

U can put one more transaction from status AWAITING OTHER APPROVALS to AWAITING IT APPROVAL and put Condition for "Other approvers" field such as - Allows to execute a transition if the given value of a field is equal to a constant value, or simply set.

So, if value is empty - transition will be available. If not - will be hidden.

Ryan Butler
Contributor
April 9, 2018

Hi @Vyacheslav Ryzhov

I'm not seeing a condition listed that matches what you're referring to? Here's what I see in the conditions for that transition:

Screen Shot 2018-04-09 at 10.01.22 AM.png

Additionally, would this transition happen automatically? Ideally, I'd like to not have to manually move the workflow forward if there are no other approvers.

Thanks for your help!

Vyacheslav Ryzhov April 10, 2018
Ryan Butler
Contributor
April 10, 2018

Thanks for the help. That plugin did allow me to add a button to click to transition to the next status, but in my search to automate that transition, i found another plugin called "Automation for Jira" that provided exactly what I needed. I set up a rule like the following, which will check new issues of type "Purchase Request" for the other approvers ("Approvers" field) to be empty, at which point it will trigger the transition to the next status. Here's a screenshot of what I setup, for anyone that may stumble across this same situation:

Screen Shot 2018-04-10 at 10.28.28 AM.png

Jason Freeman
Contributor
August 23, 2018

Hey, @Ryan Butler.

I'm trying to do exactly what you did, but I get the following error whenever the rule is triggered:

Error in the JQL Query: 'equals' is a reserved JQL word. You must surround it in quotation marks to use it in a query. 

The full error is as follows:

"(key IN (IT-548) AND (("Customer Request Type" = "Colleague Updates (IT)") AND ( equals Empty)))" - Error in the JQL Query: 'equals' is a reserved JQL word. You must surround it in quotation marks to use it in a query. (line 1, character 82)

It's almost like it doesn't see {{issue.Approvers}} at all. That's why it says "AND ( equals Empty."  Right before the words "equals," I typed {{issue.Approvers}} like you did, but the error message doesn't even see it for some reason.

Have you seen this?

Daniel Alonso
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.
September 24, 2019

@Jason Freeman  What I see is that you are missing the left parameter

<> equals Empty. You need to add Approvers on the left of equals.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events