Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Custom ScriptListener for Directory Events (or other non-Issue events). How to access details?

I'm trying to write a custom ScriptListener to add users to a customer Organization in service desk whenever they log in from our LDAP directory.

I believe I need to teach the ScriptListener to listen for the UserAuthenticatedEvent. The challenge I have is how to reference the details of that event from within my script in order to get to the User and Directory objects for that event.

My initial thought was to reference the "event" variable, but that, alas, is of type IssueEvent, and not UserAuthenticatedEvent. The script editor complains if I try to ask it for the user or directory objects that would be in a UserAuthenticatedEvent object.

When I'm triggering a custom ScriptListener by something other than an IssueEvent, how do I get to the details of that event?

1 answer

1 accepted

0 votes
Answer accepted

Well...   It appears that the script editor doesn't know that the actual runtime environment can have different types of events.

If I ignore the errors in the editor and submit my code anyway, it is able to find the right methods of the UserAuthenticatedEvent when it executes.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Asked in Jira Service Desk

Calling all Insight users, we need your help!

Hello Insight users,  As part of our (Mindville's) acquisition by Atlassian, our training team is looking to build some new Insight training materials. It would really helpful if you can ...

97 views 1 0
View question

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you