邮件:缺陷按项目排序
This commit is contained in:
parent
17280e78ab
commit
f8a35d2f97
|
@ -104,7 +104,7 @@ class Mailer < ActionMailer::Base
|
||||||
|
|
||||||
# 查询user的缺陷,项目中成员都能收到
|
# 查询user的缺陷,项目中成员都能收到
|
||||||
sql = "select DISTINCT * from members m, issues i where i.project_id = m.project_id and m.user_id='#{user.id}'
|
sql = "select DISTINCT * from members m, issues i where i.project_id = m.project_id and m.user_id='#{user.id}'
|
||||||
and (i.updated_on between '#{date_from}' and '#{date_to}') order by i.updated_on desc"
|
and (i.updated_on between '#{date_from}' and '#{date_to}') order by i.project_id, i.updated_on desc"
|
||||||
@issues = Issue.find_by_sql(sql)
|
@issues = Issue.find_by_sql(sql)
|
||||||
|
|
||||||
# issue回复
|
# issue回复
|
||||||
|
@ -125,7 +125,7 @@ class Mailer < ActionMailer::Base
|
||||||
@bids += bids if bids.count > 0
|
@bids += bids if bids.count > 0
|
||||||
@attachments += attachments if attachments.count > 0
|
@attachments += attachments if attachments.count > 0
|
||||||
end
|
end
|
||||||
@bids.sort {|a, b| a.created_at <=> b.created_at}
|
@bids = @bids.sort_by { |obj| obj.created_at }
|
||||||
end
|
end
|
||||||
|
|
||||||
# 项目附件
|
# 项目附件
|
||||||
|
|
Loading…
Reference in New Issue