Bug 32742 - Add sorting options to patron list export
Summary: Add sorting options to patron list export
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Hammat wele
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-27 23:01 UTC by Hammat wele
Modified: 2023-11-01 11:21 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 32742: Patron's lists option are not in alphabetical order (5.23 KB, text/plain)
2023-09-08 21:38 UTC, Hammat wele
Details
Bug 32742: Patron's lists option are not in alphabetical order (5.24 KB, patch)
2023-09-08 22:07 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 32742: Patron's lists option are not in alphabetical order (5.31 KB, patch)
2023-09-12 19:22 UTC, Emily-Rose Francoeur
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Hammat wele 2023-01-27 23:01:03 UTC
In the patron module, the list under 'Add to patron list' is not in alphabetical order
Comment 1 Marie-Luce Laflamme 2023-09-06 16:46:33 UTC
test plan

1. Go to Tools > Patron lists
2. Create a new patron list
3. Add 10 patrons in a random order  (not in alphabetical nor in cardnumber sequence)
4. Go back to Tools > Patron lists management page
5. Find your list, click on "Action" and select "Print patron cards"
6. Check the cards order in the pdf
--> notice these cards aren't in alphabetical order.


Unfortunately, Koha sort them by the "patron_list_patron_id" order which it isn't always logical.
Comment 2 Hammat wele 2023-09-08 21:38:53 UTC Comment hidden (obsolete)
Comment 3 Hammat wele 2023-09-08 22:07:29 UTC
Created attachment 155469 [details] [review]
Bug 32742: Patron's lists option are not in alphabetical order

This patch add sorting feature to the patron card lists export option

To test

1. Go to Tools > Patron lists
2. Create a new patron list
3. Add 10 patrons in a random order (not in alphabetical nor in cardnumber sequence)
4. Go back to Tools > Patron lists management page
5. Find your list, click on 'Action' and select 'Print patron cards'
6. Check the cards order in the pdf
    --> notice these cards aren't in alphabetical order.
7. Apply the patch
8. Repeat step 4, 5
9. Fill the «Order by» field and submit
10. Check the cards order in the pdf
    --> notice the cards are now ordered.
Comment 4 Emily-Rose Francoeur 2023-09-12 19:22:20 UTC
Created attachment 155572 [details] [review]
Bug 32742: Patron's lists option are not in alphabetical order

This patch add sorting feature to the patron card lists export option

To test

1. Go to Tools > Patron lists
2. Create a new patron list
3. Add 10 patrons in a random order (not in alphabetical nor in cardnumber sequence)
4. Go back to Tools > Patron lists management page
5. Find your list, click on 'Action' and select 'Print patron cards'
6. Check the cards order in the pdf
    --> notice these cards aren't in alphabetical order.
7. Apply the patch
8. Repeat step 4, 5
9. Fill the «Order by» field and submit
10. Check the cards order in the pdf
    --> notice the cards are now ordered.

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Comment 5 Katrin Fischer 2023-10-21 09:27:00 UTC
I am running out of time here, so please fix these yourself:

1) Please perltidy:

 OK	koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt

 WARN	patroncards/create-pdf.pl
   WARN	  tidiness
		The file is less tidy than before (bad/messy lines before: 181, now: 183)

 WARN	patroncards/print.pl
   WARN	  tidiness
		The file is less tidy than before (bad/messy lines before: 88, now: 90)


2) I feel like the Order by should be the last option in the form, going together with the "start with" option, instead of being the first in the form.

3) This should also be available when printing the patron cards from the patron card creator. Since the code for sorting is in patroncards/create-pdf.pl, I believe this would not require much more than a template change and it would give us nice consistency.

4) I think that if you change nothing the order will still be the order added ot the list - is this correct? (just a question, nothing to fix here)