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

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


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
Bug 32742: Patron's lists option are not in alphabetical (11.45 KB, patch)
2024-06-21 12:24 UTC, Alexandre Noel
Details | Diff | Splinter Review
Bug 32742: Patron's lists option are not in alphabetical (13.52 KB, patch)
2024-06-25 13:44 UTC, Alexandre Noel
Details | Diff | Splinter Review
Bug 32742: Patron's lists option are not in alphabetical order (5.31 KB, patch)
2024-08-27 20:59 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 32742: (follow-up) Add sorting feature when printing the patron cards from the patron card creator (9.93 KB, patch)
2024-08-27 20:59 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 32742: Patron's lists option are not in alphabetical order (5.31 KB, patch)
2024-08-29 21:12 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 32742: (follow-up) Add sorting feature when printing the patron cards from the patron card creator (9.93 KB, patch)
2024-08-29 21:12 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 32742: (follow-up) perltidy patroncards/create-pdf.pl and patroncards/print.pl (6.82 KB, patch)
2024-08-29 21:12 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 32742: Patron's lists option are not in alphabetical order (5.35 KB, patch)
2024-08-30 16:00 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 32742: (follow-up) Add sorting feature when printing the patron cards from the patron card creator (9.98 KB, patch)
2024-08-30 16:00 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 32742: (follow-up) perltidy patroncards/create-pdf.pl and patroncards/print.pl (6.87 KB, patch)
2024-08-30 16:01 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 32742: Patron's lists option are not in alphabetical order (5.42 KB, patch)
2025-01-10 21:31 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 32742: (follow-up) Add sorting feature when printing the patron cards from the patron card creator (10.05 KB, patch)
2025-01-10 21:32 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 32742: (follow-up) perltidy patroncards/create-pdf.pl and patroncards/print.pl (6.93 KB, patch)
2025-01-10 21:32 UTC, Lisette Scheer
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)
Comment 6 Alexandre Noel 2024-06-21 12:24:21 UTC Comment hidden (obsolete)
Comment 7 Alexandre Noel 2024-06-25 13:44:18 UTC Comment hidden (obsolete)
Comment 8 Eric Garcia 2024-06-26 18:39:40 UTC
Tried testing encountered Bug 37205
Comment 9 Hammat wele 2024-08-27 20:59:25 UTC
Created attachment 170786 [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 10 Hammat wele 2024-08-27 20:59:28 UTC
Created attachment 170787 [details] [review]
Bug 32742: (follow-up) Add sorting feature when printing the patron cards from the patron card creator

This patch also put the «Order by» field at the last position in the form

To test

1. Go to Tools > Patron card creator
2. Create a new Card batch
3. Add some patrons
4. Select all cards by clicking on checkbox in the select colunm
5. Click on «Export selected card(s)», an Export patron cards windows is opened
6. Fill the «Order by» field and submit
7. Check the cards order in the pdf
    --> notice the cards are now ordered.
8. Close the window opened in step 5
9. Click on «Export card batch», an Export patron cards windows is opened
10. repeat step 6 and 7
    --> notice the cards are now ordered.
11. Close the window opened in step 9
12. Fill the «Batch description» field and click on «Save description»
13. Click on Manage -> Card Batches
14. Click on Export button
15. repeat step 6 and 7
    --> notice the cards are now ordered.
16. Select a batch to export and click on «Export selected batches» button
17. repeat step 6 and 7
    --> notice the cards are now ordered.
Comment 11 Hammat wele 2024-08-27 21:37:51 UTC
(In reply to Katrin Fischer from comment #5)

> 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.

I added the feature when printing the patron cards from the patron card creator but it required some edit in patroncards/create-pdf.pl because the order_by was only used for patronlist 

> 
> 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)

Yes it is correct, if we do not select an order, the order added at the list will be used
Comment 12 Hammat wele 2024-08-29 21:12:21 UTC
Created attachment 170882 [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 13 Hammat wele 2024-08-29 21:12:25 UTC
Created attachment 170883 [details] [review]
Bug 32742: (follow-up) Add sorting feature when printing the patron cards from the patron card creator

This patch also put the «Order by» field at the last position in the form

To test

1. Go to Tools > Patron card creator
2. Create a new Card batch
3. Add some patrons
4. Select all cards by clicking on checkbox in the select colunm
5. Click on «Export selected card(s)», an Export patron cards windows is opened
6. Fill the «Order by» field and submit
7. Check the cards order in the pdf
    --> notice the cards are now ordered.
8. Close the window opened in step 5
9. Click on «Export card batch», an Export patron cards windows is opened
10. repeat step 6 and 7
    --> notice the cards are now ordered.
11. Close the window opened in step 9
12. Fill the «Batch description» field and click on «Save description»
13. Click on Manage -> Card Batches
14. Click on Export button
15. repeat step 6 and 7
    --> notice the cards are now ordered.
16. Select a batch to export and click on «Export selected batches» button
17. repeat step 6 and 7
    --> notice the cards are now ordered.
Comment 14 Hammat wele 2024-08-29 21:12:31 UTC
Created attachment 170884 [details] [review]
Bug 32742: (follow-up) perltidy patroncards/create-pdf.pl and patroncards/print.pl
Comment 15 ByWater Sandboxes 2024-08-30 16:00:56 UTC
Created attachment 170916 [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>
Signed-off-by: Kelly <kelly@bwatersolutions.com>
Comment 16 ByWater Sandboxes 2024-08-30 16:00:58 UTC
Created attachment 170917 [details] [review]
Bug 32742: (follow-up) Add sorting feature when printing the patron cards from the patron card creator

This patch also put the «Order by» field at the last position in the form

To test

1. Go to Tools > Patron card creator
2. Create a new Card batch
3. Add some patrons
4. Select all cards by clicking on checkbox in the select colunm
5. Click on «Export selected card(s)», an Export patron cards windows is opened
6. Fill the «Order by» field and submit
7. Check the cards order in the pdf
    --> notice the cards are now ordered.
8. Close the window opened in step 5
9. Click on «Export card batch», an Export patron cards windows is opened
10. repeat step 6 and 7
    --> notice the cards are now ordered.
11. Close the window opened in step 9
12. Fill the «Batch description» field and click on «Save description»
13. Click on Manage -> Card Batches
14. Click on Export button
15. repeat step 6 and 7
    --> notice the cards are now ordered.
16. Select a batch to export and click on «Export selected batches» button
17. repeat step 6 and 7
    --> notice the cards are now ordered.

Signed-off-by: Kelly <kelly@bwatersolutions.com>
Comment 17 ByWater Sandboxes 2024-08-30 16:01:01 UTC
Created attachment 170918 [details] [review]
Bug 32742: (follow-up) perltidy patroncards/create-pdf.pl and patroncards/print.pl

Signed-off-by: Kelly <kelly@bwatersolutions.com>
Comment 18 Lisette Scheer 2025-01-10 21:31:47 UTC
Created attachment 176400 [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>
Signed-off-by: Kelly <kelly@bwatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Comment 19 Lisette Scheer 2025-01-10 21:32:09 UTC
Created attachment 176401 [details] [review]
Bug 32742: (follow-up) Add sorting feature when printing the patron cards from the patron card creator

This patch also put the «Order by» field at the last position in the form

To test

1. Go to Tools > Patron card creator
2. Create a new Card batch
3. Add some patrons
4. Select all cards by clicking on checkbox in the select colunm
5. Click on «Export selected card(s)», an Export patron cards windows is opened
6. Fill the «Order by» field and submit
7. Check the cards order in the pdf
    --> notice the cards are now ordered.
8. Close the window opened in step 5
9. Click on «Export card batch», an Export patron cards windows is opened
10. repeat step 6 and 7
    --> notice the cards are now ordered.
11. Close the window opened in step 9
12. Fill the «Batch description» field and click on «Save description»
13. Click on Manage -> Card Batches
14. Click on Export button
15. repeat step 6 and 7
    --> notice the cards are now ordered.
16. Select a batch to export and click on «Export selected batches» button
17. repeat step 6 and 7
    --> notice the cards are now ordered.

Signed-off-by: Kelly <kelly@bwatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Comment 20 Lisette Scheer 2025-01-10 21:32:34 UTC
Created attachment 176402 [details] [review]
Bug 32742: (follow-up) perltidy patroncards/create-pdf.pl and patroncards/print.pl

Signed-off-by: Kelly <kelly@bwatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>