Bug 21979 added the ability to define a custom CR field in SIP responses - the code in handle_checkin uses: $item->{$CR} but in handle_item_information: $item->$CR To recreate: 1 - set cr_item_field to 'itype' In SIP Config 2 - Attempt item_information request 3 - it Fails!
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