[JIRA] Commented: (CC-1022) [PATCH] Include label in subject of build failure email

"Quinn Styl (JIRA)" <[email protected]>
Newsgroups gmane.comp.java.cruise-control.devel
Message-ID <925333062.1295285809814.JavaMail.jira@chidmzhosting02.thoughtworks.com>
    [ http://jira.public.thoughtworks.org/browse/CC-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_19017 ] 

Quinn Styl commented on CC-1022:
--------------------------------

Apologies for the delay, here's the patch to the corresponding unit test:

--- EmailPublisherTest.java	2010-09-15 19:42:04.000000000 -0700 
+++ EmailPublisherTest.java	2011-01-17 09:13:18.000000000 -0800
@@ -286,7 +286,7 @@
             "someproject somelabel Build Fixed",
             emailPublisher.createSubject(fixedLogHelper));
 
-        assertEquals("someproject Build Failed",
+        assertEquals("someproject somelabel Build Failed",
                 emailPublisher.createSubject(failureLogHelper));
 
         emailPublisher.setSubjectPrefix("[CC]");
@@ -300,7 +300,7 @@
             emailPublisher.createSubject(fixedLogHelper));
 
         assertEquals(
-            "[CC] someproject Build Failed",
+            "[CC] someproject somelabel Build Failed",
             emailPublisher.createSubject(failureLogHelper));
 
         //Anytime it is a "fixed" build, the subject should read "fixed".


> [PATCH] Include label in subject of build failure email
> -------------------------------------------------------
>
>                 Key: CC-1022
>                 URL: http://jira.public.thoughtworks.org/browse/CC-1022
>             Project: CruiseControl
>          Issue Type: Improvement
>          Components: Core Application
>    Affects Versions: 2.8.4
>            Reporter: Quinn Styl
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> If we have the build label, why not include it in the email subject of a failed build?  In our case, we're using the p4changelistlabelincrementer, so we have a label to report.
> --- EmailPublisher.java.284	2010-09-15 19:42:04.000000000 -0700
> +++ EmailPublisher.java	2010-12-10 16:05:49.000000000 -0800
> @@ -174,12 +174,14 @@
>              subjectLine.append(subjectPrefix).append(" ");
>          }
>          subjectLine.append(logHelper.getProjectName());
> -        if (logHelper.isBuildSuccessful()) {
> +    
> +        // we want the label whether the build passed or failed
>              final String label = logHelper.getLabel();
>              if (label.trim().length() > 0) {
>                  subjectLine.append(" ").append(logHelper.getLabel());
>              }
>  
> +        if (logHelper.isBuildSuccessful()) {
>              // Anytime the build is "fixed" the subjest line
>              // should read "fixed". It might confuse recipients...but
>              // it shouldn't

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.public.thoughtworks.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.