Bug 23432 - Stock rotation: cancelled transfer result in stockrotation failures
Summary: Stock rotation: cancelled transfer result in stockrotation failures
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Martin Renvoize
QA Contact: Nick Clemens
URL:
Keywords:
Depends on: 11897 24296
Blocks:
  Show dependency treegraph
 
Reported: 2019-08-05 16:12 UTC by Martin Renvoize
Modified: 2020-11-17 20:39 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.06


Attachments
Bug 23432: Replace 'die' with 'warn' (995 bytes, patch)
2020-09-23 11:29 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23432: Replace 'die' with 'warn' (1.03 KB, patch)
2020-10-24 21:34 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 23432: Replace 'die' with 'warn' (1.08 KB, patch)
2020-10-24 23:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23432: (QA follow-up) Add a unit test (1.49 KB, patch)
2020-10-24 23:54 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2019-08-05 16:12:22 UTC
If one cancels a transfer that has been initiated via StockRotation, then the next call to the stockrotation cronjob will fail due to a 'die' line when said transfer can no longer be found.
Comment 1 Martin Renvoize 2020-09-23 11:29:53 UTC
Created attachment 110591 [details] [review]
Bug 23432: Replace 'die' with 'warn'

This patch simply replaced the die statement with a warn such that the
cron script may continue to rotate other items even if this item cannot
be properly rotated due to corrupt data.
Comment 2 Martin Renvoize 2020-09-23 11:31:32 UTC
The patch here simply replaces the die with a warn. It does not attempt to fix the original cause of the data corruption that can take place... we attempt to resolve that in the transfers re-write tree where we significantly clean up how the transfers processes all interact.
Comment 3 Chris Cormack 2020-10-24 21:34:56 UTC
Created attachment 112405 [details] [review]
Bug 23432: Replace 'die' with 'warn'

This patch simply replaced the die statement with a warn such that the
cron script may continue to rotate other items even if this item cannot
be properly rotated due to corrupt data.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 4 Nick Clemens 2020-10-24 23:54:43 UTC
Created attachment 112424 [details] [review]
Bug 23432: Replace 'die' with 'warn'

This patch simply replaced the die statement with a warn such that the
cron script may continue to rotate other items even if this item cannot
be properly rotated due to corrupt data.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Nick Clemens 2020-10-24 23:54:49 UTC
Created attachment 112425 [details] [review]
Bug 23432: (QA follow-up) Add a unit test

prove -v t/db_dependent/StockRotationItems.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Jonathan Druart 2020-10-25 23:05:53 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 7 Lucas Gass 2020-11-13 18:34:47 UTC
backported to 20.05.x for 20.05.06
Comment 8 Aleisha Amohia 2020-11-17 04:23:01 UTC
missing dependencies, not backported to 19.11.x