BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Sort by Name - Numeric not fully working

Open serinf-lauza opened this issue 1 month ago • 1 comments

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

serinf-lauza avatar Nov 26 '25 14:11 serinf-lauza

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 avatar Nov 26 '25 21:11 ssddanbrown