Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,694
Community Members
 
Community Events
168
Community Groups

How to mention in a comment the reporter of a linked issue

Hello.

I am setting up a Shared Action with the post-function Comment issue(s) (JMWE app) (Creates a comment on the current issue or issues related to the current issue) in a workflow. I have two configuration scenarios: 1º I want to add a comment on the issue linked to an item as causes, and I need to mention the reporter of the issue with the causes link.

2º I need to add a comment in the current issue, but mentioning the reporter of the issue that has causes link with my current issue.

What code should I use in this case? The code I am using is the one below, but it mentions the reporter of the current issue, and I need to mention the repoter of the issue with cause link in both cases.


[~accountid:{{ linkedIssue.fields.reporter.accountId }}]

1 answer

1 accepted

3 votes
Answer accepted

Hi @Nathan Barbosa ,

For the first scenario, I assume you have configured the Comment Issue(s) post-function using the Target Issue(s) setting to target the issue linked to the current issue through the "causes" link type, right? In that post-function, linkedIssue.fields.reporter.accountId should return the reporter of the linked issue, not the current issue.

For scenario 2, you need a second Comment Issue(s) post-function but this time configured with the default Target Issue(s), i.e. the Current issue. But to mention the reporter of "the" linked issue, you need to be able to find it first (assuming there's only one such linked issue). This code should work:

{{issue | linkedIssues("causes",["reporter"]) | first | field("fields.reporter.accountId")}}

Hi, Davi. I hope you are well!

Thank you very much for the answer, it was very helpful and I was able to solve the issue with it.

Just one additional piece of information... As my intention is to mention/notify the reporter of the linked issue, I used the code as follows:

[~accountid:{{issue | linkedIssues("causes",["reporter"]) | first | 
field("fields.reporter._accountId")}}]

Once again, thank you very much for the answer!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events