Hello,
I'm new in this type of development in JIRA and I'm a little lost.
I'm trying to get the usermane of the member that is log in JIRA with JAVA code. I'm creating a customfield and I need to know this information.
¿Wich classes of JIRA I've to use?
¿Can anyone help me?
Thanks.
An implementation of JiraAuthenticationContext can be autowired in to any bean you define in your plugin.
Once you have a reference to an implementation of this object you can call getLoggedInUser().
See: http://docs.atlassian.com/jira/4.3.4/com/atlassian/jira/security/JiraAuthenticationContext.html
Hello,
Thank you! I do it!
I'm working with JIRA 3.13 and the object getLoggedInUser() d0esn't exist. I use the option getUser() and I get the username of the current user.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to comment on this.
getLoggedInUser() is now deprecated. This question deals with the new way of getting the logged in user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep, that's clear. Matthew beat me to what I was about to say...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for my english is not good.
Yes I need the current user.
The function of the customfield is show you a list of users that are assign in a project and have the permission of Assignable. But only can see this customfield if they have the permission of Assign. This is why I need the current user to know if I have to hide the customfield or not.
¿Do you understand?
Thanks a lot
I don't know if I have explained correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>I'm trying to get the usermane of the member that is log in JIRA with JAVA code
Sorry, that doesn't make an sense. Do you mean you want the current user?
If that's the case, then there's several ways to do it, but it's best to use the most appropriate one for what you're doing and that can vary. What does your custom field need to do?
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.