Forums

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

j query for custom field - customers

David Richardson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 22, 2022

I've set up a filter for SLAs. Tickets that have gone beyond the agreed SLA deadline. For High priority tickets the deadline is 60 days old. 

So far I've got:

project = *** AND issuetype in (Bug, Task) AND status in ("Pending Task", "In Development", "Pending Deployment to QA", "In Test", "Ready for Live") AND priority = High AND created <= -60d 

We have a custom field for customers. This query is bringing back all customers.

How do I filter the tickets for just 2 customers, say "ABC Bank" and "DEF Bank"?

Thanks...

1 answer

0 votes
Renzo Arriagada
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.
November 22, 2022

Hi @David Richardson !

You can do this in a couple of ways depending if you know which type of custom field "Customers" is or if you have its Custom field ID:

  • Add cf[CustomFieldID] to your query. Example: ... AND cf[99999] in ("ABC Bank","DEF Bank")
  • Add "Customers[CustomFieldType]" to your query. Example: ... AND "Customers[Dropdown]" in ("ABC Bank","DEF Bank")

If you add any of those two options to your query (remember to correctly replace the values for your custom field) you should be getting only the tickes for those two customers.

 

Hope this helps you.

 

Kind regards,

Renzo from Servicerocket.

David Richardson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 22, 2022

Thanks Renzo. I don't know the CustomFieldID so going with your second option.

 

  • Add "Customers[CustomFieldType]" to your query. Example: ... AND "Customers[Dropdown]" in ("ABC Bank","DEF Bank")
So now I have:
 
project = *** AND issuetype in (Bug, Task) AND status in ("Pending Task", "In Development", "Pending Deployment to QA", "In Test", "Ready for Live") AND priority = Low AND "Customers[CustomFieldType]" in ("Bank ABC","Bank DEF") AND created <= -120d
I don't know what the CustomFieldType is nor the significance of your option [Dropdown].
I get this error.
Field 'Customers[CustomFieldType]' does not exist or you do not have permission to view it.
It's possible I do not have permission to view it.
Renzo Arriagada
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.
November 22, 2022

Hi @David Richardson !

I'm sorry I wasn't clear enough.

You need to replace CustomFieldType to the actual field type of the Customer field.

For example: if your field is a dropdown then you should use "Customers[Dropdown]" or if it is a text field you should use "Customers[Short text]"

 

You can use the advanced issue search and with an empty JQL prompt write the first few letters and you should be able to see your field alongside its corresponding type.

imagen.png

 

Hope this helps!

 

Renzo from Servicerocket

Suggest an answer

Log in or Sign up to answer