Bug - Sorting functionality #5227

Closed
opened 2026-02-05 09:50:13 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @Phi2ca on GitHub (Mar 18, 2025).

Describe the Bug

Hi
I created a sorting rule by taking “Chapters First” from “Available Operations” and putting it in “Configured Operations”.
I've put “Chapters First” in the first position in “Configured Operations”.

Bug

When I create a new book with chapters and pages everything goes fine.
However, if I apply this rule to an existing book (since I have the option in the sorting section), the chapters are always and automatically placed at the bottom of the sorting order and not in first position.

Best regards

Steps to Reproduce

Creating a sorting rule by taking “Chapters First” from “Available Operations” and putting it in “Configured Operations”.
Put “Chapters First” in the first position in “Configured Operations”.
Apply this rule to existing books

Expected Behaviour

Place chapters in first position as specified by the feature

Screenshots or Additional Context

No response

Browser Details

Firefox 136.0.1 (64 bits)

Exact BookStack Version

v25.02.1

Originally created by @Phi2ca on GitHub (Mar 18, 2025). ### Describe the Bug Hi I created a sorting rule by taking “Chapters First” from “Available Operations” and putting it in “Configured Operations”. I've put “Chapters First” in the first position in “Configured Operations”. Bug When I create a new book with chapters and pages everything goes fine. However, if I apply this rule to an existing book (since I have the option in the sorting section), the chapters are always and automatically placed at the bottom of the sorting order and not in first position. Best regards ### Steps to Reproduce Creating a sorting rule by taking “Chapters First” from “Available Operations” and putting it in “Configured Operations”. Put “Chapters First” in the first position in “Configured Operations”. Apply this rule to existing books ### Expected Behaviour Place chapters in first position as specified by the feature ### Screenshots or Additional Context _No response_ ### Browser Details Firefox 136.0.1 (64 bits) ### Exact BookStack Version v25.02.1
OVERLORD added the 🐛 Bug label 2026-02-05 09:50:13 +03:00
Author
Owner

@manikandan-1704 commented on GitHub (Mar 18, 2025):

I would like to fix this issue

@manikandan-1704 commented on GitHub (Mar 18, 2025): I would like to fix this issue
Author
Owner

@ssddanbrown commented on GitHub (Mar 18, 2025):

Hi @Phi2ca,
The "Chapters First" sorting seems to be working from my testing.

Do you have any other operations configured as part of your sort rule? Or does it only contain the "Chapters first" rule?

@ssddanbrown commented on GitHub (Mar 18, 2025): Hi @Phi2ca, The "Chapters First" sorting seems to be working from my testing. Do you have any other operations configured as part of your sort rule? Or does it only contain the "Chapters first" rule?
Author
Owner

@Phi2ca commented on GitHub (Mar 18, 2025):

Yes, I have other settings behind “Chapters First”.

So in that order:

Chapters first
Name Numerics (Asc)
Name alphabetical (Asc)

That's all

@Phi2ca commented on GitHub (Mar 18, 2025): Yes, I have other settings behind “Chapters First”. So in that order: Chapters first Name Numerics (Asc) Name alphabetical (Asc) That's all
Author
Owner

@ssddanbrown commented on GitHub (Mar 18, 2025):

@Phi2ca Reverse the order of those operations, so Chapters first is last in the order.
Sort operations run from top-to-bottom, so right now the chapters will be sorted by name after being moved first. Moving the operation to the bottom, means that chatpers will be moved first after being sorted by name.

@ssddanbrown commented on GitHub (Mar 18, 2025): @Phi2ca Reverse the order of those operations, so `Chapters first` is last in the order. Sort operations run from top-to-bottom, so right now the chapters will be sorted by name after being moved first. Moving the operation to the bottom, means that chatpers will be moved first after being sorted by name.
Author
Owner

@Phi2ca commented on GitHub (Mar 18, 2025):

Ok, but now we're not really in a human logic anymore:
I'll put the chapters first, then the pages in alphabetical order, thus following the very logic of what they want to achieve.
I don't know many people who'd say to themselves: I'll sort the pages alphabetically and put the chapters first...but that's just my point of view.

Or you need a clearer tutorial in the section itself, otherwise people will think that it doesn't work and shouldn't be used.

@Phi2ca commented on GitHub (Mar 18, 2025): Ok, but now we're not really in a human logic anymore: I'll put the chapters first, then the pages in alphabetical order, thus following the very logic of what they want to achieve. I don't know many people who'd say to themselves: I'll sort the pages alphabetically and put the chapters first...but that's just my point of view. Or you need a clearer tutorial in the section itself, otherwise people will think that it doesn't work and shouldn't be used.
Author
Owner

@ssddanbrown commented on GitHub (Mar 18, 2025):

Okay. The order (especially with the supporting text) makes sense to me, but this is probably a matter of opinion/expectations. I'll keep a watch to see if this is a common misunderstand and look to make UX improvements here if so, otherwise I'll go ahead and close this off since there's not a bug to address.

@ssddanbrown commented on GitHub (Mar 18, 2025): Okay. The order (especially with the supporting text) makes sense to me, but this is probably a matter of opinion/expectations. I'll keep a watch to see if this is a common misunderstand and look to make UX improvements here if so, otherwise I'll go ahead and close this off since there's not a bug to address.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5227