プロジェクト

全般

プロフィール

Vote #73566

完了

Do not add empty header/footer to notification emails

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Email notifications_9
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
9
version_id:
70
issue_org_id:
13482
author_id:
4
assigned_to_id:
0
comments:
3
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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:

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.


journals

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).

Thanks.
--------------------------------------------------------------------------------
Committed in trunk, thanks.
--------------------------------------------------------------------------------
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!
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリEmail notifications_9 にセット
  • 対象バージョン2.4.0_70 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0