Currently when adding an order to a basket from an accepted suggestion, the status of the suggestion goes from 'accepted' to 'ordered'. If the order is then cancelled, the suggestion remains as 'ordered'. The status should be reverted to 'accepted' as it is no longer on order.
Created attachment 147526 [details] [review] Bug 33098: Revert suggestion status when orders are cancelled This enhancement will revert the status of a suggestion from ORDERED to ACCEPTED when an order made from a suggestion is cancelled. To test: 1. Log into the OPAC and go to purchase suggestions 2. Add a new purchase suggestion 3. Log into the staff interface. The suggestion will show on the home page 4. Select the suggestion and mark it as Accepted 5. Go to Acquisitions. Find or create a basket 6. Add an order to the basket from a suggestion 7. You'll be redirected to the suggestions page. Click the order button next to your suggestion 8. Fill out the order details as normal and confirm the order. 9. In a new tab, go to the suggestions management page and confirm the suggestion now shows as ORDERED. 10. In the other tab with your basket, cancel the order you just made from the suggestion. 11. Refresh the suggestions management tab. Confirm the suggestion now shows as ACCEPTED. 12. Confirm tests pass t/db_dependent/Koha/Acquisition/Order.t Sponsored-by: Waikato Institute of Technology
When testing, I still see the canceled orders as "ordered" on both the Staff Intranet and Opac.
Thanks Laura, if a test plan fails please set the Status to "failed QA". I'll take another look at this.
I've just re-tested this and the test plan still works - perhaps you forgot to restart services after applying the patch?
(In reply to Aleisha Amohia from comment #4) > I've just re-tested this and the test plan still works - perhaps you forgot > to restart services after applying the patch? Aleisha, I indeed forgot to restart the services after applying the patch. I retested everything and it works as expected. Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Created attachment 149826 [details] [review] Bug 33098: Revert suggestion status when orders are cancelled This enhancement will revert the status of a suggestion from ORDERED to ACCEPTED when an order made from a suggestion is cancelled. To test: 1. Log into the OPAC and go to purchase suggestions 2. Add a new purchase suggestion 3. Log into the staff interface. The suggestion will show on the home page 4. Select the suggestion and mark it as Accepted 5. Go to Acquisitions. Find or create a basket 6. Add an order to the basket from a suggestion 7. You'll be redirected to the suggestions page. Click the order button next to your suggestion 8. Fill out the order details as normal and confirm the order. 9. In a new tab, go to the suggestions management page and confirm the suggestion now shows as ORDERED. 10. In the other tab with your basket, cancel the order you just made from the suggestion. 11. Refresh the suggestions management tab. Confirm the suggestion now shows as ACCEPTED. 12. Confirm tests pass t/db_dependent/Koha/Acquisition/Order.t Sponsored-by: Waikato Institute of Technology Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
@Laura hi, thanks for the signoff :) The "Signed-off-by" line needs to be added to the patch itself and the updated/signed patch needs to be attached to the ticket here. You likely have git bz installed in you test environment or maybe you are using the sandboxes. Here is some documentation about how add a signoff to a patch and how to attach it here. You might want to discuss that with a colleague to find what's the most efficient or simplest workflow for your case. https://wiki.koha-community.org/wiki/Sign_off_on_patches#Method_1:_Using_sandboxes https://wiki.koha-community.org/wiki/Sign_off_on_patches#Method_2%3A_Using_git_bz https://wiki.koha-community.org/wiki/Git_bz_configuration#Signing_off
Works, makes sense, QA script happy, code looks good, passing QA :)
Pushed to master for 23.05. Nice work everyone, thanks!
Enhancement - not backporting to 22.11.x
*** Bug 29027 has been marked as a duplicate of this bug. ***
*** Bug 18770 has been marked as a duplicate of this bug. ***