Summary: | SIP2 renew shows old/wrong date due | ||
---|---|---|---|
Product: | Koha | Reporter: | Magnus Enger <magnus> |
Component: | SIP2 | Assignee: | Andreas Jonsson <andreas.jonsson> |
Status: | Needs documenting --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P3 | CC: | andreas.jonsson, fridolin.somers, lucas, nick, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
Set correct due date in SIP2 renewal response message.
|
|
Version(s) released in: |
24.11.00,24.05.02,23.11.07
|
Circulation function: | |
Bug Depends on: | |||
Bug Blocks: | 37200 | ||
Attachments: |
Bug 37016: Invalid due date in SIP renew response
Bug 37016: Invalid due date in SIP renew response Bug 37016: Unit tests Bug 37016: Invalid due date in SIP renew response |
Description
Magnus Enger
2024-06-03 13:01:09 UTC
It looks like you can use the get_from_storage method: DB<14> x $item->checkout->unblessed; 0 HASH(0x5624163e5780) 'auto_renew' => 0 'auto_renew_error' => undef 'borrowernumber' => 190 'branchcode' => 'LA' 'date_due' => '2024-06-13 23:59:00' 'issue_id' => 208 'issuedate' => '2024-06-13 15:38:17' 'issuer_id' => undef 'itemnumber' => 310173 'lastreneweddate' => undef 'note' => undef 'notedate' => undef 'noteseen' => undef 'onsite_checkout' => 0 'renewals_count' => 0 'returndate' => undef 'timestamp' => '2024-06-13 15:38:17' 'unseen_renewals' => 0 DB<15> x $item->checkout->get_from_storage->unblessed; 0 HASH(0x5624163e36c0) 'auto_renew' => 0 'auto_renew_error' => undef 'borrowernumber' => 190 'branchcode' => 'LA' 'date_due' => '2024-06-13 23:59:00' 'issue_id' => 208 'issuedate' => '2024-06-13 15:38:17' 'issuer_id' => undef 'itemnumber' => 310173 'lastreneweddate' => '2024-06-13 15:40:00' 'note' => undef 'notedate' => undef 'noteseen' => undef 'onsite_checkout' => 0 'renewals_count' => 1 'returndate' => undef 'timestamp' => '2024-06-13 15:40:00' 'unseen_renewals' => 0 Created attachment 167688 [details] [review] Bug 37016: Invalid due date in SIP renew response Test plan using koha-testing-docker: 1) Make sure SIP is running. You may need to edit /etc/koha/sites/SIPconfig.xml and remove the 8023 connector and restart the SIP-server (koha-sip --restart kohadev) 2) Find a patron, say 23529000197047 3) Set a password by selecting "change password", set it to "Password1234" 4) Find a book, say 39999000000856 5) Issue book to patron with sip-client: sudo koha-shell -c "/usr/share/koha/bin/sip_cli_emulator.pl \ --address localhost --port 6001 -t cr \ --su term1 --sp term1 --message checkout \ --location CPL --item 39999000000856 \ --patron 23529000197047 --password Password1234"\ kohadev 6) Note the AH-header in the response which for example: 'AH20240619 235900' 7) Make a renewal with: sudo koha-shell -c "/usr/share/koha/bin/sip_cli_emulator.pl \ --address localhost --port 6001 -t cr \ --su term1 --sp term1 --message renew \ --location CPL --item 39999000000856 \ --patron 23529000197047 --password Password1234"\ kohadev 8) Make sure the AH-header in the response is different from the response to the checkout, for example: 'AH20240624 235900' Created attachment 167712 [details] [review] Bug 37016: Invalid due date in SIP renew response Test plan using koha-testing-docker: 1) Make sure SIP is running. You may need to edit /etc/koha/sites/SIPconfig.xml and remove the 8023 connector and restart the SIP-server (koha-sip --restart kohadev) 2) Find a patron, say 23529000197047 3) Set a password by selecting "change password", set it to "Password1234" 4) Find a book, say 39999000000856 5) Issue book to patron with sip-client: sudo koha-shell -c "/usr/share/koha/bin/sip_cli_emulator.pl \ --address localhost --port 6001 -t cr \ --su term1 --sp term1 --message checkout \ --location CPL --item 39999000000856 \ --patron 23529000197047 --password Password1234"\ kohadev 6) Note the AH-header in the response which for example: 'AH20240619 235900' 7) Make a renewal with: sudo koha-shell -c "/usr/share/koha/bin/sip_cli_emulator.pl \ --address localhost --port 6001 -t cr \ --su term1 --sp term1 --message renew \ --location CPL --item 39999000000856 \ --patron 23529000197047 --password Password1234"\ kohadev 8) Make sure the AH-header in the response is different from the response to the checkout, for example: 'AH20240624 235900' Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com> Created attachment 168152 [details] [review] Bug 37016: Unit tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 168153 [details] [review] Bug 37016: Invalid due date in SIP renew response Test plan using koha-testing-docker: 1) Make sure SIP is running. You may need to edit /etc/koha/sites/SIPconfig.xml and remove the 8023 connector and restart the SIP-server (koha-sip --restart kohadev) 2) Find a patron, say 23529000197047 3) Set a password by selecting "change password", set it to "Password1234" 4) Find a book, say 39999000000856 5) Issue book to patron with sip-client: sudo koha-shell -c "/usr/share/koha/bin/sip_cli_emulator.pl \ --address localhost --port 6001 -t cr \ --su term1 --sp term1 --message checkout \ --location CPL --item 39999000000856 \ --patron 23529000197047 --password Password1234"\ kohadev 6) Note the AH-header in the response which for example: 'AH20240619 235900' 7) Make a renewal with: sudo koha-shell -c "/usr/share/koha/bin/sip_cli_emulator.pl \ --address localhost --port 6001 -t cr \ --su term1 --sp term1 --message renew \ --location CPL --item 39999000000856 \ --patron 23529000197047 --password Password1234"\ kohadev 8) Make sure the AH-header in the response is different from the response to the checkout, for example: 'AH20240624 235900' Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Test plan is really nice, but please also include a little summary about the problem and the solution :) Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.02 Pushed to 23.11.x for 23.11.07 Not backporting to 23.05.x unless requested Not backporting to 22.11 unless requested |