缺陷的模板消息要细化缺陷类型
This commit is contained in:
parent
3b3cafbc81
commit
670b2c48c7
app/models
|
@ -164,7 +164,20 @@ class Issue < ActiveRecord::Base
|
|||
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
|
||||
ws = WechatService.new
|
||||
content = strip_html self.project.name + " 有新缺陷了:" + self.subject.html_safe, 200
|
||||
str = " 有新缺陷了: "
|
||||
case self.tracker_id
|
||||
when 1
|
||||
str = " 有新缺陷了: "
|
||||
when 2
|
||||
str = " 有新功能了: "
|
||||
when 3
|
||||
str = " 有新支持了: "
|
||||
when 4
|
||||
str = " 有新任务了: "
|
||||
when 5
|
||||
str = " 有新周报了: "
|
||||
end
|
||||
content = strip_html self.project.name + str + 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)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue