Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Human App][Backend] Invalid sorting when reward_amount of the job is sorting criteria #2679

Open
dnechay opened this issue Oct 23, 2024 · 0 comments

Comments

@dnechay
Copy link
Contributor

dnechay commented Oct 23, 2024

Describe the bug
There is a paginateAndSortResults common tooling that's being used for sorting of some data returned to Human App UI.

reward_amount of the job is string, not a number, so when you attempt to sort by this field - you get invalid results because paginateAndSortResults uses straightforward way of sorting by comparing values.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any page with jobs
  2. Click on Reward amount table header and choose "from highest"
  3. You will see results returned in an invalid order

Expected behavior
Job sorted by reward amount as numeric value

Screenshots
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant