twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
Other
20.87k stars 2.3k forks source link

Order by currency bug with cursor #6344

Open lucasbordeau opened 4 months ago

lucasbordeau commented 4 months 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 3 months ago

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

FelixMalfait commented 3 months 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 3 months ago

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

lucasbordeau commented 3 months 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.