Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e23ee67a
Commit
e23ee67a
authored
Jul 31, 2018
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug where start_date is not updated at web
parent
db9629b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
ee/app/controllers/groups/epics_controller.rb
ee/app/controllers/groups/epics_controller.rb
+1
-1
ee/app/services/epics/update_service.rb
ee/app/services/epics/update_service.rb
+1
-1
ee/spec/controllers/groups/epics_controller_spec.rb
ee/spec/controllers/groups/epics_controller_spec.rb
+4
-1
No files found.
ee/app/controllers/groups/epics_controller.rb
View file @
e23ee67a
...
@@ -83,7 +83,7 @@ class Groups::EpicsController < Groups::ApplicationController
...
@@ -83,7 +83,7 @@ class Groups::EpicsController < Groups::ApplicationController
end
end
def
update_service
def
update_service
::
Epics
::
UpdateService
.
new
(
@group
,
current_user
,
epic_params
)
::
Epics
::
UpdateService
.
new
(
@group
,
current_user
,
epic_params
.
stringify_keys
)
end
end
def
finder_type
def
finder_type
...
...
ee/app/services/epics/update_service.rb
View file @
e23ee67a
...
@@ -7,7 +7,7 @@ module Epics
...
@@ -7,7 +7,7 @@ module Epics
update
(
epic
)
update
(
epic
)
if
(
params
.
keys
&
[
:start_date_fixed
,
:start_date_is_fixed
,
:due_date_fixed
,
:due_date_is_fixed
]).
present?
if
(
params
.
keys
.
map
(
&
:to_sym
)
&
[
:start_date_fixed
,
:start_date_is_fixed
,
:due_date_fixed
,
:due_date_is_fixed
]).
present?
epic
.
update_dates
epic
.
update_dates
end
end
...
...
ee/spec/controllers/groups/epics_controller_spec.rb
View file @
e23ee67a
...
@@ -181,6 +181,8 @@ describe Groups::EpicsController do
...
@@ -181,6 +181,8 @@ describe Groups::EpicsController do
end
end
describe
'PUT #update'
do
describe
'PUT #update'
do
let
(
:date
)
{
Date
.
new
(
2002
,
1
,
1
)}
before
do
before
do
group
.
add_developer
(
user
)
group
.
add_developer
(
user
)
put
:update
,
group_id:
group
,
id:
epic
.
to_param
,
epic:
{
title:
'New title'
,
label_ids:
[
label
.
id
],
start_date_fixed:
'2002-01-01'
,
start_date_is_fixed:
true
},
format: :json
put
:update
,
group_id:
group
,
id:
epic
.
to_param
,
epic:
{
title:
'New title'
,
label_ids:
[
label
.
id
],
start_date_fixed:
'2002-01-01'
,
start_date_is_fixed:
true
},
format: :json
...
@@ -195,7 +197,8 @@ describe Groups::EpicsController do
...
@@ -195,7 +197,8 @@ describe Groups::EpicsController do
expect
(
epic
.
title
).
to
eq
(
'New title'
)
expect
(
epic
.
title
).
to
eq
(
'New title'
)
expect
(
epic
.
labels
).
to
eq
([
label
])
expect
(
epic
.
labels
).
to
eq
([
label
])
expect
(
epic
.
start_date_fixed
).
to
eq
(
Date
.
new
(
2002
,
1
,
1
))
expect
(
epic
.
start_date_fixed
).
to
eq
(
date
)
expect
(
epic
.
start_date
).
to
eq
(
date
)
expect
(
epic
.
start_date_is_fixed
).
to
eq
(
true
)
expect
(
epic
.
start_date_is_fixed
).
to
eq
(
true
)
end
end
end
end
...
...
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