Bug 12363 - Marking an item as lost in koha always returns it, but longoverdue.pl may not
Summary: Marking an item as lost in koha always returns it, but longoverdue.pl may not
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Kyle M Hall
URL:
Whiteboard:
Keywords: release-notes-needed
Depends on:
Blocks:
 
Reported: 2014-06-04 17:52 UTC by Kyle M Hall
Modified: 2017-10-27 17:43 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 12363: Add new pref MarkLostItemsAsReturned (3.02 KB, patch)
2017-10-17 14:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12363: Add a switch to mark|do not mark items as returned when lost (3.91 KB, patch)
2017-10-17 14:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12363: Add new pref MarkLostItemsAsReturned (3.15 KB, patch)
2017-10-18 14:37 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 12363: Add a switch to mark|do not mark items as returned when lost (4.09 KB, patch)
2017-10-18 14:37 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 12363: Add new pref MarkLostItemsAsReturned (3.21 KB, patch)
2017-10-27 12:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 12363: Add a switch to mark|do not mark items as returned when lost (4.14 KB, patch)
2017-10-27 12:33 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 Kyle M Hall 2014-06-04 17:52:12 UTC
The cronjob script longoverdue.pl has a switch --mark-returned which controls if an item is returned when marked as lost. As such, by default items are *not* returned when lost by longoverdue.pl, and at the same time, *are* returned when marked as lost from the staff intranet.

In the past, marking an item as lost from additem.pl would not return the item, but doing so from moredetail.pl, so librarians had at least some control over having and item returned when lost. An update to additem.pl now causes all ways to mark an item as lost from the staff intranet.

This behavior makes little sense. The flag behavior should be moved to a system preference.

An upgrade path is problematic though. We could have longoverdue.pl set the system preference value based on the --marked-returned flag on each run. That would allow upgrades to work without intervention.
Comment 1 Katrin Fischer 2016-11-10 10:20:23 UTC
Hm, I am not sure we want to match the staff client behaviour to the script in all cases. I think a workflow for the library could be: don't automatically remove lost items from the account, but use a special lost value and let the staff check them, beore marking them lost and removing them from the account.
It might be good to still allow to control them independently.
Comment 2 Jonathan Druart 2017-10-17 14:00:50 UTC
Created attachment 68212 [details] [review]
Bug 12363: Add new pref MarkLostItemsAsReturned
Comment 3 Jonathan Druart 2017-10-17 14:00:55 UTC
Created attachment 68213 [details] [review]
Bug 12363: Add a switch to mark|do not mark items as returned when lost

There are several ways to mark an item an lost:
- item list view (catalogue/moredetail.pl, "Items" tab)
- cataloguing (cataloguing/additem.pl)
- Batch item modification tools (tools/batchMod.pl)
- The long overdue cronjob (misc/cronjobs/longoverdue.pl)

So far only the cronjob is configurable, the others mark the item as
returned (does the checkin).

This behaviour should be controlable using a syspref, to let libraries
choose what fit best for them.

Test plan:
Use the 2 options of the pref, mark checked out items as lost using the
different possibilities, and confirm that the behaviours make sense to
you
Comment 4 Séverine Queune 2017-10-18 14:07:00 UTC
Return is correctly done or blocked depending on the syspref.
I tried to mark lost items using the pages (catalogue/moredetail.pl, "Items" tab) / (cataloguing/additem.pl) / (tools/batchMod.pl) but lost status is never saved.
I don't know how to try with long overdue cronjob.

I used Biblibre's sandbox#2.
I set parameters by myself because there where no authorized value for the 'LOST' list and the field 995$2 was hidden and not linked to this list.
Maybe I did something wrong...
Comment 5 Séverine Queune 2017-10-18 14:35:50 UTC
My bad, I forgot when I set the authorized values that only numbers were allowed and I used letters. Sorry.

Behaviour is correct.
Comment 6 sandboxes@biblibre.com 2017-10-18 14:37:11 UTC
Patch tested with a sandbox, by Séverine QUEUNE <severine.queune@bulac.fr>
Comment 7 sandboxes@biblibre.com 2017-10-18 14:37:42 UTC
Created attachment 68256 [details] [review]
Bug 12363: Add new pref MarkLostItemsAsReturned

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 8 sandboxes@biblibre.com 2017-10-18 14:37:45 UTC
Created attachment 68257 [details] [review]
Bug 12363: Add a switch to mark|do not mark items as returned when lost

There are several ways to mark an item an lost:
- item list view (catalogue/moredetail.pl, "Items" tab)
- cataloguing (cataloguing/additem.pl)
- Batch item modification tools (tools/batchMod.pl)
- The long overdue cronjob (misc/cronjobs/longoverdue.pl)

So far only the cronjob is configurable, the others mark the item as
returned (does the checkin).

This behaviour should be controlable using a syspref, to let libraries
choose what fit best for them.

Test plan:
Use the 2 options of the pref, mark checked out items as lost using the
different possibilities, and confirm that the behaviours make sense to
you

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 9 Kyle M Hall 2017-10-27 12:33:37 UTC
Created attachment 68684 [details] [review]
Bug 12363: Add new pref MarkLostItemsAsReturned

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Kyle M Hall 2017-10-27 12:33:45 UTC
Created attachment 68685 [details] [review]
Bug 12363: Add a switch to mark|do not mark items as returned when lost

There are several ways to mark an item an lost:
- item list view (catalogue/moredetail.pl, "Items" tab)
- cataloguing (cataloguing/additem.pl)
- Batch item modification tools (tools/batchMod.pl)
- The long overdue cronjob (misc/cronjobs/longoverdue.pl)

So far only the cronjob is configurable, the others mark the item as
returned (does the checkin).

This behaviour should be controlable using a syspref, to let libraries
choose what fit best for them.

Test plan:
Use the 2 options of the pref, mark checked out items as lost using the
different possibilities, and confirm that the behaviours make sense to
you

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Jonathan Druart 2017-10-27 17:12:26 UTC
Pushed to master for 17.11, thanks to everybody involved!