Hello,
I'm trying to configure a dropdown-list, which has specific values depending on the user, who opens it. For this I am using the custom field "Database Picker" which uses a SQL query to get the input from a DB, now to my actual question:
I need to write some Script via ScriptRunner for this field, with which I am unfamiliar with. How do I use the "logged-in-User" as a variable? Since I need to use it in the SQL query to select the right content for the dropdown-list...
Thanks!
if you use
import com.atlassian.jira.component.ComponentAccessor
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
This will pass you the logged in user as a variable, use .name on the end to pass this variable as a string
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.