Summary: | Stock rotation fails to advance when an item is checked out from the branch that is the next stage | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Tools | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | andrew, kyle, lisettepalouse+koha, martin.renvoize, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.05.00,21.11.03,21.05.11
|
|
Circulation function: | |||
Attachments: |
Bug 29808: Unit tests
Bug 29808: Do not receive transfer for checked out items Bug 29808: Unit tests Bug 29808: Do not receive transfer for checked out items |
Description
Nick Clemens (kidclamp)
2022-01-06 12:27:31 UTC
Created attachment 129061 [details] [review] Bug 29808: Unit tests Created attachment 129062 [details] [review] Bug 29808: Do not receive transfer for checked out items This patch adds a check to StockRotationItem->advance to check if an item is checked out from the destination branch. If so, we do not receive the transfer To test: 1 - Enable StockRotation system preference 2 - Browse to Tools->Stock rotation->New Rota and create a new rota, set as cyclical 3 - Manage->stages and add two stages, each with 0 day duration 4 - Manage->items - add an item 5 - Checkout the item from the first branch of rotation 6 - Tools->Stock rotation->Manage->items->move to next stage 7 - Error: [Transfer item is currently checked out] at /usr/share/perl5/Exception/Class/Base.pm line 88 8 - Check in the item at first branch 9 - Checkout the item from the second stage branch 10 - Apply patch 11 - Tools->Stock rotation->Manage->items->move to next stage 12 - No error! 13 - Check in item at second branch 14 - Checkout from first branch 15 - Tools->Stock rotation->Manage->items->move to next stage 16 - Still no error! Created attachment 129082 [details] [review] Bug 29808: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 129083 [details] [review] Bug 29808: Do not receive transfer for checked out items This patch adds a check to StockRotationItem->advance to check if an item is checked out from the destination branch. If so, we do not receive the transfer To test: 1 - Enable StockRotation system preference 2 - Browse to Tools->Stock rotation->New Rota and create a new rota, set as cyclical 3 - Manage->stages and add two stages, each with 0 day duration 4 - Manage->items - add an item 5 - Checkout the item from the first branch of rotation 6 - Tools->Stock rotation->Manage->items->move to next stage 7 - Error: [Transfer item is currently checked out] at /usr/share/perl5/Exception/Class/Base.pm line 88 8 - Check in the item at first branch 9 - Checkout the item from the second stage branch 10 - Apply patch 11 - Tools->Stock rotation->Manage->items->move to next stage 12 - No error! 13 - Check in item at second branch 14 - Checkout from first branch 15 - Tools->Stock rotation->Manage->items->move to next stage 16 - Still no error! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Going straight for QA on this one.. Fix works as expected and I can see exactly how/where I introduced the issue (Thanks for spotting and fixing it Nick!). Covered by new unit tests, tests passing, no regressions found and fixes the bug reported. QA script also happy, Passing QA. Pushed to master for 22.05, thanks to everybody involved [U+1F984] Pushed to 21.11.x for 21.11.03 Pushed to 21.05.x for 21.05.11 |