Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
e4b8a4134eb8
Commit
251255e7
authored
Apr 04, 2017
by
Felipe Artur
Browse files
Do not set closed_at to nil when issue is reopened
parent
2c5dfb323159
Changes
3
Show whitespace changes
Inline
Side-by-side
app/models/issue.rb
View file @
e4b8a413
...
...
@@ -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
...
...
changelogs/unreleased/issue_91_ee_backport.yml
0 → 100644
View file @
e4b8a413
---
title
:
Do not set closed_at to nil when issue is reopened
merge_request
:
author
:
spec/models/issue_spec.rb
View file @
e4b8a413
...
...
@@ -51,14 +51,6 @@
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment