Summary: | Longoverdue.pl --mark-returned doesn't return items | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Command-line Utilities | Assignee: | Kyle M Hall <kyle> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, jdemuth, jonathan.druart, josef.moravec, julian.maurice, kyle.m.hall, kyle, marjorie.barry-vila, martin.renvoize, nick |
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12363 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | |||
Bug Blocks: | 13589 | ||
Attachments: |
Bug 12812 - Longoverdue.pl --mark-returned doesn't return items
Bug 12812: Longoverdue.pl --mark-returned doesn't return items Bug 12812: (Follow-up) Fix use of C4::Circulation Bug 12812: Longoverdue.pl --mark-returned doesn't return items Bug 12812: (Follow-up) Fix use of C4::Circulation |
Description
Katrin Fischer
2014-08-24 20:19:32 UTC
How do you launch the cronjob? It seems that the --charge option is required (or the pref) to mark the item as returned. I don't understand the following code: 185 ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'}); 186 LostItem($row->{'itemnumber'}, $mark_returned) if( $charge && $charge eq $lostvalue); If the charge and the lostvalue don't match, the item won't be marked as returned, so if it needs to be marked as returned, we should move the MarkIssueReturned from the LostItem subroutine. Created attachment 71336 [details] [review] Bug 12812 - Longoverdue.pl --mark-returned doesn't return items The longoverdue.pl option --mark-returned doesn't work unless the --charge option is used as well. Test Plan: 1) Run long overdue with --mark-returned and not --charge, note your items are marked lost but not returned 2) Apply this patch 3) Repeat step 1, the items should now get returned! Created attachment 72544 [details] [review] Bug 12812: Longoverdue.pl --mark-returned doesn't return items The longoverdue.pl option --mark-returned doesn't work unless the --charge option is used as well. Test Plan: 1) Run long overdue with --mark-returned and not --charge, note your items are marked lost but not returned 2) Apply this patch 3) Repeat step 1, the items should now get returned! Tested with (for example): misc/cronjobs/longoverdue.pl --lost 10=1 --mark-returned --verbose --confirm Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 72545 [details] [review] Bug 12812: (Follow-up) Fix use of C4::Circulation Fixes this error: Undefined subroutine &main::MarkIssueReturned called at misc/cronjobs/longoverdue.pl line 316. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 72564 [details] [review] Bug 12812: Longoverdue.pl --mark-returned doesn't return items The longoverdue.pl option --mark-returned doesn't work unless the --charge option is used as well. Test Plan: 1) Run long overdue with --mark-returned and not --charge, note your items are marked lost but not returned 2) Apply this patch 3) Repeat step 1, the items should now get returned! Tested with (for example): misc/cronjobs/longoverdue.pl --lost 10=1 --mark-returned --verbose --confirm Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Created attachment 72565 [details] [review] Bug 12812: (Follow-up) Fix use of C4::Circulation Fixes this error: Undefined subroutine &main::MarkIssueReturned called at misc/cronjobs/longoverdue.pl line 316. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Pushed to master for 18.05, thanks to all for your hard work. Awesome work all, backported to stable for 17.11.05 Pushed to 17.05.x for v17.05.11 |