Due to a typo, the 'charges' attribute will always return 1.
Created attachment 58568 [details] [review] Bug 17836: (ILSDI) Regression test Sponsored-by: ByWater Solutions
Created attachment 58569 [details] [review] Bug 17836: (ILSDI) Make GetPatronInfo fill 'charges' correctly This trivial fix corrects a typo on C4/ILSDI/Services.pm. It was hidden because the tests for ILSDI only cover the 'attributes' portion of the response. I added regression tests for this. To test: - Have the regression test patch applied - Run: $ prove t/db_dependent/ILSDI_Services.t => FAIL: Tests fail because 'charges' is always set to 1 - Apply the patch - Run: $ prove t/db_dependent/ILSDI_Services.t => SUCCESS: Tests pass - Sign off :-D Sponsored-by: ByWater Solutions
Comment on attachment 58569 [details] [review] Bug 17836: (ILSDI) Make GetPatronInfo fill 'charges' correctly Review of attachment 58569 [details] [review]: ----------------------------------------------------------------- ::: C4/ILSDI/Services.pm @@ -376,4 @@ > > # Cleaning the borrower hashref > my $flags = C4::Members::patronflags( $borrower ); > - $borrower->{'charges'} = $flags>{'CHARGES'}->{'amount'}; OH MY! What a horrid typo.
Created attachment 58574 [details] [review] Bug 17836: (ILSDI) Regression test Sponsored-by: ByWater Solutions Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 58575 [details] [review] Bug 17836: (ILSDI) Make GetPatronInfo fill 'charges' correctly This trivial fix corrects a typo on C4/ILSDI/Services.pm. It was hidden because the tests for ILSDI only cover the 'attributes' portion of the response. I added regression tests for this. To test: - Have the regression test patch applied - Run: $ prove t/db_dependent/ILSDI_Services.t => FAIL: Tests fail because 'charges' is always set to 1 - Apply the patch - Run: $ prove t/db_dependent/ILSDI_Services.t => SUCCESS: Tests pass - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Followed test plan in comment #5 and also ran koha-qa test tools.
(In reply to M. Tompsett from comment #3) > Comment on attachment 58569 [details] [review] [review] > Bug 17836: (ILSDI) Make GetPatronInfo fill 'charges' correctly > > Review of attachment 58569 [details] [review] [review]: > ----------------------------------------------------------------- > > ::: C4/ILSDI/Services.pm > @@ -376,4 @@ > > > > # Cleaning the borrower hashref > > my $flags = C4::Members::patronflags( $borrower ); > > - $borrower->{'charges'} = $flags>{'CHARGES'}->{'amount'}; > > OH MY! What a horrid typo. This should have been cough by our test suite, but we haven't reached ILSID yet in our attempt to improve coverage.
Created attachment 58981 [details] [review] Bug 17836: (ILSDI) Make GetPatronInfo fill 'charges' correctly This trivial fix corrects a typo on C4/ILSDI/Services.pm. It was hidden because the tests for ILSDI only cover the 'attributes' portion of the response. I added regression tests for this. To test: - Have the regression test patch applied - Run: $ prove t/db_dependent/ILSDI_Services.t => FAIL: Tests fail because 'charges' is always set to 1 - Apply the patch - Run: $ prove t/db_dependent/ILSDI_Services.t => SUCCESS: Tests pass - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 58982 [details] [review] Bug 17836: (ILSDI) Regression test Sponsored-by: ByWater Solutions Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 17.05, thanks Tomas!
Error doesn't exist in 16.11.x - it looks like it has been introduced by http://git.koha-community.org/gitweb/?p=koha.git;a=commitdiff;h=41493004f69caf471e8d73b7db2a64e433f57465#patch2 which was after the release of 16.11