@@ -722,9 +722,13 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 | if status_id_was.to_i > 0 | |||
726 | @status_was ||= IssueStatus.find_by_id(status_id_was) |
|
727 | @status_was ||= IssueStatus.find_by_id(status_id_was) | |
727 | end |
|
728 | end | |
|
729 | else | |||
|
730 | @status_was ||= status | |||
|
731 | end | |||
728 | end |
|
732 | end | |
729 |
|
733 | |||
730 | # Return true if the issue is closed, otherwise false |
|
734 | # Return true if the issue is closed, otherwise false |
General Comments 0
You need to be logged in to leave comments.
Login now