The getHashedUserKey() method on the AddUserToOrganization event returns the hashCode()ed result of the Jira User key. I’m wondering how I can use this in a Custom Listener to get the actual User Key of the Jira user added to the Organization?
Here are the properties available, with the hashedUserKey example:
Hi Matt,
hashing is the way to convert the string into an integer, and that integer is known as the hash of a string. String hashing is used to compare two strings whether they are equal or not.
This means in order to find user in Organization by hash, you would need to have a List of all users hashes.
Thanks nikolayr, that’s exactly what I ended up doing: I made an API call to Get Users in Organization (/rest/servicedeskapi/organization/{organizationId}/user) using the organisationId passed back by the event and and matched the hashedUserKey against the hashCode()ed keys of all the users in the Organization.