assignee to comment of issues

Kamil Askerov March 18, 2024

Hi. I cant found how to solve this problem. 

When I create automation for clone the comment between linked issues how i can take the assighee and reporter from oposite side?

I wrote this by creating comment but this only show the assighnee and reporter from this side not other side.

I write this in comment on issue.

Reporter [~accountid:{{Reporter}}]
Assignee [~accountid:{{assignee}}]
{{comment.body}}

1 answer

1 accepted

1 vote
Answer accepted
Rebekka Heilmann _viadee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2024

Hi @Kamil Askerov 

in order to help with Automation rules it is essential that you post a screenshot of the whole rule and not just snippets.

Kamil Askerov March 18, 2024

comment.png

Kamil Askerov March 18, 2024

@Rebekka Heilmann _viadee_ thank you for you response

Rebekka Heilmann _viadee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2024

I assume at the moment issue.reporter returns the Reporter of the linked issue?

You can access the Trigger issue's fields per {{triggerissue}} so it would be {{triggerissue.reporter}}. Trigger issue in this case is the issue that's been commented on.

Kamil Askerov March 18, 2024

ok. Thank you @Rebekka Heilmann _viadee_ I will test it now.

Kamil Askerov March 18, 2024

@Rebekka Heilmann _viadee_ 

I write like this

Reporter {{triggerissue.reporter}}
Assignee {{triggerissue.assignee}}
{{comment.body}}

answer 

Reporter 630dee058d88ec800fbe1904
Assignee
comment 1

not like I whant

 

Rebekka Heilmann _viadee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2024

The accountID part was correct. You only had to add "triggerissue."

Reporter [~accountid:{{triggerissue.reporter}}]
Assignee [~accountid:{{triggerissue.assignee}}]
{{comment.body}}

Like Kamil Askerov likes this
Kamil Askerov March 18, 2024

@Rebekka Heilmann _viadee_ Thank you. 

Its work but if there not assignee then in assignee 

Assignee [~accountid:] Can I not write anything if Assignee is null? Sorry for other question. 

Rebekka Heilmann _viadee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2024

You can check if the assignee is null with an If condition:

Screenshot 2024-03-18 153704.png

you cannot define an Else-branch within a branch though.

Therefore it's best to check the Assignee before the Linked Issues branch and dependent on the result set a variable with the desired Comment text. You can then use the variable in the Branch to post the comment to the linked issue.

Like Kamil Askerov likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2024

Hi @Kamil Askerov 

Adding to Rebekka's suggestions:

You could use conditional logic to only include the assignee mention when it has a value.  Please look here to learn more about that technique:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/

Kind regards,
Bill

Like Kamil Askerov likes this
Kamil Askerov April 6, 2024

@Rebekka Heilmann _viadee_   

Reporter [~accountid:{{triggerissue.reporter}}]
Assignee [~accountid:{{triggerissue.assignee}}]
{{comment.body}}

 

How I can change this code to take information of comment writer from

oposite side? 

 

Rebekka Heilmann _viadee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 8, 2024

Hi @Kamil Askerov 

in the branch, you can access the current (the one the branch is executed for) simply with issue.xxx

you can get the comment's author with comment.author

If you are referring to the comment that triggered the rule, it would simply be that: comment.author

Like # people like this
Kamil Askerov April 8, 2024

@Rebekka Heilmann _viadee_  thank you for your answer.  

Kamil Askerov April 8, 2024

@Rebekka Heilmann _viadee_ when I wrote {{comment.author}} then I get only 6285e55fc217e200698dcebf this id. Cant found information in internet. 

Kamil Askerov April 8, 2024

{{comment.author.displayName}} - found. Looks like its what I need

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events