Forums

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

Is there a way to to @ groups of users?

Deleted user
May 21, 2020

Is ther a way to @ a group of users with one @. instead of writing out each user?

An example would be.

@Team1 can you check this out.   

compared to 

@TeamMember1 @TeamMember2 @TeamMember3 @TeamMember4 @TeamMember5 can you check this out.

1 answer

1 accepted

0 votes
Answer accepted
Henning Tietgens
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 Champions.
February 4, 2014

You could not use a string of the user display name to set the assignee. You have to set the corresponding user object (com.atlassian.crowd.embedded.api.User) or you could use issue.assigneeId = 'userkey' (be aware that this is not the display name but the user key, which is the login name if you didn't renamed the user).

Martin Novák
February 4, 2014

Thank you for your response. I am not able to find the userkey for the user, username does not work, mail which is used as login does not work and full name does not work to and I dont have direct access to database to verify.

How can I use the com.atlassian.crowd.embedded.api.User?

I need some line of code like issue.assigneeId = UserManager.findIdbyUsername("Virtual QA")

Henning Tietgens
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 Champions.
February 5, 2014

Ok, here some code to give you a clue.

import com.atlassian.crowd.embedded.api.User
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.user.util.UserUtil

UserUtil userUtil = ComponentAccessor.getUserUtil()

// If you want a User object
User u = userUtil.getUser('username')

// If you need the key of a user (which don't change, so this could be done in the console and the key could be used in your scripts
ApplicationUser au = userUtil.getUserByName('username')
String key = au.getKey()

Martin Novák
February 6, 2014

This works, thank you for the direction :)

import com.atlassian.jira.component.ComponentAccessor
issue.summary = ('QA: ' + issue.summary)
issue.setAssignee(ComponentAccessor.getUserUtil().getUser('qa'))

Suggest an answer

Log in or Sign up to answer