Bug 35074

Summary: Add --patron_category to writeoff_debts.pl
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Command-line UtilitiesAssignee: Martin Renvoize <martin.renvoize>
Status: RESOLVED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, david.roberts, fridolin.somers, katrin.fischer, m.de.rooy, robin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/796
Text to go in the release notes:
Version(s) released in:
23.11.00
Bug Depends on: 27049    
Bug Blocks: 34077, 35996    
Attachments: Bug 35074: Add patron relationship alias
Bug 35074: Add support for category_code to writeoff_debts
Bug 35074: Add patron relationship alias
Bug 35074: Add support for category_code to writeoff_debts
Bug 35074: Add patron relationship alias
Bug 35074: Use patron relationship alias
Bug 35074: Add support for category_code to writeoff_debts
Bug 35074: Add patron relationship alias
Bug 35074: Use patron relationship alias
Bug 35074: Add support for category_code to writeoff_debts

Description Martin Renvoize 2023-10-17 08:47:25 UTC
It would be helpful to allow limiting by patron category in the writeoff_debts script.
Comment 1 Martin Renvoize 2023-10-17 11:41:19 UTC
Created attachment 157227 [details] [review]
Bug 35074: Add patron relationship alias

This patch adds the 'patron' relationship alias to the Acountline
DBIx::Class schema.
Comment 2 Martin Renvoize 2023-10-17 11:41:21 UTC
Created attachment 157228 [details] [review]
Bug 35074: Add support for category_code to writeoff_debts

This patch adds support for passing category_code as a limiter for the
writeoff_debts script.
Comment 3 Lucas Gass 2023-10-25 18:07:34 UTC
Created attachment 157860 [details] [review]
Bug 35074: Add patron relationship alias

This patch adds the 'patron' relationship alias to the Acountline
DBIx::Class schema.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Lucas Gass 2023-10-25 18:07:37 UTC
Created attachment 157861 [details] [review]
Bug 35074: Add support for category_code to writeoff_debts

This patch adds support for passing category_code as a limiter for the
writeoff_debts script.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 5 Marcel de Rooy 2023-10-27 09:29:25 UTC
 WARN   Koha/Schema/Result/Accountline.pm
   WARN   tidiness
                The file is less tidy than before (bad/messy lines before: 142, now: 151)

 WARN   misc/cronjobs/writeoff_debts.pl
   WARN   tidiness
                The file is less tidy than before (bad/messy lines before: 17, now: 18)

 Koha/Account/Line.pm              |  2 +-
 Koha/Schema/Result/Accountline.pm | 20 ++++++++++++++++++++
Please dont mix that.
Comment 6 Martin Renvoize 2023-10-27 13:07:02 UTC
Created attachment 157981 [details] [review]
Bug 35074: Add patron relationship alias

This patch adds the 'patron' relationship alias to the Acountline
DBIx::Class schema.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 7 Martin Renvoize 2023-10-27 13:07:05 UTC
Created attachment 157982 [details] [review]
Bug 35074: Use patron relationship alias

This patch updates the existing Koha::Account::Line->patron accessor to
use the new aliased 'patron' relation in the schema class

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 8 Martin Renvoize 2023-10-27 13:07:08 UTC
Created attachment 157983 [details] [review]
Bug 35074: Add support for category_code to writeoff_debts

This patch adds support for passing category_code as a limiter for the
writeoff_debts script.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 9 Martin Renvoize 2023-10-27 13:08:14 UTC
Patch split and SO cloned across.. All patches re-tidied and QA script no longer complaining.
Comment 10 Marcel de Rooy 2023-10-30 08:54:59 UTC
Created attachment 158057 [details] [review]
Bug 35074: Add patron relationship alias

This patch adds the 'patron' relationship alias to the Acountline
DBIx::Class schema.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Marcel de Rooy 2023-10-30 08:55:01 UTC
Created attachment 158058 [details] [review]
Bug 35074: Use patron relationship alias

This patch updates the existing Koha::Account::Line->patron accessor to
use the new aliased 'patron' relation in the schema class

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 12 Marcel de Rooy 2023-10-30 08:55:04 UTC
Created attachment 158059 [details] [review]
Bug 35074: Add support for category_code to writeoff_debts

This patch adds support for passing category_code as a limiter for the
writeoff_debts script.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 13 Tomás Cohen Arazi 2023-11-01 20:26:53 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 14 Fridolin Somers 2023-11-08 08:40:28 UTC
Enhancement not pushed to 23.05.x