Hello,
I'm developing an 'Issue Collector' for my Jira project.
What I am trying to do is configure the code (see below) so that when the user creates an issue using the Issue Collector it should automatically populate their Name and their Email address. So far I have been unsuccessful.
The code that I have used is:
function getCurrentUserInfo(inVar) { var user; var emailaddr; jQuery.ajax({ url: "/rest/gadget/1.0/currentUser", type: 'get', dataType: 'json', async: false, success: function(data) { user = data.fullName; emailaddr = data.email; } }); if (inVar == 'fullName') { return user; } else if (inVar == 'email') { return emailaddr; } else { return user; } }
Can any one help?
regards
Amrik