Bug 24296 - Move stock rotation transfer triggers from `comments` to `reason`
Summary: Move stock rotation transfer triggers from `comments` to `reason`
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 24287
Blocks: 23432 24298
  Show dependency treegraph
 
Reported: 2019-12-23 09:36 UTC by Martin Renvoize
Modified: 2020-11-30 21:44 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 24296: Update stockrotation process to use branchtransfers.trigger (7.43 KB, patch)
2020-01-16 09:03 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24296: Update existing data in the database (2.94 KB, patch)
2020-01-16 09:03 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24296: Update existing data in the database (2.99 KB, patch)
2020-01-17 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24296: Update stockrotation process to use branchtransfers.trigger (5.19 KB, patch)
2020-01-17 11:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24296: Update existing data in the database (3.06 KB, patch)
2020-01-17 14:02 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24296: Update stockrotation process to use branchtransfers.trigger (5.26 KB, patch)
2020-01-17 14:02 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24296: Update existing data in the database (2.98 KB, patch)
2020-01-17 16:00 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24296: Update stockrotation process to use branchtransfers.reason (5.18 KB, patch)
2020-01-17 16:00 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24296: Update existing data in the database (3.07 KB, patch)
2020-01-28 12:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24296: Update stockrotation process to use branchtransfers.reason (5.25 KB, patch)
2020-01-28 12:56 UTC, Jonathan Druart
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-12-23 09:36:09 UTC
Stock rotation misused the 'comments' field in branchtransfers to track that a transfer was triggered by the stock rotation subsystem.  We should use a the new 'trigger' field for this instead.
Comment 1 Martin Renvoize 2020-01-16 09:03:14 UTC
Created attachment 97433 [details] [review]
Bug 24296: Update stockrotation process to use branchtransfers.trigger

This patch updates all occurences of stockrotation related lookups of
branchtransfers status from using the 'comments' field to using the new
'trigger' field.

Test plan:
1) Work through the process of creating a stock rotation plan and adding
   items to the plan.. no errors should be encoutered during this process.
2) Run the stockrotation cronjob to move some items on.. no errors
   should be encountered.
3) Navigate to the transferstosend page in the circulation area of the
   staff client.. no errors should be encountered.
Comment 2 Martin Renvoize 2020-01-16 09:03:17 UTC
Created attachment 97434 [details] [review]
Bug 24296: Update existing data in the database

This DB udpate adds the stockration states to the trigger enum in the
branchtransfers table and then populates it with any such data currently
contained within the comments field.
Comment 3 Martin Renvoize 2020-01-17 11:42:22 UTC
Created attachment 97504 [details] [review]
Bug 24296: Update existing data in the database

This DB udpate adds the stockration states to the trigger enum in the
branchtransfers table and then populates it with any such data currently
contained within the comments field.

https://bugs.koha-community.org/show_bug.cgi?id=24292
Comment 4 Martin Renvoize 2020-01-17 11:42:25 UTC
Created attachment 97505 [details] [review]
Bug 24296: Update stockrotation process to use branchtransfers.trigger

This patch updates all occurences of stockrotation related lookups of
branchtransfers status from using the 'comments' field to using the new
'trigger' field.

Test plan:
1) Work through the process of creating a stock rotation plan and adding
   items to the plan.. no errors should be encoutered during this process.
2) Run the stockrotation cronjob to move some items on.. no errors
   should be encountered.

https://bugs.koha-community.org/show_bug.cgi?id=24292
Comment 5 Kyle M Hall 2020-01-17 14:02:17 UTC
Created attachment 97517 [details] [review]
Bug 24296: Update existing data in the database

This DB udpate adds the stockration states to the trigger enum in the
branchtransfers table and then populates it with any such data currently
contained within the comments field.

https://bugs.koha-community.org/show_bug.cgi?id=24292

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Kyle M Hall 2020-01-17 14:02:31 UTC
Created attachment 97518 [details] [review]
Bug 24296: Update stockrotation process to use branchtransfers.trigger

This patch updates all occurences of stockrotation related lookups of
branchtransfers status from using the 'comments' field to using the new
'trigger' field.

Test plan:
1) Work through the process of creating a stock rotation plan and adding
   items to the plan.. no errors should be encoutered during this process.
2) Run the stockrotation cronjob to move some items on.. no errors
   should be encountered.

https://bugs.koha-community.org/show_bug.cgi?id=24292

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Martin Renvoize 2020-01-17 16:00:14 UTC
Created attachment 97533 [details] [review]
Bug 24296: Update existing data in the database

This DB udpate adds the stockration states to the trigger enum in the
branchtransfers table and then populates it with any such data currently
contained within the comments field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Martin Renvoize 2020-01-17 16:00:17 UTC
Created attachment 97534 [details] [review]
Bug 24296: Update stockrotation process to use branchtransfers.reason

This patch updates all occurences of stockrotation related lookups of
branchtransfers status from using the 'comments' field to using the new
'reason' field.

Test plan:
1) Work through the process of creating a stock rotation plan and adding
   items to the plan.. no errors should be encoutered during this process.
2) Run the stockrotation cronjob to move some items on.. no errors
   should be encountered.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Jonathan Druart 2020-01-28 12:33:28 UTC
CONFLICT (content): Merge conflict in t/db_dependent/StockRotationItems.t
CONFLICT (content): Merge conflict in Koha/StockRotationItem.pm
Comment 10 Jonathan Druart 2020-01-28 12:35:26 UTC
(In reply to Jonathan Druart from comment #9)
> CONFLICT (content): Merge conflict in t/db_dependent/StockRotationItems.t
> CONFLICT (content): Merge conflict in Koha/StockRotationItem.pm

Forget that, a previous patch was not obsoleted.
Comment 11 Jonathan Druart 2020-01-28 12:56:18 UTC
Created attachment 98024 [details] [review]
Bug 24296: Update existing data in the database

This DB udpate adds the stockration states to the trigger enum in the
branchtransfers table and then populates it with any such data currently
contained within the comments field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2020-01-28 12:56:21 UTC
Created attachment 98025 [details] [review]
Bug 24296: Update stockrotation process to use branchtransfers.reason

This patch updates all occurences of stockrotation related lookups of
branchtransfers status from using the 'comments' field to using the new
'reason' field.

Test plan:
1) Work through the process of creating a stock rotation plan and adding
   items to the plan.. no errors should be encoutered during this process.
2) Run the stockrotation cronjob to move some items on.. no errors
   should be encountered.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Martin Renvoize 2020-01-28 15:06:37 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 14 Joy Nelson 2020-02-10 22:40:10 UTC
enhancement not backported to 19.11.x