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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-ce
Commits
515e9d51
Commit
515e9d51
authored
Mar 24, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure issue assignee is properly reset.
parent
2953e0d1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
20 deletions
+12
-20
app/assets/javascripts/project_users_select.js.coffee
app/assets/javascripts/project_users_select.js.coffee
+2
-5
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+1
-12
app/services/issues/bulk_update_service.rb
app/services/issues/bulk_update_service.rb
+3
-3
app/services/issues/update_service.rb
app/services/issues/update_service.rb
+3
-0
app/services/merge_requests/update_service.rb
app/services/merge_requests/update_service.rb
+3
-0
No files found.
app/assets/javascripts/project_users_select.js.coffee
View file @
515e9d51
...
...
@@ -25,7 +25,7 @@ class @ProjectUsersSelect
initSelection
:
(
element
,
callback
)
->
id
=
$
(
element
).
val
()
if
id
isnt
"
"
if
id
!=
""
&&
id
!=
"-1
"
Api
.
user
(
id
,
callback
)
...
...
@@ -44,10 +44,7 @@ class @ProjectUsersSelect
else
avatar
=
gon
.
default_avatar_url
if
user
.
id
==
''
avatarMarkup
=
''
else
avatarMarkup
=
"<div class='user-image'><img class='avatar s24' src='
#{
avatar
}
'></div>"
avatarMarkup
=
"<div class='user-image'><img class='avatar s24' src='
#{
avatar
}
'></div>"
"<div class='user-result'>
#{
avatarMarkup
}
...
...
app/helpers/issues_helper.rb
View file @
515e9d51
...
...
@@ -58,22 +58,11 @@ module IssuesHelper
end
def
bulk_update_milestone_options
options_for_select
([
'None (backlog)'
])
+
options_for_select
([
[
'None (backlog)'
,
-
1
]
])
+
options_from_collection_for_select
(
project_active_milestones
,
'id'
,
'title'
,
params
[
:milestone_id
])
end
def
bulk_update_assignee_options
(
project
=
@project
)
options_for_select
([
'None (unassigned)'
])
+
options_from_collection_for_select
(
project
.
team
.
members
,
'id'
,
'name'
,
params
[
:assignee_id
])
end
def
assignee_options
(
object
,
project
=
@project
)
options_from_collection_for_select
(
project
.
team
.
members
.
sort_by
(
&
:name
),
'id'
,
'name'
,
object
.
assignee_id
)
end
def
milestone_options
(
object
)
options_from_collection_for_select
(
object
.
project
.
milestones
.
active
,
'id'
,
'title'
,
object
.
milestone_id
)
...
...
app/services/issues/bulk_update_service.rb
View file @
515e9d51
...
...
@@ -4,9 +4,9 @@ module Issues
issues_ids
=
params
.
delete
(
:issues_ids
).
split
(
","
)
issue_params
=
params
issue_params
.
delete
(
:state_event
)
unless
issue_params
[
:state_event
].
present?
issue_params
.
delete
(
:milestone_id
)
unless
issue_params
[
:milestone_id
].
present?
issue_params
.
delete
(
:assignee_id
)
unless
issue_params
[
:assignee_id
].
present?
issue_params
.
delete
(
:state_event
)
unless
issue_params
[
:state_event
].
present?
issue_params
.
delete
(
:milestone_id
)
unless
issue_params
[
:milestone_id
].
present?
issue_params
.
delete
(
:assignee_id
)
unless
issue_params
[
:assignee_id
].
present?
issues
=
Issue
.
where
(
id:
issues_ids
)
issues
.
each
do
|
issue
|
...
...
app/services/issues/update_service.rb
View file @
515e9d51
...
...
@@ -14,6 +14,9 @@ module Issues
issue
.
update_nth_task
(
params
[
:task_num
].
to_i
,
false
)
end
params
[
:assignee_id
]
=
""
if
params
[
:assignee_id
]
==
"-1"
params
[
:milestone_id
]
=
""
if
params
[
:milestone_id
]
==
"-1"
old_labels
=
issue
.
labels
.
to_a
if
params
.
present?
&&
issue
.
update_attributes
(
params
.
except
(
:state_event
,
...
...
app/services/merge_requests/update_service.rb
View file @
515e9d51
...
...
@@ -23,6 +23,9 @@ module MergeRequests
merge_request
.
update_nth_task
(
params
[
:task_num
].
to_i
,
false
)
end
params
[
:assignee_id
]
=
""
if
params
[
:assignee_id
]
==
"-1"
params
[
:milestone_id
]
=
""
if
params
[
:milestone_id
]
==
"-1"
old_labels
=
merge_request
.
labels
.
to_a
if
params
.
present?
&&
merge_request
.
update_attributes
(
...
...
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