Summary: | (ILSDI) 'charges' always '1' | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Web services | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | kyle, m.de.rooy, mtompset, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 17836: (ILSDI) Regression test
Bug 17836: (ILSDI) Make GetPatronInfo fill 'charges' correctly Bug 17836: (ILSDI) Regression test Bug 17836: (ILSDI) Make GetPatronInfo fill 'charges' correctly Bug 17836: (ILSDI) Make GetPatronInfo fill 'charges' correctly Bug 17836: (ILSDI) Regression test |
Description
Tomás Cohen Arazi (tcohen)
2017-01-03 16:09:10 UTC
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 |