Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pre-Populate Jira field using java script

Mizan
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 19, 2012

Hi All,

I want to prepopulate the jira security level field based on user roles/group . Can someone please provide me a sample java script which does something similar ?

Thanx in advance :)

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Jobin Kuruvilla [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.
February 5, 2012

Here is my shot at it. I wanted to attempt it after I saw your question in my previous post.

There might be an easier way or you probably figured it out yourself. But have a look if you haven't ;)

Mizan
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.
February 5, 2012

Thank you .. Its a really helpful tutorial :)

0 votes
JamieA
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 22, 2012
Mizan
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 22, 2012

Can we use velocity and javascript together ? like #if ($authcontext.user.inGroup('developers'))...I dont know much about using rest .

JamieA
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 22, 2012

Yeah you can do that but if you want to use velocity you need to create a new custom field type, or hack the existing ones. The javascript solution is less invasive.

0 votes
Mizan
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 22, 2012

I am able to set the security level using javascript in the field description , however i am not able to check the group of the current user . How can i get the current users group in my script ?

thanx :)

TAGS
AUG Leaders

Atlassian Community Events