mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 15:31:12 +00:00
Prevents a status load in #status_was when status is not changed (#18290).
git-svn-id: http://svn.redmine.org/redmine/trunk@13577 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f095633f2f
commit
84d380c677
@ -722,8 +722,12 @@ class Issue < ActiveRecord::Base
|
|||||||
# Returns the initial status of the issue
|
# Returns the initial status of the issue
|
||||||
# Returns nil for a new issue
|
# Returns nil for a new issue
|
||||||
def status_was
|
def status_was
|
||||||
if status_id_was && status_id_was.to_i > 0
|
if status_id_changed?
|
||||||
@status_was ||= IssueStatus.find_by_id(status_id_was)
|
if status_id_was.to_i > 0
|
||||||
|
@status_was ||= IssueStatus.find_by_id(status_id_was)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
@status_was ||= status
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user