Feature #13307
closedStart date and due date in email notifications
0%
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
Related issues
Updated by Matt Mencel over 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.
Updated by Tiffany C over 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
Updated by Bryan Settles about 8 years ago
In redmine/app/views/mailer/reminder.html.erb, put <%= issue.due_date issue.start_date > before the <= link_to_issue()%>
Updated by ryan lee over 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
Updated by Marius BĂLTEANU about 6 years ago
- Has duplicate Feature #29254: Start date and due date in issue email notification added
Updated by Marius BĂLTEANU about 6 years ago
- File issue_mailer_helper.diff issue_mailer_helper.diff added
Attached the patch uploaded by Senya Senya in #29254.
Updated by Go MAEDA about 6 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.
Updated by Go MAEDA about 6 years ago
- Related to Feature #10378: Don't show empty fields in email notifications added
Updated by Go MAEDA almost 6 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"]
Updated by Go MAEDA almost 6 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.
Updated by Go MAEDA almost 6 years ago
Sorry, the patch issue_mailer_helper-v2.diff does not work. Here is a fixed patch.
Updated by Go MAEDA almost 6 years ago
- File test-for-13307.diff test-for-13307.diff added
Updated a test for this feature.
Updated by Go MAEDA almost 6 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.
Updated by Go MAEDA almost 6 years ago
- Subject changed from Start date and due date in email to Start date and due date in email notifications
Updated by Go MAEDA almost 6 years ago
- Related to Feature #18472: Due date and custom fileds in e-mail added