Some interesting triggers were implemented in this plugin: improvement, regression. The problem is that they never appear in the subject of the emails.

      Example for the Improvement trigger, see the following log output:

       
      Email was triggered for: Unstable
      Email was triggered for: Improvement
      Email was triggered for: Still Unstable
      Trigger Unstable was overridden by another trigger and will not send an email.
      Trigger Unstable was overridden by another trigger and will not send an email.
      Trigger Still Unstable was overridden by another trigger and will not send an email.
      Sending email for trigger: Improvement
      

      The subject of the email were:

       PROJECT_1 #524: Still Unstable

      instead of :

       PROJECT_1 #524: Improvement

      And it's the same with the Regression trigger:

      Email was triggered for: Unstable
      Email was triggered for: Regression
      Trigger Unstable was overridden by another trigger and will not send an email.
      Trigger Still Unstable was overridden by another trigger and will not send an email.
      Sending email for trigger: Regression
      

      Result:

      PROJECT_2 #144: Unstable

      Instead of:

      PROJECT_2 #144: Regression

      As for the PROJECT_2, here is the end of the log:

      Testcase: pauseTest[5] took 0,406 sec
      Testcase: noTest took 0 sec
      Testcase: noTest[0] took 0,157 sec
      Testcase: noTest[1] took 0,655 sec
      Testcase: noTest[2] took 0 sec
      Test com.****.***.*** FAILED
         Done!
      Recording test results
      Build step 'Publish JUnit test result report' changed build result to UNSTABLE
      Email was triggered for: Unstable
      Email was triggered for: Regression
      Trigger Unstable was overridden by another trigger and will not send an email.
      Trigger Still Unstable was overridden by another trigger and will not send an email.
      Sending email for trigger: Regression
      Sending email to: ...@...
      Finished: UNSTABLE		
      

      Tell me if you need another part of the config.xml file. The whole thing were too long.

      build.xml
      <hudson.plugins.emailext.ExtendedEmailPublisher plugin="email-ext@2.32">
            <recipientList>...@...</recipientList>
            <configuredTriggers>
              <hudson.plugins.emailext.plugins.trigger.UnstableTrigger>
                <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>
                  <attachmentsPattern></attachmentsPattern>
                  <attachBuildLog>false</attachBuildLog>
                  <compressBuildLog>false</compressBuildLog>
                  <replyTo></replyTo>
                </email>
              </hudson.plugins.emailext.plugins.trigger.UnstableTrigger>
              <hudson.plugins.emailext.plugins.trigger.StillFailingTrigger>
                <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>
                  <attachmentsPattern></attachmentsPattern>
                  <attachBuildLog>false</attachBuildLog>
                  <compressBuildLog>false</compressBuildLog>
                  <replyTo></replyTo>
                </email>
              </hudson.plugins.emailext.plugins.trigger.StillFailingTrigger>
              <hudson.plugins.emailext.plugins.trigger.ImprovementTrigger>
                <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>
                  <attachmentsPattern></attachmentsPattern>
                  <attachBuildLog>false</attachBuildLog>
                  <compressBuildLog>false</compressBuildLog>
                  <replyTo></replyTo>
                </email>
              </hudson.plugins.emailext.plugins.trigger.ImprovementTrigger>
              <hudson.plugins.emailext.plugins.trigger.FirstFailureTrigger>
                <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>
                  <attachmentsPattern></attachmentsPattern>
                  <attachBuildLog>false</attachBuildLog>
                  <compressBuildLog>false</compressBuildLog>
                  <replyTo></replyTo>
                </email>
                <failureCount>1</failureCount>
              </hudson.plugins.emailext.plugins.trigger.FirstFailureTrigger>
              <hudson.plugins.emailext.plugins.trigger.StillUnstableTrigger>
                <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>
                  <attachmentsPattern></attachmentsPattern>
                  <attachBuildLog>false</attachBuildLog>
                  <compressBuildLog>false</compressBuildLog>
                  <replyTo></replyTo>
                </email>
              </hudson.plugins.emailext.plugins.trigger.StillUnstableTrigger>
              <hudson.plugins.emailext.plugins.trigger.NotBuiltTrigger>
                <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>
                  <attachmentsPattern></attachmentsPattern>
                  <attachBuildLog>false</attachBuildLog>
                  <compressBuildLog>false</compressBuildLog>
                  <replyTo></replyTo>
                </email>
              </hudson.plugins.emailext.plugins.trigger.NotBuiltTrigger>
              <hudson.plugins.emailext.plugins.trigger.RegressionTrigger>
                <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>
                  <attachmentsPattern></attachmentsPattern>
                  <attachBuildLog>false</attachBuildLog>
                  <compressBuildLog>false</compressBuildLog>
                  <replyTo></replyTo>
                </email>
              </hudson.plugins.emailext.plugins.trigger.RegressionTrigger>
              <hudson.plugins.emailext.plugins.trigger.FailureTrigger>
                <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>
                  <attachmentsPattern></attachmentsPattern>
                  <attachBuildLog>false</attachBuildLog>
                  <compressBuildLog>false</compressBuildLog>
                  <replyTo></replyTo>
                </email>
              </hudson.plugins.emailext.plugins.trigger.FailureTrigger>
              <hudson.plugins.emailext.plugins.trigger.FixedTrigger>
                <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>
                  <attachmentsPattern></attachmentsPattern>
                  <attachBuildLog>false</attachBuildLog>
                  <compressBuildLog>false</compressBuildLog>
                  <replyTo></replyTo>
                </email>
              </hudson.plugins.emailext.plugins.trigger.FixedTrigger>
              <hudson.plugins.emailext.plugins.trigger.SecondFailureTrigger>
                <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>
                  <attachmentsPattern></attachmentsPattern>
                  <attachBuildLog>false</attachBuildLog>
                  <compressBuildLog>false</compressBuildLog>
                  <replyTo></replyTo>
                </email>
                <failureCount>2</failureCount>
              </hudson.plugins.emailext.plugins.trigger.SecondFailureTrigger>
            </configuredTriggers>
            <contentType>default</contentType>
            <defaultSubject>$DEFAULT_SUBJECT</defaultSubject>
            <defaultContent>$DEFAULT_CONTENT</defaultContent>
            <attachmentsPattern></attachmentsPattern>
            <presendScript></presendScript>
            <attachBuildLog>false</attachBuildLog>
            <compressBuildLog>false</compressBuildLog>
            <replyTo>...@...</replyTo>
            <saveOutput>true</saveOutput>
          </hudson.plugins.emailext.ExtendedEmailPublisher>
      

          [JENKINS-20265] Triggers not reported in email

          Alex Earl added a comment -

          Please post your job config file and full build log.

          Alex Earl added a comment - Please post your job config file and full build log.

          Yes, initial post updated! Tell me if you need more.

          Stéphane Bruckert added a comment - Yes, initial post updated! Tell me if you need more.

          Alex Earl added a comment -

          Ok, the reason you are seeing what you are seeing is because the default subject uses the BUILD_STATUS token, which is the actual status of the build, not the trigger name. Currently I don't have a token for the trigger name.

          Alex Earl added a comment - Ok, the reason you are seeing what you are seeing is because the default subject uses the BUILD_STATUS token, which is the actual status of the build, not the trigger name. Currently I don't have a token for the trigger name.

          Ok, do you think you will implement that one day? Would be wonderful! By the way, thanks for your reactiveness.

          Stéphane Bruckert added a comment - Ok, do you think you will implement that one day? Would be wonderful! By the way, thanks for your reactiveness.

          Alex Earl added a comment -

          The difficulty is the way that tokens are used. I think the easiest thing might to try and add it as an environment variable, but I'll look into it more.

          Alex Earl added a comment - The difficulty is the way that tokens are used. I think the easiest thing might to try and add it as an environment variable, but I'll look into it more.

          Code changed in jenkins
          User: slide
          Path:
          src/main/java/hudson/plugins/emailext/AttachmentUtils.java
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherContext.java
          src/main/java/hudson/plugins/emailext/plugins/ContentBuilder.java
          src/main/java/hudson/plugins/emailext/plugins/content/TriggerNameContent.java
          src/test/java/hudson/plugins/emailext/plugins/ContentBuilderTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/a42c3152c5f0322082caf7dd8ffd979d7cef807c
          Log:
          FIXED JENKINS-20265

          Added TRIGGER_NAME token

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: slide Path: src/main/java/hudson/plugins/emailext/AttachmentUtils.java src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherContext.java src/main/java/hudson/plugins/emailext/plugins/ContentBuilder.java src/main/java/hudson/plugins/emailext/plugins/content/TriggerNameContent.java src/test/java/hudson/plugins/emailext/plugins/ContentBuilderTest.java http://jenkins-ci.org/commit/email-ext-plugin/a42c3152c5f0322082caf7dd8ffd979d7cef807c Log: FIXED JENKINS-20265 Added TRIGGER_NAME token

          Code changed in jenkins
          User: slide
          Path:
          src/main/java/hudson/plugins/emailext/plugins/content/TriggerNameContent.java
          src/test/java/hudson/plugins/emailext/plugins/content/TriggerNameContentTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/e2b1e77416cdecec9fa49fdc5334637be8f8b7ae
          Log:
          Fix JENKINS-20265

          Added new content TRIGGER_NAME that will be replaced with the name of the
          trigger that caused the email.

          Compare: https://github.com/jenkinsci/email-ext-plugin/compare/c70cb5482d03...e2b1e77416cd

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: slide Path: src/main/java/hudson/plugins/emailext/plugins/content/TriggerNameContent.java src/test/java/hudson/plugins/emailext/plugins/content/TriggerNameContentTest.java http://jenkins-ci.org/commit/email-ext-plugin/e2b1e77416cdecec9fa49fdc5334637be8f8b7ae Log: Fix JENKINS-20265 Added new content TRIGGER_NAME that will be replaced with the name of the trigger that caused the email. Compare: https://github.com/jenkinsci/email-ext-plugin/compare/c70cb5482d03...e2b1e77416cd

          Alex Earl added a comment -

          Added TRIGGER_NAME token that can be used to display the trigger that caused the email.

          Alex Earl added a comment - Added TRIGGER_NAME token that can be used to display the trigger that caused the email.

          Perfect, thank you!

          Stéphane Bruckert added a comment - Perfect, thank you!

            slide_o_mix Alex Earl
            stephanebruckert Stéphane Bruckert
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: