diff --git a/app/models/issue.rb b/app/models/issue.rb index 6e3dcc57a..79ddcd917 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -162,7 +162,7 @@ class Issue < ActiveRecord::Base end self.project.members.each do |m| count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Project' and shield_id=#{self.project_id}").count - if m.user_id != self.author_id && count != 0 + if m.user_id != self.author_id && count == 0 ws = WechatService.new content = strip_html self.project.name + " 有新缺陷了:" + self.subject.html_safe, 200 ws.message_update_template m.user_id, "issues", self.id, "#{l(:label_new_issue_template)}", content, format_time(self.created_on) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 22515205c..10d0af25b 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2139,7 +2139,7 @@ zh: label_journals_comment_template: 您的留言有新回复了 label_blog_comment_template: 您的博客有新回复了 label_new_blog_template: 有新博客了 - label_new_issue_template: 您有新缺陷了 + label_new_issue_template: 有新缺陷了 label_new_notice_template: 您的课程有新通知了 #edit yk label_code_work_tests: 代码测试列表