How can I comment on a Parent issue as part of a Post-Function of the Subtask?

Steven Behnke Community Champion Apr 05, 2015

I am of course specifically referring to Script Runner.

I've seen lots of examples for looking at subtasks, and many examples of commenting on linked issues. I haven't seen a great example of accessing the parent issue and setting a comment there.

Use case
  1. I have a multi approval workflow using conditions and post-functions, as well as multi-user picker fields
  2. When the subtask is fully approved by all approval steps and people, this indicates a change in the parent issue.
  3. The parent issue should receive a comment along the lines of, "Change Request CR-1211 has been approved. Requirements may have changed."

Specifically, the issue has a Closed status and Close Issue transition. Ideally, the event fires as a post-function of Close Issue.

1 answer

This widget could not be displayed.

It's the same as any of the other examples for commenting on an issue, but you will pass to commentManager.create: issue.parentIssueObject instead of just "issue".

Steven Behnke Community Champion Apr 07, 2015

I'll scope it out, I think that was my issue, I didn't know how to access the parent object.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

584 views 25 15
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