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

ownership plugin does not find owner's email - although it's defined in his/her profile

      ownership plugin fails to find the user's email - although it's properly defined in the user's configuration. My username is yanivk, but my email is yaniv.kaul@abc.com - therefore I cannot use the default user mail extension.
      However, I expect the ownership plugin to take this data from the user's config, and it doesn't:
      [OwnershipPlugin] - Setting JOB_OWNER=yanivk
      [OwnershipPlugin] - Setting JOB_OWNER_EMAIL=

      Thanks,
      Y.

          [JENKINS-19433] ownership plugin does not find owner's email - although it's defined in his/her profile

          Oleg Nenashev added a comment - - edited

          Yes, you are right

          The implementation seems to be very easy, but it may cause regressions if user has a garbage/outdated e-mail.
          So there should be a switch in global or user's configuration.

          Oleg Nenashev added a comment - - edited Yes, you are right The implementation seems to be very easy, but it may cause regressions if user has a garbage/outdated e-mail. So there should be a switch in global or user's configuration.

          Alex Earl added a comment -

          It could call Mailer.UserProperty.hasExplicitlyConfiguredAddress() to verify the address has been configured before using it, I think that would suffice.

          Alex Earl added a comment - It could call Mailer.UserProperty.hasExplicitlyConfiguredAddress() to verify the address has been configured before using it, I think that would suffice.

          Oleg Nenashev added a comment -

          The main risk: authentication plugins may configure the Mailer's property on their own (e.g. ActiveDirectory), so the field may differ from a user's expectations. If a user relies on e-mail suffix, in most cases he don't need to care about a garbage in the Mailer's user property

          BTW, the approach you propose is a correct way even if it causes some regressions. Hence I propose to just put a notification in change history of the plugin.

          Oleg Nenashev added a comment - The main risk: authentication plugins may configure the Mailer's property on their own (e.g. ActiveDirectory), so the field may differ from a user's expectations. If a user relies on e-mail suffix, in most cases he don't need to care about a garbage in the Mailer's user property BTW, the approach you propose is a correct way even if it causes some regressions. Hence I propose to just put a notification in change history of the plugin.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/tasks/MailAddressResolver.java
          src/main/java/hudson/tasks/Mailer.java
          src/test/java/hudson/tasks/MailAddressResolverTest.java
          http://jenkins-ci.org/commit/mailer-plugin/0a8d52ac7d06a774b0a94cf4c2d7e8826a5c3d25
          Log:
          JENKINS-19433 - Added handling of user-defined e-mail addresses in FastEmailResolver.

          This change adds a new routine for fast email resolution.
          If a user has defined his own e-mail on the profile page, it will be resolved in the Mailer plugin with a highest priority.

          Resolves https://issues.jenkins-ci.org/browse/JENKINS-19433

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/tasks/MailAddressResolver.java src/main/java/hudson/tasks/Mailer.java src/test/java/hudson/tasks/MailAddressResolverTest.java http://jenkins-ci.org/commit/mailer-plugin/0a8d52ac7d06a774b0a94cf4c2d7e8826a5c3d25 Log: JENKINS-19433 - Added handling of user-defined e-mail addresses in FastEmailResolver. This change adds a new routine for fast email resolution. If a user has defined his own e-mail on the profile page, it will be resolved in the Mailer plugin with a highest priority. Resolves https://issues.jenkins-ci.org/browse/JENKINS-19433 Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - https://github.com/jenkinsci/mailer-plugin/pull/12

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/tasks/MailAddressResolver.java
          src/main/java/hudson/tasks/Mailer.java
          http://jenkins-ci.org/commit/mailer-plugin/fe2d408c71dfe66820fc66d835b2d6082b4730ff
          Log:
          JENKINS-19433 - Fixed comments from @jglick

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/tasks/MailAddressResolver.java src/main/java/hudson/tasks/Mailer.java http://jenkins-ci.org/commit/mailer-plugin/fe2d408c71dfe66820fc66d835b2d6082b4730ff Log: JENKINS-19433 - Fixed comments from @jglick Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/tasks/MailAddressResolver.java
          http://jenkins-ci.org/commit/mailer-plugin/2b59658b5483ae465aaf9f933d12ce6bfcd4af4b
          Log:
          JENKINS-19433 - MailAddressResolver::resolve(User) uses a Mailer.UserProperty as a data source with a highest priority.

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/tasks/MailAddressResolver.java http://jenkins-ci.org/commit/mailer-plugin/2b59658b5483ae465aaf9f933d12ce6bfcd4af4b Log: JENKINS-19433 - MailAddressResolver::resolve(User) uses a Mailer.UserProperty as a data source with a highest priority. Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/tasks/MailAddressResolver.java
          src/main/java/hudson/tasks/Mailer.java
          src/test/java/hudson/tasks/MailAddressResolverTest.java
          http://jenkins-ci.org/commit/mailer-plugin/17c289f66b5541c0613b288c4abf89fdd7ef1a43
          Log:
          Merge pull request #12 from jenkinsci/JENKINS_19433_fix

          JENKINS-19433 - Added handling of user-defined e-mail addresses in FastEmailResolver.

          Compare: https://github.com/jenkinsci/mailer-plugin/compare/1dfed4acc50c...17c289f66b55

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/tasks/MailAddressResolver.java src/main/java/hudson/tasks/Mailer.java src/test/java/hudson/tasks/MailAddressResolverTest.java http://jenkins-ci.org/commit/mailer-plugin/17c289f66b5541c0613b288c4abf89fdd7ef1a43 Log: Merge pull request #12 from jenkinsci/JENKINS_19433_fix JENKINS-19433 - Added handling of user-defined e-mail addresses in FastEmailResolver. Compare: https://github.com/jenkinsci/mailer-plugin/compare/1dfed4acc50c...17c289f66b55

          Oleg Nenashev added a comment -

          Will be resolved in mailer-1.9 (coming soon)

          Oleg Nenashev added a comment - Will be resolved in mailer-1.9 (coming soon)

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/ownership-plugin/960e18f00dc22d70972e65e99b533b5d79819962
          Log:
          JENKINS-19433 - Update Mailer plugin dependency to mailer-0.9 to support user properties

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/ownership-plugin/960e18f00dc22d70972e65e99b533b5d79819962 Log: JENKINS-19433 - Update Mailer plugin dependency to mailer-0.9 to support user properties Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

            oleg_nenashev Oleg Nenashev
            ykaul Yaniv Kaul
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: