Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to exclude work items where summary is equal to TEST in JQL

Joshua Redel
February 3, 2026

I have to use JQL for a search that connects to a slack integration, and I explicitly want to exclude where the name of the work item is "TEST". However, summary only seems to search for !~, which means anything with TEST in the name would get excluded. How can I exclude an item whose name is TEST specifically? 

2 answers

0 votes
Marc -Devoteam-
Community Champion
February 4, 2026

Hi @Joshua Redel 

Based on your requirement and the response from @Trudy Claspill would it not be simpler to create a new work type called "Test"?

Use this work type for testing, then in a JQL its way simpler to exclude a specific work type, then basgin this on a test field like summary.

Joshua Redel
February 10, 2026

It's not a bad idea, but...we'd have to scope all our many, many automations to include Test in addition to whichever work type they're specified for. Then we'd need to update all our automations outside of Jira that create tickets — slack, airtable, etc. etc. to only create Test tickets when testing and create regular tickets otherwise. Which also means needing to switch back and forth for 3p apps that don't have sandboxing (like Airtable), which seems untenable. I guess we could create a dropdown for each automation that allows the creation of either the regular work type or a test one...sounds like a lot of work just to be able to search for a name that matches "Test".

0 votes
Trudy Claspill
Community Champion
February 3, 2026

Hello @Joshua Redel 

Welcome to the Atlassian community.

Do I understand correctly that the items you want to exclude have only the text TEST in their Summary, and no other text?

What I have found is that the !~ can exclude items based on a phrase, but if it has only a single word then it excludes all items that contain that word anywhere within the field.

Is it possible for you to change the name of the items to a unique multi-word phrase like "TEST ISSUE"? 

 

Joshua Redel
February 3, 2026

Yeah, so I can, but it's really hard to enforce that across a team of 50 engineers — just telling them "call it TEST" is easy, but telling them "call it TEST ISSUE" is much harder. Is there really no way to just say you want when summary doesn't equal something? Is it perhaps possible using an embedded AQL query or something?

Trudy Claspill
Community Champion
February 3, 2026

AQL is for querying Asset related data. Do these have some relationship to Asset objects?

In an Automation rule you can use string functions to determine if a text field contains just "TEST".

You could use Automation Rules to change or existing items and new items as the get created.

Or you could add a custom field that is more easily filtered upon, and ask the engineers to set that or again use Automation Rules to set it. 

 

Joshua Redel
February 3, 2026

The problem is that "on create" is also when the Slack Integration runs, so there'd be a race condition for any automation to update a field before the slack integration catches the item and spams our slack channel.

Joshua Redel
February 3, 2026

(oh, and sorry, no assets under consideration, so no AQL — makes sense, thanks)

Trudy Claspill
Community Champion
February 10, 2026

How have you implemented the Slack integration? Is that another rule or something else?

If it is another rule, since you are on the Premium plan you could add the Delay action to that rule that selects the issues via JQL and sends messages to Slack. I don't know exactly how you have that rule constructed, but you would need to execute the JQL selection after the Delay to ensure you have current data. Set the Delay for long enough for the other rule (triggered by Item Created and changing "TEST" to your uniquely includable phrase, or setting the alternate more-easily filtered custom field) to do its updates before the slack message is sent

Trudy Claspill
Community Champion
February 10, 2026

Or you might be able to implement setting the secondary, more easily filterable field into the workflow.

Do you have any apps available to you that extend workflow capabilities, like ScriptRunner, JMWE, or JSU? (There are other apps besides those three that extend workflow capabilities.)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events