Is there a work-around to enable copying a parent's Summary into the sub-task's Summary field?

Ideally on Sub-Task Create I would like to display the parent Summary field as the default Summary and allow the user to edit that. I found deferred feature requests so this appears not to be possible.

As an alternative, not displaying the Summary field and having the parent Summary copied into the Sub-Task summary on create would be acceptable. Users could then edit the Sub-Task if they wanted to change the Summary.

I tried implementing the above by not showing the Summary field on the create screen and adding a post function to copy the parent's Summary field into the Sub-Task Summary field. But creates then fail because the Summary field not empty validation precedes the post function.

Is there a way to copy the field value earlier OR to, without user interaction, add a dummy value to the Summary field to pass the validation check (and be overwritten by the post function)?

1 answer

I bet you could do this in Javascript. You’d have something trigger so when the “Create Sub-task” form content gets loaded, it would copy the summary from the “main” page into the summary input field on the “pop-up” page. I’ve done similar things before.

Something like:

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e, context0, reason) {
    var context = AJS.$(context0);

    if (context.parents("div#create-subtask-dialog").length < 1) return;

    context.find("input#summary").val(AJS.$("#summary-val").text().trim());
});

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,861 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot