Hi,
I am trying to write a JQL search in JIRA 4.2.4 and it is not returning what I would expect.
Here's what I want to do.
Find the issues that contain the comment "This Issue has been sent to the Lab Director for approval" but do not also contain the comment "This Issue has been Approved by the Lab Director" and are not closed. There are multiple comments on each issue, and I need to find all the ones that contain one, but don't have the other.
I tried this:
comment ~"\"This Issue has been sent to the Lab Director for approval\"" AND comment !~ "\"This Issue has been Approved by the Lab Director\"" AND status != Closed
but it returns issues that do contain the second string.
I know my logic must be a bit off, but I can't seem to think this one out. Every angle I try still returns with ones with the second comment.
I have 8 issues with the first comment, and of the 8, 6 have the second comment, so I want the 2 without the second comment returned. I tried
(comment ~"\"This Issue has been sent to the Lab Director for approval\"" and status != Closed) and not (status != Closed and comment ~"\"This Issue has been Approved by the Lab Director\"")
thinking the first part of the query will give me the 8, and the second the 6, leaving me the 2, but it gave me all 8 again.
Can anyone shed some light on what I am missing?
Thanks!!
Hi,
I'm not sure if it will work but try the following approach.
Create a filter for first part and save it as test1
comment ~"\"This Issue has been sent to the Lab Director for approval\""
Create a filter for the second part and save it as test2
comment ~ "\"This Issue has been Approved by the Lab Director\""
Create third filter that combines them using filter
filter = test1 AND NOT filter = test2 AND status != Closed
I know that this is an old thread/comment but thank you Andrzej this is just what I was looking for after banging my head against not being able to use NOT with 'comment ~ "\"XYZ\"" '
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello there!
The filter is recognized as a good one by JIRA, but it is not allowing me to save the filters made.
Do you know if there are any changes with the new updates on JIRA?
Query used:
field1 = "VALUE NAME1" AND NOT filed2 = "VALUE-NAME2"
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's a typo... "filed2"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had a similar problem and Andrzej's solution worked! Thanks!
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.