Vote #73457
完了Start date and due date in email notifications
0%
説明
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.
journals
+1
--------------------------------------------------------------------------------
Anyone know if this is possible via a plugin? I have someone asking if these fields can be added to the notification email.
--------------------------------------------------------------------------------
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!
<pre>
<code class="diff">
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
</code>
</pre>
--------------------------------------------------------------------------------
In redmine/app/views/mailer/reminder.html.erb, put <%= issue.due_date issue.start_date %> before the <%= link_to_issue()%>
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
I posted a patch #29254
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Attached the patch uploaded by Senya Senya in #29254.
--------------------------------------------------------------------------------
+1
Start date and due date are important information for project management.
I am setting the target version to 4.1.0.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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.
<pre><code class="ruby">
%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
</code></pre>
<pre>
$ 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"]
</pre>
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Sorry, the patch issue_mailer_helper-v2.diff does not work. Here is a fixed patch.
--------------------------------------------------------------------------------
Updated a test for this feature.
--------------------------------------------------------------------------------
Committed the patch. Thank you for your contribution.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
relates,Closed,10378,Don't show empty fields in email notifications
relates,Closed,18472,Due date and custom fileds in e-mail
duplicates,Closed,29254,Start date and due date in issue email notification