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

email-ext v2.3 can't be configured normally with promoted-builds v2.14.1 since Jenkins v1.403

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      How to reproduce
      1. Copy any jenkins.war version listed in "Environment" on a machine similar with the ones described there
      2. Configure JENKINS_HOME to use a new, empty directory
      3. Run Jenkins with "java -jar jenkins.war"
      4. Install email-ext v2.3 and promoted-builds v2.14.1
      5. Create a new job and add a new promotion process
      6. Add a new action of type "Editable Email Notification". PROBLEM: When the action is selected from the "Add Action" drop-down, its UI doesn't appear. It's as if the selection wasn't made.
      Notes
      • Firebug shows an AJAX call going out to the server and the response contains a lot of the expected HTML/JS; however, nothing is actually displayed in the browser
      • The server's console log doesn't show any messages, error or otherwise, when step 6 is attempted
      • email-ext works as expected when it's configured in the "Post-build Actions" section of a job's configuration page
      • Tested the two plugins with a couple of Jenkins versions going back to v1.400. Fortunately, I found that the problem manifests itself only going back to v1.403. On v1.400 and v1.401 the problem doesn't appear; v1.402 doesn't exist. Also of importance, I configured a job with this type of action on v1.401 and then loaded the configuration on v1.418 and email-ext's configuration ui appears on the job configuration page. I still can't add new email-ext actions for promoted-builds from the ui, but it seems that they work if I add them manually, by editing the job's config.xml.

        Attachments

          Issue Links

            Activity

            Hide
            bogdaniosif bogdaniosif added a comment -

            I can't be sure if this issue is an exact duplicate of 9509/9294 but it sure looks like they are strongly related

            Show
            bogdaniosif bogdaniosif added a comment - I can't be sure if this issue is an exact duplicate of 9509/9294 but it sure looks like they are strongly related
            Hide
            savedlinuxgeek Timothy Soehnlin added a comment -

            This issue is still occurring in v1.430

            Show
            savedlinuxgeek Timothy Soehnlin added a comment - This issue is still occurring in v1.430
            Hide
            bogdaniosif bogdaniosif added a comment -

            An ugly workaround for this problem exists.

            1. First, you need the XML that would be generated in the config.xml of the promotion build if email-ext would've worked fine with promoted-builds; I provided a sample below.
            2. Inject that XML in the config.xml of your promotion build. You should be able to find this file in a path like: %JENKINS_HOME% \ jobs \ %YourJobName% \ promotions \ %YourPromotionName% \ config.xml. The node you need to edit is: / hudson.plugins.promoted__builds.PromotionProcess / buildSteps
            3. Force Jenkins to reload configs for all the jobs. Afterwards, you'll be able to see the newly added email-ext promotion step in your job's config.
            4. From now on you can perform almost all configurations on this email-ext step from Jenkins' job config UI but some things still won't work. e.g. you can't reorder the email-ext step from the UI, you have to do that manually also.

              Sample XML for email-ext configured as a promotion step:
                  <hudson.plugins.emailext.ExtendedEmailPublisher>
                    <recipientList>recipients@company.ro</recipientList>
                    <configuredTriggers>
                      <hudson.plugins.emailext.plugins.trigger.SuccessTrigger>
                        <email>
                          <recipientList></recipientList>
                          <subject>$PROJECT_DEFAULT_SUBJECT</subject>
                          <body>$PROJECT_DEFAULT_CONTENT</body>
                          <sendToDevelopers>false</sendToDevelopers>
                          <sendToRequester>false</sendToRequester>
                          <includeCulprits>false</includeCulprits>
                          <sendToRecipientList>true</sendToRecipientList>
                        </email>
                      </hudson.plugins.emailext.plugins.trigger.SuccessTrigger>
                    </configuredTriggers>
                    <contentType>default</contentType>
                    <defaultSubject>This is a notification</defaultSubject>
                    <defaultContent>These are some details about the notification</defaultContent>
                  </hudson.plugins.emailext.ExtendedEmailPublisher>
              
            Show
            bogdaniosif bogdaniosif added a comment - An ugly workaround for this problem exists. First, you need the XML that would be generated in the config.xml of the promotion build if email-ext would've worked fine with promoted-builds; I provided a sample below. Inject that XML in the config.xml of your promotion build. You should be able to find this file in a path like: %JENKINS_HOME% \ jobs \ %YourJobName% \ promotions \ %YourPromotionName% \ config.xml. The node you need to edit is: / hudson.plugins.promoted__builds.PromotionProcess / buildSteps Force Jenkins to reload configs for all the jobs. Afterwards, you'll be able to see the newly added email-ext promotion step in your job's config. From now on you can perform almost all configurations on this email-ext step from Jenkins' job config UI but some things still won't work. e.g. you can't reorder the email-ext step from the UI, you have to do that manually also. — Sample XML for email-ext configured as a promotion step: <hudson.plugins.emailext.ExtendedEmailPublisher> <recipientList>recipients@company.ro</recipientList> <configuredTriggers> <hudson.plugins.emailext.plugins.trigger.SuccessTrigger> <email> <recipientList></recipientList> <subject>$PROJECT_DEFAULT_SUBJECT</subject> <body>$PROJECT_DEFAULT_CONTENT</body> <sendToDevelopers>false</sendToDevelopers> <sendToRequester>false</sendToRequester> <includeCulprits>false</includeCulprits> <sendToRecipientList>true</sendToRecipientList> </email> </hudson.plugins.emailext.plugins.trigger.SuccessTrigger> </configuredTriggers> <contentType>default</contentType> <defaultSubject>This is a notification</defaultSubject> <defaultContent>These are some details about the notification</defaultContent> </hudson.plugins.emailext.ExtendedEmailPublisher>
            Hide
            dogfood dogfood added a comment -

            Integrated in plugins_email-ext #101
            Fix for JENKINS-10812. It appears that since 1.402, addChild is executed
            [FIXED JENKINS-10812]

            b2jrock :
            Files :

            • src/main/webapp/scripts/emailext-behavior.js

            b2jrock :
            Files :

            • src/main/webapp/scripts/emailext-behavior.js
            Show
            dogfood dogfood added a comment - Integrated in plugins_email-ext #101 Fix for JENKINS-10812 . It appears that since 1.402, addChild is executed [FIXED JENKINS-10812] b2jrock : Files : src/main/webapp/scripts/emailext-behavior.js b2jrock : Files : src/main/webapp/scripts/emailext-behavior.js
            Hide
            b2jrock b2jrock added a comment -

            This is fixed in 2.18

            Show
            b2jrock b2jrock added a comment - This is fixed in 2.18

              People

              • Assignee:
                b2jrock b2jrock
                Reporter:
                bogdaniosif bogdaniosif
              • Votes:
                4 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: