修正项目动态中缺陷编号错误的问题
This commit is contained in:
parent
f1b086ef90
commit
f218b87338
|
@ -991,6 +991,11 @@ class Issue < ActiveRecord::Base
|
|||
"#{tracker} ##{id}: #{subject}"
|
||||
end
|
||||
|
||||
# 缺陷在项目中的序号
|
||||
def inProjectIndex
|
||||
(self.project.issues.index(self).to_i + 1).to_s
|
||||
end
|
||||
|
||||
# Returns a string of css classes that apply to the issue
|
||||
def css_classes
|
||||
s = "issue tracker-#{tracker_id} status-#{status_id} #{priority.try(:css_classes)}"
|
||||
|
|
|
@ -29,7 +29,7 @@ class Journal < ActiveRecord::Base
|
|||
# end
|
||||
attr_accessor :indice
|
||||
|
||||
acts_as_event :title => Proc.new {|o| status = ((s = o.new_status) ? " (#{s})" : nil); "#{o.issue.tracker} ##{o.issue.id}#{status}: #{o.issue.subject}" },
|
||||
acts_as_event :title =>Proc.new {|o| status = ((s = o.new_status) ? " (#{s})" : nil); "#{o.issue.tracker} ##{o.issue.inProjectIndex}#{status}: #{o.issue.subject}" },
|
||||
:description =>:notes,
|
||||
:author => :user,
|
||||
:group => :issue,
|
||||
|
|
Loading…
Reference in New Issue