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 }}]
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.