Commit 9a273dbe authored by Douwe Maan's avatar Douwe Maan

Merge branch 'issue-2831' into 'master'

Fix Assignee selector when 'Unassigned' #2831

Fixes #2831 

![Screen_Shot_2015-11-21_at_12.04.42_AM](/uploads/e3cb98ff805366805f4a989d927e3f10/Screen_Shot_2015-11-21_at_12.04.42_AM.png)


See merge request !1860
parents 732c2d15 be045553
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 8.3.0 (unreleased) v 8.3.0 (unreleased)
- Fix: Assignee selector is empty when 'Unassigned' is selected (Jose Corcuera)
v 8.2.0 v 8.2.0
- Improved performance of finding projects and groups in various places - Improved performance of finding projects and groups in various places
......
...@@ -58,11 +58,8 @@ class @UsersSelect ...@@ -58,11 +58,8 @@ class @UsersSelect
query.callback(data) query.callback(data)
initSelection: (element, callback) => initSelection: (args...) =>
id = $(element).val() @initSelection(args...)
if id != "" && id != "0"
@user(id, callback)
formatResult: (args...) => formatResult: (args...) =>
@formatResult(args...) @formatResult(args...)
formatSelection: (args...) => formatSelection: (args...) =>
...@@ -71,6 +68,14 @@ class @UsersSelect ...@@ -71,6 +68,14 @@ class @UsersSelect
escapeMarkup: (m) -> # we do not want to escape markup since we are displaying html in results escapeMarkup: (m) -> # we do not want to escape markup since we are displaying html in results
m m
initSelection: (element, callback) ->
id = $(element).val()
if id == "0"
nullUser = { name: 'Unassigned' }
callback(nullUser)
else if id != ""
@user(id, callback)
formatResult: (user) -> formatResult: (user) ->
if user.avatar_url if user.avatar_url
avatar = user.avatar_url avatar = user.avatar_url
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment