Details
-
Improvement
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Duplicate
-
None
Description
It'd be great if email-ext allowed to specify an alternative text if a CHANGE_... token is empty (i.e. no changes).
Then I could add a notice if no changes are available to make it clear that nothing was changed:
Changes:
The following changes occurred since the last unstable build:
There were no changes
Build Log:
blabla
Otherwise, it'll just look like the following:
Changes:
The following changes occurred since the last unstable build:
Build Log:
blabla
Example token:
${CHANGES_SINCE_LAST_UNSTABLE, reverse=true, default="<em>There were no changes.</em>"}
Attachments
Issue Links
- duplicates
-
JENKINS-16532 ${CHANGES} token does not give any output for debugging or any "No Changes" response when there are no changes like the web page
-
- Resolved
-
Code changed in jenkins
User: Jeff MAURY
Path:
src/main/java/hudson/plugins/emailext/plugins/content/AbstractChangesSinceContent.java
src/main/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent.java
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/bfaadca29e5b946d7e028c59044427b1748a6f20
Log:
Fix
JENKINS-20324- Add default parameter for CHANGES, CHANGES_SINCE_LAST_SUCCESS and CHANGES_SINCE_LAST_UNSTABLE tokens