Project

General

Profile

Actions

Feature #13307

closed

Start date and due date in email notifications

Added by Benjamin Jeanjean about 11 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Email notifications
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Today, the start date and the due date doesn't appears in the email sent when we create a new issue.
It would be really useful to make them appears for being aware of the priority of the issue.


Files

issue_mailer_helper.diff (666 Bytes) issue_mailer_helper.diff Marius BĂLTEANU, 2018-10-28 20:38
issue_mailer_helper-v2.diff (750 Bytes) issue_mailer_helper-v2.diff Go MAEDA, 2019-01-24 01:40
issue_mailer_helper-v3.diff (753 Bytes) issue_mailer_helper-v3.diff Go MAEDA, 2019-01-24 03:04
test-for-13307.diff (790 Bytes) test-for-13307.diff Go MAEDA, 2019-01-24 12:06

Related issues

Related to Redmine - Feature #10378: Don't show empty fields in email notificationsClosedJean-Philippe Lang

Actions
Related to Redmine - Feature #18472: Due date and custom fileds in e-mailClosed

Actions
Has duplicate Redmine - Feature #29254: Start date and due date in issue email notificationClosed

Actions
Actions #1

Updated by Pavel Lautsevich about 11 years ago

+1

Actions #2

Updated by Matt Mencel almost 9 years ago

Anyone know if this is possible via a plugin? I have someone asking if these fields can be added to the notification email.

Actions #3

Updated by Tiffany C almost 9 years ago

Hi, I'm using Redmine2.4.1.
It works fine when I added "start_date" and "due_date" to issues_helper.rb as the following code.
Could you add to the latest Redmine, too? It would be really useful!

Index: app/helpers/issues_helper.rb  
===================================================================
--- app/helpers/issues_helper.rb>  
+++ app/helpers/issues_helper.rb>
@@ -233,7 +233,7 @@
_
def email_issue_attributes(issue, user) 
  items = [] 
- %w(author status priority assigned_to category fixed_version).each do |attribute|  
+ %w(author status priority assigned_to category fixed_version start_date due_date).each do |attribute|
 unless issue.disabled_core_fields.include?(attribute+"_id") 
items << "#{l("field_#{attribute}")}: #{issue.send attribute}"  
 end 

Actions #4

Updated by Bryan Settles over 7 years ago

In redmine/app/views/mailer/reminder.html.erb, put <%= issue.due_date issue.start_date > before the <= link_to_issue()%>

Actions #5

Updated by Florian ROBERT almost 7 years ago

+1

Actions #6

Updated by ryan lee almost 6 years ago

Hi, I am using Redmine 3.4.2.
I have edited the file 'app/helpers/issues_helper.rb' as Tiffany C's post but it not works.
I want the notification email include the info start date and due date.
If you have the solution please let me know. Thank you very much

Actions #7

Updated by Yuuki NARA almost 6 years ago

+1

Actions #8

Updated by Senya Senya almost 6 years ago

I posted a patch #29254

Actions #9

Updated by Marius BĂLTEANU over 5 years ago

  • Has duplicate Feature #29254: Start date and due date in issue email notification added
Actions #10

Updated by Marius BĂLTEANU over 5 years ago

Attached the patch uploaded by Senya Senya in #29254.

Actions #11

Updated by Go MAEDA over 5 years ago

  • Target version set to 4.1.0

+1
Start date and due date are important information for project management.

I am setting the target version to 4.1.0.

Actions #12

Updated by Go MAEDA over 5 years ago

  • Related to Feature #10378: Don't show empty fields in email notifications added
Actions #13

Updated by Go MAEDA about 5 years ago

I agree with showing start date and due date in reminders, But the current patch in #13307#note-10 needs some fix.

You can disable some standard fields in the tracker setting. Needless to say, disabled fields are not shown in reminders. However, start date and due date are always shown in reminders even if those fields are disabled.

When IssuesHelper#email_issue_attributes checks if a field name is included in the disabled_core_fields array, it assumes that the format of the value is "*_id". This does not work for start_date and due_date because those fields does not have the suffix "_id" in the disabled_core_fields array.

    %w(author status priority assigned_to category fixed_version start_date due_date).each do |attribute|
      unless issue.disabled_core_fields.include?(attribute+"_id")
        if html
          items << content_tag('strong', "#{l("field_#{attribute}")}: ") + (issue.send attribute)
        else
          items << "#{l("field_#{attribute}")}: #{issue.send attribute}" 
        end
      end
    end
$ bin/rails c
Loading development environment (Rails 5.2.2)
2.6.0 :001 > Tracker.find(1).disabled_core_fields
  Tracker Load (0.3ms)  SELECT  "trackers".* FROM "trackers" WHERE "trackers"."id" = ? LIMIT ?  [["id", 1], ["LIMIT", 1]]
 => ["assigned_to_id", "category_id", "fixed_version_id", "parent_issue_id", "start_date", "due_date", "estimated_hours", "done_ratio", "description"]
Actions #14

Updated by Go MAEDA about 5 years ago

Go MAEDA wrote:

When IssuesHelper#email_issue_attributes checks if a field name is included in the disabled_core_fields array, it assumes that the format of the value is "*_id". This does not work for start_date and due_date because those fields does not have the suffix "_id" in the disabled_core_fields array.

Here is an updated patch. The patch works whether the value in the disabled_core_fields array has "_id" suffix or not.

Actions #15

Updated by Go MAEDA about 5 years ago

Sorry, the patch issue_mailer_helper-v2.diff does not work. Here is a fixed patch.

Actions #16

Updated by Go MAEDA about 5 years ago

Updated a test for this feature.

Actions #17

Updated by Go MAEDA about 5 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for your contribution.

Actions #18

Updated by Go MAEDA about 5 years ago

  • Subject changed from Start date and due date in email to Start date and due date in email notifications
Actions #19

Updated by Go MAEDA about 5 years ago

  • Related to Feature #18472: Due date and custom fileds in e-mail added
Actions

Also available in: Atom PDF