Adding approvers from Insight objects
Jira Service Management allows you to require approvals for a workflow step. This means that a request can’t move from one status to another until it’s approved by the right people. In Insight, the right people are the owners of your assets or groups responsible for their maintenance. You can now add them as approvers when a request is raised against the asset they own or have relations to. The approvers will change dynamically based on the assets selected in your requests.
Before you begin
To add approvers from Insight, you’ll need the following items:
Attribute of type User or Group added to an object type
Insight object/s custom field mapped to your objects in Insight
If you don’t have them already, follow these steps:
When you add the User/Group attribute to your object type, you can then fill it in for the underlying objects by choosing a specific user or group. These people will have relations to your objects and can be assigned as approvers. For more info on attributes, see Adding attributes to object types.
To add an attribute to your object type:
- In Insight, select an object type, and switch to the Attributes tab.
- Add an attribute of type User or Group. In the following example, we added a User attribute – we’ll assign the right user to this object in the next step.
You can configure extra details for each of your attributes by selecting the cog icon on the right. One of the useful options is cardinality – it will let you choose how many users can be selected for a field.
Switch to the Objects tab, edit an object, and assign a user or group to the attribute you added.
An Insight object/s field works like a link between Insight and your projects in Jira. The field is configured differently than Jira custom fields, but when it comes to adding it to Jira screens, it behaves like a regular custom field. You will select this field, together with an attribute, when creating an approval step. For more info on the Insight object/s field, see Default Insight custom field.
To create the Insight object/s field:
In Jira, go to Administration > Custom fields, and create a new custom field.
Select the type as Insight Object/s.
Choose the name, applicable projects and issue types.
Associate the custom field with the screen that are used by the workflow you’re planning to add the approval to. Typically, these would be the Create and Edit screens, related to the issue type used by your workflow.
To link the Insight object/s field to your projects and objects:
On the Custom field page, find the custom field, and click … > Configure.
Select Edit Insight configuration. You’ll now see configuration specific to this field.
Select the object schema in which you store your assets. This option should be enough to use the field for the approvals. If you’d like to configure more, see the docs linked above.
Adding, configuring, and viewing your approvers
With the attributes and the custom field ready, you can now configure the approval step and add approvers from Insight to your request.
1. Add the approval step to your workflow
To add the approval step to your workflow:
Edit the workflow to which you want to add the approval.
Select a status, and click Add approval.
Select Insight object field and choose your custom field. We’ll check this field for any valid attributes and will let you choose the one with your approvers.
Choose how many approvals are required and which transition your request should use when it’s approved or declined.
Click Create to add the approval.
2. Enable the Insight object/s field on the customer portal
Approvers change based on the object selected in your request, but someone needs to actually select an object. In this step, you’ll let customers select objects on the customer portal. If you skip it, your agents can still select objects in the agent view.
To enable the custom field on the customer portal:
In your project, go to Project settings > Request types.
Select the request type.
If your field isn’t in Visible fields already, click Add a field, and add it.
3. Raise a request and view approvers
When you raise a request and select an object in it, approvers will be added automatically when the request reaches your approval step.
To raise a request:
Open your customer portal and raise a request.
The Insight object/s field should let you select one of your objects from Insight.
To view approvers for the request:
Transition the request to the workflow status with your approval step.
Approvers related to the selected object should be added automatically. They will also receive an email notification asking them to approve or decline this request.