Section 4 - Updating the workflow for the Application Access Request issue type
Objectives
In this section, we will amend the workflow associated with the Task issue type so that it will trigger the lookup automation to populate the stakeholders.
We will add 4 post functions
Lookup the Data Owner with Application and update back to the triggering issue’s Data Owner
Lookup the Data Owner with Application and update back to the triggering issue’s Assignee
Lookup the System Owner with Application and update back to the triggering issue’s System Owner
Lookup the System Admin with Application and update back to the triggering issue’s System Admin
About the workflow
The workflow will be as follows
When the issue is created, it will use the Application field to lookup the stakeholders
Data Owner - the person in charge of reviewing whether the person has authority to access the data in the application
System Owner - the person in charge of the application
System Admin - the System admin who is responsible for granting the access
The request will be assigned to the Data Owner for approval
Once the Data Owner has approved, it will be routed to the System Owner for approval
After the System Owner has approved, it will be assigned to the System Admin to process the request
When the System Admin has completed the task, the request goes to the Completed status
During the workflow, it is possible to cancel or reject the request
Steps
1. Entering the Workflow Edit mode
Click on the Workflows in the Project settings' left sidebar
Click on the Pencil icon under Actions column to edit the workflow associated with the Task issue type
Click on the Diagram tab
Click on the topmost arrow pointing to the Open status
Click on the Post Functions link to edit the post function
2. Adding the Lookup to set the Data Owner
We will show the detailed steps for setting up the 1st post function
Click on the Add post function link
Select Lookup Manager: Update Issue Field and click on the Add button
Select Application as the Source Field(s) since we are using that field in the Service Desk request to perform the lookup
Select APPMAPPING project as the Lookup Project Key since it stores the mapping between the Application field and the other stakeholder user picker fields (Data Owner, System Owner, System Admin)
Select Application in the Search Field(s) as it is the field in the Lookup Project to be matched with the Source Field(s)
Select Data Owner for the Matching Field because we will use its value
Select Data Owner for the Destination Field because we will use the value from step 6 to update back into the Data Owner field in the triggering issue
Click on the Add button
The Post Function is added successfully
For the Create transition, the post functions must be placed after the Creates the issue originally
2. Adding the Lookup to set the Data Owner as the Assignee
Unlike Jira Server/DC, the post functions for Jira Cloud are executed asynchronously. Thus it is not possible to add a post function to copy the value of the Data Owner to the Assignee. However, it is possible to use a Lookup post function to update the Assignee directly.
Click on the Add post function link
Select Lookup Manager: Update Issue Field and click on the Add button
Select Application as the Source Field(s) since we are using that field in the Service Desk request to perform the lookup
Select APPMAPPING project as the Lookup Project Key since it stores the mapping between the Application field and the other stakeholder user picker fields (Data Owner, System Owner, System Admin)
Select Application in the Search Field(s) as it is the field in the Lookup Project to be matched with the Source Field(s)
Select Data Owner for the Matching Field because we will use its value
Select Assignee for the Destination Field because we will use the value from step 6 to update back into the Assignee field in the triggering issue
Click on the Add button
The Post Function is added successfully
3. Lookup the System Owner and System Admin for the Application
There are 2 schools of thoughts.
Some prefer to update stakeholders as early as possible so that it gives visibility. Whereas some advocate just-in-time concept to cater to the scenario that the stakeholders may change during the meantime.
The advantage of setting it upfront is that you can use the Copy Value From Other Field post function to set the assignee from the System Owner/System Admin fields when it enters the corresponding status.
The setup for the Lookup post function for System Owner
The setup for the Lookup post function for System Admin
The list of post functions will be like this
4. Updating the workflow
This step is optional since lookup post functions are triggered immediately upon creation.
You can add the statuses and transitions as per the workflow diagram below
You can delete the other existing statuses and transitions
5. Adding the approval
This step is optional since lookup post functions are triggered immediately upon creation.
We need to set up the approvals so that it will transition automatically to the next state once the Data Owner has approved.
Click on the link of the workflow name
Click on the Diagram tab to go into diagram mode
Click on the Data Owner Review status
Click on the Configure link in the box on the right
Select the options for the fields and then click on the Create button
Get approvers from field: Data Owner
If approved, transition status to: Data Owner Approved
If declined, transition status to: Data Owner Denied
When you are done, you can click on the Publish Draft link at the top to save the workflow
6. Try it Out
Now you can go to the Customer Portal and create a request and test out the automation you have configured
Go back to the Service Desk project using the top menu
Click on Raise a request
Select Application Access
Fill in the fields and click Send
Click on the issue key at the top breadcrumbs to go from the Customer Portal view to the Agent View
The stakeholder fields are populated on the right side
If you click on the History tab, you can see the changes updated by the Lookup Manager
The End
Give yourself a pat on the shoulder for completing this tutorial. 👍
Now you have learnt how to set up a new project on Jira Cloud as well as the enhancing the Jira workflow.
If you have any questions or suggestions for improvement, you are welcome to submit them at our Service Desk. It is also powered by Lookup Manager for Jira Cloud.