You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expense-Rate list doesn't sorts rates by creation order (first created appears first) #72374
Version Number: V9.2.29-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#71529 Email or phone of affected tester (no customers): Slottwo1 ployee@gmail.com Issue reported by: Applause Internal Team Device used: Redminote 10s android 13 phone App Component: Money Requests
Action Performed:
Launch app
Go to workspace settings
Enable distance rate and create few custom distance rates (example for name of distance rates : Z, zh, zz , A, G, B)
Note the distance rates sorted in ascending order by name
Go to workspace chat
Create a distance expense
Go to distance rate and add a rate
Open the distance expense
Open rate field
Note the distance rates sorted in ascending order by name
Expected Result:
Step 4 and 9 : rate list sorts rates by creation order (first created appears first)
in production
Step 4 : the distance rates sorted in ascending order by name
Step 9 : rate list sorts rates by creation order (first created appears first)
Actual Result:
Step 4 and 9 : the distance rates sorted in ascending order by name
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
We sort the rate alphabetically based on the rate name on both PolicyDistanceRatesPage (workspace settings) and IOURequestStepDistanceRate (expense rate picker). We additionally sort the rate on IOURequestStepDistanceRate to fix a different issue where rates appeared in random order after clearing cache and restarting the app
Currently, we don't have any field from backend to define the default rate or which rate is created first. We cannot maintain creation order after cache clears because rates is stored as an object (Record<string, Rate>), and object property iteration order is not guaranteed to match the original array order from the backend. I think backend should add explicit fields like createdAt, sortOrder or isDefault to maintain the rate order. Ref to this and this comment for more context
Activity
melvin-bot commentedon Oct 11, 2025
Triggered auto assignment to @heyjennahay (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.melvin-bot commentedon Oct 11, 2025
Triggered auto assignment to @cead22 (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Oct 11, 2025
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 11, 2025
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
mitarachim commentedon Oct 11, 2025
in production
Step 4 : the distance rates sorted in ascending order by name
Step 9 : rate list sorts rates by creation order (first created appears first)
This is video while reproduce issue in Production :
Screen.Recording.2025-10-11.at.10.57.28.AM.mov
nyomanjyotisa commentedon Oct 11, 2025
This has a similar RCA to this issue
We sort the rate alphabetically based on the rate name on both
PolicyDistanceRatesPage(workspace settings) andIOURequestStepDistanceRate(expense rate picker). We additionally sort the rate onIOURequestStepDistanceRateto fix a different issue where rates appeared in random order after clearing cache and restarting the appCurrently, we don't have any field from backend to define the default rate or which rate is created first. We cannot maintain creation order after cache clears because
ratesis stored as an object (Record<string, Rate>), and object property iteration order is not guaranteed to match the original array order from the backend. I think backend should add explicit fields likecreatedAt,sortOrderorisDefaultto maintain the rate order. Ref to this and this comment for more contextmountiny commentedon Oct 13, 2025
This just seems like a continuation of #71529 and I dont think its a blocker, assigning accordingly, can you please follow up?
arosiclair commentedon Oct 13, 2025
Not a bug - we are now sorting rates alphabetically.