Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Include Parent Key in Query (Jira Cloud)

Jacques B August 4, 2022

I have a query of subtasks (filtered on IssueType). I want to include the Parent Issue's Key in the query (and it should be present when I export to Excel).


I have thought of two options (neither of which I'm able to get working):

  1. Create a custom field (called Parent Key), add it to the subtask's screen, copy the value from the parent when the subtask is created (using Automation)
    • I do not know how to access/specify the key of the parent in the Automation

  2. Create a Filter using JQL / ScriptRunner
    • Again, I do not know how to access the parent's field in a query which is listing the subtasks


Any advice please on how to implement one of the above options?


Are there more options I'm not considering?

2 answers

1 accepted

1 vote
Answer accepted
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 4, 2022

Hello @Jacques B

Thank you for reaching out.

Per your description, I understand that you would like to add the parent Key as a column when running a specific query on your site and be able to export that value to CSV, as in the screenshot below. Is that correct?

Screen Shot 2022-08-04 at 18.14.47.png

If I've properly understood your request, you can achieve your goal by creating a paragraph custom field and a Jira automation rule to update that field with the parent key - By adding the smart value {{issue.parent.key}}. This would be the automation rule, supposing the name of your custom field is "Paragraph field":

Screen Shot 2022-08-04 at 18.24.01.png

Let us know if you have any questions.

Jacques B August 5, 2022

Thank you @Petter Gonçalves !

Your understanding is spot-on and the solution is what I was after. Much appreciated.

Like Petter Gonçalves likes this
Brett Talbot February 26, 2024

Thanks, although being able to just display the parent key without having to do this extra work would be much better; subtask are very useful but being able to group by them or at least view them easily would be a good thing ;-)

0 votes
MFMM December 14, 2022

@Petter Gonçalves

I'm trying to do something similar and so far I have not found how to or if is possible, have to say that I'm pretty new to JQL.

I'm trying to pull subtask(s) within a task and display them in a dashboard and don't have access to ScriptRunner(I have seen is possible with this)

What I have is a query (that I'm inserting with "insert jira issue/filter" within confluence) that is pulling from a Jira kanban board all the tasks that are currently in progress and another query that is pulling the subtask(s) for a given manuallly added ID. Both querys do the job(picture attached) but I would love to have just one query(if posssible) and not to manually add the task ID to pull the subtask(s)

  • Query for task
    • project in ("ProjectName") and status in ( "In Progress") and issuetype in (task)
  • Query for subtask
    • issuekey in (childIssuesOf(abc-123)) and status in ("In Progress") 

The idea that I have in mind is to add/show a column with the subtask(s) that are as well in progress for the parent taskidea.png


I would appreciate your help on this one

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events