Auto-add comment to parent issue based on transition of subtask issue

Is there a way to auto add a comment to the parent issue based on the transition of a subtask issue?

2 answers

1 accepted

2 votes
Accepted answer


It is possible to do so by using a post-function from a third-party plugin to run a scripted post-function to add the comment. These are the steps needed to use this:

  1. Navigate to Administration » Plugins » Find new Plugins, search and install the Script Runner plugin.
  2. Create a <tt>.groovy</tt> file (script file) with the custom script for this transition. You can possibly customize the script mentioned here to use it for this purpose - you'll also need to look up the correct transition IDs so this will work and update the script.
  3. Add a new post-function in the transition you wish. Choose the Script Post-Function option, which will be added after you install the mentioned plugin.
  4. On the <cite>Script file path</cite> option, type the path to the script file (e.g.<tt>Subtasks.groovy</tt>) you've created in the previous steps.
  5. Publish the Workflow's draft and try to close a subtask's parent issue to see how it goes.

I hope this helps!

Best regards,
Matheus Fernandes

Hey matheus,

It something similar also possible for JIRA OnDemand users ?

We are looking forward to do the same - add a coment to the parent issue on sub-task resolve - but the "copy field value to parent issue" post funtion is not able to copy a comment so we started to look for a "workaround" but this is the only one I found so far - and installing scripts and adding files does not sound to mu ch of a solid answer for OnDemand users.

I do not know if this is possible in OnDemand due to the restrictions in the platform as you mentioned. My suggestion would be to transform your comment here in a question here in Answers, so that anyone else would be able to see.

Jelly scripts could possibly do that I think, but again I'm not sure if it works in OnDemand.

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,152 views 5 10
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