|
|
|
@ -562,6 +562,12 @@ class Issue < ActiveRecord::Base
|
|
|
|
|
@workflow_rule_by_attribute = result if user.nil?
|
|
|
|
|
result
|
|
|
|
|
end
|
|
|
|
|
# 缺陷的短描述信息
|
|
|
|
|
def short_description(length = 255)
|
|
|
|
|
description.gsub(/<\/?.*?>/,"").html_safe if description
|
|
|
|
|
#description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private :workflow_rule_by_attribute
|
|
|
|
|
|
|
|
|
|
def done_ratio
|
|
|
|
@ -1513,4 +1519,6 @@ class Issue < ActiveRecord::Base
|
|
|
|
|
def be_user_score_new_issue
|
|
|
|
|
UserScore.project(:post_issue, User.current,self, { issue_id: self.id })
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|