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
db9629b3
Commit
db9629b3
authored
Jul 31, 2018
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow update dates at web controller
parent
5afd8481
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
ee/app/controllers/groups/epics_controller.rb
ee/app/controllers/groups/epics_controller.rb
+4
-2
ee/app/serializers/epic_entity.rb
ee/app/serializers/epic_entity.rb
+7
-1
ee/spec/controllers/groups/epics_controller_spec.rb
ee/spec/controllers/groups/epics_controller_spec.rb
+3
-1
No files found.
ee/app/controllers/groups/epics_controller.rb
View file @
db9629b3
...
@@ -66,8 +66,10 @@ class Groups::EpicsController < Groups::ApplicationController
...
@@ -66,8 +66,10 @@ class Groups::EpicsController < Groups::ApplicationController
[
[
:title
,
:title
,
:description
,
:description
,
:start_date
,
:start_date_fixed
,
:end_date
,
:start_date_is_fixed
,
:due_date_fixed
,
:due_date_is_fixed
,
label_ids:
[]
label_ids:
[]
]
]
end
end
...
...
ee/app/serializers/epic_entity.rb
View file @
db9629b3
...
@@ -6,8 +6,14 @@ class EpicEntity < IssuableEntity
...
@@ -6,8 +6,14 @@ class EpicEntity < IssuableEntity
expose
:group_full_name
do
|
epic
|
expose
:group_full_name
do
|
epic
|
epic
.
group
.
full_name
epic
.
group
.
full_name
end
end
expose
:start_date
expose
:start_date
expose
:end_date
expose
:start_date_is_fixed?
,
as: :start_date_is_fixed
expose
:start_date_fixed
,
:start_date_from_milestones
expose
:end_date
,
as: :due_date
expose
:due_date_is_fixed?
,
as: :due_date_is_fixed
expose
:due_date_fixed
,
:due_date_from_milestones
expose
:web_url
do
|
epic
|
expose
:web_url
do
|
epic
|
group_epic_path
(
epic
.
group
,
epic
)
group_epic_path
(
epic
.
group
,
epic
)
end
end
...
...
ee/spec/controllers/groups/epics_controller_spec.rb
View file @
db9629b3
...
@@ -183,7 +183,7 @@ describe Groups::EpicsController do
...
@@ -183,7 +183,7 @@ describe Groups::EpicsController do
describe
'PUT #update'
do
describe
'PUT #update'
do
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
]
},
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
end
end
it
'returns status 200'
do
it
'returns status 200'
do
...
@@ -195,6 +195,8 @@ describe Groups::EpicsController do
...
@@ -195,6 +195,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_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