Forums

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

Searching Parent Contains String~

emma_walsh June 8, 2020

Hello!

 

I'm new to using JQL and after having a look at the resources I'm still unable to make the search query:

 

Parent string contains "XXX-"~

 

I have numerous parents which titles begin with "XXX-", after this are more details (i.e "XXX-PROD"). I need to find the right JQL which can filter these parents so that I can batch add a label to all the issues linked to these parents. 

 

As there are a lot of issues I would really like to avoid doing this manually if possible!!

 

Thanks,

Emma

2 answers

0 votes
Muhammad Ramzan(Atlassian Certified Master)
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.
June 9, 2020

As you are using jira cloud and currently the only possible way is using some  third party plugins like scriptrunner  and   JQL Search Extensions for Jira & reports

 

you can get your required results by using the plugin., lets take example of JQL Search Extensions for Jira & reports

 

Just execute this query and it will Search for subtasks with a parent's summary containing a particular text xxx. 

parentSummary ~ "XXX"

 

There are other ways too but this is the simplified way. you can also use sub queries for complex searches , references are here

https://jqlsearchextensions.atlassian.net/wiki/spaces/SEARCH/pages/3375124/JQL+Reference+Cloud#JQLReference(Cloud)-ParentSummary

 

https://jqlsearchextensions.atlassian.net/wiki/spaces/SEARCH/pages/173211649/Subqueries+-+Jira+Cloud

emma_walsh June 9, 2020

Hi Muhammad,

Thanks for the reply - I was hoping to be able to complete this search without purchasing additional software!

Is this not possible? 

Emma

Muhammad Ramzan(Atlassian Certified Master)
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.
June 10, 2020

Unfortunately in current context no

0 votes
Jack Nolddor _Sweet Bananas_
Atlassian Partner
June 8, 2020

Hi emma,

Using Advanced search feature you can:

 

Search issues containing "XXX-" on their title:

summary ~ "XXX-*"

 

However, If you want to query all subtasks or linked issues to the above ones...

This you cannot achieve the desired search using standard features on Jira, you must go for a third-party app instead. Using i.e. JQL Booster Pack you can type the following:

 

1) Search subtasks of issues containing "XXX-" on their title

issue IN subtasksOf(' summary ~ "XXX-*" ')

2) Search liked issues to issues containing "XXX-" on their title

issue IN linkedIssuesOf(' summary ~ "XXX-*" ')

(*) Note that this is just an example, you must tune above query to fit your needs.

 

Using this app you can also query other issues relations, check:

 

References:

emma_walsh June 9, 2020

Hey Jack*!

 

Thank you for really informative response, theres some really helpful info here! I've used your suggestion above and have been able to search for the part string in the summary, however I was wondering if it is possible to do this search in the parent rather than the summary? 

 

In my situation all the parents start with the code 'XXX-' so I was hoping to use this to filter the tasks correctly and apply to label to all related tasks. 

 

Thanks again for your help!

Emma

Jack Nolddor _Sweet Bananas_
Atlassian Partner
June 9, 2020

If XXX-<NUMBER> represent the key of your parents, what probably you really what is to retrive subtask created under project XXX which can be done using the following JQL:

 

project = XXX IN type in subTaskIssueTypes() 

 

Since I'm unsure if I understand you properly, please could you share with us some screens to help us to bettter understand your requirement?

 

Regards

emma_walsh June 9, 2020

Thanks for your help!

Apologies I'm still quite new to JQL!

In this image taken from the Roadmap view we see three parents, their names all start with RED- followed by a department code then a name. 

 

I've been trying to filter the text name of the parent to contain "RED" so I can apply a label to all issues related. 

Screenshot 2020-06-09 at 18.52.03.png

Thanks!

Emma

Jack Nolddor _Sweet Bananas_
Atlassian Partner
June 9, 2020

Hi Emma,

Note that "parent" has a different meaning in the Jira world, that are Epics, so what you really want is to retrieve those Stories within Epics having RED on their summary? or on their Epic name?

 

Btw, are you on Cloud or Server?

 

Regards

emma_walsh July 9, 2020

Hi Jack, 

 

Apologies for late reply!

 

Yes I'm looking to retrieve stories within Epics having RED on their epic name. 

 

I'm using Cloud.

 

Thanks,

Emma

Andee Weir
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!
August 19, 2024

Hi Emma,

Running into the same issue.  Did you ever get a solution to this?

Thanks,

Andee

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events