Puts updates behind hidden setting

This commit is contained in:
brrusselburg 2025-04-09 15:13:50 -05:00
parent d8888c4589
commit 6e36963645
3 changed files with 4 additions and 4 deletions

View File

@ -492,7 +492,7 @@ class ::Assigner
end
def small_action_username_or_name(assign_to)
if (assign_to.is_a?(User) && !SiteSetting.prioritize_username_in_ux) ||
if (assign_to.is_a?(User) && SiteSetting.prioritize_full_name_in_ux) ||
!assign_to.try(:username)
custom_fields = { "action_code_who" => assign_to.name || assign_to.username }
else

View File

@ -12,7 +12,7 @@ describe "Assign | Assigning posts", type: :system do
before do
skip "Tests are broken and need to be fixed. See https://github.com/discourse/discourse/actions/runs/13890376408/job/38861216842"
SiteSetting.assign_enabled = true
SiteSetting.prioritize_username_in_ux = true
SiteSetting.prioritize_username_in_ux = false
# The system tests in this file are flaky and auth token related so turning this on
SiteSetting.verbose_auth_token_logging = true
@ -61,7 +61,7 @@ describe "Assign | Assigning posts", type: :system do
end
context "when prioritize_full_name_in_ux setting is enabled" do
before { SiteSetting.prioritize_username_in_ux = false }
before { SiteSetting.prioritize_full_name_in_ux = true }
it "shows the user's name after assign" do
visit "/t/#{topic.id}"

View File

@ -50,7 +50,7 @@ describe "Assign | Assigning topics", type: :system do
end
context "when prioritize_full_name_in_ux setting is enabled" do
before { SiteSetting.prioritize_username_in_ux = false }
before { SiteSetting.prioritize_full_name_in_ux = true }
it "shows the user's name after assign" do
visit "/t/#{topic.id}"