@zeniai/client-epic-state 4.20.0-beta16RR → 4.20.0-beta17RR
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -61,15 +61,15 @@ const getTasksWithUserDetails = ({ taskListState, taskState, userState, userRole
|
|
|
61
61
|
const assigneeUsers = task.assignees
|
|
62
62
|
.map((userId) => getUserAndUserRole(userState, userRoleState, addressState, userId))
|
|
63
63
|
.filter((value) => value != null);
|
|
64
|
-
// Compute sort name matching display order:
|
|
64
|
+
// Compute sort name matching display order: users first, then groups
|
|
65
|
+
const firstUser = assigneeUsers[0]?.user;
|
|
66
|
+
const firstUserName = getUserName(firstUser) || firstUser?.email || '';
|
|
65
67
|
const firstGroupName = task.groupAssignees.length > 0
|
|
66
68
|
? task.groupAssignees
|
|
67
69
|
.map((gId) => userGroupsState.userGroupByUserGroupId[gId]?.name ?? '')
|
|
68
70
|
.find((name) => name !== '')
|
|
69
71
|
: undefined;
|
|
70
|
-
const
|
|
71
|
-
const firstUserName = getUserName(firstUser) || firstUser?.email || '';
|
|
72
|
-
const firstAssigneeSortName = (firstGroupName ?? firstUserName).toLowerCase();
|
|
72
|
+
const firstAssigneeSortName = (firstUserName || firstGroupName || '').toLowerCase();
|
|
73
73
|
return { ...task, assigneeUsers, firstAssigneeSortName };
|
|
74
74
|
}
|
|
75
75
|
return undefined;
|