It is possible to mention multiple users from the Multiple User Picker field in a comment for Jira Data Center.
@Nagaraju I would expect that to be easy to do with a for loop and after acquiring the users' id.
@Alex Koxaras -Relational- thanx for reply.
Iam getting users list by using loop, but we need to add '~' before every username.
@TN Raju with JMWE I've inserted during a transition the "Add Comment" post function and entered the following code:
def users = issue.get("customfield_17251")def commentString=""for (user in users){ commentString += "[~" + user.username.toString() + "] "}commentString + "this is a comment"
The customfield_17251 is my multiuser picker field. So replace this with your CF and adjust the final line to your liking:
Let me know if that works our for you.
@Alex Koxaras -Relational- Perfectly Worked.Thank you so much.
This works for Cloud, not sure about DC
This would work using the JMWE Comment Issue Post Function, replace the X's with your custom field ID. This @ mentions each user in a multi user field on a separate line.
{% for user in issue.fields.customfield_XXXXX %}[~{{ user.accountId }}] {% endfor %}
The following does the same but keeps all mentions on the same line
{% for user in issue.fields.customfield_XXXXX %}[~{{ user.accountId }}]{% endfor %}
It looks like you're new here. Sign in or register to get started.