优化issue显示代码
This commit is contained in:
parent
2aeebfe645
commit
fce872a6a5
|
@ -113,12 +113,8 @@ class IssuesController < ApplicationController
|
|||
|
||||
def show
|
||||
# 当前用户查看指派给他的缺陷消息,则设置消息为已读
|
||||
query = @issue.forge_messages
|
||||
query.each do |m|
|
||||
if m.user_id == User.current.id
|
||||
m.update_attribute(:viewed, true)
|
||||
end
|
||||
end
|
||||
query = ForgeMessage.where("forge_message_type =? and user_id =? and forge_message_id =?", "Issue", User.current, @issue).first
|
||||
query.update_attribute(:viewed, true) unless query.nil?
|
||||
# 缺陷状态更新
|
||||
query_journals = @issue.journals
|
||||
query_journals.each do |query_journal|
|
||||
|
|
Loading…
Reference in New Issue