[GH-ISSUE #15] Automatically sort by alphabet - feature request... #9

Closed
opened 2026-02-25 21:30:58 +03:00 by kerem · 5 comments
Owner

Originally created by @fumunda on GitHub (May 11, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/15

Me again.

I was curious if you could add a default setting to sort everything alphabetically automatically. I know we have the option to sort that way, but the default sorting is in whatever order you added folders or files.

Originally created by @fumunda on GitHub (May 11, 2020). Original GitHub issue: https://github.com/ciur/papermerge/issues/15 Me again. I was curious if you could add a default setting to sort everything alphabetically automatically. I know we have the option to sort that way, but the default sorting is in whatever order you added folders or files.
kerem closed this issue 2026-02-25 21:30:58 +03:00
Author
Owner

@ciur commented on GitHub (May 12, 2020):

It is fairly easy to do it.

Long story short, I think it is an excellent feature - with the difference that there will be no "option". Instead application will just remember the last state.

Longer version:

Instead of adding a setting or configuration of this feature, I think it would be a better idea to save the last state. So that if you sorted last time by "sort by date - ascending", all subsequent displays in same (or other) folders will be with "sort by date - ascending".
This way you will still have to chose preferred sorting type - but only once.
If you would be more interested in "sort by date - descending", display files and folder with letter Z first, just sort it that way once, and all subsequent displays will be with "sort by date - descending".

In preferences there is an option to save view as "list" or "grid". I think this option is redundant. Similar way to sorting, application just needs to remember the last state the user used.

Also, there should be a checkbox displayed of current sorting "mode".
I will take care of this soon.

<!-- gh-comment-id:627137263 --> @ciur commented on GitHub (May 12, 2020): It is fairly easy to do it. Long story short, I think it is an excellent feature - with the difference that there will be no "option". **Instead application will just remember the last state.** Longer version: Instead of adding a setting or configuration of this feature, I think it would be a better idea to save the last state. So that if you sorted last time by "sort by date - ascending", all subsequent displays in same (or other) folders will be with "sort by date - ascending". This way you will still have to chose preferred sorting type - but only once. If you would be more interested in "sort by date - descending", display files and folder with letter Z first, just sort it that way once, and all subsequent displays will be with "sort by date - descending". In preferences there is an option to save view as "list" or "grid". I think this option is redundant. Similar way to sorting, application just needs to remember the last state the user used. Also, there should be a checkbox displayed of current sorting "mode". I will take care of this soon.
Author
Owner

@fumunda commented on GitHub (May 12, 2020):

I like that idea. I can set it how i want and it will remember. Sounds good!

Thanks again!

<!-- gh-comment-id:627659152 --> @fumunda commented on GitHub (May 12, 2020): I like that idea. I can set it how i want and it will remember. Sounds good! Thanks again!
Author
Owner

@ciur commented on GitHub (May 16, 2020):

I fixed the issue.
You'll need to use latest papermerge docker image tagged 1.2.2.
Also, make sure you force refresh browser page so that it will not use cached version of latest javascript file.

Last sort type (i.e. if you sorted by title asc/desc, date asc/desc etc) will be saved into a cookie titled "save_last_sort". When you browse files/folders, that cookie will be sent to server side, and based on it, results will be returned.

Server-side changes
Client-side changes - js code
Latest docker image

<!-- gh-comment-id:629628948 --> @ciur commented on GitHub (May 16, 2020): I fixed the issue. You'll need to use latest papermerge docker image tagged 1.2.2. Also, make sure you force refresh browser page so that it will not use cached version of latest javascript file. Last sort type (i.e. if you sorted by title asc/desc, date asc/desc etc) will be saved into a cookie titled "save_last_sort". When you browse files/folders, that cookie will be sent to server side, and based on it, results will be returned. [Server-side changes](https://github.com/ciur/papermerge/commit/400ee2bf87d95f4c096090ee258cf62901c7beee) [Client-side changes - js code](https://github.com/ciur/papermerge-js/commit/866feac4367ad460e9a4693ba908f7117bdc6ba4) [Latest docker image](https://hub.docker.com/layers/eugenci/papermerge/1.2.2/images/sha256-0b00e06a1b97a14624c7b6a2bef11ffa96116960915b201ec5fed1808fe57ff9?context=repo)
Author
Owner

@fumunda commented on GitHub (May 18, 2020):

Awesome thanks! I will update and let you know how things go.

<!-- gh-comment-id:629883979 --> @fumunda commented on GitHub (May 18, 2020): Awesome thanks! I will update and let you know how things go.
Author
Owner

@fumunda commented on GitHub (May 19, 2020):

Worked great. Thanks for the added functionality. Consider this closed.

<!-- gh-comment-id:630522832 --> @fumunda commented on GitHub (May 19, 2020): Worked great. Thanks for the added functionality. Consider this closed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#9
No description provided.