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

This widget could not be displayed.


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

This widget could not be displayed.

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
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

179 views 1 3
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