##// END OF EJS Templates
Prevents a status load in #status_was when status is not changed (#18290)....
Jean-Philippe Lang -
r13195:84d380c6772d
parent child
Show More
@@ -722,8 +722,12 class Issue < ActiveRecord::Base
722 # Returns the initial status of the issue
722 # Returns the initial status of the issue
723 # Returns nil for a new issue
723 # Returns nil for a new issue
724 def status_was
724 def status_was
725 if status_id_was && status_id_was.to_i > 0
725 if status_id_changed?
726 @status_was ||= IssueStatus.find_by_id(status_id_was)
726 if status_id_was.to_i > 0
727 @status_was ||= IssueStatus.find_by_id(status_id_was)
728 end
729 else
730 @status_was ||= status
727 end
731 end
728 end
732 end
729
733
General Comments 0
You need to be logged in to leave comments. Login now