From 121aca750562d4e27186806bbc2e0fb88b7bc338 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 5 May 2016 09:09:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E6=A8=A1=E6=9D=BF=E6=B6=88?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/issue.rb | 2 +- config/locales/zh.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: 代码测试列表