Patch #13482


Do not add empty header/footer to notification emails

Added by Anonymous about 10 years ago. Updated about 10 years ago.

Email notifications
Target version:
Start date:
Due date:
% Done:


Estimated time:


Right now, even if I set the email header or footer to be empty, Redmine will still put them into the email. For HTML emails, that means you still get a line like this in the HTML code:

<span class="header"><div style="white-space: pre-wrap;"></div></span>

For plain text emails, this means you still get "-- " followed by an empty line (actually, two, but that's another story) at the end of the email. This latter point also means that if you want to disable the global footer, and tweak select mail templates to include a custom footer, this clashes.

The attached patch is quite simple: It suppress output of any header related stuff (including the span element in the HTML) part if the header is set to an empty string. Similar for the footer.


Actions #1

Updated by Anonymous about 10 years ago

It would be nice to know if the Redmine team is considering this for inclusion at all (and if so, whether / what kind of improvements are needed before this can be included), or considers it inappropriate (in which case this could be closed).


Actions #2

Updated by Toshi MARUYAMA about 10 years ago

  • Status changed from New to Closed
  • Target version set to 2.4.0

Committed in trunk, thanks.

Actions #3

Updated by Anonymous about 10 years ago

Thank you very much for this super quick reaction. I see that you also went to quite some trouble indeed, and even added some new tests for this. Thank you again for that, too!

Note: if you just had told me that I should add some tests, I would have also done that, though it would have probably taken me much longer and I am not sure if the result would have been good enough. Anyway, all I want to say is: Of course I fully understand if acceptance of a patch of mine is delayed because its quality does not meet your standards (e.g. if tests should be added) -- as long as somebody briefly tells me that, I am fully willing to work on improving my patches. But of course I won't complain if somebody else does the polishing for me, like you did.

So: Thanks yet again!


Also available in: Atom PDF