Bug 29809

Summary: StockRotationItems->itemnumber is poorly named
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Architecture, internals, and plumbingAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, kyle, martin.renvoize, victor
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:
22.05.00,21.11.03,21.05.11
Circulation function:
Attachments: Bug 29809: Rename item relation accessor from itemnumber
Bug 29809: Update stockration tool to reflect method name change
Bug 29809: Rename item relation accessor from itemnumber
Bug 29809: Update stockration tool to reflect method name change
Bug 29809: (follow-up) Update tests and rename variable
Bug 29809: Rename item relation accessor from itemnumber
Bug 29809: Update stockration tool to reflect method name change
Bug 29809: (follow-up) Update tests and rename variable
Bug 29809: Fix StockRotationStages.t

Description Nick Clemens (kidclamp) 2022-01-06 12:45:22 UTC
This subroutine returns a Koha::Item object - not an itemnumber

Leads to fun lines of code like:
$sr_item->itemnumber->itemnumber
Comment 1 Martin Renvoize (ashimema) 2022-01-06 14:05:41 UTC
Created attachment 129086 [details] [review]
Bug 29809: Rename item relation accessor from itemnumber

This patch renames the item relation accessor method in
StockRotationItem to 'item' from 'itemnumber' to more clearly reflect
that the method returns a Koha::Item object and not an itemnumber.
Comment 2 Martin Renvoize (ashimema) 2022-01-06 14:05:45 UTC
Created attachment 129087 [details] [review]
Bug 29809: Update stockration tool to reflect method name change
Comment 3 Martin Renvoize (ashimema) 2022-01-06 14:06:19 UTC
Hopefully that catches all spots
Comment 4 Katrin Fischer 2022-01-08 21:52:45 UTC
Hi Nick, you accidentally attached patches to bug 28909 - including a follow-up with a typo in the bug number. Can you please check? 

I have fixed the attachments on the other bug.
Comment 5 Nick Clemens (kidclamp) 2022-01-18 12:00:54 UTC
Created attachment 129548 [details] [review]
Bug 29809: Rename item relation accessor from itemnumber

This patch renames the item relation accessor method in
StockRotationItem to 'item' from 'itemnumber' to more clearly reflect
that the method returns a Koha::Item object and not an itemnumber.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Nick Clemens (kidclamp) 2022-01-18 12:00:57 UTC
Created attachment 129549 [details] [review]
Bug 29809: Update stockration tool to reflect method name change

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Nick Clemens (kidclamp) 2022-01-18 12:01:00 UTC
Created attachment 129550 [details] [review]
Bug 29809: (follow-up) Update tests and rename variable

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 8 Jonathan Druart 2022-01-27 16:15:12 UTC
Created attachment 129901 [details] [review]
Bug 29809: Rename item relation accessor from itemnumber

This patch renames the item relation accessor method in
StockRotationItem to 'item' from 'itemnumber' to more clearly reflect
that the method returns a Koha::Item object and not an itemnumber.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2022-01-27 16:15:17 UTC
Created attachment 129902 [details] [review]
Bug 29809: Update stockration tool to reflect method name change

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2022-01-27 16:15:21 UTC
Created attachment 129903 [details] [review]
Bug 29809: (follow-up) Update tests and rename variable

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2022-01-27 16:15:26 UTC
Created attachment 129904 [details] [review]
Bug 29809: Fix StockRotationStages.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Fridolin Somers 2022-02-01 07:57:14 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑
Comment 13 Kyle M Hall (khall) 2022-02-07 16:51:00 UTC
Pushed to 21.11.x for 21.11.03
Comment 14 Andrew Fuerste-Henry 2022-02-21 15:46:14 UTC
Pushed to 21.05.x for 21.05.11
Comment 15 Victor Grousset/tuxayo 2022-02-24 22:35:32 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.