Summary: | SIP2 Connection is killed when an item that was not issued is checked in and generates a transfer | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | SIP2 | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | major | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, colin.campbell, fridolin.somers, jonathan.druart, kyle, martin.renvoize, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25726 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27196 |
||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.01,20.05.07,19.11.13
|
|
Circulation function: | |||
Bug Depends on: | 21020 | ||
Bug Blocks: | |||
Attachments: |
Bug 27166: Unit tests
Bug 27166: Set destination_loc to item->homebranch Bug 27166: Unit tests Bug 27166: Set destination_loc to item->homebranch Bug 27166: Unit tests Bug 27166: Set destination_loc to item->homebranch Bug 27166: [20.05.x] Set destination_loc to item->homebranch |
Description
Nick Clemens (kidclamp)
2020-12-07 20:16:18 UTC
Created attachment 114257 [details] [review] Bug 27166: Unit tests Created attachment 114258 [details] [review] Bug 27166: Set destination_loc to item->homebranch In bug 21020 we used the issue to fetch the item and then the homebranch. This fails when the item is not issued. We fetch the item already, so we can use it directly To test: 1 - Have an item belonging to branch A 2 - Check it in via sip at branch B: perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 --item CHESS1 -l FPL -m checkin 3 - The read command is blank and there is a warn about uninitialized data 4 - Apply patch 5 - Restart sip server 6 - Check the item in at branch A using the sip cli emulator 7 - Check it in at branch B 8 - This time the checkin should succeed and the output msg should be included Created attachment 114281 [details] [review] Bug 27166: Unit tests Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Created attachment 114282 [details] [review] Bug 27166: Set destination_loc to item->homebranch In bug 21020 we used the issue to fetch the item and then the homebranch. This fails when the item is not issued. We fetch the item already, so we can use it directly To test: 1 - Have an item belonging to branch A 2 - Check it in via sip at branch B: perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 --item CHESS1 -l FPL -m checkin 3 - The read command is blank and there is a warn about uninitialized data 4 - Apply patch 5 - Restart sip server 6 - Check the item in at branch A using the sip cli emulator 7 - Check it in at branch B 8 - This time the checkin should succeed and the output msg should be included Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Created attachment 114301 [details] [review] Bug 27166: Unit tests Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 114302 [details] [review] Bug 27166: Set destination_loc to item->homebranch In bug 21020 we used the issue to fetch the item and then the homebranch. This fails when the item is not issued. We fetch the item already, so we can use it directly To test: 1 - Have an item belonging to branch A 2 - Check it in via sip at branch B: perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 --item CHESS1 -l FPL -m checkin 3 - The read command is blank and there is a warn about uninitialized data 4 - Apply patch 5 - Restart sip server 6 - Check the item in at branch A using the sip cli emulator 7 - Check it in at branch B 8 - This time the checkin should succeed and the output msg should be included Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> This makes sense and also provides a minor performance boost (not double fetching the item). Tests pass, QA script passes... Passing QA Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.01 Created attachment 114536 [details] [review] Bug 27166: [20.05.x] Set destination_loc to item->homebranch In bug 21020 we used the issue to fetch the item and then the homebranch. This fails when the item is not issued. We fetch the item already, so we can use it directly In 20.05.x we don't have the item object, so we can just use the SIP transaction item To test: 1 - Have an item belonging to branch A 2 - Check it in via sip at branch B: perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 --item CHESS1 -l FPL -m checkin 3 - The read command is blank and there is a warn about uninitialized data 4 - Apply patch 5 - Restart sip server 6 - Check the item in at branch A using the sip cli emulator 7 - Check it in at branch B 8 - This time the checkin should succeed and the output msg should be included Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed to 20.05.x for 20.05.07 The tests pass in 19.11.x but I have an error message not in 20.05.x kohadev-koha@9ddfdbbbd877:/kohadevbox/koha$ prove t/db_dependent/SIP/Transaction.t t/db_dependent/SIP/Transaction.t .. 7/10 AddReturn error: branch 'SIP2' not found. Reverting to bH8GNQ at /kohadevbox/koha/C4/Circulation.pm line 1844. AddReturn error: branch 'SIP2' not found. Reverting to bH8GNQ at /kohadevbox/koha/C4/Circulation.pm line 1844. t/db_dependent/SIP/Transaction.t .. 9/10 AddReturn error: branch 'SIP2' not found. Reverting to lw0u4bBY02 at /kohadevbox/koha/C4/Circulation.pm line 1844. AddReturn error: branch 'SIP2' not found. Reverting to lw0u4bBY02 at /kohadevbox/koha/C4/Circulation.pm line 1844. t/db_dependent/SIP/Transaction.t .. ok All tests successful. Files=1, Tests=10, 6 wallclock secs ( 0.04 usr 0.00 sys + 4.78 cusr 0.78 csys = 5.60 CPU) Result: PASS That doesn't look good right? (In reply to Victor Grousset/tuxayo from comment #12) > The tests pass in 19.11.x but I have an error message not in 20.05.x > > kohadev-koha@9ddfdbbbd877:/kohadevbox/koha$ prove > t/db_dependent/SIP/Transaction.t > t/db_dependent/SIP/Transaction.t .. 7/10 AddReturn error: branch 'SIP2' not > found. Reverting to bH8GNQ at /kohadevbox/koha/C4/Circulation.pm line 1844. > AddReturn error: branch 'SIP2' not found. Reverting to bH8GNQ at > /kohadevbox/koha/C4/Circulation.pm line 1844. > t/db_dependent/SIP/Transaction.t .. 9/10 AddReturn error: branch 'SIP2' not > found. Reverting to lw0u4bBY02 at /kohadevbox/koha/C4/Circulation.pm line > 1844. > AddReturn error: branch 'SIP2' not found. Reverting to lw0u4bBY02 at > /kohadevbox/koha/C4/Circulation.pm line 1844. > t/db_dependent/SIP/Transaction.t .. ok > All tests successful. > Files=1, Tests=10, 6 wallclock secs ( 0.04 usr 0.00 sys + 4.78 cusr 0.78 > csys = 5.60 CPU) > Result: PASS > > That doesn't look good right? I get the same warnings before this patch My bad, thanks for doing the right check. Backported to 19.11.x branch for 19.11.13 :D |