Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding @mention in a comment using Pythong

dantag01
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 31, 2019

Hello,

I have a script the adds a comment to a list of issues. I am also trying to use @mention in that comment through the script. However, it won't actually initiate the mention when I run the script. I just get the text @firstname lastname without that person getting tagged (i.e. text is black not a link).

Is there a way to do this?

Below is my code:

for issue in filter_proj:   
assignee = issue.fields.assignee
comment = jira.add_comment(issue, 'Thanks for the quick response, @{}'.format(assignee))

 

2 answers

0 votes
Uladzislau Khevuk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 3, 2020

Hi there! 

It will work in this way:

jira.add_comment(issue , "Please, provide an update [~{}]".format (project['lead']))

 

Use ~ instead of @

Thanks

0 votes
gangadhar_rayudu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 15, 2020

is there any way to mention assignee and reporter using add_comment()

jira.add_comment(issue, "thanks @assignee @reporter")  something like this?

@dantag01did you find any solution?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events