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

Email Extension plugin - groovy and jelly do not update $rooturl after Jenkins URL updated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
      Windows 2008 R2
    • Similar Issues:

      Description

      Running the Email Extension plugin - version 2.14.1 with Jenkins 1.424.6 - I had the Jenkins URL set incorrectly which was causing broken images and the wrong rooturl in my email-ext status message after a job built (using the HTML and the included templates). Fixing the Jenkins URL did not fix it. I then upgraded to Email-ext version 2.19 with Jenkins 1.457. This also did not fix it. I'm confused because if I "echo %rooturl%" as a Windows Batch script as a build step - it gives the right response. I can't see any place that the plugin could be caching this info.

        Attachments

          Activity

          Hide
          shinsato shinsato added a comment -

          Found the problem - the java file src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java, in the configure method - is not checking the setting for overrideGlobalSettings before it actually does the overriding. Since I had been playing with the settings - I had entered a string in that field - so that caused the problem.

          It's not just for the URL setting though - all of the overridden settings can potentially trample on the defaults even if the overrideGlobalSettings checkbox is turned back off.

          Show
          shinsato shinsato added a comment - Found the problem - the java file src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java, in the configure method - is not checking the setting for overrideGlobalSettings before it actually does the overriding. Since I had been playing with the settings - I had entered a string in that field - so that caused the problem. It's not just for the URL setting though - all of the overridden settings can potentially trample on the defaults even if the overrideGlobalSettings checkbox is turned back off.
          Hide
          slide_o_mix Alex Earl added a comment -

          Please fork and issue a pull request if you have a fix.

          Show
          slide_o_mix Alex Earl added a comment - Please fork and issue a pull request if you have a fix.
          Hide
          shinsato shinsato added a comment -

          Will do that - thanks! Given that there is a workaround (delete all overridden settings) - it's less urgent - but I think it would improve usability.

          Show
          shinsato shinsato added a comment - Will do that - thanks! Given that there is a workaround (delete all overridden settings) - it's less urgent - but I think it would improve usability.
          Hide
          shinsato shinsato added a comment -

          Pull request submitted.

          Show
          shinsato shinsato added a comment - Pull request submitted.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Harold Shinsato
          Path:
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
          http://jenkins-ci.org/commit/email-ext-plugin/b6563fa1cbaeb0571a2f826045b85f9e9c8e9f4c
          Log:
          Fix for JENKINS-13242

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Harold Shinsato Path: src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java http://jenkins-ci.org/commit/email-ext-plugin/b6563fa1cbaeb0571a2f826045b85f9e9c8e9f4c Log: Fix for JENKINS-13242
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: slide
          Path:
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
          http://jenkins-ci.org/commit/email-ext-plugin/bb8616fa7e143c3e850dade97f09288b4afe5c3a
          Log:
          Merge pull request #34 from hajush/master

          Fix JENKINS-13242 - global settings always overriding husdonUrl

          Compare: https://github.com/jenkinsci/email-ext-plugin/compare/6077a78...bb8616f

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: slide Path: src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java http://jenkins-ci.org/commit/email-ext-plugin/bb8616fa7e143c3e850dade97f09288b4afe5c3a Log: Merge pull request #34 from hajush/master Fix JENKINS-13242 - global settings always overriding husdonUrl Compare: https://github.com/jenkinsci/email-ext-plugin/compare/6077a78...bb8616f
          Hide
          shinsato shinsato added a comment -

          This will be released with 2.20.

          Show
          shinsato shinsato added a comment - This will be released with 2.20.

            People

            • Assignee:
              shinsato shinsato
              Reporter:
              shinsato shinsato
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: