Default log in user in text field

Hi I want to set default sign in user in select field while creating issue. SO please tell me how to do it

2 answers

1 accepted

This widget could not be displayed.

try with this script

<script type="text/javascript">
jQuery(document).ready(function($) {
    JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
        setDefaultValues();
    });
        setDefaultValues();
     
function setDefaultValues(){
		var currentUser=getCurrentUserName();
        $("#customfield_11329").val(currentUser);
}
     
function getCurrentUserName()
{
var user;
     AJS.$.ajax({
        url: "/rest/gadget/1.0/currentUser",
        type: 'get',
        dataType: 'json',
        async: false,
        success: function(data) {
            user = data.username;
        }
     });
     return user;
}
 
});
</script>

refer this

https://answers.atlassian.com/questions/196399/js-to-set-custom-field-based-on-a-project?page=1#comment-197895

This widget could not be displayed.
Timothy Chin Community Champion Oct 01, 2013

You might want to search for resouces about using Javascript on the screens. There are already plenty of answers around.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

128 views 2 0
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