[Bug 17843] New: Move C4::Koha::getitemtypeinfo to Koha::ItemTypes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Bug ID: 17843 Summary: Move C4::Koha::getitemtypeinfo to Koha::ItemTypes Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 17835 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17835 [Bug 17835] Move C4::Koha::GetItemTypes to Koha::ItemTypes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15779 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15779 [Bug 15779] Remove unnecessary parts of C4::Koha -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 58583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58583&action=edit Bug 17843: Repace C4::Koha::getitemtypeinfo with Koha::ItemTypes The C4::Koha::getitemtypeinfo subroutine did the almost same job as GetItemTypes. On top of that it returned the imageurl value processed by C4::Koha::getitemtypeimagelocation. This value is only used from the 2 [opac-]shelves.pl scripts. Then it's better not retrieve it only when we need it. Test plan: Play with the different scripts touched by this patch and focus on item types. The same description as prior to this patch must be displayed. Note that sometimes it is not the translated description which is displayed, but that should be fixed on another bug report. Indeed we do not expect this patch to change any behaviors. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 58584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58584&action=edit Bug 17843: Remove C4::Koha::getitemtypeinfo At this point there should not be any calls to this subroutine. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 --- Comment #3 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 61972 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61972&action=edit Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes The C4::Koha::getitemtypeinfo subroutine did the almost same job as GetItemTypes. On top of that it returned the imageurl value processed by C4::Koha::getitemtypeimagelocation. This value is only used from the 2 [opac-]shelves.pl scripts. Then it's better not retrieve it only when we need it. Test plan: Play with the different scripts touched by this patch and focus on item types. The same description as prior to this patch must be displayed. Note that sometimes it is not the translated description which is displayed, but that should be fixed on another bug report. Indeed we do not expect this patch to change any behaviors. Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58584|0 |1 is obsolete| | --- Comment #4 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 61973 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61973&action=edit Bug 17843: Remove C4::Koha::getitemtypeinfo At this point there should not be any calls to this subroutine. Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lari.taskula@jns.fi Attachment #58583|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 --- Comment #5 from Lari Taskula <lari.taskula@jns.fi> --- Rebased on top of master, fixed a minor conflict and typo in patch title. Tested scripts touched by first patch. Switching to Signed Off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Bug 17843 depends on bug 17835, which changed state. Bug 17835 Summary: Move C4::Koha::GetItemTypes to Koha::ItemTypes https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17835 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61972|0 |1 is obsolete| | --- Comment #6 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62266 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62266&action=edit Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes The C4::Koha::getitemtypeinfo subroutine did the almost same job as GetItemTypes. On top of that it returned the imageurl value processed by C4::Koha::getitemtypeimagelocation. This value is only used from the 2 [opac-]shelves.pl scripts. Then it's better not retrieve it only when we need it. Test plan: Play with the different scripts touched by this patch and focus on item types. The same description as prior to this patch must be displayed. Note that sometimes it is not the translated description which is displayed, but that should be fixed on another bug report. Indeed we do not expect this patch to change any behaviors. Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61973|0 |1 is obsolete| | --- Comment #7 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62267 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62267&action=edit Bug 17843: Remove C4::Koha::getitemtypeinfo At this point there should not be any calls to this subroutine. Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62266|0 |1 is obsolete| | Attachment #62267|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64400 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64400&action=edit Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes The C4::Koha::getitemtypeinfo subroutine did the almost same job as GetItemTypes. On top of that it returned the imageurl value processed by C4::Koha::getitemtypeimagelocation. This value is only used from the 2 [opac-]shelves.pl scripts. Then it's better not retrieve it only when we need it. Test plan: Play with the different scripts touched by this patch and focus on item types. The same description as prior to this patch must be displayed. Note that sometimes it is not the translated description which is displayed, but that should be fixed on another bug report. Indeed we do not expect this patch to change any behaviors. Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64401 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64401&action=edit Bug 17843: Remove C4::Koha::getitemtypeinfo At this point there should not be any calls to this subroutine. Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Looking here now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64400|0 |1 is obsolete| | --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 64582 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64582&action=edit Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes The C4::Koha::getitemtypeinfo subroutine did the almost same job as GetItemTypes. On top of that it returned the imageurl value processed by C4::Koha::getitemtypeimagelocation. This value is only used from the 2 [opac-]shelves.pl scripts. Then it's better not retrieve it only when we need it. Test plan: Play with the different scripts touched by this patch and focus on item types. The same description as prior to this patch must be displayed. Note that sometimes it is not the translated description which is displayed, but that should be fixed on another bug report. Indeed we do not expect this patch to change any behaviors. Signed-off-by: Lari Taskula <lari.taskula@jns.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64401|0 |1 is obsolete| | --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 64583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64583&action=edit Bug 17843: Remove C4::Koha::getitemtypeinfo At this point there should not be any calls to this subroutine. Signed-off-by: Lari Taskula <lari.taskula@jns.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 64584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64584&action=edit Bug 17843: [QA Follow-up] Some polishing Resolve warning from members/summary-print.pl: "my" variable $itemtype masks earlier declaration in same scope Test if find returns a Koha object in GetDescription. Test if find returns a Koha object too in shelves.pl. While testing, I had a crash on a biblioitem with itemtype NULL (bad record, but these things tend to happen somehow.) Can't call method "imageurl" on an undefined value at virtualshelves/shelves.pl line 253. Same for opac/opac-shelves.pl. Note: Did not add tests everywhere but generally, I have the impression that we do not sufficiently test on the results of Koha::Object->find. Mostly we just assume that it will find a record. Several reports include fixes to resolve that wrong assumption. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Master |RESOLVED CC| |fridolin.somers@biblibre.co | |m --- Comment #15 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Enhancement not pushed to 17.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18971 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18971 [Bug 18971] Typo Koha::ItemsTypes for Koha::ItemTypes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19194 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19194 [Bug 19194] Internal server error when receiving an order with no itemtype -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19978 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19978 [Bug 19978] ITEMTYPECAT is broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17843 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21842 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21842 [Bug 21842] always test Koha::ItemType in defined -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org