summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorhaseeb <haseebeqx@yahoo.com>2018-03-05 19:57:53 +0530
committerhaseeb <haseebeqx@yahoo.com>2018-03-05 19:57:53 +0530
commitf0859cc937f7c4251062b12957253c4832bd1263 (patch)
tree1eee8a4083e51970a7c205d23cdcf8df337eb6e9 /app/models
parenta73c9a63a79c51d26c2fda430c84f4fc1e195cbd (diff)
downloadgitlab-ce-f0859cc937f7c4251062b12957253c4832bd1263.tar.gz
changed the way of nullifying colums
Diffstat (limited to 'app/models')
-rw-r--r--app/models/issue.rb5
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