[Bug 28754] New: C4::Reserves::FixPriority creates many warns when holds have lowestPriority set
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28754 Bug ID: 28754 Summary: C4::Reserves::FixPriority creates many warns when holds have lowestPriority set 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 To recreate: 1 - Add holds with lowest priorty to 2 records in the catalog 2 - Add a hold on a third record 3 - Note errors in log like: [2021/07/23 17:47:17] [WARN] splice() offset past end of array at /kohadevbox/koha/C4/Reserves.pm line 1649 -- 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=28754 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=28754 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 123147 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123147&action=edit Bug 28754: Only adjust holds on specific biblio and don't go past end of array Our query for lowest priority holds only needs to adjust holds on the biblio we are looking at so I add biblionumber Additionally we can simply find the end of the array and use that rather than 99998 so I set new_rank to scalar @priority Lastly, we don't need to fetch the lowest priority holds if we are ignoring lowest priority so I move it into the conditional To test: 1 - Add holds with lowest priorty to 2 records in the catalog 2 - Add a hold on a third record 3 - Note errors in log like: [2021/07/23 17:47:17] [WARN] splice() offset past end of array at /kohadevbox/koha/C4/Reserves.pm line 1649 4 - Apply patch and restart all the things 5 - Add a new hold on third record - no warns 6 - Make one of the holds on third record have lowestPriority (click rightmost arrow with line at bottom) 7 - Note no warns 8 - Adjust other holds on record and note no warns -- 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=28754 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=28754 David Nind <david@davidnind.com> 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=28754 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123147|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 123158 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123158&action=edit Bug 28754: Only adjust holds on specific biblio and don't go past end of array Our query for lowest priority holds only needs to adjust holds on the biblio we are looking at so I add biblionumber Additionally we can simply find the end of the array and use that rather than 99998 so I set new_rank to scalar @priority Lastly, we don't need to fetch the lowest priority holds if we are ignoring lowest priority so I move it into the conditional To test: 1 - Add holds with lowest priorty to 2 records in the catalog 2 - Add a hold on a third record 3 - Note errors in log like: [2021/07/23 17:47:17] [WARN] splice() offset past end of array at /kohadevbox/koha/C4/Reserves.pm line 1649 4 - Apply patch and restart all the things 5 - Add a new hold on third record - no warns 6 - Make one of the holds on third record have lowestPriority (click rightmost arrow with line at bottom) 7 - Note no warns 8 - Adjust other holds on record and note no warns Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28754 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |joonas.kylmala@helsinki.fi |y.org | CC| |joonas.kylmala@helsinki.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28754 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=28754 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123158|0 |1 is obsolete| | --- Comment #3 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 123242 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123242&action=edit Bug 28754: Only adjust holds on specific biblio and don't go past end of array Our query for lowest priority holds only needs to adjust holds on the biblio we are looking at so I add biblionumber Additionally we can simply find the end of the array and use that rather than 99998 so I set new_rank to scalar @priority Lastly, we don't need to fetch the lowest priority holds if we are ignoring lowest priority so I move it into the conditional To test: 1 - Add holds with lowest priorty to 2 records in the catalog 2 - Add a hold on a third record 3 - Note errors in log like: [2021/07/23 17:47:17] [WARN] splice() offset past end of array at /kohadevbox/koha/C4/Reserves.pm line 1649 4 - Apply patch and restart all the things 5 - Add a new hold on third record - no warns 6 - Make one of the holds on third record have lowestPriority (click rightmost arrow with line at bottom) 7 - Note no warns 8 - Adjust other holds on record and note no warns Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28754 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28754 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.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=28754 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|21.11.00 |21.11.00,21.05.03 released in| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28754 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|21.11.00,21.05.03 |21.11.00,21.05.03,20.11.09 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28754 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |victor@tuxayo.net --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org