diff options
author | haseeb <haseebeqx@yahoo.com> | 2018-03-05 19:57:53 +0530 |
---|---|---|
committer | haseeb <haseebeqx@yahoo.com> | 2018-03-05 19:57:53 +0530 |
commit | f0859cc937f7c4251062b12957253c4832bd1263 (patch) | |
tree | 1eee8a4083e51970a7c205d23cdcf8df337eb6e9 /app/models/issue.rb | |
parent | a73c9a63a79c51d26c2fda430c84f4fc1e195cbd (diff) | |
download | gitlab-ce-f0859cc937f7c4251062b12957253c4832bd1263.tar.gz |
changed the way of nullifying colums
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 8e51448770d..f1075d07372 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -77,6 +77,11 @@ class Issue < ActiveRecord::Base before_transition any => :closed do |issue| issue.closed_at = Time.zone.now end + + before_transition closed: :opened do |issue| + issue.closed_at = nil + issue.closed_by = nil + end end class << self |