Copying Parent Summary to the Summary of a Cloned Subtask

Hello. I am trying to solve a problem for one of my teams (documentation team) that gets tasks assigned to their board through the clone of a specific subtask on the dev team board ear-marked for their needs. If it matters, they work from two different projects as the docs team supports the entire organization and have their own set of prioritized issues outside the scope of the devs.

My solution up to this point is as follows:

1.) When an issue is created on the dev project, I have post-script functions that auto create a set of subtasks (i.e. fix it, test it, document it). These functions are on the "Open" step -> "Create" transition of my workflow.

2.) When the "Document It" subtask is moved to Done, I have another post-script function that clones the issue if it is of custom sub-task issue type (Documentation Subtask). There are a number of custom fields I show on the "Document It" subtask that I need completed and passed along to the docs team, and must be filled in by the Dev Team in order to meet their definition of done.

3.) The Clone step executes, and copies over relevant information, but the problem is the summary of the cloned item just says "Document It". Therefore, every time a team completes this subtask, it clones over, but when you look at the Doc team board, all issues read "Document It", which is not very helpful for them.

What I would like to do is copy over the original summary of the parent issue of the "Document It" subtask, as that is the relevant information for the team that will help them determine what they are working on (right now they have to traverse the links to get to it, which is annoying). I don't want to append the parent summary to the "Document It" subtask, as that clutters the dev subtasks on the work view.

I have searched through the boards and come across a number of solutions that are close, but haven't been able to quite get one that solves this specific issues.<br< a="">>

I have tried adding to "Additional Issue Actions":

issue.summary = issue.parent.summary
- not sure if the parent issue is available at this step in the execution

- guessing the link hasn't been created yet for this function to work as I can get this to test out successfully in the condition tester, but of course the clone already exists.

issue.summary = transientVars["originalissueobject"].summary
- returns subtask issue summary, rather than parent

Has anyone tried doing something similar? I have script runner and jira suite utilities plugins installed/enabled.

Thank you in advance.


4 answers

1 accepted

0 votes
Accepted answer

It seems I am going to end up writing a custom script to get this accomplished.

Hi Chris, were you able to solve the problem? I'm trying to copy a parent summary to a subtask summary during the create issue transition. I'm not familiar with groovy scripting but I'd still appreciate if you could share your script with me.

If you are just looking to copy the parent summary value directly to a subtask when it gets created, all you need to do is leave the subtask summary field blank when setting up the subtask creation workflow post script function. Below the subtask summary field it says:

Optionally set the summary. If blank it will be inherited from the parent.

Does this solve your issue?

I'm not using the subtask creation postfunction. I'm manually creating the subtasks. But I used the following workaround to copy the summary. I filled the subtask summary with a dummy string (by adding some java script to the description). I created a "temp" status between "create" and "open", and then I used the script function to auto-transition the issue while copying the parent's summary (with miscellaneous workflow extensions) and overwriting the dummy string.

issue.summary = transientVars["originalissueobject"].summary

is that a typo? The capitalisation is wrong. IIRC the answer is transientVars... if you "log.warn(transientVars)" and check your log file, one of the things in that map gives you the parent ID or similar.

Better still debug in an IDE.

Hi Jamie. Thank you for the quick response. Could you specify where the capitalization error is? I am using the "issue.summary = transientVars["originalissueobject"].summary" statement from an example on the web. I have run this last post script with logging on and will check to see what comes up.


Should be


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,323 views 5 11
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you