From 3811088db357cce26a6e3a5ec190d713fd4831d9 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Tue, 25 Nov 2025 13:46:14 -0500 Subject: [PATCH 1/2] Prioritize current user and assigned users in assignment dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/controllers/cards/assignments_controller.rb | 3 ++- app/views/cards/assignments/_user.html.erb | 7 +++++++ app/views/cards/assignments/new.html.erb | 12 +++--------- 3 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 app/views/cards/assignments/_user.html.erb diff --git a/app/controllers/cards/assignments_controller.rb b/app/controllers/cards/assignments_controller.rb index fdd2a86dc..886537fa1 100644 --- a/app/controllers/cards/assignments_controller.rb +++ b/app/controllers/cards/assignments_controller.rb @@ -2,7 +2,8 @@ class Cards::AssignmentsController < ApplicationController include CardScoped def new - @users = @board.users.active.alphabetically + @assigned_to = @card.assignees.active.alphabetically.where.not(id: Current.user) + @users = @board.users.active.alphabetically.where.not(id: @card.assignees).where.not(id: Current.user) fresh_when etag: [ @users, @card.assignees ] end diff --git a/app/views/cards/assignments/_user.html.erb b/app/views/cards/assignments/_user.html.erb new file mode 100644 index 000000000..4dad5a9f7 --- /dev/null +++ b/app/views/cards/assignments/_user.html.erb @@ -0,0 +1,7 @@ + diff --git a/app/views/cards/assignments/new.html.erb b/app/views/cards/assignments/new.html.erb index ee7f38c2d..cb690da23 100644 --- a/app/views/cards/assignments/new.html.erb +++ b/app/views/cards/assignments/new.html.erb @@ -15,15 +15,9 @@ type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %> <% end %> <% end %> From 3d429c1dea68b215b6d2189b95c77f18f9fe53e0 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Tue, 25 Nov 2025 13:19:33 -0600 Subject: [PATCH 2/2] Include full name string so you can type your name to filter --- app/views/cards/assignments/_user.html.erb | 1 + app/views/cards/assignments/new.html.erb | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/cards/assignments/_user.html.erb b/app/views/cards/assignments/_user.html.erb index 4dad5a9f7..0d4eff888 100644 --- a/app/views/cards/assignments/_user.html.erb +++ b/app/views/cards/assignments/_user.html.erb @@ -2,6 +2,7 @@ <%= button_to card_assignments_path(card, params: { assignee_id: user.id }), method: :post, class: "popup__btn btn", form_class: "max-width flex-item-grow" do %> <%= local_assigns.fetch(:user_label, user.name) %> + <%= yield if block_given? %> <%= icon_tag "check", size: 18, class: "checked flex-item-no-shrink flex-item-justify-end", style: "--icon-size: 1em" %> <% end %> diff --git a/app/views/cards/assignments/new.html.erb b/app/views/cards/assignments/new.html.erb index cb690da23..6692a53f0 100644 --- a/app/views/cards/assignments/new.html.erb +++ b/app/views/cards/assignments/new.html.erb @@ -15,7 +15,9 @@ type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %>