Set up your automation rules:
You must be a Project Admin to perform these steps.
Create a related issue when a ServiceNow Request is created
Create a new rule
Add a Trigger - Issue Created
Add a JQL Condition
issuetype = "ServiceNow Request" and "Assignment Group" = "My Assignment Group"
You can add other Conditions as needed
Action - Create issue
Project: Same Project
Issue type
Chose which fields to set - can copy values from the Request or set default values
Summary (Can copy from Current or Trigger issue)
Description
Linked issue
Add link type and Trigger issue to relate the new issue to the ServiceNow Request
You can also set the Team field under More Options-> Additional fields
{
"fields": {
"Team": "XXXXXXX"
}
}
You can find the Team number using the issue navigator and searching for your Team.
"Team[Team]" = “Team Name”
The Team Name will change to the number as soon as you select the team name from the drop down.
You cannot copy attachments using Automation but you can link to the attachment in the related request by using the following smart value:
Attachments: {{attachment.content}}
See example to the right.
Transition ServiceNow Request to WORK IN PROGRESS if the related issue is in an IN PROGRESS status category (blue statuses)
Create a new rule
Add a Trigger = Issue Transitioned
From status - leave blank to match all statuses
To status - select the IN PROGRESS status in your project or any other In Progress (blue) statuses.
Next
Add a Condition - Related Issues Condition
Related issues - Linked issues
Link type - Select the link type used in the automation rule to create the issues.
Condition - Some match specified JQL
Matching JQL - issuetype = "ServiceNow Request" and status != "Work in Progress"
This will only update the ServiceNow Request if it is not already in WORK IN PROGRESS status.
Add additional conditions in your query as needed.
Validate your query
Next
Add a Branch rule / related issues - this is so you will update the ServiceNow Request, not the current issue.
Type of related issues - Linked issues
Link type - select the Link type set up in the Create automataion rule
Next
If you have additional issue types using the same link type, you may want to add a Condition to check for only ServiceNow issue types
Condition - Issue fields condition
Field - Issue Type
Condition - equasl
Value - ServiceNow Request
Add an Action - Transition issue
Destination Status - WORK IN PROGRESS
If you want to copy additional information over to the ServiceNow Request, you can what fields to set on the ServiceNow Request here. Example - Assignee can be copied from the trigger issue.
Next
Name your rule and Publish.
Transition ServiceNow Request to CLOSED COMPLETE if the related issue is in an DONE status category (green statuses)
Create a new rule
Add a Trigger = Issue Transitioned
From status - leave blank to match all statuses
To status - select the DONE statuses in your project.
Examples: COMPLETED ACCEPTED CLOSED DONE etc
Save
Add a Condition - Related Issues Condition
Related issues - Linked issues
Link type - All link types
Condition - Some match specified JQL
Matching JQL - issuetype = "ServiceNow Request" and statuscategory != "Done"
This will only update the ServiceNow Request if it is not already in DONE statuscategory.
Validate your query
Save
Add a Branch rule / related issues
Type of related issues - JQL
JQL - issuetype = "ServiceNow Request"
Validate query
Check the box next to “Only include issues that have changed since the last time this rule executed”
Save
Add an Action - Transition issue
Destination Status - CLOSED COMPLETE
If you want to copy additional information over to the ServiceNow Request, you can what fields to set on the ServiceNow Request here.
Save
Name your rule and Publish.
Follow the above steps for any other status mapping you want to automate.