Do not set closed_at to nil when issue is reopened
This commit is contained in:
parent
0a4b853f2c
commit
251255e7ca
3 changed files with 4 additions and 12 deletions
|
@ -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
|
||||
|
|
4
changelogs/unreleased/issue_91_ee_backport.yml
Normal file
4
changelogs/unreleased/issue_91_ee_backport.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue