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

Support regex/replace attribute in ${CHANGES} token to modify changes message

    Details

    • Similar Issues:

      Description

      As a user, I want to modify the changes message in the email notifications.
      This is useful when a change contains a message in xml.

      For example:

      • Given a change with the message <defectId>DEFECT-666</defectId><message>Initial commit</message>
      • When I define the content of the email notifications as follows: ${CHANGES, regex="<defectId>(DEFECT-[0-9]+)</defectId><message>(.*)</message>", replace="[$1] $2"}
      • Then I should get an email notification with the following content: [DEFECT-666] Initial commit

        Attachments

          Activity

          gssiyankai Gregory SSI-YAN-KAI created issue -
          Hide
          gssiyankai Gregory SSI-YAN-KAI added a comment -

          I'll submit a pull request within a few days.

          Show
          gssiyankai Gregory SSI-YAN-KAI added a comment - I'll submit a pull request within a few days.
          Hide
          gssiyankai Gregory SSI-YAN-KAI added a comment -
          Show
          gssiyankai Gregory SSI-YAN-KAI added a comment - Pull request submitted: https://github.com/jenkinsci/email-ext-plugin/pull/93
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: gssiyankai
          Path:
          src/main/java/hudson/plugins/emailext/plugins/content/AbstractChangesSinceContent.java
          src/main/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent.java
          src/main/resources/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent/help.groovy
          src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContentTest.java
          src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastSuccessfulBuildContentTest.java
          src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastUnstableBuildContentTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/bd7adee64ffc608bb2365d66066501696a0f5dde
          Log:
          JENKINS-23691
          Support regex/replace attributes in ${CHANGES} token to modify changes message

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: gssiyankai Path: src/main/java/hudson/plugins/emailext/plugins/content/AbstractChangesSinceContent.java src/main/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent.java src/main/resources/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent/help.groovy src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContentTest.java src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastSuccessfulBuildContentTest.java src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastUnstableBuildContentTest.java http://jenkins-ci.org/commit/email-ext-plugin/bd7adee64ffc608bb2365d66066501696a0f5dde Log: JENKINS-23691 Support regex/replace attributes in ${CHANGES} token to modify changes message
          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/plugins/content/AbstractChangesSinceContent.java
          src/main/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent.java
          src/main/resources/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent/help.groovy
          src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContentTest.java
          src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastSuccessfulBuildContentTest.java
          src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastUnstableBuildContentTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/2d37c7a3d7e128481d7844efed3a5c52edbd0ee6
          Log:
          Merge pull request #93 from gssiyankai/master

          JENKINS-23691 Support regex/replace attribute in ${CHANGES} token to modify changes message

          Compare: https://github.com/jenkinsci/email-ext-plugin/compare/684ab899efcd...2d37c7a3d7e1

          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/plugins/content/AbstractChangesSinceContent.java src/main/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent.java src/main/resources/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent/help.groovy src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContentTest.java src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastSuccessfulBuildContentTest.java src/test/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastUnstableBuildContentTest.java http://jenkins-ci.org/commit/email-ext-plugin/2d37c7a3d7e128481d7844efed3a5c52edbd0ee6 Log: Merge pull request #93 from gssiyankai/master JENKINS-23691 Support regex/replace attribute in ${CHANGES} token to modify changes message Compare: https://github.com/jenkinsci/email-ext-plugin/compare/684ab899efcd...2d37c7a3d7e1
          Hide
          slide_o_mix Alex Earl added a comment -

          Fixed via pull request 93

          Show
          slide_o_mix Alex Earl added a comment - Fixed via pull request 93
          slide_o_mix Alex Earl made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 156476 ] JNJira + In-Review [ 195431 ]

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              gssiyankai Gregory SSI-YAN-KAI
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: