issue截止修改
This commit is contained in:
parent
da3dcb6fc0
commit
59aa1e9c6f
|
@ -381,7 +381,7 @@ class Mailer < ActionMailer::Base
|
|||
|
||||
# issue截止时间提醒
|
||||
def issue_due_date(issue, recipients)
|
||||
@author = issue.author.login
|
||||
@author = issue.author
|
||||
@issue_name = issue.subject
|
||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id)
|
||||
@subject = "#{l(:mail_issue)}#{issue.subject} #{l(:mail_issue_due_date)} "
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||
<span style="float: left; width: 526px">
|
||||
<p><%=link_to @author, user_url(@author) %> 发布的问题跟踪:<%=link_to @issue_name, @issue_url %> <span style="color: red">截止时间快到了,请您关注!</span></p>
|
||||
<p><%=link_to @author.login, user_url(@author) %> 发布的问题跟踪:<%=link_to @issue_name, @issue_url %> <span style="color: red">截止时间快到了,请您关注!</span></p>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -8,7 +8,9 @@ namespace :issue_due_date do
|
|||
if ForgeMessage.where("forge_message_type =? and forge_message_id =? and status =?", "Issue", issue.id, 1).first.nil?
|
||||
recipients = []
|
||||
assigner = User.find(issue.assigned_to_id)
|
||||
recipients << issue.author
|
||||
unless assigner.id == issue.author.id
|
||||
recipients << issue.author
|
||||
end
|
||||
recipients << assigner
|
||||
recipients.each do |r|
|
||||
issue.forge_messages << ForgeMessage.new(:user_id => r.id, :project_id => issue.project_id, :viewed => false, :status => 1)
|
||||
|
|
Loading…
Reference in New Issue