Summary: | Closing and reopening a basket should not alter status of completed orders | ||
---|---|---|---|
Product: | Koha | Reporter: | Colin Campbell <colin.campbell> |
Component: | Acquisitions | Assignee: | Colin Campbell <colin.campbell> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | f.demians, koha, liz, marjorie.barry-vila, nengard, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 19024 | ||
Attachments: |
Proposed patch
[PASSED QA] Bug 15036: Do not overwrite complete status in basket ops |
Description
Colin Campbell
2015-10-20 11:59:18 UTC
eek! Created attachment 43682 [details] [review] Proposed patch Patch. To test create a basket with a number of orders close. receive one of the orders, reopening and closing the basket will change the received order status as outlined in the bug report. Apply the patch. Receive another order in the basket again reopen and close the basket. Note that the status of the completed order is not overridden by these operations Without the patch : I have added a new baskest with 2 orders, closed this basket, received one of the order. Orders status for this basket are "complete" and "ordered". I have re-opened the basket : ordered status are both "new". With the patch : I redone exactly the same stages, but afer reopening the basket, ordered status are "complete" and "ordered". Koha Team Lyon3 - is this a 'sign off'? :) Yes, this is signed off but I tried to sign it with a sandbox 15 mn ago and nothing happens so far... I will switch the status - we can add the line in QA if it doesn't appear. Created attachment 44551 [details] [review] [PASSED QA] Bug 15036: Do not overwrite complete status in basket ops Reopening or closing a basket should preserve the completed status for receipted orders. This patch excludes orderlines with the completed status from having their status rewritten as a result of the change in basket status Made the subroutines involved more efficient by removing an unnecessary loop and by not fetching a large amount of superfluous data Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Patch pushed to master. Thanks Colin! *** Bug 13467 has been marked as a duplicate of this bug. *** This patch has been pushed to 3.20.x, will be in 3.20.6. Pushed to 3.18.13, and released. A note for later: Should we also include a database update to recalculate the status affected correctly? The initial SQL when the feature was introduced could give some ideas. |