Commit 20e6670a authored by Sean McGivern's avatar Sean McGivern

Merge branch 'issue_91_ee_backport' into 'master'

Do not set closed_at to nil when issue is reopened

See merge request !10453
parents d4d95ad3 251255e7
......@@ -59,10 +59,6 @@ class Issue < ActiveRecord::Base
before_transition any => :closed do |issue|
issue.closed_at = Time.zone.now
end
before_transition closed: any do |issue|
issue.closed_at = nil
end
end
def hook_attrs
......
---
title: Do not set closed_at to nil when issue is reopened
merge_request:
author:
......@@ -51,14 +51,6 @@ describe Issue, models: true do
expect(issue.closed_at).to eq(now)
end
it 'sets closed_at to nil when issue is reopened' do
issue = create(:issue, state: 'closed')
issue.reopen
expect(issue.closed_at).to be_nil
end
end
describe '#to_reference' do
......
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