In the staff interface, in most areas of Koha that require an active currency to be defined, a large info box appears to let the user know there is no active currency defined. Our SIP code presumes an active currency and if one is not defined, any SIP messages utilizing C4::SIP::ILS::Patron will crash with no errors such that a response is never transmitted for the request.
Created attachment 179583 [details] [review] Bug 39407: Add unit test to prove no active currency crashes SIP
Created attachment 179584 [details] [review] Bug 39407: Add unit test to prove no active currency crashes SIP
Created attachment 179585 [details] [review] Bug 39407: Prevent SIP from crashing due to lack of active currency In the staff interface, in most areas of Koha that require an active currency to be defined, a large info box appears to let the user know there is no active currency defined. Our SIP code presumes an active currency and if one is not defined, any SIP messages utilizing C4::SIP::ILS::Patron will crash with no errors such that a response is never transmitted for the request. Test Plan: 1) Apply the unit test patch 2) prove t/db_dependent/SIP/Patron.t Fails! 3) Apply the second patch 4) prove t/db_dependent/SIP/Patron.t Succeeds!
Created attachment 180060 [details] [review] Bug 39407: Prevent SIP from crashing due to lack of active currency In the staff interface, in most areas of Koha that require an active currency to be defined, a large info box appears to let the user know there is no active currency defined. Our SIP code presumes an active currency and if one is not defined, any SIP messages utilizing C4::SIP::ILS::Patron will crash with no errors such that a response is never transmitted for the request. Test Plan: 1) Apply the unit test patch 2) prove t/db_dependent/SIP/Patron.t Fails! 3) Apply the second patch 4) prove t/db_dependent/SIP/Patron.t Succeeds! Signed-off-by: Magnus Enger <magnus@libriotech.no>
Created attachment 180061 [details] [review] Bug 39407: Add unit test to prove no active currency crashes SIP Signed-off-by: Magnus Enger <magnus@libriotech.no>
Created attachment 180062 [details] [review] Bug 39407: Prevent SIP from crashing due to lack of active currency In the staff interface, in most areas of Koha that require an active currency to be defined, a large info box appears to let the user know there is no active currency defined. Our SIP code presumes an active currency and if one is not defined, any SIP messages utilizing C4::SIP::ILS::Patron will crash with no errors such that a response is never transmitted for the request. Test Plan: 1) Apply the unit test patch 2) prove t/db_dependent/SIP/Patron.t Fails! 3) Apply the second patch 4) prove t/db_dependent/SIP/Patron.t Succeeds! Signed-off-by: Magnus Enger <magnus@libriotech.no>
I ran the test without the second patch. And was surprised to see: # Subtest: new tests 1..6 ok 1 - Found patron via cardnumber scalar ok 2 - Found patron via userid scalar ok 3 - Found patron via borrowernumber hashref ok 4 - Found patron via cardnumber hashref ok 5 - Found patron via userid hashref ok 6 - Found patron when no active currency is defined ok 3 - new tests Please clarify.