Running data centre version
jira_comment = "[~accountid:\{{issue.fields.assignee.accountId}}]"
jira.add_comment(jira_id, jira_comment)
I am trying to add a comment on my Jira ticket using python automation script to mention the assignee name, but it is not honoring it and simply putting the whole string, how can I add mention?
Hi @Shubhi Jain
welcome to the community and thank you for you question.
The syntax you are using is for the cloud version, DC does not have a accountId, so that your problem right now.
You should be able to just use:
[~{{assignee}}]
Hope this helps.
Hi @Kai Becker
Thanks for the help, I want to add this assignee on runtime, in my python script this is how I am passing it now, it still does not work
jira_comment = f"[~{{assignee}}]"
jira.add_comment(jira_id, jira_comment)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Shubhi Jain
I'm not sure about what you are doing, but I guess this is not properly formatted/escaped. Thats why the outer brackets get removed.
I don't think you need to use an f string, as it is just plain text.
Please try
jira_comment = "[~{{assignee}}]"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.