Bug 24529 - Uninitialised value warnings in C4::Reserves
Summary: Uninitialised value warnings in C4::Reserves
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 24217
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-29 13:18 UTC by Martin Renvoize
Modified: 2020-11-30 21:45 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 24529: Silence warnings for title level holds (1.29 KB, patch)
2020-01-29 13:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24529: Silence another uninitialised value warning (860 bytes, patch)
2020-01-29 13:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24529: Silence warnings for title level holds (1.36 KB, patch)
2020-01-29 14:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24529: Silence another uninitialised value warning (933 bytes, patch)
2020-01-29 14:57 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2020-01-29 13:18:11 UTC
There is an uninitialised value warning coming from C4::Reserves which is causing a fair bit of noise when running the circulation tests.
Comment 1 Martin Renvoize 2020-01-29 13:21:25 UTC
Created attachment 98075 [details] [review]
Bug 24529: Silence warnings for title level holds

This patch simply adds a test for itemnumber being defined in the
reserve before comparing it to silence the warning.

Test plan:
1) Prior to patch, run prove t/db_dependant/Circulation.t and note lots
   of `Use of uninitialized value in numeric eq (==) at
   /kohadevbox/koha/C4/Reserves.pm line 790` warnings.
2) Apply the patch, re-run the test and note the tests still pass but
   the warnings are now gone.
Comment 2 Martin Renvoize 2020-01-29 13:25:32 UTC
Created attachment 98076 [details] [review]
Bug 24529: Silence another uninitialised value warning
Comment 3 Martin Renvoize 2020-01-29 13:26:50 UTC
Test plan:
Both t/db_dependant/Circulation.t and t/db_dependant/Reserves.t should pass before and after the patches but after they should not contain warnings from C4::Reserves.
Comment 4 Jonathan Druart 2020-01-29 14:57:55 UTC
Created attachment 98086 [details] [review]
Bug 24529: Silence warnings for title level holds

This patch simply adds a test for itemnumber being defined in the
reserve before comparing it to silence the warning.

Test plan:
1) Prior to patch, run prove t/db_dependant/Circulation.t and note lots
   of `Use of uninitialized value in numeric eq (==) at
   /kohadevbox/koha/C4/Reserves.pm line 790` warnings.
2) Apply the patch, re-run the test and note the tests still pass but
   the warnings are now gone.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2020-01-29 14:57:58 UTC
Created attachment 98087 [details] [review]
Bug 24529: Silence another uninitialised value warning

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Martin Renvoize 2020-02-05 12:39:08 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 7 Joy Nelson 2020-02-11 00:15:41 UTC
missing dependencies in 19.11.x 
not backported