Summary: | Error when specifying CR field in SIP Config | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | SIP2 | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | andrewfh, caroline.cyr-la-rose, fridolin.somers, kyle, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
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.03
|
|
Bug Depends on: | 21979 | ||
Bug Blocks: | |||
Attachments: |
Bug 27589: Unit test
Bug 27589: Access item fields as hash Bug 27589: Unit test Bug 27589: Unit test Bug 27589: Access item fields as hash Bug 27589: Unit test Bug 27589: Access item fields as hash |
Description
Nick Clemens (kidclamp)
2021-02-01 20:36:29 UTC
Created attachment 116311 [details] [review] Bug 27589: Unit test Previous tests only covered CHECKIN, this adds a test for ITEM_INFORMATION Created attachment 116312 [details] [review] Bug 27589: Access item fields as hash SIP item stores the item unblessed so field must be accessed as a hashref This patch changes the code in handle_item_information to match the code in handle_checkin To test: 1 - In sip config set the cr_item_field='itype' for a sip account 2 - Restart SIP 3 - Attempt an item information requests using the sip_cli_emulator perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m item_information --item 39999000011791 4 - It fails! 5 - Apply patch and restart 6 - It succeeds! Created attachment 116313 [details] [review] Bug 27589: Unit test Previous tests only covered CHECKIN, this adds a test for ITEM_INFORMATION Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 116315 [details] [review] Bug 27589: Unit test Previous tests only covered CHECKIN, this adds a test for ITEM_INFORMATION Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 116316 [details] [review] Bug 27589: Access item fields as hash SIP item stores the item unblessed so field must be accessed as a hashref This patch changes the code in handle_item_information to match the code in handle_checkin To test: 1 - In sip config set the cr_item_field='itype' for a sip account 2 - Restart SIP 3 - Attempt an item information requests using the sip_cli_emulator perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m item_information --item 39999000011791 4 - It fails! 5 - Apply patch and restart 6 - It succeeds! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 116317 [details] [review] Bug 27589: Unit test Previous tests only covered CHECKIN, this adds a test for ITEM_INFORMATION Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 116318 [details] [review] Bug 27589: Access item fields as hash SIP item stores the item unblessed so field must be accessed as a hashref This patch changes the code in handle_item_information to match the code in handle_checkin To test: 1 - In sip config set the cr_item_field='itype' for a sip account 2 - Restart SIP 3 - Attempt an item information requests using the sip_cli_emulator perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m item_information --item 39999000011791 4 - It fails! 5 - Apply patch and restart 6 - It succeeds! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> I'm loving that the test coverage for SIP is slowly starting to creep up and we're doing proper TDD here. Works well, solves the problem with no regressions. Passing QA! Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.03 Missing dependency, not backported to 20.05 |