It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Default values in custom fields per user

Is it possible (via some plugin maybe?) to set defualt values for custom fielde different for each user? :) thank you for answer

5 answers

1 accepted

1 vote
Answer accepted

try with this(for which field type you are trying to set default value)

<script type="text/javascript">  
jQuery(document).ready(function($) {
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
function setDefaultValue(){
        var user=getCurrentUserName();			
		if( user == 'prasad'){
			//	set default value text field, if the field is select list then add option id insted of text
		}else if(user == 'Ram') {

function getCurrentUserName()
var user;
        url: "/rest/gadget/1.0/currentUser",
        type: 'get',
        dataType: 'json',
        async: false,
        success: function(data) {
            user = data.username;
     return user;


suggest to load javascript as webresource module in a plugin

please, where should i put this code? i am new to scripting in jira

first change custom field id and user name

you can load javascript in two ways

1. add it in field description in field configuration

2. load it as webresource module in plugin, check this

i tried to put this code into field description and it didnt work :(

and isnt there missing "AJS." on the second 1 line?

hard question i see :)

yes, you can write some java script in the velocity template.

you get the option ids from the page and get the user name from $authContext variable and set the restrictions according to that.

Hi Peter,

You could define the custom field as a scripted field (if you use script runner) and then use groovy to insert the data regarding to the user.

Very simple solution.

Good luck

i dont need to solve this problem anymore, and cant close it. so i choose one comment as answer

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

Expose your beautifully crafted Dashboard through the Jira Service Desk Customer Portal

  A picture is worth a thousand words, especially when you're trying to find relationships and understand your data. Here, Dashboards play a vital role in gaining insights from a variety of dat...

256 views 5 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you