Skip to content

Commit

Permalink
fix: Correct sorting for the tester assignment menu, addresses #993 (#…
Browse files Browse the repository at this point in the history
…1067)

* Fix tester menu sorting

* Use localeCompare

* Sort initial tester assign dropdown

* Remove debugging code

---------

Co-authored-by: Howard Edwards <howarde.edwards@gmail.com>
Co-authored-by: alflennik <alflennik@users.noreply.github.com>
  • Loading branch information
3 people authored May 6, 2024
1 parent b8cefcd commit 01c818f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client/components/TestQueue/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ const TestQueue = () => {
<TestQueueRow
key={key}
user={auth}
testers={testers}
testers={testers.sort((a, b) =>
a.username.localeCompare(b.username)
)}
testPlanReportData={testPlanReport}
latestTestPlanVersions={
latestTestPlanVersions
Expand Down
2 changes: 1 addition & 1 deletion client/components/TestQueueRow/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ const TestQueueRow = ({
{draftTestPlanRuns
.slice() // because array was frozen
.sort((a, b) =>
a.tester.username < b.tester.username ? -1 : 1
a.tester.username.localeCompare(b.tester.username)
)
.map(({ tester }) => {
return (
Expand Down

0 comments on commit 01c818f

Please sign in to comment.