[Bug 30269] New: Use objects directly to display holds on request.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Bug ID: 30269 Summary: Use objects directly to display holds on request.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com request.pl fetches holds objects, then loops over them to build a hash for display - we don't need this intermediate step. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 131558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131558&action=edit Bug 30269: Use objects directly on request.pl This patch removes our loop over the hold objects, and simply passes them directly to the template Template is adjusted to use ojbects and accessor method Related objects are prefetched to avoid more DB calls when display Use of 'iswaiting' and related methods are removed - it is faster to use the accessor and test To test: 1 - Place many holds on a record 2 - Set soem waiting, some in transit 3 - View the holds page and note loading time 4 - Apply patch 5 - Reload 6 - Page appears the same 7 - Load time is faster (more with more holds) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 131559 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131559&action=edit Perf check This compared the time for using accessor versus subroutines for checking transit, waiting, etc. accessor were faster in both cases, but more drastically so in case of a found hold Unfound hold: Rate objectMethodAtD objectMethodIsW objectMethodIsF objectAccessorW objectAccessorF objectMethodAtD 546/s -- -1% -5% -6% -8% objectMethodIsW 553/s 1% -- -4% -5% -7% objectMethodIsF 576/s 6% 4% -- -1% -3% objectAccessorW 579/s 6% 5% 1% -- -3% objectAccessorF 596/s 9% 8% 3% 3% -- Found hold: Rate objectMethodIsF objectMethodAtD objectMethodIsW objectAccessorW objectAccessorF objectMethodIsF 183/s -- -63% -65% -67% -68% objectMethodAtD 500/s 173% -- -3% -9% -12% objectMethodIsW 516/s 182% 3% -- -7% -10% objectAccessorW 552/s 201% 10% 7% -- -3% objectAccessorF 572/s 212% 14% 11% 4% -- -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30266 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30266 [Bug 30266] Holds marked waiting with a holdingbranch that does not match can cause loss of pickup locations -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30270 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30270 [Bug 30270] Use numeric inputs instead of dropdowns for hold priority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Needs Signoff |Failed QA --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I love this patch, but can you name the relationship 'library' instead of 'branch'? Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131558|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 132245 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132245&action=edit Bug 30269: Use objects directly on request.pl This patch removes our loop over the hold objects, and simply passes them directly to the template Template is adjusted to use ojbects and accessor method Related objects are prefetched to avoid more DB calls when display Use of 'iswaiting' and related methods are removed - it is faster to use the accessor and test To test: 1 - Place many holds on a record 2 - Set soem waiting, some in transit 3 - View the holds page and note loading time 4 - Apply patch 5 - Reload 6 - Page appears the same 7 - Load time is faster (more with more holds) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132245|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134548 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134548&action=edit Bug 30269: Use objects directly on request.pl This patch removes our loop over the hold objects, and simply passes them directly to the template Template is adjusted to use ojbects and accessor method Related objects are prefetched to avoid more DB calls when display Use of 'iswaiting' and related methods are removed - it is faster to use the accessor and test To test: 1 - Place many holds on a record 2 - Set soem waiting, some in transit 3 - View the holds page and note loading time 4 - Apply patch 5 - Reload 6 - Page appears the same 7 - Load time is faster (more with more holds) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134552&action=edit Bug 30269: (follow-up) Remove object references as using directly now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- I'm getting this error when I try to place the hold, after selecting the patron: Broken FK constraint at /usr/share/perl5/Exception/Class/Base.pm line 88 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- I cannot recreate, can you test again? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |marie-luce.laflamme@inlibro | |.com --- Comment #9 from Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com> --- Patch doesn't apply. I've followed the test plan 1 - Place many holds on a record 2 - Set some waiting, some in transit 3 - View the holds page and note loading time 4 - Apply patch 5 - Reload 6 - Page appears the same 7 - Load time is faster (more with more holds) Somehow, the reserve/request.pl?biblionumber= display changed after applying the patch. It shows up a new button with the bugnumber. see my test in this sandboxe https://staff-test.sandbox.bywatersolutions.com/cgi-bin/koha/reserve/request... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 --- Comment #10 from Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com> --- Created attachment 136794 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136794&action=edit hold page incorrect display after applying the patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134548|0 |1 is obsolete| | Attachment #134552|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 137725 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137725&action=edit Bug 30269: Use objects directly on request.pl This patch removes our loop over the hold objects, and simply passes them directly to the template Template is adjusted to use ojbects and accessor method Related objects are prefetched to avoid more DB calls when display Use of 'iswaiting' and related methods are removed - it is faster to use the accessor and test To test: 1 - Place many holds on a record 2 - Set soem waiting, some in transit 3 - View the holds page and note loading time 4 - Apply patch 5 - Reload 6 - Page appears the same 7 - Load time is faster (more with more holds) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 137726 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137726&action=edit Bug 30269: (follow-up) Remove object references as using directly now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrewfh@dubcolib.org Status|Needs Signoff |Failed QA --- Comment #13 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- With this patch applied on a sandbox, I am not able to open request.pl for a bib with holds on it. I get the following error: "Template process failed: undef error - The method Koha::Hold->date is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 875" After a bunch of error output, it goes on to say: "in C4::Templates::output at /kohadevbox/koha/C4/Templates.pm line 127" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30269 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emily.lamancusa@montgomeryc | |ountymd.gov -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org