JSM 5.12.5, ScriptRunner 8.34.0
Edit: I understand now that it's the result of applying hashCode() on the user key, but I still don't understand how this is useful.
I want to get the Customer (Jira User) that was just added to an Organization in JSM via the AddUserToOrganization event on a Custom Listener in ScriptRunner.
There is a promising-looking method on the event binding called getHashedUserKey(): how can I use this? How can I "unhash" it back to useable data? It looks like this, shown with the other available properties:
class="class com.atlassian.servicedesk.internal.feature.organization.analytics.AddUserToOrganizationEvent" hashedUserKey="-1796255073" organisationId="161" sdVersion="5.12.5"
My workaround: 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.
Not sure why the event doesn't just pass back a normal Jira User key instead of a hash?
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.