Set up different mail address for notifications of a user when Jira is in front of a corporate LDAP

Felix Herzog April 11, 2013

Hi.

We are using Jira with MS-AD Synchronisation to our corporate AD (LDAP). The in the mail attribute noted mail address is currently always used to be the one where notifications are sent.

Now we have a certain constellation where we need to get this notification sent to a different address of that user.
I could not find a plugin or similar idea to make it possible that either the user itself can change it's mailadress where notifications have to be delivered or how to set up by administration a different mail address.

We can NOT change the mail address field in the corporate Active Directory as there are a lot of other applications linked to that and we would get in troubble with compliance issues.

Do you have an idea? Do you know a plugin that might help?

Thanks!

6 answers

0 votes
Franklin Cadre August 5, 2019

Hello, 

As the topic is quite old now, does anyone know if there is an easier way to tackle this issue?

Thank you :) 

0 votes
Alex Perez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 25, 2013

Mmmm ... it's a bit crappy but here I go:

-In the LDAP server: define a custom attribute for the affected users and store his secondary email in it. Then define a LDAP group including all ldap-users that should be notified to this secondary email. Let's call this group: [secondary-email-group]

-In Jira, duplicate the directory definition. Both directories are the same ldap-server but in the first one add a "User Object Filter" condition to prevent users belonging to [secondary-email-group] group to login. In the second directory, change the email mapping to use the custom attribute as email.

This way, users in the XX group will login by using the second directory (which is the same server but with different email-attribute mapping).

HTH

0 votes
Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2013

Its not clear what scenario determines the address needs to be rewritten. Is it always or when X=Y (if so what)?

Bottom line, if you are OK for userX to receive a copy to the default email address, you need a customized IssueEventListener to do this. The custom IssueListener could then say 'aha' I have userX, and create a new notification for the subsitute address.

If you want to stop the notification to the first address that becomes more complex but is still doable.

0 votes
Aspect Infra Team
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2013

yes this is not a best idea, and will have some support cost ( you will need to manage two mail fields per user instead of one ) but it's easy realised - for beginning just copy current AD e-mail to this new field, and then change this field only for users who need change. but i hope users won't change jira notifications e-mail often?

0 votes
Felix Herzog April 11, 2013

Thanks, but this is not possible for individual accounts, correct? Like: for User 'felix1' use 'jiramail' attribute... This is only configurable for the whole system, right?

0 votes
Aspect Infra Team
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2013

jira allows to link mail to any ldap attribute, so you can create some "alternatemail" and link jira email to it in ldap connector

Suggest an answer

Log in or Sign up to answer