指派给自己的缺陷不发送消息提示

This commit is contained in:
huang 2015-08-13 13:59:15 +08:00
parent fbf21fc51b
commit 69050b4271
2 changed files with 8 additions and 5 deletions

View File

@ -141,11 +141,14 @@ class Issue < ActiveRecord::Base
end
# end
# 发布缺陷foege_messages中添加记录
# 发布缺陷forge_messages中添加记录
def act_as_forge_message
self.forge_messages << ForgeMessage.new(:user_id => self.assigned_to_id,
:project_id => self.project_id,
:viewed => false)
# 指派给自己的缺陷不提示消息
unless self.author_id == self.assigned_to_id
self.forge_messages << ForgeMessage.new(:user_id => self.assigned_to_id,
:project_id => self.project_id,
:viewed => false)
end
end

View File

@ -37,7 +37,7 @@
{:controller=> 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.host_user},
{:class => 'my-message'} if User.current.logged?%>
</li>
</ul>
</div>
<% end -%>