Forums

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

Is there a way to use a CONTAINS operator with "Epic Link" in JQL?

glen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 23, 2018

I want to get a list of stories that are contained in several different epics, and all the epics start with the same keyword. Is there any way to use a CONTAINS operator with "Epic Link"?

If I type in the advanced search field, after typing "Epic Link", JQL only shows me EQUALS, IS, and IN operators (and the 'not' versions). It doesn't have CONTAINS.

If I use the basic search, I can select the "More" dropdown and select "Epic Link", and then type "foo - " in the dialog that comes up and it will give me a list of all epic links that start with "foo -". I can check the ones I want. The result is the list of stories that I'm interested in. That's great.

If I then switch from basic to advanced, the resulting JQL is:

    issuetype = Story AND "Epic Link" in (PROJECT_NAME-1, PROJECT_NAME-2, PROJECT_NAME-3)

So, in basic mode, it knew how to find all Epic Links that started with "foo -" because it gave me a list. But the end result was an IN operator with the epic links listed out. If another epic link gets created that has "foo -" in the name, I don't want to have to update my JQL with another PROJECT_NAME-XXX. I just want something like:

   issuetype = Story AND "Epic Link" ~ "foo -"

3 answers

2 votes
Nodas Anastasiou
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 21, 2019

project =xxxx AND issuetype = Epic AND text ~ "xxxx" ORDER BY priority DESC, updated DESC worked for me :)

0 votes
James Kennedy
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 3, 2024 edited

"Epic Filter" alows you to search for text on the Epic Link title.  Then you can remove the EPIC from the list by doing an issuetype != Epic
"Epic Filter" ~ "Search String In Epic Name" AND issuetype != Epic

I didn't want any SubTasks, so I also added "AND issuetype != Sub-task".  You can filter out anyother types of issuetypes you want this way.
"Epic Filter" ~ "Search String In Epic Name" AND issuetype != Epic AND issuetype != Sub-task

To answer the Original Poster Question, use:
issuetype = Story AND "Epic Filter" ~ "foo -"

0 votes
Randy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2018

Not with the standard JQL functionality but you might be able to with the ScriptRunner Scripted JQL feature:

 

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events