Created attachment 37797 [details] Order transfer Suppose if we transfer order from one vendor to another vendor previous orderstatus is not changed still is showing new but if we see order in basket level it shown under cancelled order section.
Created attachment 37798 [details] [review] Bug 13993 - Transfer order from one vendor to another vendor previous orderstatus is not changed Transfer order from one vendor to another vendor previous orderstatus is not changed To Test: 1) Create a vendor for ex: A 2) Create a basket under vendor A 3) Create a order 4) Create a vendor for ex: B 5) Create a basket under vendor B 6) Search vendor A and basket/order 7) Click on Transfer link and choose the vendor and basket in which you want to transfer the order 8) Go to mysql prompt and see previous orderstatus. For ex: mysql> select orderstatus from aqorders where ordernumber = 2; +-------------+ | orderstatus | +-------------+ | cancelled | +-------------+
Created attachment 37957 [details] [review] Bug 13993 - Add tests to confirm 'new' and 'cancelled' This adds 2 tests to t/db_dependent/Acquisition/TransferOrder.t in order to confirm the order's status is properly marked. TEST PLAN --------- 1) Apply this patch only 2) prove -v t/db_dependent/Acquisition/TransferOrder.t -- should fail one test: not marked as 'cancelled'. 3) Apply other patch 4) prove -v t/db_dependent/Acquisition/TransferOrder.t -- should succeed. 5) Run test plan as per initial patch. 6) Run koha qa test tools
Created attachment 37958 [details] [review] Bug 13993 - Transfer order from one vendor to another vendor Previous orderstatus is not changed To Test: 1) Create a vendor for ex: A 2) Create a basket under vendor A 3) Create a order 4) Create a vendor for ex: B 5) Create a basket under vendor B 6) Search vendor A and basket/order 7) Click on Transfer link and choose the vendor and basket in which you want to transfer the order 8) Go to mysql prompt and see previous orderstatus. For ex: mysql> select orderstatus from aqorders where ordernumber = 2; +-------------+ | orderstatus | +-------------+ | cancelled | +-------------+
Created attachment 37959 [details] [review] Bug 13993 - Correct poorly transferred orders Added Atomic Update to fix poorly transferred orders TEST PLAN --------- 1) Do an order transfer 2) Confirm the bad transfer in sql 3) Apply this patch 4) Run the updatedatabase.pl script 5) Confirm the bad transfer is fixed
Created attachment 37977 [details] [review] Bug 13993 - (1) Add tests to confirm 'new' and 'cancelled' This adds 2 tests to t/db_dependent/Acquisition/TransferOrder.t in order to confirm the order's status is properly marked. TEST PLAN --------- 1) Log into staff client 2) Acquisitions 3) Create a basket for two differing vendors. 4) Place an order in one of the baskets. 5) Transfer the order from one vendor's basket to the others. 6) Apply this patch (1) only 7) prove -v t/db_dependent/Acquisition/TransferOrder.t -- should fail one test: not marked as 'cancelled'.
Created attachment 37978 [details] [review] Bug 13993 - (2) Correct poorly transferred orders Added Atomic Update to fix poorly transferred orders TEST PLAN --------- 8) Apply patch (2) 9) Run the database updates $ ./installer/data/mysql/updatedatabase.pl -- This should run without error 10) prove -v t/db_dependent/Acquisition/TransferOrder.t -- This should succeed now, because the update fixed it.
Created attachment 37979 [details] [review] Bug 13993 - (3) Transfer order leaves incorrect orderstatus 11) Apply patch (3) 12) Log in to staff client 13) Acquisitions 14) Create a basket for two different vendors 15) Place an order in one vendor's basket. 16) Transfer the order to the other vendor's basket. 17) prove -v t/db_dependent/Acquisition/TransferOrder.t -- This should succeed without intervention. 18) Run koha qa test tools for the last 3 commits.
Comment on attachment 37978 [details] [review] Bug 13993 - (2) Correct poorly transferred orders Review of attachment 37978 [details] [review]: ----------------------------------------------------------------- ::: installer/data/mysql/atomicupdate/Bug-13993-Correct-OrderStatus-Of-Poorly-Transferred-Orders.sql @@ +1,2 @@ > +UPDATE aqorders SET orderstatus='cancelled' > + WHERE (NOT datecancellationprinted IS NULL OR The correct syntax is field is not null
Created attachment 38668 [details] [review] Bug 13993 - (1) Add tests to confirm 'new' and 'cancelled' This adds 2 tests to t/db_dependent/Acquisition/TransferOrder.t in order to confirm the order's status is properly marked. TEST PLAN --------- 1) Log into staff client 2) Acquisitions 3) Create a basket for two differing vendors. 4) Place an order in one of the baskets. 5) Transfer the order from one vendor's basket to the others. 6) Apply this patch (1) only 7) prove -v t/db_dependent/Acquisition/TransferOrder.t -- should fail one test: not marked as 'cancelled'.
Created attachment 38669 [details] [review] Bug 13993 - (2) Correct poorly transferred orders Added Atomic Update to fix poorly transferred orders TEST PLAN --------- 8) Apply patch (2) 9) Run the database updates $ ./installer/data/mysql/updatedatabase.pl -- This should run without error 10) prove -v t/db_dependent/Acquisition/TransferOrder.t -- This should succeed now, because the update fixed it.
Created attachment 38670 [details] [review] Bug 13993 - (3) Transfer order leaves incorrect orderstatus 11) Apply patch (3) 12) Log in to staff client 13) Acquisitions 14) Create a basket for two different vendors 15) Place an order in one vendor's basket. 16) Transfer the order to the other vendor's basket. 17) prove -v t/db_dependent/Acquisition/TransferOrder.t -- This should succeed without intervention. 18) Run koha qa test tools for the last 3 commits.
Still debugging/testing...
Created attachment 38674 [details] [review] Bug 13993 - (1) Add tests to confirm 'new' and 'cancelled' This adds 2 tests to t/db_dependent/Acquisition/TransferOrder.t in order to confirm the order's status is properly marked. TEST PLAN --------- 1) Log into staff client 2) Acquisitions 3) Create a basket for two differing vendors. 4) Place an order in one of the baskets. 5) Transfer the order from one vendor's basket to the others. 6) Apply this patch (1) only 7) prove -v t/db_dependent/Acquisition/TransferOrder.t -- should fail one test: not marked as 'cancelled'.
Created attachment 38675 [details] [review] Bug 13993 - (2) Correct poorly transferred orders Added Atomic Update to fix poorly transferred orders TEST PLAN --------- 8) Apply patch (2) 9) Run the database updates $ ./installer/data/mysql/updatedatabase.pl -- This should run without error 10) prove -v t/db_dependent/Acquisition/TransferOrder.t -- This should fail, because the transfer function is still not fixed.
Created attachment 38676 [details] [review] Bug 13993 - (3) Transfer order leaves incorrect orderstatus 11) Apply patch (3) 12) Log in to staff client 13) Acquisitions 14) Create a basket for two different vendors 15) Place an order in one vendor's basket. 16) Transfer the order to the other vendor's basket. 17) prove -v t/db_dependent/Acquisition/TransferOrder.t -- This should succeed without intervention. 18) Run koha qa test tools for the last 3 commits.
Created attachment 39017 [details] [review] Bug 13993 - (1) Add tests to confirm 'new' and 'cancelled' This adds 2 tests to t/db_dependent/Acquisition/TransferOrder.t in order to confirm the order's status is properly marked. TEST PLAN --------- 1) Log into staff client 2) Acquisitions 3) Create a basket for two differing vendors. 4) Place an order in one of the baskets. 5) Transfer the order from one vendor's basket to the others. 6) Apply this patch (1) only 7) prove -v t/db_dependent/Acquisition/TransferOrder.t -- should fail one test: not marked as 'cancelled'. Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 39018 [details] [review] Bug 13993 - (2) Correct poorly transferred orders Added Atomic Update to fix poorly transferred orders TEST PLAN --------- 8) Apply patch (2) 9) Run the database updates $ ./installer/data/mysql/updatedatabase.pl -- This should run without error 10) prove -v t/db_dependent/Acquisition/TransferOrder.t -- This should fail, because the transfer function is still not fixed. Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 39019 [details] [review] Bug 13993 - (3) Transfer order leaves incorrect orderstatus 11) Apply patch (3) 12) Log in to staff client 13) Acquisitions 14) Create a basket for two different vendors 15) Place an order in one vendor's basket. 16) Transfer the order to the other vendor's basket. 17) prove -v t/db_dependent/Acquisition/TransferOrder.t -- This should succeed without intervention. 18) Run koha qa test tools for the last 3 commits. Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 39535 [details] [review] Bug 13993 - (1) Add tests to confirm 'new' and 'cancelled' This adds 2 tests to t/db_dependent/Acquisition/TransferOrder.t in order to confirm the order's status is properly marked. TEST PLAN --------- 1) Log into staff client 2) Acquisitions 3) Create a basket for two differing vendors. 4) Place an order in one of the baskets. 5) Transfer the order from one vendor's basket to the others. 6) Apply this patch (1) only 7) prove -v t/db_dependent/Acquisition/TransferOrder.t -- should fail one test: not marked as 'cancelled'. Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Created attachment 39536 [details] [review] Bug 13993 - (2) Correct poorly transferred orders Added Atomic Update to fix poorly transferred orders TEST PLAN --------- 8) Apply patch (2) 9) Run the database updates $ ./installer/data/mysql/updatedatabase.pl -- This should run without error 10) prove -v t/db_dependent/Acquisition/TransferOrder.t -- This should fail, because the transfer function is still not fixed. Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Created attachment 39537 [details] [review] Bug 13993 - (3) Transfer order leaves incorrect orderstatus 11) Apply patch (3) 12) Log in to staff client 13) Acquisitions 14) Create a basket for two different vendors 15) Place an order in one vendor's basket. 16) Transfer the order to the other vendor's basket. 17) prove -v t/db_dependent/Acquisition/TransferOrder.t -- This should succeed without intervention. 18) Run koha qa test tools for the last 3 commits. Signed-off-by: Indranil Das Gupta <indradg@gmail.com> Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Created attachment 39538 [details] [review] Bug 13993: Clarify test messages Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Patches pushed to master. Thanks Mark and Amit!
Problem also appears in 3.18 - Chris and Liz - can you consider this for backporting please?
Yep, will have a look.
Pushed to 3.20.x will be in 3.20.2