Koha-clms/Koha/Schema/Result
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
..
Accountline.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Accountoffset.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ActionLog.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ActionLogs.pm Bug 8798: DBIx::Class base classes for all Koha tables 2013-10-14 21:07:24 +00:00
AdditionalField.pm Bug 10855: (RM followup) DBIx update 2015-10-02 15:14:22 -03:00
AdditionalFieldValue.pm Bug 10855: (RM followup) DBIx update 2015-10-02 15:14:22 -03:00
Alert.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Aqbasket.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Aqbasketgroup.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Aqbasketuser.pm Bug 7295: (follow-up) update DBIx::Class schema classes 2013-10-31 16:37:34 +00:00
Aqbookseller.pm 10402: DBIx::Class schema update 2014-08-26 11:55:40 -03:00
Aqbudget.pm Bug 13007: DBIC updates 2015-02-09 15:52:24 -03:00
Aqbudgetborrower.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Aqbudgetperiod.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
AqbudgetsPlanning.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Aqcontact.pm 10402: DBIx::Class schema update 2014-08-26 11:55:40 -03:00
Aqcontract.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Aqinvoice.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Aqorder.pm Bug 11006: (RM followup) DBIx updates 2015-05-14 11:30:00 -03:00
AqorderUser.pm Bug 12648: (RM followup) DBIx schema update 2015-03-11 11:52:47 -03:00
AqordersItem.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
AqordersTransfer.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
AudioAlert.pm Bug 11431: (QA followup) Simplify audio_alert_id to just id 2015-11-04 12:33:10 -03:00
AuthHeader.pm Bug 11165: (RM followup) DBIx updates 2015-04-29 15:10:05 -03:00
AuthSubfieldStructure.pm Bug 8480: (RM followup) DBIx updates 2015-05-18 11:24:12 -03:00
AuthTagStructure.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
AuthType.pm Bug 8480: (RM followup) DBIx updates 2015-05-18 11:24:12 -03:00
AuthorisedValue.pm Bug 12601: (RM followup) DBIx updates 2015-02-05 15:21:51 -03:00
AuthorisedValuesBranch.pm Bug 10363: There is no package for authorised values. 2015-10-19 12:46:27 -03:00
Biblio.pm Bug 3206: (RM followup) DBIx updates 2015-07-08 15:15:53 -03:00
BiblioFramework.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Biblioimage.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Biblioitem.pm Bug 14544: [QA Follow-up] DBIx::Class changes 2015-11-05 10:00:31 -03:00
Borrower.pm Bug 9303 [2] - relative's checkouts in the opac - Schema Updates e opac/svc/patron/ 2015-12-31 13:01:53 +00:00
BorrowerAttribute.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
BorrowerAttributeType.pm Bug 13379: (RM followup) DBIx updates 2015-01-13 13:26:11 -03:00
BorrowerAttributeTypesBranch.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
BorrowerDebarment.pm Bug 8007: Discharge - DBIx changes 2015-04-30 12:33:49 -03:00
BorrowerFile.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
BorrowerMessagePreference.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
BorrowerMessageTransportPreference.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
BorrowerModification.pm Bug 10020: (RM followup) DBIx update 2015-10-06 10:39:26 -03:00
BorrowerSync.pm Bug 11401: DBIx updates 2014-11-14 09:58:40 -03:00
Branch.pm Bug 8836: Update DBIx 2014-11-06 15:28:19 -03:00
BranchBorrowerCircRule.pm Bug 14045: DBIC Changes 2015-10-13 11:13:24 -03:00
BranchItemRule.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
BranchTransferLimit.pm Bug 12781: DBIx::Class schema update 08/2014 2014-08-21 09:35:47 -03:00
Branchcategory.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Branchrelation.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Branchtransfer.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Browser.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
CategoriesBranch.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Category.pm Bug 12781: DBIx::Class schema update 08/2014 2014-08-21 09:35:47 -03:00
City.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ClassSortRule.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ClassSource.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Collection.pm Bug 8836: Update DBIx 2014-11-06 15:28:19 -03:00
CollectionsTracking.pm Bug 12781: DBIx::Class schema update 08/2014 2014-08-21 09:35:47 -03:00
ColumnsSetting.pm Bug 10212: Columns configuration for tables - DB changes 2014-08-26 09:28:11 -03:00
Course.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
CourseInstructor.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
CourseItem.pm Bug 14205: (RM followup) DBIx updates 2015-09-02 09:56:49 -03:00
CourseReserve.pm Bug 14205: (RM followup) DBIx updates 2015-09-02 09:56:49 -03:00
CreatorBatch.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
CreatorImage.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
CreatorLayout.pm Bug 12194: (RM followup) DBIx update 2015-10-22 10:34:13 -03:00
CreatorTemplate.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Currency.pm Bug 9593: update DBIC files 2014-05-04 22:05:31 +00:00
DefaultBorrowerCircRule.pm Bug 14045: DBIC Changes 2015-10-13 11:13:24 -03:00
DefaultBranchCircRule.pm Bug 14045: DBIC Changes 2015-10-13 11:13:24 -03:00
DefaultBranchItemRule.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
DefaultCircRule.pm Bug 14045: DBIC Changes 2015-10-13 11:13:24 -03:00
Deletedbiblio.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Deletedbiblioitem.pm Bug 13523: DBIC updates 2015-02-24 14:20:31 -03:00
Deletedborrower.pm Bug 9303 [2] - relative's checkouts in the opac - Schema Updates e opac/svc/patron/ 2015-12-31 13:01:53 +00:00
Deleteditem.pm Bug 13023: (RM followup) DBIx updates 2015-04-23 12:46:48 -03:00
Discharge.pm Bug 14368: (RM followup) DBIx update 2015-09-28 12:09:40 -03:00
ExportFormat.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Fieldmapping.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
HoldFillTarget.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ImportAuth.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ImportBatch.pm Bug 7131: (follow-up) update DBIx::Class schema classes 2013-10-30 04:35:17 +00:00
ImportBiblio.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ImportItem.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ImportRecord.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
ImportRecordMatch.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Issue.pm Bug 14978: (RM followup) DBIx update 2015-11-04 12:32:56 -03:00
Issuingrule.pm Bug 9129 - Update schema 2015-12-31 15:29:13 +00:00
Item.pm Bug 9303 [QA Followup] - Restore missing biblio relationship 2015-12-31 13:08:11 +00:00
ItemCirculationAlertPreference.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ItemsLastBorrower.pm Bug 14945 - Add the ability to store the last patron to return an item 2015-12-31 19:32:20 +00:00
ItemsSearchField.pm Bug 12601: (RM followup) DBIx updates 2015-02-05 15:21:51 -03:00
Itemtype.pm Bug 10937: (RM followup) DBIx update 2015-10-22 11:11:49 -03:00
LanguageDescription.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
LanguageRfc4646ToIso639.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
LanguageScriptBidi.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
LanguageScriptMapping.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
LanguageSubtagRegistry.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Letter.pm Bug 9016: (follow-up) update DBIC schema classes 2014-05-02 20:29:18 +00:00
Linktracker.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Localization.pm Bug 14100: (RM followup) DBIx update 2015-10-27 12:52:22 -03:00
MarcMatcher.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MarcModificationTemplate.pm Bug 8015: (follow-up) update DBIx::Class schema classes 2013-10-31 22:51:13 +00:00
MarcModificationTemplateAction.pm Bug 15095: (RM followup) DBIx update 2015-11-05 10:40:24 -03:00
MarcSubfieldStructure.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MarcTagStructure.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Matchcheck.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MatcherMatchpoint.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Matchpoint.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MatchpointComponent.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MatchpointComponentNorm.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Message.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MessageAttribute.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MessageQueue.pm Bug 7793: DBRev 3.21.00.010 2015-06-22 16:51:03 -03:00
MessageTransport.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MessageTransportType.pm Bug 9016: (follow-up) update DBIC schema classes 2014-05-02 20:29:18 +00:00
MiscFile.pm Bug 3050: (follow-up) update DBIC schema classes 2014-05-25 21:17:39 +00:00
NeedMergeAuthority.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Notify.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
OaiSet.pm Bug 3206: (RM followup) DBIx updates 2015-07-08 15:15:53 -03:00
OaiSetsBiblio.pm Bug 3206: (RM followup) DBIx updates 2015-07-08 15:15:53 -03:00
OaiSetsDescription.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
OaiSetsMapping.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
OldIssue.pm Bug 13790: (RM followup) DBIx updates 2015-04-23 13:06:00 -03:00
OldReserve.pm Bug 9809: Update Schema files 2015-08-26 10:26:13 -03:00
OpacNews.pm Bug 14246: Adding Koha::Schema::Result differences 2015-10-27 15:57:10 -03:00
Overduerule.pm Bug 9016: (follow-up) update DBIC schema classes 2014-05-02 20:29:18 +00:00
OverduerulesTransportType.pm Bug 9016: (follow-up) update DBIC schema classes 2014-05-02 20:29:18 +00:00
PatronList.pm Bug 10565: (follow-up) refresh DBIC schema class files 2013-10-14 21:35:11 +00:00
PatronListPatron.pm Bug 10565: (follow-up) refresh DBIC schema class files 2013-10-14 21:35:11 +00:00
Patronimage.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
PendingOfflineOperation.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Permission.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
PluginData.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Printer.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
PrintersProfile.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Quote.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Rating.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
RepeatableHoliday.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ReportsDictionary.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Reserve.pm Bug 9809: Update Schema files 2015-08-26 10:26:13 -03:00
Review.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
SavedReport.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
SavedSql.pm Bug 2969: Update DBIx 2014-10-24 10:02:01 -03:00
SearchHistory.pm Bug 11430: (RM followup) DBIx schema update 2015-03-11 15:14:30 -03:00
Serial.pm Bug 12375 [2] - Update Serial schema file 2015-12-31 11:57:54 +00:00
Serialitem.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ServicesThrottle.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Session.pm Bug 13606: (RM followup) DBIx updates 2015-04-23 13:22:41 -03:00
SocialData.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
SpecialHoliday.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Statistic.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Subscription.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
SubscriptionFrequency.pm Bug 7688: (follow-up) update DBIx::Class schema classes 2013-10-30 02:42:40 +00:00
SubscriptionNumberpattern.pm Bug 7688: (follow-up) update DBIx::Class schema classes 2013-10-30 02:42:40 +00:00
Subscriptionhistory.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Subscriptionroutinglist.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Suggestion.pm Bug 13006: (RM followup) DBIx schema update 2015-04-13 11:07:01 -03:00
Systempreference.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Tag.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
TagAll.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
TagsApproval.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
TagsIndex.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
TmpHoldsqueue.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
TransportCost.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
UploadedFile.pm Bug 14321: (RM followup) DBIx update 2015-09-25 15:22:07 -03:00
UserPermission.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Userflag.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Virtualshelfcontent.pm Bug 14544: [QA Follow-up] DBIx::Class changes 2015-11-05 10:00:31 -03:00
Virtualshelfshare.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Virtualshelve.pm Bug 14544: (RM followup) DBIx update 2015-11-05 10:40:57 -03:00
Z3950server.pm Bug 6536: (RM followup) make DBIx::Class::Schema::Loader happy 2014-09-01 10:25:25 -03:00
Zebraqueue.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00