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

Hello,

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

350 views 2 4
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