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

Add trigger list of triggers that fired to the object model of the pre-send script

    Details

    • Similar Issues:

      Description

      It would be useful to have a way for the pre-send script to know what triggers fired to cause the email to be sent. This would allow someone to filter emails if one trigger is in the list of fired triggers. The idea would allow people to customize the replacement strategy through the pre-send script.

        Attachments

          Activity

          Hide
          bramt Bram Tassyns added a comment -

          If you add this, please also add a way to know for which of the triggers this script is currently being executed.

          Show
          bramt Bram Tassyns added a comment - If you add this, please also add a way to know for which of the triggers this script is currently being executed.
          Hide
          slide_o_mix Alex Earl added a comment -

          Added two variables to the object model:

          trigger - the current trigger (EmailTrigger instance) causing an email to be sent
          triggered - a Map<String,EmailTrigger> that is a name->trigger map for all the triggers that were triggered to send emails. This is an unmodifiable map.

          Show
          slide_o_mix Alex Earl added a comment - Added two variables to the object model: trigger - the current trigger (EmailTrigger instance) causing an email to be sent triggered - a Map<String,EmailTrigger> that is a name->trigger map for all the triggers that were triggered to send emails. This is an unmodifiable map.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
          src/test/java/hudson/plugins/emailext/plugins/content/JellyScriptContentTest.java
          src/test/java/hudson/plugins/emailext/plugins/content/ScriptContentTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/dba4fe1fd045f44037272989cb2926abb033292b
          Log:
          Fixed JENKINS-17577

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java src/test/java/hudson/plugins/emailext/plugins/content/JellyScriptContentTest.java src/test/java/hudson/plugins/emailext/plugins/content/ScriptContentTest.java http://jenkins-ci.org/commit/email-ext-plugin/dba4fe1fd045f44037272989cb2926abb033292b Log: Fixed JENKINS-17577

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              slide_o_mix Alex Earl
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: