You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm searching for all Jira issues with comments written by a given user and containing some given text.
I'm already aware of how I can search for issues with comments by a given user, for example:
issueFunction in commented("by user@domain.com")
or, if looking for my comments,
issueFunction in commented("by currentUser()")
But I'd like to specifically filter by comments satisfying both conditions: author and content. How can I achieve this?
Queries like
issueFunction in commented("by user@domain.com") and comment ~ 'text'
of course don't satisfy my requirement.
Thanks in advance!
Hi @luca-pittino and @Björn_Schotte
I had tried this jql and get my favorite result
Comment ~ "\"text\"" and issuefunction in commented (" by user@domain.com")
Hi @Ashkan Malekly, I guess your case was a lucky combination :)
Your suggestion is basically the last query I wrote in my question above, with the difference you're searching `"text"` (quotes included).
My problem is that I need to match isses having single comments satisfying both conditions A and B, but I can only get issues with some comment satisfying A and some other comment satisfying B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hii @luca-pittino
No in my code include ( \ ) this is important.
this is yours: comment ~ 'text'
And this is mine : comment ~ "\"text\""
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry @Ashkan Malekly, I think I've been mislead by the fact that even using quotes I still got many results with comments not matching both conditions (false positives)..
Actually though, the amount of results with and without quotes is different (e.g. ~70 and ~120 respectively).
Maybe something related to Jira app version? I'm using Jira Server 7.1.4, maybe on later versions they did some improvements?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@luca-pittino could you tell me the username and comment? I think you miss somewhere in the code. I want to implement your username and comment in my code give you back and please put it in your search bar. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does anyone know if there is a way to display the comment text in the results?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is necessary to search for text in the comment of a specific user. i can't find a solution to such a problem in JQL.
issueFunction in commented("by user") AND comment ~ 'text'
- not satisfied with the results.
I want to have something like (fantasizing):
comment ~ 'text' ("by user") //OR// issueFunction in commented("by user / text ~ blabla ")
?)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
it's complicate to manage some special chars for your condition 'comment ~' (escape with '\' or '\\' )
you have to escape the special chars ex: https://confluence.atlassian.com/jirasoftwareserver/search-syntax-for-text-fields-939938747.html#Searchsyntaxfortextfields-escapingSpecialcharacters
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not with a query unfortunately, nor with Jira filters.
I guess a search with similar expressiveness is unsupported at the moment.
In my case I searched by text, as I got the fewest results, and then manually checked the text occurrences and saw who the comment author was.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.