Bug 29181

Summary: Allow patron card creator to use a report to get list of borrowers
Product: Koha Reporter: Chris Cormack <chris>
Component: ToolsAssignee: Owen Leonard <oleonard>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, fridolin.somers
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/814
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Attachments: Bug 29181: Create patron card creator batch from report result
Bug 29181: Create patron card creator batch from report result
Bug 29181: Create patron card creator batch from report result

Description Chris Cormack 2021-10-05 20:35:38 UTC
Allow the list of borrowers to be created dynamically from a report. So that there is not the need to run the report, and then try to cut and paste a big list.
Comment 1 Katrin Fischer 2023-06-24 19:22:49 UTC
We could add the patron card creator to the batch actions you can trigger from reports.
Comment 2 Owen Leonard 2023-06-26 15:28:15 UTC
Created attachment 152697 [details] [review]
Bug 29181: Create patron card creator batch from report result

This patch adds the option of taking the results of a report that
returns borrowernumbers and create a new patron card creator batch with
those results.

The logic of the dropdown menu has been modified in order to ensure that
duplicate patron modification options aren't shown in the menu when a
report return both borrowernumber and cardnumber.

To test, apply the patch and create a new report which will return
patron borrowernumbers, e.g.

SELECT borrowernumber, cardnumber, surname, firstname FROM borrowers
order by RAND() LIMIT 20

- Run your report
- Click the "Batch operations with..." button at the top of the result
  -  Click "Patron card creator"
- A new tab should open with a new patron card creator batch with the
  patrons from your report.
Comment 3 Owen Leonard 2023-06-26 15:29:37 UTC
I don't know if this patch satisfies the original intent of the bug, but I hope it will be useful either way.
Comment 4 Sam Lau 2023-06-29 18:41:45 UTC
Created attachment 152878 [details] [review]
Bug 29181: Create patron card creator batch from report result

This patch adds the option of taking the results of a report that
returns borrowernumbers and create a new patron card creator batch with
those results.

The logic of the dropdown menu has been modified in order to ensure that
duplicate patron modification options aren't shown in the menu when a
report return both borrowernumber and cardnumber.

To test, apply the patch and create a new report which will return
patron borrowernumbers, e.g.

SELECT borrowernumber, cardnumber, surname, firstname FROM borrowers
order by RAND() LIMIT 20

- Run your report
- Click the "Batch operations with..." button at the top of the result
  -  Click "Patron card creator"
- A new tab should open with a new patron card creator batch with the
  patrons from your report.

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 5 Katrin Fischer 2023-09-21 20:46:13 UTC
Created attachment 156009 [details] [review]
Bug 29181: Create patron card creator batch from report result

This patch adds the option of taking the results of a report that
returns borrowernumbers and create a new patron card creator batch with
those results.

The logic of the dropdown menu has been modified in order to ensure that
duplicate patron modification options aren't shown in the menu when a
report return both borrowernumber and cardnumber.

To test, apply the patch and create a new report which will return
patron borrowernumbers, e.g.

SELECT borrowernumber, cardnumber, surname, firstname FROM borrowers
order by RAND() LIMIT 20

- Run your report
- Click the "Batch operations with..." button at the top of the result
  -  Click "Patron card creator"
- A new tab should open with a new patron card creator batch with the
  patrons from your report.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Tomás Cohen Arazi (tcohen) 2023-10-18 13:22:57 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-10-25 07:30:15 UTC
Enhancement not pushed to 23.05.x