twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
GNU Affero General Public License v3.0
15.79k stars 1.73k forks source link

Order by currency bug with cursor #6344

Open lucasbordeau opened 1 month ago

lucasbordeau commented 1 month ago

Bug Description

When we have a view with an order by on a currency field type, if we go to the show page and try to navigate with the buttons, if we have an empty amount on the previous record, the request says there's nothing before, while there is actually a record.

Example (the previous arrow is deactivated) :

image

Expected behavior

The backend should return the previous record, even if the currency field is empty.

pacyL2K19 commented 1 month ago

@Bonapara @lucasbordeau @FelixMalfait Lemme know if this is something I can pick up, I would like to

FelixMalfait commented 1 month ago

Hey @pacyL2K19 - I've asked @lucasbordeau and he says this one might be a bit difficult as it involves backend work.

Tbh I don't really understand the cause for the bug (I don't see the link between currency/amount and navigation), if you find the solution feel free to raise a PR of course!

lucasbordeau commented 1 month ago

I assigned core team as it might be tricky and would require more discussions.

lucasbordeau commented 1 month ago

@FelixMalfait It seems to be an issue with how our backend handles sorting on currency field type, the frontend just acts upon what it gets as pagination info from the server.