How to add an approval step in my workflow

Philip Moturi October 4, 2016

I would like to add an approval in my workflow i.e. before an issue is moved to DONE, it needs to be approved by 2 people in my team.

My project is a Software project.

I've pretty much googled & guessed my way through. I got a point where I went to JIRA Administration -> Projects -> Fields -> Approval (Edit). 

I added the field "Approval" to my project "TURI" as seen in the screenshot below... or so I thought.

However it looks like the approval field is locked. And upon checking the issues in my my "TURI" project, none of them show the approval field. 

    Screen Shot 2016-10-05 at 11.53.26 AM.png

 

is it possible to have an approval in my workflow? And how can I implement it?

3 answers

2 votes
Alexander Richter
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 4, 2016

there are many ways to do something like that. I would prefer to have another status i.e. "to be approved" between your last status and the DONE status.

Then you make the transition to DONE only accesible by the 2 people in your team using a condition.

Philip Moturi October 6, 2016

I've taken this approach. However I've hit a road block. 

The key thing is that I don't want the assignee to be allowed to move it from "Awaiting-approval" status to "Done". I'd like to have every one else in the team except the assignee to move the card from "Awaiting-approval" status to "Done".

I created a transition called "approval-to-done" and tried adding a condition that will prevent the assignee from being able to execute this transition. But I've not been successful. I've been stuck at this for too long now sad.

This is where I got stuck:

Screen Shot 2016-10-06 at 12.58.54 PM.png

 

Alexander Richter
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 6, 2016

Hi Philip,

in your case, you tell JIRA to only allow the transition if the current User is assignee of your issue.

I think you need to have Scriptrunner for JIRA or the JIRA Workflow Toolbox installed.

Solution for script runner: Choose the Script Condition -> Simple scripted condition -> paste following code

currentUser != issue.assignee

Solution for JIRA Workflow Toolbox: Use the "Except assignee" condition.

 

Hope one of the will help you wink

 

Best Regards

Alex

Philip Moturi October 6, 2016

I'm using the cloud and this feature doesn't seem to be available on cloud.

Alexander Richter
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 6, 2016

Scriptrunner is available for Cloud, but unfortunately not for free: https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner/cloud/overview

Maybe you could post a list of your available Conditions an we'll see what to use.

0 votes
David Skreiner
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 5, 2016

As Alexander Richter pointed out, you should probably add a status (or two) to your workflow.

 

As for the field: I think your "Approval" field locked because it's made for, and only for use with, a plugin called ServiceDesk. And it's invisible because it's set to be so in the project's field configuration (just a guess).

To find out precisely what you need to do: Open the issue using a JIRA admin account, click Admin, and click "Where is my field?" It will tell why the field is not being displayed.

 

Adding Approval info:

That field probably does not show up on your screens because it is set to be invisible in the project's Field Configuration.

I'd suggest making a custom field instead of using Approval:

1 Create fields you think would be good to have, e.g. a checkbox "approved yes/no", or a "approved by:" user picker field, or an "approved on: " date field .. 

2. Create a screen that creates the fields you'll be using.

3. Open your workflow. Click on the transition from your "Approval Request" step to the next status.

4. Set this transition to use your new screen with all of these "approval" fields on it.

 

0 votes
RPandyaram
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 4, 2016

Alternatively you can have a project role by name approver and manage them at the project level. Restrict the transitions towards Done to the people from this role only. ( Conditions)    

Suggest an answer

Log in or Sign up to answer