This repository was archived by the owner on Jul 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +13
-12
lines changed
assets/javascripts/discourse Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export default class AssignedToPost extends Component {
1212 @service siteSettings;
1313
1414 get nameOrUsername () {
15- if (! this .siteSettings .prioritize_username_in_ux ) {
15+ if (this .siteSettings .prioritize_full_name_in_ux ) {
1616 return this .args .assignedToUser .name || this .args .assignedToUser .username ;
1717 } else {
1818 return this .args .assignedToUser .username ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export default {
7575 content . push (
7676 unassignFromTopicButton (
7777 this . topic ,
78- this . siteSettings . prioritize_username_in_ux
78+ this . siteSettings . prioritize_full_name_in_ux
7979 )
8080 ) ;
8181 }
@@ -136,11 +136,11 @@ function reassignToSelfButton() {
136136 } ;
137137}
138138
139- function unassignFromTopicButton ( topic , prioritize_username_in_ux ) {
139+ function unassignFromTopicButton ( topic , prioritize_full_name_in_ux ) {
140140 let username =
141141 topic . assigned_to_user ?. username || topic . assigned_to_group ?. name ;
142142
143- if ( topic . assigned_to_user && ! prioritize_username_in_ux ) {
143+ if ( topic . assigned_to_user && prioritize_full_name_in_ux ) {
144144 username = topic . assigned_to_user ?. name || topic . assigned_to_user ?. username ;
145145 }
146146
Original file line number Diff line number Diff line change @@ -478,8 +478,9 @@ function initialize(api) {
478478 }
479479
480480 const icon = iconHTML ( assignee . username ? "user-plus" : "group-plus" ) ;
481+ const showNameInUx = siteSettings . prioritize_full_name_in_ux ;
481482 const name =
482- ! siteSettings . prioritize_username_in_ux || ! assignee . username
483+ showNameInUx || ! assignee . username
483484 ? assignee . name || assignee . username
484485 : assignee . username ;
485486
@@ -556,7 +557,7 @@ function initialize(api) {
556557
557558 let displayedName = "" ;
558559 if ( assignedToUser ) {
559- displayedName = ! this . siteSettings . prioritize_username_in_ux
560+ displayedName = this . siteSettings . prioritize_full_name_in_ux
560561 ? assignedToUser . name || assignedToUser . username
561562 : assignedToUser . username ;
562563
@@ -594,7 +595,7 @@ function initialize(api) {
594595 const postNumber = indirectlyAssignedTo [ postId ] . post_number ;
595596
596597 displayedName =
597- ! this . siteSettings . prioritize_username_in_ux || ! assignee . username
598+ this . siteSettings . prioritize_full_name_in_ux || ! assignee . username
598599 ? assignee . name || assignee . username
599600 : assignee . username ;
600601
Original file line number Diff line number Diff line change @@ -492,7 +492,7 @@ def queue_notification(assignment)
492492 end
493493
494494 def small_action_username_or_name ( assign_to )
495- if ( assign_to . is_a? ( User ) && ! SiteSetting . prioritize_username_in_ux ) ||
495+ if ( assign_to . is_a? ( User ) && SiteSetting . prioritize_full_name_in_ux ) ||
496496 !assign_to . try ( :username )
497497 custom_fields = { "action_code_who" => assign_to . name || assign_to . username }
498498 else
Original file line number Diff line number Diff line change 1212 before do
1313 skip "Tests are broken and need to be fixed. See https://github.com/discourse/discourse/actions/runs/13890376408/job/38861216842"
1414 SiteSetting . assign_enabled = true
15- SiteSetting . prioritize_username_in_ux = true
15+ SiteSetting . prioritize_full_name_in_ux = false
1616 # The system tests in this file are flaky and auth token related so turning this on
1717 SiteSetting . verbose_auth_token_logging = true
1818
@@ -61,7 +61,7 @@ def assign_post(post, assignee)
6161 end
6262
6363 context "when prioritize_full_name_in_ux setting is enabled" do
64- before { SiteSetting . prioritize_username_in_ux = false }
64+ before { SiteSetting . prioritize_full_name_in_ux = true }
6565
6666 it "shows the user's name after assign" do
6767 visit "/t/#{ topic . id } "
Original file line number Diff line number Diff line change 1010
1111 before do
1212 SiteSetting . assign_enabled = true
13-
13+ SiteSetting . prioritize_full_name_in_ux = false
1414 # The system tests in this file are flaky and auth token related so turning this on
1515 SiteSetting . verbose_auth_token_logging = true
1616
5050 end
5151
5252 context "when prioritize_full_name_in_ux setting is enabled" do
53- before { SiteSetting . prioritize_username_in_ux = false }
53+ before { SiteSetting . prioritize_full_name_in_ux = true }
5454
5555 it "shows the user's name after assign" do
5656 visit "/t/#{ topic . id } "
You can’t perform that action at this time.
0 commit comments