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
ddd0dae2
Commit
ddd0dae2
authored
Dec 03, 2018
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add EE specific IssueBoardEntity
parent
a861167f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
app/serializers/issue_board_entity.rb
app/serializers/issue_board_entity.rb
+1
-1
ee/app/serializers/ee/issue_board_entity.rb
ee/app/serializers/ee/issue_board_entity.rb
+10
-0
spec/fixtures/api/schemas/entities/issue_board.json
spec/fixtures/api/schemas/entities/issue_board.json
+1
-1
spec/fixtures/api/schemas/entities/issue_boards.json
spec/fixtures/api/schemas/entities/issue_boards.json
+4
-2
No files found.
app/serializers/issue_board_entity.rb
View file @
ddd0dae2
...
...
@@ -2,6 +2,7 @@
class
IssueBoardEntity
<
Grape
::
Entity
include
RequestAwareEntity
prepend
::
EE
::
IssueBoardEntity
expose
:id
expose
:iid
...
...
@@ -11,7 +12,6 @@ class IssueBoardEntity < Grape::Entity
expose
:due_date
expose
:project_id
expose
:relative_position
expose
:weight
,
if:
->
(
*
)
{
respond_to?
(
:weight
)
}
expose
:project
do
|
issue
|
API
::
Entities
::
Project
.
represent
issue
.
project
,
only:
[
:id
,
:path
]
...
...
ee/app/serializers/ee/issue_board_entity.rb
0 → 100644
View file @
ddd0dae2
# frozen_string_literal: true
module
EE
module
IssueBoardEntity
extend
ActiveSupport
::
Concern
prepended
do
expose
:weight
,
if:
->
(
issue
,
_
)
{
issue
.
supports_weight?
}
end
end
end
spec/fixtures/api/schemas/entities/issue_board.json
View file @
ddd0dae2
...
...
@@ -9,7 +9,7 @@
"project_id"
:
{
"type"
:
"integer"
},
"relative_position"
:
{
"type"
:
[
"integer"
,
"null"
]
},
"time_estimate"
:
{
"type"
:
"integer"
},
"weight"
:
{
"type"
:
"integer"
},
"weight"
:
{
"type"
:
[
"integer"
,
"null"
]
},
"project"
:
{
"type"
:
"object"
,
"properties"
:
{
...
...
spec/fixtures/api/schemas/entities/issue_boards.json
View file @
ddd0dae2
...
...
@@ -2,14 +2,16 @@
"type"
:
"object"
,
"required"
:
[
"issues"
,
"size"
"size"
,
"total_weight"
],
"properties"
:
{
"issues"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"issue_board.json"
}
},
"size"
:
{
"type"
:
"integer"
}
"size"
:
{
"type"
:
"integer"
},
"total_weight"
:
{
"type"
:
"integer"
}
},
"additionalProperties"
:
false
}
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