summaryrefslogtreecommitdiff
path: root/app/helpers/issuables_helper.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-04-19 15:58:20 +0100
committerPhil Hughes <me@iamphill.com>2016-05-26 10:04:17 +0100
commitbc0666b3c906c990c1a10efc4b0acc73281ea533 (patch)
tree45e399b429dba60cd2de1a8c4d0d87baf79a09f2 /app/helpers/issuables_helper.rb
parentadc64e4583dc42399f681a9b17490f98b8c4bec0 (diff)
downloadgitlab-ce-bc0666b3c906c990c1a10efc4b0acc73281ea533.tar.gz
Filter issuables by any user
Closes #2836
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r--app/helpers/issuables_helper.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 39474217286..a7a6657b948 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -50,14 +50,10 @@ module IssuablesHelper
end
def user_dropdown_label(user_id, default_label)
+ return default_label if user_id.nil?
return "Unassigned" if user_id == "0"
- if @project
- member = @project.team.find_member(user_id)
- user = member.user if member
- else
- user = User.find_by(id: user_id)
- end
+ user = User.find_by(id: user_id)
if user
user.name