[Bug 29786] New: Holds to pull report shows incorrect item for item level holds
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Bug ID: 29786 Summary: Holds to pull report shows incorrect item for item level holds Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org When running holds to pull it can show the wrong item for an item level hold. This is because we simply get the first barcode from the list of items that can fill the hold. The issue seems to come from 'get_items_that_can_fill' in Koha::Holds This does not take into account that an item level hold can only be filled by one item To recreate: 1 - Find a record with many items available 2 - Place an item level hold for an item on the record, not the one with lowest itemnumber 3 - Run 'Hold to pull' report 4 - Note the barcode does not match -- 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=29786 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=29786 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 128987 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128987&action=edit Bug 29786: Unit tests I add a new test for the case of an item level hold, and additionally adjust later tests to use a title level hold. I also fix a typo where the comment says item 1 when it means item 2 -- 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=29786 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 128988 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128988&action=edit Bug 29786: Select only specific items for item level holds This patch adjusts get_items_that_can_fill to make two requests: first the list of items for item-level holds second the list of biblionumbers for title-level holds This stops the report from pulling more items for item-level hold This patch also removes the aliases used in the code - while readability is a bit harder, it allows for using 'me' in get_items_that_can_fill Otherwise, this routine would need a parameter to know what we called the table. To test: 1 - Find a record with many items available 2 - Place an item level hold for an item on the record, not the one with lowest itemnumber 3 - Run 'Hold to pull' report 4 - Note the barcode does not match 5 - Apply patch 6 - Reload report 7 - It matches! -- 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=29786 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=29786 Andrew Fuerste-Henry <andrew@bywatersolutions.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=29786 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128987|0 |1 is obsolete| | --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 128989 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128989&action=edit Bug 29786: Unit tests I add a new test for the case of an item level hold, and additionally adjust later tests to use a title level hold. I also fix a typo where the comment says item 1 when it means item 2 Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128988|0 |1 is obsolete| | --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 128990 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128990&action=edit Bug 29786: Select only specific items for item level holds This patch adjusts get_items_that_can_fill to make two requests: first the list of items for item-level holds second the list of biblionumbers for title-level holds This stops the report from pulling more items for item-level hold This patch also removes the aliases used in the code - while readability is a bit harder, it allows for using 'me' in get_items_that_can_fill Otherwise, this routine would need a parameter to know what we called the table. To test: 1 - Find a record with many items available 2 - Place an item level hold for an item on the record, not the one with lowest itemnumber 3 - Run 'Hold to pull' report 4 - Note the barcode does not match 5 - Apply patch 6 - Reload report 7 - It matches! Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29148 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29148 [Bug 29148] Holds to Pull doesn't reflect item-level holds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |minna.kivinen@hamk.fi --- Comment #5 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- *** Bug 29161 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Jonathan Druart <jonathan.druart+koha@gmail.com> 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=29786 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128989|0 |1 is obsolete| | Attachment #128990|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 129139 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129139&action=edit Bug 29786: Unit tests I add a new test for the case of an item level hold, and additionally adjust later tests to use a title level hold. I also fix a typo where the comment says item 1 when it means item 2 Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 129140 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129140&action=edit Bug 29786: Select only specific items for item level holds This patch adjusts get_items_that_can_fill to make two requests: first the list of items for item-level holds second the list of biblionumbers for title-level holds This stops the report from pulling more items for item-level hold This patch also removes the aliases used in the code - while readability is a bit harder, it allows for using 'me' in get_items_that_can_fill Otherwise, this routine would need a parameter to know what we called the table. To test: 1 - Find a record with many items available 2 - Place an item level hold for an item on the record, not the one with lowest itemnumber 3 - Run 'Hold to pull' report 4 - Note the barcode does not match 5 - Apply patch 6 - Reload report 7 - It matches! Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- What a big dirty bug ^^ A short release note would be great -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, 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=29786 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Version(s)|22.05.00 |22.05.00,21.11.03 released in| | Status|Pushed to master |Pushed to stable --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch corrects an release notes| |issue with the Holds to | |Pull report in which an | |incorrect barcode number | |could be shown for an | |item-level hold. The | |correct barcode will now be | |shown. CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|22.05.00,21.11.03 |22.05.00,21.11.03,21.05.11 released in| | --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.11 I also backported 3142, which is seemed like this might require. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Jessie Zairo <jzairo@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jzairo@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29786 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Missing dependencies for 20.11.x, it shouldn't be affected, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org