text search with negation

I need to find all issues wich don't have such comment with text "bla bla bla" (for example)

this search query returns issues containing comment:

issue in linkedissues (Direct-34567) and comment ~ "bla bla bla"

But construction with negation doesn't :(
issue in linkedissues (Direct-34567) and comment !~ "bla bla bla"

Does anyone know why?

2 answers

This widget could not be displayed.

That may be because you have other comments in those issues that do not include "bla bla bla". It seems like JIRA searches each comment individually, not all comments as one set of text. For example, take an issue with two comments:

comment 1: bla bla bla

comment 2: hello world

Comment 2 does not include bla bla bla, so the negated search will return the issue even though comment 1 does have bla bla bla in it.

Does that fit your situation?

Yes, this is possible.
Bot how can I cope with this?

This widget could not be displayed.

Randalls explanation is correct. In order to achieve your goal you would need to negate the whole query to exlude those comments:

issue in linkedissues (Direct-34567) and not(issue in linkedissues (Direct-34567) and comment ~ "bla bla bla")

thx, but this one doesn't work either =(

issue in linkedissues (Direct-34567) - returns 147 issues.

issue in linkedissues (Direct-34567) and comment ~ "bla bla bla" - returns 104 issues

issue in linkedissues (Direct-34567) and not(issue in linkedissues (Direct-34567) and comment ~ "bla bla bla") - return all issues in the system

Now you made me curious. If you combine the clause which returns 147 issues with AND to a second clause (doesn't matter what clause) the combined result never can be more than 147 issues.

So, I guess the query you ran that gave you "all issues" contains an OR operator as well. Please post you complete query so we can help you.

Well, I cannot reproduce it now -_-

Here are screens of queries and results:

---------

And issue in linkedissues (Direct-21629) returns how many issues?

Hmm, I am confused. You got 149 issues which are linked to Direct-21629. Of those 149 you got 101 issues that have that particular cyrillic phrase in a comment.

So, if I take 'those 149 and not( those 101)' I'd expected 48 issues as the result. But there are 99 more!

I'm clueless. Actually this sounds like a bug to me.

Sorry, that I couldn't help you much.

I guess this is a bug too. Where I should write about it?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 14 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

41 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you