Skip to content

Column sorting incorrect #923

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

Open
Volkerti opened this issue Apr 29, 2025 · 0 comments
Open

Column sorting incorrect #923

Volkerti opened this issue Apr 29, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Volkerti
Copy link

Describe the bug
Column sorting is incorrect. If an extra column is activated, every try to sort columns by clicking the header sorts the next following column.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a "Category" or "Storage location" and display all parts therein
  2. My standard columns are (in this order): "Name", "Description", "Category", "Footprint", "Manufacturer", "Storage locations", "Amount"
  3. Click on the tooth wheel and select "MPN" (I didn't try any other field) as additional column to display.
  4. Find "MPN" as last column
  5. Try to sort for "MPN" by clicking on the column header --> Does not sort
  6. Re-arrange columns by dragging column "MPN" to another position, e.g. between columns "Manufacturer" and "Storage locations"
  7. Try sorting different columns. Everything left of and including "Manufacturer" sorts well. If "MPN" column header is clicked, the table is sorted for column "Storage" (the NEXT column).
  8. Every click on a header right of and including "MPN" sorts the NEXT column.

Screenshots
Image
Correctly sorted

Image
Click on "MPN" sorts next column

Server Side
Behaviour is reproducible on Part-DB German Demo server

My setup:

  • Part-DB Version: 1.17.0
  • PHP Version: 8.3.19 (SAPI: fpm-fcgi)
  • Server Operating System: Linux partdb-1 4.4.302+ #69057 SMP Fri Jan 12 17:02:59 CST 2024 x86_64
  • Database Server: mysql 10.11.6-MariaDB

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Google Chrome
  • Version Version 135.0.7049.115 (Official Build) (64-bit)

Additional context
Seems like an column indexing problem. I did not try with more than 1 additional column. Don't know if this would cause this "sorting effect" shifted two columns.

@Volkerti Volkerti added the bug Something isn't working label Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant