how add comment in link task

When we change period in the task  this period should be appearing in the comments to the linked project. How  I can do that?

5 answers

Period = Time am I right?

It can be done using your workflow post-functions.

Please work on it, you have lot there to explore.

i create scritp post-funtion, but cjmment not added

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkManager
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.comments.CommentManager

Issue issueKey = issue

def subTasksLinks = ComponentAccessor.getIssueLinkManager().getInwardLinks(issue.id)

subTasksLinks.each {

def CurrentUser = ComponentAccessor.getJiraAuthenticationContext().getUser().displayName


CommentManager commentManager = ComponentAccessor.getCommentManager()



def comment = "Some comment ......"

if(issueKey){

commentManager.create(issueKey, CurrentUser,comment, true)
}
}

 

Could you explain me the scenario please, so I can try to help you out on this

 We have two projects. For example: project A and project B. We create in both projects different tasks. The tasks  have different deadlines. When we associate these tasks we want that in task of project B was generated comment with a deadline of task of project A. 

Could you explain please what plugin can we use. 

 

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

911 views 5 18
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
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