Bug 40403 - Circulation_holdsqueue.t generates warnings
Summary: Circulation_holdsqueue.t generates warnings
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 40444
  Show dependency treegraph
 
Reported: 2025-07-16 08:41 UTC by Jonathan Druart
Modified: 2025-08-01 09:46 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.02,24.11.08
Circulation function:


Attachments
Bug 40403: Remove warning from Circulation_holdsqueue.t (1.72 KB, patch)
2025-07-16 08:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40403: Remove warning from Circulation_holdsqueue.t (1.77 KB, patch)
2025-07-18 07:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 40403: Remove warning from Circulation_holdsqueue.t (1.86 KB, patch)
2025-07-18 09:12 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-07-16 08:41:45 UTC
Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Biblio.pm line 3049.
Comment 1 Jonathan Druart 2025-07-16 08:43:45 UTC
Created attachment 184125 [details] [review]
Bug 40403: Remove warning from Circulation_holdsqueue.t

Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Biblio.pm line 3049.

The context is:

3045     my $current_issues = $biblioitem->totalissues // 0;
3046     if ( defined $value ) {
3047         $totalissues = $value;
3048     } else {
3049         $totalissues = $biblioitem->totalissues + $increase;
3050     }
3051     return 0 if $current_issues == $totalissues;    # No need to update if no changes

It feels correct to use $current_issues to suppress the warning
Comment 2 David Nind 2025-07-18 07:51:38 UTC
Created attachment 184295 [details] [review]
Bug 40403: Remove warning from Circulation_holdsqueue.t

Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Biblio.pm line 3049.

The context is:

3045     my $current_issues = $biblioitem->totalissues // 0;
3046     if ( defined $value ) {
3047         $totalissues = $value;
3048     } else {
3049         $totalissues = $biblioitem->totalissues + $increase;
3050     }
3051     return 0 if $current_issues == $totalissues;    # No need to update if no changes

It feels correct to use $current_issues to suppress the warning

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-07-18 07:52:09 UTC
Testing notes (using KTD):
1. prove t/db_dependent/Circulation_holdsqueue.t
Comment 4 Marcel de Rooy 2025-07-18 09:12:39 UTC
Created attachment 184308 [details] [review]
Bug 40403: Remove warning from Circulation_holdsqueue.t

Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Biblio.pm line 3049.

The context is:

3045     my $current_issues = $biblioitem->totalissues // 0;
3046     if ( defined $value ) {
3047         $totalissues = $value;
3048     } else {
3049         $totalissues = $biblioitem->totalissues + $increase;
3050     }
3051     return 0 if $current_issues == $totalissues;    # No need to update if no changes

It feels correct to use $current_issues to suppress the warning

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Lucas Gass (lukeg) 2025-07-18 17:12:39 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 6 Paul Derscheid 2025-07-24 08:21:30 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 7 Fridolin Somers 2025-08-01 09:46:14 UTC
Pushed to 24.11.x for 24.11.08