diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index dbcfd1b..c6c608f 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -1028,14 +1028,19 @@
 
         self.assertEqual(A.data['status'], 'MERGED')
         self.assertEqual(A.reported, 2)
+        self.assertIn('Build succeeded', A.messages[1])
         self.assertEqual(B.data['status'], 'NEW')
         self.assertEqual(B.reported, 2)
+        self.assertIn('Build failed', B.messages[1])
         self.assertEqual(C.data['status'], 'NEW')
         self.assertEqual(C.reported, 2)
+        self.assertIn('depends on a change', C.messages[1])
         self.assertEqual(D.data['status'], 'NEW')
         self.assertEqual(D.reported, 2)
+        self.assertIn('depends on a change', D.messages[1])
         self.assertEqual(E.data['status'], 'MERGED')
         self.assertEqual(E.reported, 2)
+        self.assertIn('Build succeeded', E.messages[1])
         self.assertEqual(len(self.history), 18)
 
     def test_head_is_dequeued_once(self):
diff --git a/zuul/scheduler.py b/zuul/scheduler.py
index c2fc378..b3163b3 100644
--- a/zuul/scheduler.py
+++ b/zuul/scheduler.py
@@ -1458,19 +1458,25 @@
     def formatReport(self, item):
         ret = ''
 
-        if not self.pipeline.didMergerSucceed(item):
+        if item.dequeued_needing_change:
+            ret += 'This change depends on a change that failed to merge.\n'
+        elif not self.pipeline.didMergerSucceed(item):
             ret += self.pipeline.merge_failure_message
-            if item.dequeued_needing_change:
-                ret += ('\n\nThis change depends on a change that failed to '
-                        'merge.')
-            if self.pipeline.footer_message:
-                ret += '\n\n' + self.pipeline.footer_message
-            return ret
-
-        if self.pipeline.didAllJobsSucceed(item):
-            ret += self.pipeline.success_message + '\n\n'
         else:
-            ret += self.pipeline.failure_message + '\n\n'
+            if self.pipeline.didAllJobsSucceed(item):
+                ret += self.pipeline.success_message + '\n\n'
+            else:
+                ret += self.pipeline.failure_message + '\n\n'
+            ret += self._formatReportJobs(item)
+
+        if self.pipeline.footer_message:
+            ret += '\n' + self.pipeline.footer_message
+
+        return ret
+
+    def _formatReportJobs(self, item):
+        # Return the list of jobs portion of the report
+        ret = ''
 
         if self.sched.config.has_option('zuul', 'url_pattern'):
             url_pattern = self.sched.config.get('zuul', 'url_pattern')
@@ -1521,8 +1527,6 @@
                     name = job.name + ' '
             ret += '- %s%s : %s%s%s\n' % (name, url, result, elapsed,
                                           voting)
-        if self.pipeline.footer_message:
-            ret += '\n' + self.pipeline.footer_message
         return ret
 
     def formatDescription(self, build):
