Commit f0859cc9 authored by haseeb's avatar haseeb

changed the way of nullifying colums

parent a73c9a63
......@@ -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
......
......@@ -10,7 +10,6 @@ module Issues
execute_hooks(issue, 'reopen')
invalidate_cache_counts(issue, users: issue.assignees)
issue.update_project_counter_caches
issue.update(closed_by: nil, closed_at: nil)
end
issue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment