How to add 2nd approver
Since: v2.3.0.
We are receiving request from users that they would like to add two-step approval, we prepared this manual with step by step instruction how to edit workflow and add second supervisor
Add new custom field
Add new custom field of type Team User Picker (Vacation Manager) - name it eg. “2nd approver”
Add this field to the project by selecting Vacation Manager project issue screens:
Modify Issue Security Scheme
You need to modify “Security Levels“ in Vacation Manager Issue Security Scheme. You can find it in project setting or through global page with security schemes.
In editing mode use “Add“ button in “User, Supervisor and HR admins(Default)“ row.
In next screen select “User custom field value“ radio button and select field created in point 1.
Save changes.
Vacation Manager Workflow
Go to Vacation Manager Workflow and edit it.
Add new status e.g. Waiting for 2nd approval
Create new transition from “Waiting for approval” to “Waiting for 2nd approval“ - name “Send to 2nd supervisor“
Search “approve“ transition and move it from “Waiting for approval“ to “Waiting for 2nd approval“
In “Send to 2nd supervisor“ transition need add Conditions, Validators and Post Functions. It’s quite similar like in “Send to supervisor“ transition but it’s two differences marked in bold:
- Conditions:
Show transition for selected groups and users: supervisor, assignee, HR group (hrs)
- Validators:
Validates vacation days numbers using "Start Date" and "End Date" custom fields,
Validates if supervisor/substitute fields are not the same as reporter
- Post functions:
Calculate used vacation days,
Set Assignee to value from 2nd approver field (field created in point 1)Create new transition from “Waiting for 2nd approval“ to “Reject“ and add missing condition and post function like in “Reject“ transition:
- Condition: Show transition for selected groups and users: assignee, HR group
- Post function: The Resolution of the issue will be set to Done.Create new transition from “Waiting for 2nd approval“ to “Need more info“. In screen set “VACMAN Comment screen“
Edit Conditions and Validators
- Conditions: Show transition for selected groups and users: assignee, HR group
- Validators: Makes comment field required.Save all changes and publish new workflow:
First supervisor has access to vacation document only if he is assignee. After send to 2nd supervisor, he is not able to see this vacation document.
Example:
Feel free to tell us what topic should be covered: vacationmanager@psc-software.atlassian.net