How to delegate the approval permission in a JSM customer portal approval?
Summary
Jira Service Management (JSM) workflows can be configured to include customer approval steps. In these approvals, customer users approve requests directly from the customer portal interface, without accessing the conventional Jira interface.
How do you delegate the permissions for these approvals, using Keychain - Delegation for Jira?
Solution
To delegate the approvers on JSM customer portal approvals we will use the new Keychain custom field type and configure the portal approval to take approvers from this field.
To implement that, follow these steps:
- The instructions below presume that you have a JSM service desk project and a request type with an approval step that uses the Approvers field is already configured. If not, follow the steps in this Atlassian document first.
- Go to Jira Admin >> Issues >> Custom Fields page. Click the Add new Custom Field button.
- When the Add new Custom Field dialog opens, search for and select Delegate Users Field (by Keychain).
- Then click next.
- In the next dialog page, enter a name for your new Keychain custom field.
- In this example, we named the field Approvers with Delegates. but you can use any name that will be meaningful for your users.
- Then click next.
- In the next dialog page, configure a context for your new custom field.
- In this example, we set a global context for our custom field (all projects and all issuetypes) so the custom field will be visible on all issues. The recommended approach is to set a narrower context to show the custom field only on relevant projects and issue types. This improves Jira performance significantly.
- This dialog page is present only in newer Jira versions. It is OK if your Jira does not show this page.
- Then click Create.
- At this stage, the dialog will close and the screen selection page will open.
- Select the issue screens where you want this custom field to be displayed.
- Please note that you don't need to add this field to a screen for the approval flow to work. Adding this field to a screen lets you see the names of approvers and their delegates on issue view screens.
- Since this is a read-only field, it makes sense to select only View screens here. The field will not allow editing or display any value on create, edit, or transition screens.
- Then click Update.
- The browser will go back to the Custom Fields screen.
- Find your new custom field in the list and open its configuration page using the Configure option in the context menu.
- In the Configure Custom Field screen, select the Edit Delegator option to navigate to delegation-specific configuration.
- In the Delegation Configuration page, select the source that will provide the delegator users.
- For the Show Delegates of option, select User Picker Custom Field.
- For the Pick Custom User Picker option, select Approvers field.
- For Delegation Policy option, select Delegators and All Delegates so the custom field will display both the delegators and their delegates.
- You might also want to use the Delegators or First Delegates option to keep the number of approvers constant.
- Click Save.
- At this point, the configuration for the custom field is complete.
- To configure the request type to use this field as the source of approvers, go to Jira Admin >> Issues >> Workflows page and locate the workflow used by your request type.
- Click the Edit link and open the workflow in Edit mode.
- Switch to the Diagram mode of the workflow editor. Click on the status that contains the approval. Click on the Configure link for the approval.
- For the Get Approvers From option, check the User picker field checkbox and select the new Approvers with Delegates custom field.
- Then click Create.
- The configuration is complete.
- You can click the Publish button on the workflow editor page to publish your updated workflow.
- After following these steps, go to Configuring Delegations screen on your Jira to make some delegation definitions for your users.
- In this example, we've set Alana Grant as the delegate of Vincent Wong.
- In this example, the Approvers field contains Vincent Wong as the original approver.
- Since we added the Approvers with Delegates field to the issue screen, you will be able to see the field value on the issue.
- The approval stage we just configured will allow both the original approvers and their delegates to approve.
- Whenever the Approver field of the issue changes, the Approvers with Delegates field will be updated immediately and the permission to approve the request will shift to the new approvers and their delegates.