inventree / inventree-app

InvenTree mobile app
https://docs.inventree.org/en/latest/app/app/
MIT License
51 stars 44 forks source link

filtering by IPN #508

Open spitdavid opened 2 weeks ago

spitdavid commented 2 weeks ago

When I filter by IPN the numbers are not in correct order (1,2,3,4....) the filtering doesn't account number of numbers, so every number starting with 1 is before number 2 (10,101,1001...). This could be solved by adding zero before everything (0001,0002,0003....) but I find that impractical.

This issue is encountered both on web and iOS app.

SchrodingersGat commented 2 weeks ago

This is a fundamental limitation of string sorting, unfortunately. The ordering is done on the server when you make an API request, and the IPN field is a non-numeric string - so ordering is done "alphabetically"