Forums

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

JQL Question

Swapnil Wale
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 8, 2022


Hello,

I've been using the following JQL: type = bug AND component = example AND key in (XYZ-1212) and created >= 2022-10-01 and assignee = asmith ORDER BY created DESC and as a result I've gotten one ticket that is XYZ-1212.

I tried to use a slightly different JQL: type = bug AND component = example AND key in ~ (1212, 1213, 1214) and created >= 2022-10-01 and assignee = asmith ORDER BY created DESC and expected to get 3 tickets as a result but instead received an error saying: "Error in JQL Query: Expecting either a value, list or function but got '~'. You must surround '~' in quotation marks to use it as a value." .
Does anyone know how to solve this error?

Thank you in adavance!

3 answers

1 accepted

0 votes
Answer accepted
Swapnil Wale
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 9, 2022

Hi all,

Thank you for your responses.

Let me explain what I'm looking for: I would like to only write the number of the JIRA ticket, w/o the project prefix. So for example: 1212 instead of XYZ-1212, and then get as a result all the tickets that are numbered 1212. The assignee name will ensure that only the XYZ project tickets will appear.

Is that possible?

Thank you again!

@Danielle Green  @Nic Brough -Adaptavist- 

Nic Brough -Adaptavist-
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 9, 2022

No, it's not possible.

I don't think it has any use either.  Project sequence keys are unique to the project.  Why would ABC-1212 have anything in common with XYZ-1212?

Like Swapnil Wale likes this
NTAMEN NTANMI luc landry
Contributor
November 23, 2022

@Nic Brough -Adaptavist- hello please how can i practice in jql?

Nic Brough -Adaptavist-
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 24, 2022

Best way to learn JQL is to play with it.  Ask your people what they are looking to report on, and then build JQL to find the issues they want to report on.

Kadambi,S,Sumanth,QDC C October 2, 2023

Hi Nic,

can you suggest a query, where i want to get list of incidents which has passed through a component, may or may have that component as current component.

Nic Brough -Adaptavist-
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.
October 2, 2023

"componenet = xyz" is the basic search.

Kadambi,S,Sumanth,QDC C October 2, 2023

thanks, i wanted to know how to query for component transitions

Nic Brough -Adaptavist-
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.
October 2, 2023

Components don't have transitions, so I'm a bit stuck on what you mean.

Kadambi,S,Sumanth,QDC C October 2, 2023

hi , i wanted to create a foot fall report for a component. mean how many tickets passed through the component, which currently may still sit in the component or may not.

2 votes
Danielle Green
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 8, 2022

Hi Swapnil

What are you trying to find through your JQL query? Because defining the key in your query will then just return that ticket or tickets, and make the rest of the query redundant.

If you did want to get the 3 tickets, then the syntax for the clause (or just the whole query really) should be:

key in (XYZ-1212, XYZ-1213, XYZ-1214) [no ~ ]

or

key >= XYZ-1212 and key <=XYZ-1214

 

Danielle

0 votes
Nic Brough -Adaptavist-
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 8, 2022

Remove the tilde, it is a matching operator, but you already have one with 'in'

Suggest an answer

Log in or Sign up to answer