Bug 26577

Summary: Make basket.pl and cancelorder.pl use $order->cancel
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi <tomascohen>
Status: Pushed to master --- QA Contact: Kyle M Hall <kyle>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, kyle, lucas, martin.renvoize, tomascohen
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10869
Change sponsored?: --- Patch complexity: Small patch
Who signed the patch off: Manual merge request:
Text to go in the release notes:
This patch refactors order cancelling code usage to prepare the ground for code cleanup.
Version(s) released in:
20.11.00
Bug Depends on: 26515    
Bug Blocks: 26579, 26580    
Attachments: Bug 26577: Make basket.pl and cancelorder.pl use ->cancel
Bug 26577: Make basket.pl and cancelorder.pl use ->cancel
Bug 26577: Make basket.pl and cancelorder.pl use ->cancel

Description Tomás Cohen Arazi 2020-09-30 11:04:21 UTC

    
Comment 1 Tomás Cohen Arazi 2020-09-30 14:29:04 UTC
Created attachment 110993 [details] [review]
Bug 26577: Make basket.pl and cancelorder.pl use ->cancel

This patch makes the mentioned controller scripts use the new
$order->cancel method instead of DelOrder.

To test:
1. Apply this patches
2. Have a basket with some orders
3. Play with cancelling orders and removing baskets
=> SUCCESS: No behaviour change!
=> SUCCESS: No errors!
4. Sign off :-D
Comment 2 Martin Renvoize 2020-10-01 11:42:18 UTC
Created attachment 111035 [details] [review]
Bug 26577: Make basket.pl and cancelorder.pl use ->cancel

This patch makes the mentioned controller scripts use the new
$order->cancel method instead of DelOrder.

To test:
1. Apply this patches
2. Have a basket with some orders
3. Play with cancelling orders and removing baskets
=> SUCCESS: No behaviour change!
=> SUCCESS: No errors!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2020-10-01 11:42:50 UTC
It's great to see this scripts getting tidied up.. works as expected.

Signing off
Comment 4 Kyle M Hall 2020-10-02 17:52:48 UTC
Created attachment 111174 [details] [review]
Bug 26577: Make basket.pl and cancelorder.pl use ->cancel

This patch makes the mentioned controller scripts use the new
$order->cancel method instead of DelOrder.

To test:
1. Apply this patches
2. Have a basket with some orders
3. Play with cancelling orders and removing baskets
=> SUCCESS: No behaviour change!
=> SUCCESS: No errors!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Jonathan Druart 2020-10-15 13:25:20 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 6 Lucas Gass 2020-11-13 15:51:19 UTC
enhancement will not be backported to 20.05.x