From 01c818f5f4ee0310c85d3b6e30585cb6a594c7c2 Mon Sep 17 00:00:00 2001 From: Paul Clue <67766160+Paul-Clue@users.noreply.github.com> Date: Mon, 6 May 2024 12:08:34 -0700 Subject: [PATCH] fix: Correct sorting for the tester assignment menu, addresses #993 (#1067) * Fix tester menu sorting * Use localeCompare * Sort initial tester assign dropdown * Remove debugging code --------- Co-authored-by: Howard Edwards Co-authored-by: alflennik --- client/components/TestQueue/index.jsx | 4 +++- client/components/TestQueueRow/index.jsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/components/TestQueue/index.jsx b/client/components/TestQueue/index.jsx index da9f8a3fd..80b3745f1 100644 --- a/client/components/TestQueue/index.jsx +++ b/client/components/TestQueue/index.jsx @@ -114,7 +114,9 @@ const TestQueue = () => { + a.username.localeCompare(b.username) + )} testPlanReportData={testPlanReport} latestTestPlanVersions={ latestTestPlanVersions diff --git a/client/components/TestQueueRow/index.jsx b/client/components/TestQueueRow/index.jsx index 0c449fb90..208c32673 100644 --- a/client/components/TestQueueRow/index.jsx +++ b/client/components/TestQueueRow/index.jsx @@ -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 (