Bug 16378 - Overdues.pm: Can't call method "store" without a package or object reference
Summary: Overdues.pm: Can't call method "store" without a package or object reference
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low blocker (vote)
Assignee: Jacek Ablewicz
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on: 15675
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-28 08:43 UTC by Marc Véron
Modified: 2019-06-27 09:24 UTC (History)
6 users (show)

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


Attachments
Bug 16378: Overdues.pm: Can't call method "store" without a package or object reference (1.10 KB, patch)
2016-04-28 09:55 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16378: Overdues.pm: Can't call method "store" without a package or object reference (1.15 KB, patch)
2016-04-28 10:32 UTC, Jacek Ablewicz
Details | Diff | Splinter Review
Bug 16378: Overdues.pm: Can't call method "store" without a package or object reference (1.20 KB, patch)
2016-04-28 12:14 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2016-04-28 08:43:48 UTC
To reproduce:

- Go to cgi-bin/koha/circ/returns.pl (Home > Circulation > Check in)
- Enter 2, hit Submit
=> Result: Check in message: No item with barcode 2
Nothing in intranet-error.log

- Enter 1, hit Submit
=> Result: An error has occurred! Error 500
Intranet-error.log:
returns.pl: No property outstanding! at /usr/share/kohaclone/Koha/Object.pm line 188
...and about 10 more lines
Comment 1 Marc Véron 2016-04-28 09:27:48 UTC
Ok, it's not related to the barcode 1.

I had an item with barcode 1. Changed the barcode to 111.
It is checked out to patron A.
Returnig leads to the error as in comment above.

Trying to check out to a patron B leads to:
Software error
Can't call method "store" without a package or object reference at /usr/share/kohaclone/C4/Overdues.pm line 584.
Comment 2 Marc Véron 2016-04-28 09:49:36 UTC
Found:
Overdues.pm line 588 tries to do an $accountline->set with column outstanding instead of amountoutstanding.

Patch follows.
Comment 3 Marc Véron 2016-04-28 09:55:54 UTC Comment hidden (obsolete)
Comment 4 Jacek Ablewicz 2016-04-28 10:32:48 UTC Comment hidden (obsolete)
Comment 5 Jacek Ablewicz 2016-04-28 10:42:49 UTC
This bug can be triggered as well when trying to run misc/cronjobs/fines.pl (on some database with overdued items):

No property outstanding! at /home/koha/devkohaclone/C4/Overdues.pm line 584
Can't call method "store" without a package or object reference at /home/koha/devkohaclone/C4/Overdues.pm line 584.

Without the patch, fine calculations are pretty much completely broken, overdued items are unreturnable and so on. Upping severity to 'blocker'.
Comment 6 Kyle M Hall 2016-04-28 12:14:03 UTC
Created attachment 50905 [details] [review]
Bug 16378: Overdues.pm: Can't call method "store" without a package or object reference

Overdues.pm line 588 tries to do an $accountline->set with column outstanding
instead of amountoutstanding.
This patch fixes it.

To test:
- Verify that code change is correct.
- Try to trigger a situation where an existing fine is updated
  (see comment in line 574 in C4/Overdues.pm)

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Brendan Gallagher 2016-04-28 23:24:14 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!
Comment 8 Julian Maurice 2016-05-09 08:09:49 UTC
Not needed in stable versions, status changed to RESOLVED