Automatically change reporter's email address

zunairf February 11, 2018

Our clients have 2 aliases/domain for their email.

user@ad.org
user@non-ad.org

@ad.org is used through active directory.
@non-ad.org is used when they send tickets through the emails. - problem.

So our problem is that, we are getting duplicated users and would like to merge both aliases when issue is created.
Users with @non-ad.org aren't really needed, users with @ad.org has most of the info we need.

 

So, is there a way to rename incoming reporter's email address so it can map the issue to the Active Directory users when issue is created by the email using @non-ad.org

Or something along those lines.

 

Any suggestions are welcome.

 

1 answer

0 votes
Thomas Deiler
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2018

Dear @zunairf,

by default you have no chance. Jira Software tries to map the users based on the email address of the sender.

Possible solution: Post clean up. Some scripts that can replace the senders email address.

Other solution: a plugin, that gives you more options on Email Handling.

So long

Thomas

zunairf February 12, 2018

Ok thanks for quick reply, is there a quick guide for making plugins to register events/triggers to make this happen?

 

Thanks!

Thomas Deiler
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2018

Dear @zunairf,

if you search Atlassian pages, you can get some SDK for plugin development. But first have a look at JMEH, if they support what you need.

So long

Thomas

zunairf February 12, 2018

Thanks but unfortunately we use standalone JIRA Server and JMEH does not support that.

 

Thanks for the help.

zunairf February 16, 2018

It's great to see ton of documentation around creating plugins.

https://developer.atlassian.com/server/jira/platform/creating-a-custom-mail-handler-for-jira/

 

I'll reply back if I succeed in this project. 

 

Thanks

zunairf February 17, 2018

Is there a way to get the source code of one of the default mail handlers specifically the one called 'Create a new issue or add a comment to an existing issue' ?

 

Thanks

zunairf July 11, 2019

We were able to accomplish this by using SmartHandler email handler.

 

Thanks

Oleksandr_Koveda April 28, 2020

Hello, @zunairf
Could you be more specific for how you accomplished the change reporter's email address with the help of SmartHandler plugin?
That info would be really useful in our situation. 
Thanks!

zunairf April 28, 2020

basically SmartHandler can map usernames based on the incoming mail.

so if username already exist then you can use the incoming email address, parse out the username then map to existing user.

our users are created using the AD.

at the end we ended up not using the plugin because something broke the workflow scripts - might work better now with all their updates.

zunairf April 28, 2020

currently we use a script so when ticket it created... it goes through reporters and participants and looks for existing users n replaces them.

comments are still messed up - uses incoming email as the author.

Oleksandr_Koveda May 3, 2020

@zunairf Thank You for your reply! It's really helpful. 

Suggest an answer

Log in or Sign up to answer