This repository was archived by the owner on Jul 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
assets/javascripts/discourse Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,15 @@ export default class AssignActionsDropdown extends DropdownSelectBoxComponent {
4040 Object . entries ( this . topic . indirectly_assigned_to ) . forEach ( ( entry ) => {
4141 const [ postId , assignment_map ] = entry ;
4242 const assignee = assignment_map . assigned_to ;
43+ console . log ( "!!!!!!!!!!!!!!!!!!!" ) ;
4344 options = options . concat ( {
4445 id : `unassign_post_${ postId } ` ,
4546 icon : assignee . username ? "user-xmark" : "group-times" ,
4647 name : i18n ( "discourse_assign.unassign_post.title" ) ,
4748 description : i18n ( "discourse_assign.unassign_post.help" , {
48- username : assignee . username || assignee . name ,
49+ username : ! siteSettings . prioritize_full_name_in_ux
50+ ? assignee . username
51+ : assignee . name ,
4952 } ) ,
5053 } ) ;
5154 } ) ;
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ const DEPENDENT_KEYS = [
2929 "topic.assigned_to_group" ,
3030 "currentUser.can_assign" ,
3131 "topic.assigned_to_user.username" ,
32+ "topic.assigned_to_user.name" ,
3233] ;
3334
3435function defaultTitle ( topic ) {
@@ -477,12 +478,16 @@ function initialize(api) {
477478 assignedPath = `/t/${ topic . id } ` ;
478479 }
479480 const icon = iconHTML ( assignee . username ? "user-plus" : "group-plus" ) ;
480- const name = assignee . username || assignee . name ;
481481 const tagName = params . tagName || "a" ;
482482 const href =
483483 tagName === "a"
484484 ? `href="${ getURL ( assignedPath ) } " data-auto-route="true"`
485485 : "" ;
486+
487+ const name = ! siteSettings . prioritize_full_name_in_ux
488+ ? assignee . username
489+ : assignee . name ;
490+
486491 return `<${ tagName } class="assigned-to discourse-tag simple" ${ href } >${ icon } <span title="${ escapeExpression (
487492 note
488493 ) } ">${ name } </span></${ tagName } >`;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export class Assignment extends EmberObject {
66 const assignment = new Assignment ( ) ;
77 assignment . id = 0 ;
88 assignment . username = topic . assigned_to_user ?. username ;
9+ assignment . name = topic . assigned_to_user ?. name ;
910 assignment . groupName = topic . assigned_to_group ?. name ;
1011 assignment . status = topic . assignment_status ;
1112 assignment . note = topic . assignment_note ;
@@ -17,6 +18,7 @@ export class Assignment extends EmberObject {
1718 static fromPost ( post ) {
1819 const assignment = new Assignment ( ) ;
1920 assignment . username = post . assigned_to . username ;
21+ assignment . name = post . assigned_to . name ;
2022 assignment . groupName = post . assigned_to . name ;
2123 assignment . status = post . assignment_status ;
2224 assignment . note = post . assignment_note ;
@@ -31,6 +33,7 @@ export class Assignment extends EmberObject {
3133 // and models from server, that's why we have to call it "group_name" now
3234 @tracked group_name ;
3335 @tracked username ;
36+ @tracked name ;
3437 @tracked status ;
3538 @tracked note ;
3639 targetId ;
You can’t perform that action at this time.
0 commit comments