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

Simple Sort doesn't work for numbers #3744

Closed
Chinoman10 opened this issue Jul 20, 2022 · 2 comments
Closed

Simple Sort doesn't work for numbers #3744

Chinoman10 opened this issue Jul 20, 2022 · 2 comments
Labels
node/issue Issue with a node

Comments

@Chinoman10
Copy link

Found a bug? Please fill out the sections below. 👍

Issue Summary

Using the ItemsList node, the Operation "Sort" and choosing the Type "Simple", and giving it a number field, it's not properly sorted.

Steps to Reproduce

  1. Provide any input to the ItemsList node with numbers mixed randomly (with different numbers of digits);
  2. Check output;

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?
I expect it to sort the numbers Ascending or Descending as the UI suggests that it does.

Technical details

  • Running version: 0.186.1
@Chinoman10
Copy link
Author

Here's a screenshot:
image

@Joffcom Joffcom added the node/issue Issue with a node label Jul 21, 2022
@Joffcom
Copy link
Member

Joffcom commented Jan 18, 2023

Hey @Chinoman10,

I have just been looking at this one and I can see the issue you are having and was able to reproduce it but I wouldn't classify it as a bug, Looking at the data you have in the node the amounts are strings not numbers so the data is being sorted as a string. If you were to take the same values and run them through a set node or code first to convert them to numbers it works as expected.

This of course is not great but hopefully shows a bit of insight as to what is happening, What I have done is added this to our internal product ideas list as it would be a great feature to automatically convert the data type or at least provide an option so you can decide if we convert it or not.

For now I am going to mark this one as closed as while it is annoying for the reasons above it isn't really a bug, If you have any questions let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node/issue Issue with a node
Projects
None yet
Development

No branches or pull requests

2 participants