No (more) UserEvent upon creation fired?

Hello!

I am trying to implement a listener that listens to user events and changes group membership of any user that get automatically created by our mail-handler.

I use https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Writing+JIRA+event+listeners+with+the+atlassian-event+library as the base of my work.

From reading the source of com.atlassian.jira.event.listeners.DebugListener I got the impression that there is an event fired when user is created. Problem is that I am unable to see such an event. For testing purposes I wrote an generic function like this

@EventListener

public void onEvent(AbstractEvent event) {

System.out.println(Handled an event: + event + at: + event.getTime());

}

Doing so the only user events I see are user.LoginEvent and user.LogoutEvent.

Am I missing something?

Can you help me?

1 answer

1 accepted

Hello everyone!

I managed to resolve this issue myself: I waded through the source code and found the "problem". To make the MailHandler dispatch UserCreated events when it creates a user the option "Notify Users" has to be enabled! If this option is disabled users are created without dispatching an UserCreated event.

For me this is somewhat surprising but that's the way it is...

Hi Hermann,

I have not related to this post question,

I saw you have asked in other post how to MoveIssue programmatically.

Did you find a solution to "Move Issue" problem?

I will appreciate if you could share it

thanks a lot

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Posted 9 hours ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

32 views 0 5
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you