...
Problem
Info |
---|
When scripting with routines functions such as getUserByFullName() or currentUser(), the format of the user key returns an unexpected result such as, "JIRAUSER10000". |
...
If you have existing scripts that were written before Jira 8.2, chances are they were written with the assumption that the user key and username are basically the same. Due to the changes Atlassian has implemented, it is no longer the case that user keys and user names are the same. To that end, you must modify scripts that have routines functions that return user keys intended for use as usernames.
To convert the userkey to the username, try the following with the userKeyToUsername() routinefunction:
Code Block |
---|
userKeyToUsername("userkey goes here") |
...
For more information on the userKeyToUsername() routinefunction, see this documentation:
...
You can use a third-party database app to conduct queries such as pgAdmin. To use the sql() routine function as posted above, you must first create a database connection to Jira's database. Please see the documentation below on how to do that:
...
Here is the documentation for the sql routinefunction:
The following Atlassian documentation seems to be a good outline of navigating user tables.
...