Sort by Name - Numeric not fully working #5524

Open
opened 2026-02-05 10:08:43 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @serinf-lauza on GitHub (Nov 26, 2025).

Describe the Bug

Hi! I'm not sure if what I'm asking is actually a bug or if it's suppose to work that way. When I'm sorting a book with the only sort operation "Name - Numeric (Desc)", it does not work when a letter is in front of it.
Example of the result I would get with "Name - Numeric (Desc)":
2
1
Page 1
Page 2

"Page 2" should be on top of "Page 1" since it's suppose to be Desc

Image Image

Steps to Reproduce

  1. Create a sorting rule with only "Name - Numeric (Desc)"
  2. Go to a book and create some pages with a name then a number "Page 1" & "Page 2"
  3. Sort the book when the new rule created

Expected Behaviour

The expected behaviour would be

Page 2
Page 1

Screenshots or Additional Context

No response

Browser Details

Chrome, Windows 11

Exact BookStack Version

v25.11.2

Originally created by @serinf-lauza on GitHub (Nov 26, 2025). ### Describe the Bug Hi! I'm not sure if what I'm asking is actually a bug or if it's suppose to work that way. When I'm sorting a book with the only sort operation "Name - Numeric (Desc)", it does not work when a letter is in front of it. Example of the result I would get with "Name - Numeric (Desc)": 2 1 Page 1 Page 2 "Page 2" should be on top of "Page 1" since it's suppose to be Desc <img width="838" height="422" alt="Image" src="https://github.com/user-attachments/assets/b17176b7-c043-44f7-9e4b-91dbe945e9c9" /> <img width="913" height="761" alt="Image" src="https://github.com/user-attachments/assets/e9f73f39-b883-427c-94c3-3c1db6c0db45" /> ### Steps to Reproduce 1. Create a sorting rule with only "Name - Numeric (Desc)" 2. Go to a book and create some pages with a name then a number "Page 1" & "Page 2" 3. Sort the book when the new rule created ### Expected Behaviour The expected behaviour would be Page 2 Page 1 ### Screenshots or Additional Context _No response_ ### Browser Details Chrome, Windows 11 ### Exact BookStack Version v25.11.2
OVERLORD added the 🐛 Bug label 2026-02-05 10:08:43 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 27, 2025):

Hi @serinf-lauza,
This is expected, to quote our docs:

Name - Numeric: Will attempt to parse a numeric value (24, 24.125), up to one decimal point, from the start of the name and sort on that.

We don't go any deeper than that, since the logic beyond that can become more uncertain relative to expectation.

@ssddanbrown commented on GitHub (Nov 27, 2025): Hi @serinf-lauza, This is expected, to quote [our docs](https://www.bookstackapp.com/docs/user/organising-content/#sort-rule-operations): > Name - Numeric: Will attempt to parse a numeric value (24, 24.125), up to one decimal point, from the start of the name and sort on that. We don't go any deeper than that, since the logic beyond that can become more uncertain relative to expectation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5524