Bug 19287: Add ability to mark an item 'Lost' from 'Holds to pull' list
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 12 Dec 2017 17:14:56 +0000 (14:14 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 23 Apr 2018 15:42:38 +0000 (12:42 -0300)
commit32ff96a875aa7607eeba56b9ce3fc5f86eee585f
tree6f04bfdd3e14fdd8794e87b602d0b9808898dcf1
parent443b7159fa214af3398bef97d5f2aaa49b2f1a55
Bug 19287: Add ability to mark an item 'Lost' from 'Holds to pull' list

The goal to this enhancement is to add the ability to cancel a hold and
mark items as lost from the 'Holds to pull' page.
A new pref is added to control the behaviour, default is off

To mark items as lost you need to set the new pref CanMarkHoldsToPullAsLost to one of these two values:
- "Allow to mark items as lost"
=> The item will be marked as lost and the hold will be cancelled
- "Allow to mark items as lost and notify the patron"
=> Same as previously but the patron will be notified as well.

The notification is done using a new notice template (code=CANCEL_HOLD_ON_LOST).
Feel free to suggest another default wording.

To update the values of the items when one of these 2 buttons are used, you need to
fill the UpdateItemWhenLostFromHoldList with something like: 'itemlost: 1'

Test plan:
1/ Place holds on some items
2/ Go to Home > Circulation > Holds to pull
From here you can cancel the hold or
3/ Mark the items as lost
=> You will receive feedback messages depending on different situations:
* The CANCEL_HOLD_ON_LOST does not exist
* The patron does not have an email address (but the notice has been
enqueued! It is the current behaviour with other notices)
* The notice has been enqueued
* The hold has been cancelled

QA Notes:
From which library do we want to pick the notice? This patch use
reserves.branchcode

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
circ/pendingreserves.pl
installer/data/mysql/atomicupdate/bug_19287.sql [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt