Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,368,557
Community Members
 
Community Events
168
Community Groups

What's the best way to limit the output of a JQL when querying more than one field?

I am looking for records that were commented on a specific date but I only want the records with a specific keyword in those comments.

I tried the following JQL but it returns all records with a comment on the specific date regardless of whether the keyword I am looking for in the comments is present or absent.

     ...(commentedOn in ("2021/5/12") AND comment ~ "My keyword")...

Thanks for the feedback.

2 answers

0 votes

Hi @Rosauro  -- Welcome to the Atlassian Community!

You cannot do what you ask with out-of-the-box Jira queries.  JQL isn't a generic SQL and isn't built to allow nested sub-queries. 

If you need to do this often, there are marketplace addons for purchase which could support this.  If you need this ability infrequently *and* have only a few issues to review, consider performing one of the queries first, and then manually check each resulting issue.

Best regards,

Bill

Hi Bill,

Thank you for the warm welcome!

I was beginning to reach the same conclusion as you had mentioned above while continuing to experiment with a possible solution to my issue. The manual check solution works for now - massaging the data in Excel.

Which add-ons would you recommend for me?

 

Sincerely,

Rosauro

Hi Rosauro,

I am not currently using any of those, and you may search for them here for your server edition: https://marketplace.atlassian.com/search?hosting=server&query=JQL

In the comments from @Vikrant Yadav they are noting a solution that would use the ScriptRunner addon with the issueFunction feature.

Best regards,

Bill

0 votes
Vikrant Yadav Community Leader May 14, 2021

Hi @Rosauro if you search by comment, the JQL query will only search for those issues which have been commented on, which means that all the issues without comments will be ignored.

This issue is already sloved by Atlassian Team. Check out below link very helpful :- 

https://community.atlassian.com/t5/Jira-questions/Jira-Advanced-Query-for-searching-text-in-a-comment-field-in-a/qaq-p/48175#:~:text=If%20you%20search%20by%20comment,'success%20couponscom%2Dintegration'.

 

Thanks!

Hi @Vikrant Yadav ,

Thank you for the reference to the prior post. It is very informational. However, my predicament is a little different than what it describes. Mine is centered around two things:

1. Find all records with a comment on a specific date. We have regular meetings to review JIRA records and the meeting minutes/decision for each record are captured in the comments. Thus, this is the first requirement - to look for any record that has a comment on the date of the meeting.

2. Determine if the comment on a specific date contains keywords that would indicate it was reviewed by the right team. Our records receive comments from many team members throughout the lifecycle of the record, sometime multiple comments are added daily. As such, it is imperative that I filter for a specific keyword to determine that the comment indicates it was from a meeting that I am interested in.

What I'm trying to do is basically filter the results of a prior filter result. I haven't gotten it to work so far in JQL by using AND or by sequencing the queries. Do you know of a way to feed the results of one filter/query into another? Without external plugins? :-D

Vikrant Yadav Community Leader May 15, 2021

Hi @Rosauro  For checking comment on a particular date, you can user below query, but it only works if you have ScriptRunner Plugin installed.

 

project = "JIRA Support" AND issueFunction in commented("after 2019/01/31 before 2020/01/07")

 

Thanks

Hi @Vikrant Yadav ,

Thank you for your suggestion. It gives me an alternative to the commentedOn keyword. It is always good to know more than one way to do things.

 

Rosauro

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events