display groups of current login user on issue page

if there is a user who is currently on the issue/ticket page.I want to display all the groups the user belongs to on the issue page.how can i do that.

thanks in advance.

asif

1 answer

0 votes

You mean on a customfield? Also, where is the user details stored?

Hi Jobin,

i just somehow want the groups that the current user belongs to , to be displayed on the issue page.For that i made a custome field "user_groups".BUt i dont want the user to enter his group names in that field manually.If somehow i get the group names automatically in the field, then that field and its values(groupnames)will be present on the issue page .Then I can extract the text of that field and use it in my script.

actually my requirement is ,I want to set some values in the fields of "worklog" tab .But these fields should get set only for the user who belongs to a particular group.For that I am trying to get the group names of the user on the issue page so that i can extract it using the script and then use it in the script.Once done, i will try to make the field hidden.

Here is the script:

jQuery(document).ready(function() {

var project_name = $('#project-name-val').text();

alert(project_name);

//i want to find the user groups now so that i can put it in the "if". if the user belongs to a particular group, lets say group1,then execute the content inside "if"

if( )
{
$('#a1_').attr('checked','checked');
$('#a2_').attr('checked','checked');
$('#a3_').val('0');
}

});

Please suggest the required modifications in the scrpt.

Please let meknow if more details are required.

We get the groups name the user belongs to by clicking on the user name(profile).

Thanks I advance,

Asif

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,945 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot