Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8594

Please add ability to use email addresses (resolved via LDAP integration) as user ID to Jabber Notification plug-in

    XMLWordPrintable

Details

    Description

      We have a few dozens of developers working on several projects that are built using Hudson. So far we've been using email notifications (with email addresses resolved using LDAP integration) to notify about failed/fixed continuous builds. However most developers do not monitor their inbox very keenly, so we tried to use Jabber Notification plug-in to reduce time-to-fix. Unfortunately it didn't worked out-of-the-box, since our Jabber uses email addresses as user IDs.

      "Default ID suffix" option of Jabber Notification doesn't help, as our emails are using "firstname.lastname@domain" schema.

      Please add ability to use email addresses (resolved via LDAP integration) as user ID in "Jabber Notification" plug-in.

      Attachments

        Activity

          kutzi kutzi added a comment -

          You mean the email addresses for the users in Hudson are filled from the LDAP integration?
          In that case it doesn't really matter for me, from where the mail adresses come.

          I'm thinking about adding general support for getting the Jabber ID from a Hudson user property. Nice usecase, you brought up there.

          kutzi kutzi added a comment - You mean the email addresses for the users in Hudson are filled from the LDAP integration? In that case it doesn't really matter for me, from where the mail adresses come. I'm thinking about adding general support for getting the Jabber ID from a Hudson user property. Nice usecase, you brought up there.
          dmitrym dmitrym added a comment -

          Yes, email addresses for the users in Hudson are filled from the LDAP integration. Would be nice to use the same address as Jabber user ID.

          dmitrym dmitrym added a comment - Yes, email addresses for the users in Hudson are filled from the LDAP integration. Would be nice to use the same address as Jabber user ID.

          At first I tried adding the custom jabber id user property as described, but I found no way of retreiving the user property by id, let alone grabbing the intended value, there is the Exported annotation but that can be used on more than one getter..

          Attaching patch for advanced option which uses the email address as the Jabber ID, I tried to avoid mangling imports and keeping the indenting consistent. During our tests all build related messages were relayed to the recipient(s) correctly.

          johno Johno Crawford added a comment - At first I tried adding the custom jabber id user property as described, but I found no way of retreiving the user property by id, let alone grabbing the intended value, there is the Exported annotation but that can be used on more than one getter.. Attaching patch for advanced option which uses the email address as the Jabber ID, I tried to avoid mangling imports and keeping the indenting consistent. During our tests all build related messages were relayed to the recipient(s) correctly.

          kutzi, would you please provide a status update? Is there a problem with the attached patch?

          johno Johno Crawford added a comment - kutzi, would you please provide a status update? Is there a problem with the attached patch?
          kutzi kutzi added a comment -

          Sorry for the lack of response.
          I was thinking about a more general way to specify the Jabber ID - e.g. by evaluating any user property.
          Therefore I'm a bit reluctant to apply the patch now.

          kutzi kutzi added a comment - Sorry for the lack of response. I was thinking about a more general way to specify the Jabber ID - e.g. by evaluating any user property. Therefore I'm a bit reluctant to apply the patch now.

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/plugins/jabber/im/transport/JabberPublisher.java
          src/main/java/hudson/plugins/jabber/im/transport/JabberPublisherDescriptor.java
          src/main/resources/hudson/plugins/jabber/im/transport/JabberPublisher/global.jelly
          http://jenkins-ci.org/commit/jabber-plugin/47f9241823d4f1a21963ebfd869c32b835928653
          Log:
          [FIXED JENKINS-8594] new option to allow the user's e-mail address to be used as the Jabber id

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/plugins/jabber/im/transport/JabberPublisher.java src/main/java/hudson/plugins/jabber/im/transport/JabberPublisherDescriptor.java src/main/resources/hudson/plugins/jabber/im/transport/JabberPublisher/global.jelly http://jenkins-ci.org/commit/jabber-plugin/47f9241823d4f1a21963ebfd869c32b835928653 Log: [FIXED JENKINS-8594] new option to allow the user's e-mail address to be used as the Jabber id
          kutzi kutzi added a comment -

          I realised that I won't implement the more general solution in the near future. Therefore I've applied your patch - with minor adaptions.

          Sorry for the delay.

          kutzi kutzi added a comment - I realised that I won't implement the more general solution in the near future. Therefore I've applied your patch - with minor adaptions. Sorry for the delay.

          People

            kutzi kutzi
            dmitrym dmitrym
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: