The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to filter by Request Type using a key instead of names like in custom fields?

Zaloon
July 27, 2021

I'm wondering if its possible to filter in JQL using something like serviceRequest31 or requestType31 as a value of the field request type as it is shown in the screenshot instead of its name. Like in custom fields where you can access them in smart values using issue.customfield_<<number>> or in JQL using cf[<<number>>].

Capture.PNG

I want to solve the problem of changing every rule whenever someone decides to change a request type name.

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Kerli Suve
Community Champion
September 1, 2026

There is an article written on how to write Request Types as JQL so it wouldn't break if names are changed. 🚩 Changes to request type names break JQL queries...

0 votes
Daniel Ebers
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 Champions.
July 31, 2021

Hi @Zaloon

assuming I'm following I feel Kishan is right - was able to reproduce it on my Cloud instance.

Let's summarize: you are trying to have a JQL that survives a rename of a Request Type, correct?

So having a Request Type "IT Help" is renamed to "Super-Test IT Help" but the JQL is still standing.

According to what Kishan said and the JQL advanced search reference (https://support.atlassian.com/jira-service-management-cloud/docs/advanced-search-reference-jql-fields/#Advancedsearchingfieldsreference-CustomerRequestTypeCustomerRequestType)

you can use the key which is static (even when the Request Type is renamed in frontend).

That being said I was able to continue searching for it after the rename like:

"Request Type" = "demo/getithelp"

That representation is available from the REST API call Kishan looked up.

From what I read, tested and seen this is all Jira is providing for this as of now.

Please take your time to test it for your scenario. In case this was not what you are looking for please perhaps visualize with a screenshot.

Regards,
Daniel

0 votes
Kishan Sharma
Community Champion
July 27, 2021

You can find issues where the Request Type is new account in itsample project via below JQL - "Request Type" = "itsample/newaccount"


Below API will give you the relevant request types for an issue type

https://YOUR_HOSTNAME/rest/servicedesk/1/servicedesk/request/ISSUE_ID/request-types

eg:
"portalKey":"itsample","portalId":1,"key":"newaccount"

Then you can search via JQL as below
eg:
"Request Type" = "itsample/newaccount"

Zaloon
July 28, 2021

I don't want to retrieve this information from the instance, my problem is that I don't want to change names in every rule whenever a boss want to modify it for example. But thanks for your help anyways. What I need is to find how to filter in jql the request type using its key/id, but it seems that the name is the key/id at the same time.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events