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
ffc1137e
Commit
ffc1137e
authored
Sep 28, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include author and assignee from board config
parent
83941288
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
45 deletions
+43
-45
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+15
-19
app/assets/javascripts/boards/components/board_form.vue
app/assets/javascripts/boards/components/board_form.vue
+10
-0
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+9
-12
app/assets/javascripts/filtered_search/filtered_search_visual_tokens.js
...ascripts/filtered_search/filtered_search_visual_tokens.js
+3
-12
app/helpers/boards_helper.rb
app/helpers/boards_helper.rb
+4
-2
ee/app/helpers/ee/boards_helper.rb
ee/app/helpers/ee/boards_helper.rb
+2
-0
No files found.
app/assets/javascripts/boards/boards_bundle.js
View file @
ffc1137e
...
...
@@ -70,7 +70,10 @@ $(() => {
detailIssue
:
Store
.
detail
,
milestoneTitle
:
$boardApp
.
dataset
.
boardMilestoneTitle
,
weight
:
$boardApp
.
dataset
.
boardWeight
,
authorUsername
:
$boardApp
.
dataset
.
boardAuthorUsername
,
assigneeUsername
:
$boardApp
.
dataset
.
boardAssigneeUsername
,
defaultAvatar
:
$boardApp
.
dataset
.
defaultAvatar
,
cantEdit
:
[],
},
computed
:
{
detailIssueVisible
()
{
...
...
@@ -78,26 +81,19 @@ $(() => {
},
},
created
()
{
const
cantEdit
=
[];
if
(
this
.
milestoneTitle
)
{
const
milestoneTitleParam
=
`milestone_title=
${
this
.
milestoneTitle
}
`
;
Store
.
filter
.
path
=
[
milestoneTitleParam
].
concat
(
Store
.
filter
.
path
.
split
(
'
&
'
).
filter
(
param
=>
param
.
match
(
/^milestone_title=
(
.*
)
$/g
)
===
null
)
).
join
(
'
&
'
);
cantEdit
.
push
(
'
milestone
'
);
}
if
(
this
.
weight
)
{
const
weightParam
=
`weight=
${
this
.
weight
}
`
;
Store
.
filter
.
path
=
[
weightParam
].
concat
(
Store
.
filter
.
path
.
split
(
'
&
'
).
filter
(
param
=>
param
.
match
(
/^weight=
(
.*
)
$/g
)
===
null
)
const
updateFilterPath
=
(
key
,
value
,
tokenName
)
=>
{
if
(
!
value
)
return
;
const
querystring
=
`
${
key
}
=
${
value
}
`
;
Store
.
filter
.
path
=
[
querystring
].
concat
(
Store
.
filter
.
path
.
split
(
'
&
'
).
filter
(
param
=>
param
.
match
(
new
RegExp
(
`^
${
key
}
=(.*)$`
,
'
g
'
))
===
null
)
).
join
(
'
&
'
);
this
.
cantEdit
.
push
(
tokenName
);
};
cantEdit
.
push
(
'
weight
'
);
}
updateFilterPath
(
'
milestone_title
'
,
this
.
milestoneTitle
,
'
milestone
'
);
updateFilterPath
(
'
weight
'
,
this
.
weight
,
'
weight
'
);
updateFilterPath
(
'
author_username
'
,
this
.
authorUsername
,
'
author
'
);
updateFilterPath
(
'
assignee_username
'
,
this
.
assigneeUsername
,
'
assignee
'
);
Store
.
updateFiltersUrl
(
true
);
...
...
@@ -109,7 +105,7 @@ $(() => {
});
Store
.
rootPath
=
this
.
boardsEndpoint
;
this
.
filterManager
=
new
FilteredSearchBoards
(
Store
.
filter
,
true
,
cantEdit
);
this
.
filterManager
=
new
FilteredSearchBoards
(
Store
.
filter
,
true
,
this
.
cantEdit
);
this
.
filterManager
.
setup
();
// Listen for updateTokens event
...
...
app/assets/javascripts/boards/components/board_form.vue
View file @
ffc1137e
...
...
@@ -80,6 +80,16 @@
/>
</form-block>
<form-block>
<div>
Author
</div>
<input
v-model=
"board.author_id"
/>
</form-block>
<form-block>
<div>
Assignee
</div>
<input
v-model=
"board.assignee_id"
/>
</form-block>
<form-block
title=
"Weight"
defaultText=
"Any weight"
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
ffc1137e
...
...
@@ -46,18 +46,15 @@ gl.issueBoards.BoardsStore = {
this
.
state
.
reload
=
false
;
this
.
state
.
currentPage
=
page
;
},
updateBoardConfig
({
name
,
id
,
milestone
,
milestone_id
,
labels
=
[],
})
{
this
.
boardConfig
.
name
=
name
;
this
.
boardConfig
.
milestone
=
milestone
;
this
.
boardConfig
.
milestone_id
=
milestone_id
;
this
.
boardConfig
.
id
=
id
;
this
.
boardConfig
.
labels
=
labels
;
updateBoardConfig
(
board
)
{
this
.
boardConfig
.
name
=
board
.
name
;
this
.
boardConfig
.
milestone
=
board
.
milestone
;
this
.
boardConfig
.
milestone_id
=
board
.
milestone_id
;
this
.
boardConfig
.
id
=
board
.
id
;
this
.
boardConfig
.
weight
=
board
.
weight
;
this
.
boardConfig
.
labels
=
board
.
labels
||
[];
this
.
boardConfig
.
author_id
=
board
.
author_id
;
this
.
boardConfig
.
assignee_id
=
board
.
assignee_id
;
},
addList
(
listObj
,
defaultAvatar
)
{
const
list
=
new
List
(
listObj
,
defaultAvatar
);
...
...
app/assets/javascripts/filtered_search/filtered_search_visual_tokens.js
View file @
ffc1137e
...
...
@@ -38,23 +38,14 @@ class FilteredSearchVisualTokens {
}
static
createVisualTokenElementHTML
(
canEdit
=
true
)
{
if
(
!
canEdit
)
return
''
;
let
removeTokenMarkup
=
''
;
if
(
canEdit
)
{
removeTokenMarkup
=
`
<div class="remove-token" role="button">
<i class="fa fa-close"></i>
</div>
`
;
}
return
`
<div class="selectable" role="button"
${
canEdit
?
''
:
'
style="display: none;"
'
}
>
<div class="name"></div>
<div class="value-container">
<div class="value"></div>
${
removeTokenMarkup
}
<div class="remove-token" role="button">
<i class="fa fa-close"></i>
</div>
</div>
</div>
`
;
...
...
app/helpers/boards_helper.rb
View file @
ffc1137e
...
...
@@ -26,9 +26,11 @@ module BoardsHelper
board
=
@board
||
@boards
.
first
board
.
to_json
(
only:
[
:id
,
:name
,
:milestone_id
],
only:
[
:id
,
:name
,
:milestone_id
,
:author_id
,
:assignee_id
,
:weight
],
include:
{
milestone:
{
only:
[
:title
]
}
milestone:
{
only:
[
:title
]
},
author:
{
only:
[
:name
,
:username
],
methods:
[
:avatar_url
]
},
assignee:
{
only:
[
:name
,
:username
],
methods:
[
:avatar_url
]
}
}
)
end
...
...
ee/app/helpers/ee/boards_helper.rb
View file @
ffc1137e
...
...
@@ -7,6 +7,8 @@ module EE
def
board_data
data
=
{
board_milestone_title:
board
&
.
milestone
&
.
title
,
board_author_username:
board
&
.
author
&
.
username
,
board_assignee_username:
board
&
.
assignee
&
.
username
,
board_weight:
board
&
.
weight
,
focus_mode_available:
parent
.
feature_available?
(
:issue_board_focus_mode
).
to_s
,
show_promotion:
(
@project
&&
show_promotions?
&&
(
!
@project
.
feature_available?
(
:multiple_issue_boards
)
||
!
@project
.
feature_available?
(
:scoped_issue_board
)
||
!
@project
.
feature_available?
(
:issue_board_focus_mode
))).
to_s
...
...
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