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
b15e84e7
Commit
b15e84e7
authored
May 02, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'multiple_assignees_review' into add-multiple-assignees-to-create-issue-page
parents
1402b79b
8bf5936d
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
50 additions
and
24 deletions
+50
-24
app/assets/javascripts/blob/template_selectors/template_selector.js
.../javascripts/blob/template_selectors/template_selector.js
+5
-2
app/assets/javascripts/boards/components/new_list_dropdown.js
...assets/javascripts/boards/components/new_list_dropdown.js
+3
-1
app/assets/javascripts/members.js
app/assets/javascripts/members.js
+3
-1
app/assets/javascripts/namespace_select.js
app/assets/javascripts/namespace_select.js
+2
-1
app/assets/javascripts/project.js
app/assets/javascripts/project.js
+2
-1
app/assets/javascripts/protected_branches/protected_branch_access_dropdown.js
...ts/protected_branches/protected_branch_access_dropdown.js
+4
-1
app/assets/javascripts/protected_branches/protected_branch_dropdown.js
...vascripts/protected_branches/protected_branch_dropdown.js
+2
-1
app/assets/javascripts/sidebar/components/assignees/assignees.js
...ets/javascripts/sidebar/components/assignees/assignees.js
+15
-8
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.js
...scripts/sidebar/components/assignees/sidebar_assignees.js
+1
-0
app/assets/javascripts/sidebar/stores/sidebar_store.js
app/assets/javascripts/sidebar/stores/sidebar_store.js
+1
-1
app/models/global_milestone.rb
app/models/global_milestone.rb
+1
-1
app/views/projects/boards/components/sidebar/_assignee.html.haml
...ws/projects/boards/components/sidebar/_assignee.html.haml
+1
-0
features/steps/dashboard/dashboard.rb
features/steps/dashboard/dashboard.rb
+1
-1
features/steps/group/milestones.rb
features/steps/group/milestones.rb
+2
-2
features/steps/groups.rb
features/steps/groups.rb
+2
-2
spec/controllers/projects/issues_controller_spec.rb
spec/controllers/projects/issues_controller_spec.rb
+1
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+4
-0
No files found.
app/assets/javascripts/blob/template_selectors/template_selector.js
View file @
b15e84e7
...
...
@@ -24,7 +24,7 @@ export default class TemplateSelector {
search
:
{
fields
:
[
'
name
'
],
},
clicked
:
(
item
,
el
,
e
)
=>
this
.
fetchFileTemplate
(
item
,
el
,
e
),
clicked
:
options
=>
this
.
fetchFileTemplate
(
options
),
text
:
item
=>
item
.
name
,
});
}
...
...
@@ -51,7 +51,10 @@ export default class TemplateSelector {
return
this
.
$dropdownContainer
.
removeClass
(
'
hidden
'
);
}
fetchFileTemplate
(
item
,
el
,
e
)
{
fetchFileTemplate
(
options
)
{
const
{
e
}
=
options
;
const
item
=
options
.
selectedObj
;
e
.
preventDefault
();
return
this
.
requestFile
(
item
);
}
...
...
app/assets/javascripts/boards/components/new_list_dropdown.js
View file @
b15e84e7
...
...
@@ -52,7 +52,9 @@
filterable
:
true
,
selectable
:
true
,
multiSelect
:
true
,
clicked
(
label
,
$el
,
e
)
{
clicked
(
options
)
{
const
{
e
}
=
options
;
const
label
=
options
.
selectedObj
;
e
.
preventDefault
();
if
(
!
Store
.
findList
(
'
title
'
,
label
.
title
))
{
...
...
app/assets/javascripts/members.js
View file @
b15e84e7
...
...
@@ -43,7 +43,9 @@
return
$el
.
text
();
},
clicked
:
(
selected
,
$link
)
=>
{
clicked
:
(
options
)
=>
{
const
$link
=
options
.
$el
;
if
(
!
$link
.
data
(
'
revert
'
))
{
this
.
formSubmit
(
null
,
$link
);
}
else
{
...
...
app/assets/javascripts/namespace_select.js
View file @
b15e84e7
...
...
@@ -58,7 +58,8 @@
});
}
NamespaceSelect
.
prototype
.
onSelectItem
=
function
(
item
,
el
,
e
)
{
NamespaceSelect
.
prototype
.
onSelectItem
=
function
(
options
)
{
const
{
e
}
=
options
;
return
e
.
preventDefault
();
};
...
...
app/assets/javascripts/project.js
View file @
b15e84e7
...
...
@@ -119,7 +119,8 @@ import Cookies from 'js-cookie';
toggleLabel
:
function
(
obj
,
$el
)
{
return
$el
.
text
().
trim
();
},
clicked
:
function
(
selected
,
$el
,
e
)
{
clicked
:
function
(
options
)
{
const
{
e
}
=
options
;
e
.
preventDefault
();
if
(
$
(
'
input[name="ref"]
'
).
length
)
{
var
$form
=
$dropdown
.
closest
(
'
form
'
);
...
...
app/assets/javascripts/protected_branches/protected_branch_access_dropdown.js
View file @
b15e84e7
...
...
@@ -53,7 +53,10 @@
onHide
();
}
},
clicked
(
item
,
$el
,
e
)
{
clicked
(
opts
)
{
const
{
$el
,
e
}
=
opts
;
const
item
=
opts
.
selectedObj
;
e
.
preventDefault
();
if
(
$el
.
is
(
'
.is-active
'
))
{
...
...
app/assets/javascripts/protected_branches/protected_branch_dropdown.js
View file @
b15e84e7
...
...
@@ -35,7 +35,8 @@ class ProtectedBranchDropdown {
return
_
.
escape
(
protectedBranch
.
id
);
},
onFilter
:
this
.
toggleCreateNewButton
.
bind
(
this
),
clicked
:
(
item
,
$el
,
e
)
=>
{
clicked
:
(
options
)
=>
{
const
{
$el
,
e
}
=
options
;
e
.
preventDefault
();
this
.
onSelect
();
}
...
...
app/assets/javascripts/sidebar/components/assignees/assignees.js
View file @
b15e84e7
...
...
@@ -16,6 +16,10 @@ export default {
type
:
Array
,
required
:
true
,
},
editable
:
{
type
:
Boolean
,
required
:
true
,
},
},
computed
:
{
firstUser
()
{
...
...
@@ -142,14 +146,17 @@ export default {
<div class="value hide-collapsed">
<template v-if="hasNoUsers">
<span class="assign-yourself no-value">
No assignee -
<button
type="button"
class="btn-link"
@click="assignSelf"
>
assign yourself
</button>
No assignee
<template v-if="editable">
-
<button
type="button"
class="btn-link"
@click="assignSelf"
>
assign yourself
</button>
</template>
</span>
</template>
<template v-else-if="hasOneUser">
...
...
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.js
View file @
b15e84e7
...
...
@@ -76,6 +76,7 @@ export default {
class="value"
:root-path="store.rootPath"
:users="store.assignees"
:editable="store.editable"
@assign-self="assignSelf"
/>
</div>
...
...
app/assets/javascripts/sidebar/stores/sidebar_store.js
View file @
b15e84e7
...
...
@@ -27,7 +27,7 @@ export default class SidebarStore {
this
.
timeEstimate
=
data
.
time_estimate
;
this
.
totalTimeSpent
=
data
.
total_time_spent
;
this
.
humanTimeEstimate
=
data
.
human_time_estimate
;
this
.
humanT
imeSpent
=
data
.
human
_time_spent
;
this
.
humanT
otalTimeSpent
=
data
.
human_total
_time_spent
;
}
addAssignee
(
assignee
)
{
...
...
app/models/global_milestone.rb
View file @
b15e84e7
...
...
@@ -86,7 +86,7 @@ class GlobalMilestone
end
def
issues
@issues
||=
Issue
.
of_milestones
(
milestoneish_ids
).
includes
(
:project
,
:assignee
,
:labels
)
@issues
||=
Issue
.
of_milestones
(
milestoneish_ids
).
includes
(
:project
,
:assignee
s
,
:labels
)
end
def
merge_requests
...
...
app/views/projects/boards/components/sidebar/_assignee.html.haml
View file @
b15e84e7
...
...
@@ -5,6 +5,7 @@
":editable"
=>
can?
(
current_user
,
:admin_issue
,
@project
)
}
%assignees
.value
{
"root-path"
=>
"#{root_url}"
,
":users"
=>
"issue.assignees"
,
":editable"
=>
can?
(
current_user
,
:admin_issue
,
@project
),
"@assign-self"
=>
"assignSelf"
}
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
...
...
features/steps/dashboard/dashboard.rb
View file @
b15e84e7
...
...
@@ -77,7 +77,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
step
'project "Shop" has issue "Bugfix1" with label "feature"'
do
project
=
Project
.
find_by
(
name:
"Shop"
)
issue
=
create
(
:issue
,
title:
"Bugfix1"
,
project:
project
,
assignee
:
current_user
)
issue
=
create
(
:issue
,
title:
"Bugfix1"
,
project:
project
,
assignee
s:
[
current_user
]
)
issue
.
labels
<<
project
.
labels
.
find_by
(
title:
'feature'
)
end
end
features/steps/group/milestones.rb
View file @
b15e84e7
...
...
@@ -110,7 +110,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
create
:issue
,
project:
project
,
assignee
:
current_user
,
assignee
s:
[
current_user
]
,
author:
current_user
,
milestone:
milestone
...
...
@@ -122,7 +122,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
issue
=
create
:issue
,
project:
project
,
assignee
:
current_user
,
assignee
s:
[
current_user
]
,
author:
current_user
,
milestone:
milestone
...
...
features/steps/groups.rb
View file @
b15e84e7
...
...
@@ -61,7 +61,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
step
'project from group "Owned" has issues assigned to me'
do
create
:issue
,
project:
project
,
assignee
:
current_user
,
assignee
s:
[
current_user
]
,
author:
current_user
end
...
...
@@ -168,7 +168,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
step
'the archived project have some issues'
do
create
:issue
,
project:
@archived_project
,
assignee
:
current_user
,
assignee
s:
[
current_user
]
,
author:
current_user
end
...
...
spec/controllers/projects/issues_controller_spec.rb
View file @
b15e84e7
...
...
@@ -166,7 +166,7 @@ describe Projects::IssuesController do
body
=
JSON
.
parse
(
response
.
body
)
expect
(
body
[
'assignees'
].
first
.
keys
)
.
to
match_array
(
%w(name username avatar_url)
)
.
to
match_array
(
%w(
id
name username avatar_url)
)
end
end
...
...
spec/features/issues_spec.rb
View file @
b15e84e7
...
...
@@ -437,9 +437,13 @@ describe 'Issues', feature: true do
click_link
'Edit'
click_link
'Unassigned'
first
(
'.title'
).
click
expect
(
page
).
to
have_content
'No assignee'
end
# wait_for_ajax does not work with vue-resource at the moment
sleep
1
expect
(
issue
.
reload
.
assignees
).
to
be_empty
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