I have tried various advanced searches and cannot get the syntax right. I want to look for all issues of certain status (for example, open or reopened or inprogress) but exclude any with a certain label (for example OnHold). Tried every kind of NOT but cannot get it to work. HELP please.
With this JQL :
project = TEST AND status in
) AND assignee in (usertest) ORDER BY created DESC
i have noting in
"reopened" status, so the JQL is giving me an error :
The value '
reopened' doesn't exist in the field 'status'.
Do you have any idea how can i correct it ?
I have issues logged that have a "DEMO" label. operationally I want to filter these out, prety much as the OP. There wasn't a proper anser above, a couple of fragments so I eventually came up with:
and (labels is empty or (labels is not empty and labels not in (DEMO)))
This means if it's empty, list it. If it has any label, filter out issues that have the DEMO label. Hope that clarifies things.
Unfortunately this doesn't seem to work for me.
the query is slightly more complicated:
project in (WIN) AND issuetype in (Epic, Initiative) AND status not in (Delivered, Closed, Cancelled) AND (labels not in ("Prime-Backlog") OR labels is EMPTY)
I get the same number of issues back with or without the last AND clause and get labels I don't want.
This makes the trick indeed:
((labels is not EMPTY and labels not in (demo)) or labels is EMPTY))
For me the problem was before, that when I used simply the labels != demo, on top of filtering the items with "demo" labels, it as well filtered the issues with no labels.
Thx for the hint. :)
May be caused by the problem I report in
Seems to search for A and not B, you must say
A AND NOT B
A NOT B
which the documentation says.
This does not work for me even a little bit.
How can I say that the text field does not contain a specific string?
This is for INCLUDING the text "missing":
project = MYPROJECT AND status = "To Do" AND assignee in (EMPTY) AND reporter in (jiramail) AND text ~ "missing" ORDER BY created DESC
How can I tweak this to make it show me issues that DO NOT INCLUDE the text "missing"?
Problem is correctly identified above by Thomas Tulinksy. Beware that adding "labels is empty" appears to help (i.e. you suddenly see results, hurrrah) but does not show any issue that has a different label (e.g. "Z")
To overcome it, you must use the AND NOT exactly as Thomas described.
Status in (Backlog, Analysis) AND (NOT labels in (X,Y) OR labels is EMPTY) ORDER BY LABELS ASC