It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 -"

2 answers

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

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

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you