Skip to end of banner
Go to start of banner

ServiceNow Requests - Create and Sync Related Issues

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Current »

Error rendering macro 'viewpdf' : Failed to find attachment with Name Request automation.pdf

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

  1. Create a new rule

  2. Add a Trigger - Issue Created

  3. Add a JQL Condition

    1. issuetype = "ServiceNow Request" and "Assignment Group" = "My Assignment Group"

  4. You can add other Conditions as needed

  5. Action - Create issue

    1. Project: Same Project

    2. Issue type

    3. Chose which fields to set - can copy values from the Request or set default values

      1. Summary (Can copy from Current or Trigger issue)

      2. Description

      3. Linked issue

        1. Add link type and Trigger issue to relate the new issue to the ServiceNow Request

    4. 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.

image-20240910-143818.pngimage-20240910-144128.pngimage-20240910-144402.pngimage-20240910-145223.png

Transition ServiceNow Request to WORK IN PROGRESS if the related issue is in an IN PROGRESS status category (blue statuses)

  1. Create a new rule

  2. Add a Trigger = Issue Transitioned

    1. From status - leave blank to match all statuses

    2. To status - select the IN PROGRESS status in your project or any other In Progress (blue) statuses.

    3. Next

image-20240910-152335.png

  1. Add a Condition - Related Issues Condition

  2. Related issues - Linked issues

    1. Link type - Select the link type used in the automation rule to create the issues.

    2. Condition - Some match specified JQL

    3. Matching JQL - issuetype = "ServiceNow Request" and status != "Work in Progress"

      1. This will only update the ServiceNow Request if it is not already in WORK IN PROGRESS status.

      2. Add additional conditions in your query as needed.

      3. Validate your query

    4. Next

image-20240910-153529.png
  1. Add a Branch rule / related issues - this is so you will update the ServiceNow Request, not the current issue.

    1. Type of related issues - Linked issues

    2. Link type - select the Link type set up in the Create automataion rule

    3. Next

image-20240910-153723.png
  1. 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

    1. Condition - Issue fields condition

      1. Field - Issue Type

      2. Condition - equasl

      3. Value - ServiceNow Request

image-20240910-154310.png

  1. Add an Action - Transition issue

    1. Destination Status - WORK IN PROGRESS

    2. 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.

    3. Next

image-20240910-155419.png

  1. Name your rule and Publish.

Transition ServiceNow Request to CLOSED COMPLETE if the related issue is in an DONE status category (green statuses)

  1. Create a new rule

  2. Add a Trigger = Issue Transitioned

    1. From status - leave blank to match all statuses

    2. To status - select the DONE statuses in your project.

      1. Examples: COMPLETED ACCEPTED CLOSED DONE etc

    3. Save

  3. Add a Condition - Related Issues Condition

    1. Related issues - Linked issues

    2. Link type - All link types

    3. Condition - Some match specified JQL

    4. Matching JQL - issuetype = "ServiceNow Request" and statuscategory != "Done"

      1. This will only update the ServiceNow Request if it is not already in DONE statuscategory.

      2. Validate your query

    5. Save

  4. Add a Branch rule / related issues

    1. Type of related issues - JQL

    2. JQL - issuetype = "ServiceNow Request"

      1. Validate query

    3. Check the box next to “Only include issues that have changed since the last time this rule executed”

    4. Save

  5. Add an Action - Transition issue

    1. Destination Status - CLOSED COMPLETE

    2. If you want to copy additional information over to the ServiceNow Request, you can what fields to set on the ServiceNow Request here.

    3. Save

  6. Name your rule and Publish.

Follow the above steps for any other status mapping you want to automate.

  • No labels