Signature
Helper | userHelper |
Signature | getByKey(String userKey) |
Description | Returns a user matching the specified user key or null if the user is not found. |
Introduced in | 0.12.0 |
Example use
/* assign the local user to the same assignee as the remote issue assignee ** if user doesn't exist create the user first */ if (userHelper.getByKey(replica.assignee.key) == null) { // create the user if s/he doesn't exist userHelper.createUser(replica.assignee.username, "changeme", replica.assignee.email, replica.assignee.displayName) } issue.assignee = userHelper.getByKey(replica.assignee.key)
Comments
You can use it when you have a common user directory for both source and destination instances.