I have multiple issues with specific labels for example say "X_Required", "Y_Required", "Z_Required" so on and most of them are without labels.
Now I want to write a JQL such that it removes all the issues with label "X_Required" and "Z_Required". The result should show only those issues which has no labels and "Y_Required". To do that I write something as this
labels not in (X_Required, Z_Required)
but this also removes issues without labels.
Hi @Chetan Krishna -- Welcome to the Atlassian Community!
First thing, you describe "removes all the stories...". If you mean deleting the stories, I recommend not doing that as there is no automatic backup or "undo" operation to correct issue deletion. Instead, I recommend disabling the delete issue permission for all users except for Jira Site Admins and then use the issue Resolution field to indicate abandoned / removed issues.
Back to your question...
If you are just trying to remove the issues from the results shown, you may also ignore issues where the labels field is EMPTY, please add that to your JQL:
project = myProject AND ( labels IS EMPTY OR labels NOT IN (X_Required, Z_Required) )
Please note the use of parentheses wrap around the use of the OR keyword.
To learn more, please see this documentation: https://support.atlassian.com/jira-software-cloud/docs/jql-keywords/#EMPTY
Kind regards,
Bill
Thank You
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JQL: (labels not in (X_Required, Z_Required) OR labels is empty)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You
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.