When searching holds we pass $self->{item}->id, which is the barcode, as the itemnumber.
Created attachment 95999 [details] [review] Bug 24175: Unit tests
Created attachment 96000 [details] [review] Bug 24175: Use itemnumber when searching for holds in SIP drop_hold To test: 1 - place a hold for a patron 2 - Get SIP running https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup 3 - edit the sip_cli_emulator.pl for hold_mode from '+' to '-' 4 - Attempt to cancel hold 5 - It fails 6 - Apply patch 7 - Try again 8 - It succeeds
Created attachment 96372 [details] [review] Bug 24175: Take advantage of Koha::Item->holds
Created attachment 96375 [details] [review] Bug 24175: Unit tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 96376 [details] [review] Bug 24175: Use itemnumber when searching for holds in SIP drop_hold To test: 1 - place a hold for a patron 2 - Get SIP running https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup 3 - edit the sip_cli_emulator.pl for hold_mode from '+' to '-' 4 - Attempt to cancel hold 5 - It fails 6 - Apply patch 7 - Try again 8 - It succeeds Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 96377 [details] [review] Bug 24175: Take advantage of Koha::Item->holds Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 96378 [details] [review] Bug 24175: Simplify tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 96527 [details] [review] Bug 24175: Unit tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 96528 [details] [review] Bug 24175: Use itemnumber when searching for holds in SIP drop_hold To test: 1 - place a hold for a patron 2 - Get SIP running https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup 3 - edit the sip_cli_emulator.pl for hold_mode from '+' to '-' 4 - Attempt to cancel hold 5 - It fails 6 - Apply patch 7 - Try again 8 - It succeeds Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 96529 [details] [review] Bug 24175: Take advantage of Koha::Item->holds Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 96530 [details] [review] Bug 24175: Simplify tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
I added my sign-off for the patches from Jonathan because they were not so trivial. So now waiting for someone to QA this.
Created attachment 96534 [details] [review] Bug 24175: Unit tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 96535 [details] [review] Bug 24175: Use itemnumber when searching for holds in SIP drop_hold To test: 1 - place a hold for a patron 2 - Get SIP running https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup 3 - edit the sip_cli_emulator.pl for hold_mode from '+' to '-' 4 - Attempt to cancel hold 5 - It fails 6 - Apply patch 7 - Try again 8 - It succeeds Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 96536 [details] [review] Bug 24175: Take advantage of Koha::Item->holds Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 96537 [details] [review] Bug 24175: Simplify tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected and passes tests and qa scripts.. Passing QA
Nice work everyone! Pushed to master for 20.05
Pushed to 19.11.01
cant rebase for 19.05, if it is needed please supply a 19.05 patch.
Created attachment 96680 [details] [review] Bug 24175: [19.05.x] Unit tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 24175: Simplify tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 24175: [19.05.x] Remove use of Koha::Item::Holds
Created attachment 96681 [details] [review] Bug 24175: [19.05.x] Use itemnumber when searching for holds in SIP drop_hold To test: 1 - place a hold for a patron 2 - Get SIP running https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup 3 - edit the sip_cli_emulator.pl for hold_mode from '+' to '-' 4 - Attempt to cancel hold 5 - It fails 6 - Apply patch 7 - Try again 8 - It succeeds Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>