Forums

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

Populate custom field with a group, based on current user?

JohnJ
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!
January 12, 2012

Anyone know of a way to populate a custom field, with the group of the current user?

Ex. When creating an issue, a customfield "Requesting Dept" is automatically populated with the group name of the current user? Either through a post function or another way?

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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 Leaders.
January 12, 2012

Yes, I do it with a post function. I'm not aware of a generalised one in the plugin exchange, you'll probably need to write one.

If you do, bear in mind that you probably do NOT want to use all the groups a user belongs to (e.g. jira-users), and you need to handle multiple group memberships (i.e. "Requesting Dept" must be a multi-select list because a user could be in several departments)

JohnJ
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!
January 12, 2012

You had to write your own plugin correct? Or could it be done as a fairly simple script within a postfunction, with say, the scriptrunner plugin?

Thanks for mentioning the multiple groups, I didn't even think it that far through yet. With that in mind, I'm thinking this is out of my league...

Nic Brough -Adaptavist-
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 Leaders.
January 12, 2012

Both - I wrote a plugin that happened to do it as part of something else, but the script runner should be able to do it too.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events