Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

This function returns a text list of group names a user belongs tousers are belonging to. You can specify user names, group names or role names.

Multiple users items can be specified as a comma-separated list of user names, group names and project role names, returning a list of groups, any of the returned users is a member of.


Code Block
languagebash
titlesyntax
linenumberstrue
groupsUserBelongsTo(users) #Output: Text list


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
groupsUserBelongsTo("b.smith")


This example returns all groups b.smith belongs to, e.g.:
jira-developers, jira-administrators


Code Block
languagebash
linenumberstrue
groupsUserBelongsTo("jira-administrators")


This example returns all groups of all users that are member of the jira-administrators group, e.g.:
jira-users, jira-administrators


Code Block
languagebash
linenumberstrue
groupsUserBelongsTo("Users")


This example returns all groups of all users that are member of the Users project role, e.g.:
jira-users, jira-developers



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
users

Status
subtletrue
titletext

Text containing a valid user, group or project role name.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext list



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_groupsuserbelongsto" and space = currentSpace()



Page properties
hiddentrue
id1


Parser function cloud
Map(question)
Notes

It's possible to access to a user's groups, but it's not possible to do it by only using the username, because to access to a user the acccount ID should be used. Also, using a field code it can be done.

Workaround

Code Block
languagebash
issue.reporter.groups

or

Code Block
languagebash
let userSearch = new User("5e60bebccf54800ce3a0221c");
userSearch.groups





Page properties
hiddentrue



Status
Tech review

Status
colourYellowGreen
titleReady for reviewdone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged



Page properties
hiddentrue


Short description

Returns all groups for given users.

Output

Status
subtletrue
titletext list

Available since

Status
subtletrue
colourBlue
title2.1.32

Label