Koha/t/db_dependent/Circulation
Kyle M Hall ecd89d2030 Bug 14945 - Add the ability to store the last patron to return an item
Currently if the AnonymousPatron system preference is in use, all patron
data is anonymized. Some libraries would like to be able to see the last
patron who returned out an item ( in case of damage ) but still keep all
other patrons anonymized.

* Add the table items_last_borrower ( id, itemnumber, borrowernumber )
* Add new system preference StoreLastBorrower
* If StoreLastBorrower is enabled, upon checkin have Koha insert into
  this table the patron who last returned this item. Replace existing
  row based on itemnumber if exists.
* If table has a row for a given item, link to the patron from the item
  details page.

Test plan:
1) Apply patch
2) Run updatedatabase.pl
3) Enable StoreLastBorrower
4) Issue an item to a patron and return said item
5) Issue the same item to a second patron, do not return it.
6) View moredetail.pl for the given bib, find the given item. There
   should be a new field in the history list 'Last returned by' with a link
   to the last patron to return the item.

Optionally, you can also verify this works even if patron issuing
history has been set to anonymize issues upon return.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jen DeMuth <JDeMuth@roseville.ca.us>
Signed-off-by: Tom Misilo <misilot@fit.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2015-12-31 19:32:20 +00:00
..
IssuingRules Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
AnonymiseIssueHistory.t Bug 14945 - Add the ability to store the last patron to return an item 2015-12-31 19:32:20 +00:00
CalcFine.t Bug 9129 [QA Followup] - Make unit test file conform to PBP 2015-12-31 15:31:19 +00:00
CheckIfIssuedToPatron.t
CheckValidBarcode.t
GetIssues.t Bug 11201: Add a in-house use list pages 2015-03-31 11:30:55 -03:00
GetTopIssues.t Bug 15160: GetTopIssues.t should create random data 2015-11-10 09:27:55 -03:00
IsItemIssued.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
MarkIssueReturned.t Bug 9942: Make Koha fails if privacy is not respected 2015-07-07 14:52:32 -03:00
Returns.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
TooMany.t Bug 14045: Fix failing tests if issuing rules exist 2015-11-06 12:01:14 -03:00