Bug 19120

Summary: Order cancelled status is reset on basket open
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: AcquisitionsAssignee: Mark Tompsett <mtompset>
Status: CLOSED FIXED QA Contact: Julian Maurice <julian.maurice>
Severity: major    
Priority: P5 - low CC: amit.gupta, amitddng135, barton, colin.campbell, fridolin.somers, jonathan.druart, julian.maurice, marjorie.barry-vila, mtj, mtompset, severine.queune
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19024
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 19120: Add tests to reproduce the problem
Bug 19120: Leave cancelled ordered items alone when reopening basket
Bug 19120: Add tests to reproduce the problem
Bug 19120: Leave cancelled ordered items alone when reopening basket
Bug 19120: Add tests to reproduce the problem
Bug 19120: Leave cancelled ordered items alone when reopening basket

Description Katrin Fischer 2017-08-15 19:07:23 UTC
When a basket with a canceled order is opened again, the order status is changed to 'new'. See also bug 19024.

To test:

- Create a basket
- Add orders to it
- Cancel one of the orders
- Close the basket
- Check the status of your orders using the acquisition search, they should be
  ordered with the exception one being canceled
- Open the basket again
- Verify the order still shows as canceled
- Leave the basket open and verify using the acquisition search, that the status of the canceled order is now 'new'.

A canceled order status should always remain as canceled until we introduce an actual feature to reactivate canceled orders. Closing and reopening the basket should have no effect on the status of canceled orders.
Comment 1 Mark Tompsett 2017-09-02 01:26:15 UTC
Created attachment 66786 [details] [review]
Bug 19120: Add tests to reproduce the problem

TEST PLAN
---------
1) apply this patch
2) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- FAILS!
   -- This proves the test works.
3) run koha qa test tools
Comment 2 Mark Tompsett 2017-09-02 01:26:21 UTC
Created attachment 66787 [details] [review]
Bug 19120: Leave cancelled ordered items alone when reopening basket

TEST PLAN
---------
1) Apply first patch
2) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- FAILS
3) Apply this patch
4) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- SUCCESS!
5) run koha qa test tools
Comment 3 Alex Buckley 2017-09-07 05:21:59 UTC
Created attachment 66908 [details] [review]
Bug 19120: Add tests to reproduce the problem

TEST PLAN
---------
1) apply this patch
2) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- FAILS!
   -- This proves the test works.
3) run koha qa test tools

Followed test plan, patch worked as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 4 Alex Buckley 2017-09-07 05:24:28 UTC
Created attachment 66909 [details] [review]
Bug 19120: Leave cancelled ordered items alone when reopening basket

TEST PLAN
---------
1) Apply first patch
2) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- FAILS
3) Apply this patch
4) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- SUCCESS!
5) run koha qa test tools

Followed test plan, patch worked as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 5 Katrin Fischer 2017-09-20 21:19:25 UTC
*** Bug 17172 has been marked as a duplicate of this bug. ***
Comment 6 Julian Maurice 2017-09-29 11:50:05 UTC
Created attachment 67436 [details] [review]
Bug 19120: Add tests to reproduce the problem

TEST PLAN
---------
1) apply this patch
2) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- FAILS!
   -- This proves the test works.
3) run koha qa test tools

Followed test plan, patch worked as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 7 Julian Maurice 2017-09-29 11:50:09 UTC
Created attachment 67437 [details] [review]
Bug 19120: Leave cancelled ordered items alone when reopening basket

TEST PLAN
---------
1) Apply first patch
2) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- FAILS
3) Apply this patch
4) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- SUCCESS!
5) run koha qa test tools

Followed test plan, patch worked as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 8 Jonathan Druart 2017-09-29 15:47:21 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 9 Fridolin Somers 2017-10-17 07:50:43 UTC
Pushed to 17.05.x, will be in 17.05.05.
Comment 10 Katrin Fischer 2017-10-18 21:15:57 UTC
These patches have been pushed to 16.11.x and will be in 16.11.13.
Comment 11 Mason James 2017-11-23 23:16:37 UTC
Pushed to 16.05.x, for 16.05.18 release