Start progress on an issue only after the approval of project manager
Contents
Use case
Let's consider the following case: a Project Manager wants to see and approve each issue before it can be worked on.
Solution
This recipe consists of two different approaches that essentially do the same thing. The first uses just the Power Scripts™ for Jira app and the second one uses both Power Scripts™ for Jira and Power Actions™ for Jira.
In order to complete this tutorial you must be logged in with a Jira account that belongs to the jira-adminstrators group.
First approach
Start progress on an issue only after the approval of a Project Manager with Power Scripts™ for Jira.
Step 1: Create a new workflow by coping the default Workflow Scheme
Go to the Administration tab and in the Issues menu click the Workflows link.
Copy the default Jira workflow and name it "ApprovingWorkflow".
Click Edit.
In the bottom of the page, add a new status and name it "Approve".
Add another new status and name it "Reject".
Remove all transitions from the Open status.
To do this, click the Delete Transitions link, select all transitions, and click Delete.For the Open status named "Approving", click the Add Transition link and fill out the transition fields:
Transition Name: "Approve"
Destination Step: "Approve"
Transition View: "Default Screen"
Click Add.
In the similar way, add a transition for rejecting.
In the similar way, from the Approve status, add the following transitions:
Start Progress to the In Progress status
Resolve Issue to the Resolve status
Close Issue to the Closed status
Step 2: Edit condition for your transition
Set conditions for the Approve and Reject transitions. To do so, click the link on the name of the transition.
She following screen appears.Click Add Condition and select (k) SIL™ Condition.
Create a new SIL™ script named: "Approve condition" with the following SIL™ code:
return currentUser() == projectPM(project);The result should look like this:
In the same way, add a script to the Reject transition.
Step 3: Set the Workflow scheme
Select Workflow Schemes on the left of your screen and click Add Workflow Scheme.
Create a new Workflow Scheme, name it "ApprovedWorkflowScheme", and click Add.
Click Assign button for the ApprovedWorkflowScheme.
In a new screen, click the Associate an Issue Type with a Workflow button.
Configure it:
Issue Type: "All Unassigned Issue Types"
Workflow: "ApprovingWorkflow".