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 +7
-9
lines changed
assets/javascripts/discourse Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,12 @@ 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 ( "!!!!!!!!!!!!!!!!!!!" ) ;
4443 options = options . concat ( {
4544 id : `unassign_post_${ postId } ` ,
4645 icon : assignee . username ? "user-xmark" : "group-times" ,
4746 name : i18n ( "discourse_assign.unassign_post.title" ) ,
4847 description : i18n ( "discourse_assign.unassign_post.help" , {
49- username : ! siteSettings . prioritize_full_name_in_ux
50- ? assignee . username
51- : assignee . name ,
48+ username : assignee . username || assignee . name ,
5249 } ) ,
5350 } ) ;
5451 } ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import DMenu from "float-kit/components/d-menu";
99
1010export default class AssignedToPost extends Component {
1111 @service taskActions;
12+ @service siteSettings;
1213
1314 @action
1415 unassign () {
Original file line number Diff line number Diff line change @@ -484,10 +484,6 @@ function initialize(api) {
484484 ? `href="${ getURL ( assignedPath ) } " data-auto-route="true"`
485485 : "" ;
486486
487- const name = ! siteSettings . prioritize_full_name_in_ux
488- ? assignee . username
489- : assignee . name ;
490-
491487 return `<${ tagName } class="assigned-to discourse-tag simple" ${ href } >${ icon } <span title="${ escapeExpression (
492488 note
493489 ) } ">${ name } </span></${ tagName } >`;
@@ -524,6 +520,10 @@ function initialize(api) {
524520 ] ;
525521 const assigneeElements = [ ] ;
526522
523+ const nameOrUsername = siteSettings . prioritize_full_name_in_ux
524+ ? assignedToUser . name
525+ : assignedToUser . username ;
526+
527527 const assignedHtml = ( username , path , type ) => {
528528 return `<span class="assigned-to--${ type } ">${ htmlSafe (
529529 i18n ( "discourse_assign.assigned_topic_to" , {
@@ -539,7 +539,7 @@ function initialize(api) {
539539 "span.assignee" ,
540540 new RawHtml ( {
541541 html : assignedHtml (
542- assignedToUser . username ,
542+ nameOrUsername ,
543543 assignedToUserPath ( assignedToUser ) ,
544544 "user"
545545 ) ,
You can’t perform that action at this time.
0 commit comments