Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

🚩 Changes to request type names break JQL queries and related SLAs, Filters, and Automations

Esteban Diaz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2023

Problem: If you change the Request Type names, this will break the JQLs queries used on Filters, SLAs and Automations.

To solve this problem, I found that we can use Request Types IDs on JQL queries.

🚨 Spoiler Alert: this is not user friendly.

We will need to search and find those Request Types IDs.

Solution:

  1. Search for an existing issue with the request type you are looking for and get the Issue Key.
    As an example, the Issue Key could be ITSM-8
    P1.PNG

  2. In your browser use your-jira-instance-url/rest/api/3/issue/Issue Key

    e.g: https://mytestsite.atlassian.net/rest/api/3/issue/ITSM-8

  3. As a result, you will get something like this:
    P2.PNG
    And there is the Issue ID.
    In this case the Issue ID is 10093

  4. Using this Issue ID, go back to your browser and use this URL:
    your-jira-instance-url/rest/servicedesk/1/servicedesk/request/Issue ID/request-types

    And replace the corresponding values

    e.g:https://mytestsite.atlassian.net/rest/servicedesk/1/servicedesk/request/10093/request-types 

  5. You will get a JSON like this one as result: 
  6. Copy and paste this JSON on a parser like this one: http://json.parser.online.fr/

  7. Over the result look for the Request Type name and you will find the portalkey and the key (key of the request type). Copy those values
    P4.PNG

  8. Using the obtained values: portalKey and key, now you can create your JQL query like this one: “Request Type” = portalkey/key

    P6.PNG
    ❗ Importan: key values could look like this too: c1fa97c3-6154-4bcf-9db4-e6d385765dab

    P7.PNG



📌 Using this method you can create any JQL even on Automations, filters, or SLAs and you don't need to worry about someone renaming the Request Type.


 

SLA example:

P8.PNG

Automation example:

P9.PNG

Filter example:

P10.PNG


I hope this has been useful to you.
I will be waiting for your comments.
If you liked it, please hit like and share! 😉

Cheers!


Esteban Diaz
https://www.linkedin.com/in/estebandiaz/ 

The Atlassian Guy YouTube Channel 

 

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events