Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhaseeb <haseebeqx@yahoo.com>2018-03-05 17:27:53 +0300
committerhaseeb <haseebeqx@yahoo.com>2018-03-05 17:27:53 +0300
commitf0859cc937f7c4251062b12957253c4832bd1263 (patch)
tree1eee8a4083e51970a7c205d23cdcf8df337eb6e9 /app/models/issue.rb
parenta73c9a63a79c51d26c2fda430c84f4fc1e195cbd (diff)
changed the way of nullifying colums
Diffstat (limited to 'app/models/issue.rb')
-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