Hi I want to set default sign in user in select field while creating issue. SO please tell me how to do it
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
You might want to search for resouces about using Javascript on the screens. There are already plenty of answers around.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.