Koha-clms/Koha/Schema/Result
Aleisha Amohia 2285c2d657 Bug 24488: Show correct first patron details on Holds to pull
This patch rewrites the complex search query to reduce the risk of
reordering the results multiple times.

This patch includes a change to schema files so may need to upgrade
schema and/or restart memcached

To test:
1) Reproduce problem following test plan in Description
2) Apply patch and refresh page
3) Notice the correct patron is now shown
4) Play with date selection, confirm correct results are still shown
5) Test cancelling holds
6) Test filtering table results
7) Test with biblios with multiple items
8) Test with making items unavailable (i.e. not for loan, checked out)

Sponsored by: IHC New Zealand

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:55:59 +01:00
..
AccountCreditType.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AccountCreditTypesBranch.pm Bug 23805: DBIC Classes 2019-10-24 17:35:19 +01:00
AccountDebitType.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AccountDebitTypesBranch.pm Bug 23049: Add DBIC Classes 2019-10-24 17:25:30 +01:00
AccountOffset.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AccountOffsetType.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Accountline.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
ActionLog.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AdditionalField.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AdditionalFieldValue.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AdvancedEditorMacro.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Alert.pm Bug 13535: DBIC schema changes 2020-10-08 16:18:19 +02:00
ApiKey.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Aqbasket.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Aqbasketgroup.pm Bug 24461: Add to_api_mapping to Koha::Acquisition::BasketGroup 2020-03-24 11:32:37 +00:00
Aqbasketuser.pm
…
Aqbookseller.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Aqbudget.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Aqbudgetborrower.pm
…
Aqbudgetperiod.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AqbudgetsPlanning.pm
…
Aqcontact.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Aqcontract.pm
…
Aqinvoice.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AqinvoiceAdjustment.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Aqorder.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AqorderUser.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AqordersClaim.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AqordersItem.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AqordersTransfer.pm
…
ArticleRequest.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AudioAlert.pm
…
AuthHeader.pm Bug 23152: Fix more pluralisation (and add tests) 2019-10-24 17:01:45 +01:00
AuthSubfieldStructure.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
AuthTagStructure.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
AuthType.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
AuthorisedValue.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
AuthorisedValueCategory.pm Bug 17355: DBIC changes - boolean flag 2020-05-04 07:57:21 +01:00
AuthorisedValuesBranch.pm
…
BackgroundJob.pm Bug 22417: DBIX Schema changes 2020-10-05 15:22:43 +02:00
Biblio.pm Bug 20212: Add missing relation in Biblio 2021-01-28 16:44:11 +01:00
BiblioFramework.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
BiblioMetadata.pm Bug 23152: Fix more pluralisation (and add tests) 2019-10-24 17:01:45 +01:00
Biblioitem.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Borrower.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
BorrowerAttribute.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
BorrowerAttributeType.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
BorrowerAttributeTypesBranch.pm
…
BorrowerDebarment.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
BorrowerFile.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
BorrowerMessagePreference.pm
…
BorrowerMessageTransportPreference.pm
…
BorrowerModification.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
BorrowerPasswordRecovery.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
BorrowerRelationship.pm Bug 14570: (RM follow-up) Add class relatinship to BorrowerRelationship 2019-08-21 08:24:27 +01:00
Branch.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
BranchTransferLimit.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
BranchesOverdrive.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
Branchtransfer.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Browser.pm
…
CashRegister.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
CashRegisterAction.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
CategoriesBranch.pm
…
Category.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
CirculationRule.pm Bug 18930: (RM follow-up) Restore primary key find 2019-07-16 13:53:54 +01:00
City.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
ClassSortRule.pm
…
ClassSource.pm Bug 15836: DBRev 18.06.00.060 2018-11-13 16:21:22 +00:00
ClassSplitRule.pm Bug 15836: DBRev 18.06.00.060 2018-11-13 16:21:22 +00:00
Club.pm Bug 19618: DBRev 19.06.00.030 2019-10-01 08:14:59 +01:00
ClubEnrollment.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
ClubEnrollmentField.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
ClubField.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
ClubHold.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
ClubHoldsToPatronHold.pm Bug 19618: (RM follow-up) Add missing use statements 2019-10-01 11:46:11 +01:00
ClubTemplate.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
ClubTemplateEnrollmentField.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
ClubTemplateField.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
Collection.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
CollectionsTracking.pm
…
ColumnsSetting.pm Bug 24156: DBIC changes 2020-06-25 10:51:59 +02:00
Course.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
CourseInstructor.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
CourseItem.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
CourseReserve.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
CoverImage.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
CreatorBatch.pm Bug 15766: (RM follow-up) Schema updates 2018-10-24 17:35:18 +00:00
CreatorImage.pm
…
CreatorLayout.pm
…
CreatorTemplate.pm
…
Currency.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
Deletedbiblio.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
DeletedbiblioMetadata.pm Bug 22155: Schema updates 2019-01-30 11:36:11 +00:00
Deletedbiblioitem.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Deletedborrower.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Deleteditem.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Desk.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Discharge.pm
…
EdifactEan.pm Bug 21417: DBRev 18.06.00.038 2018-10-09 12:57:29 +00:00
EdifactMessage.pm Bug 21294: Replace BOOLEAN with TINYINT(1) in our DB structure 2020-04-29 16:58:45 +01:00
ExportFormat.pm Bug 5087: (QA follow-up) Rename the attribute to fit later API usage 2020-07-23 10:52:10 +02:00
HoldFillTarget.pm Bug 18958: DBIC schema changes 2020-09-18 11:49:29 +02:00
HouseboundProfile.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
HouseboundRole.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
HouseboundVisit.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Illcomment.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Illrequest.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Illrequestattribute.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
ImportAuth.pm
…
ImportBatch.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
ImportBatchProfile.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
ImportBiblio.pm Bug 26853: DBIC schema changes 2020-11-03 10:57:34 +01:00
ImportItem.pm
…
ImportRecord.pm Bug 22532: DBRev 18.12.00.059 2019-04-18 10:51:21 +00:00
ImportRecordMatch.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Issue.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Item.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
ItemCirculationAlertPreference.pm
…
ItemsLastBorrower.pm
…
ItemsSearchField.pm
…
Itemtype.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
ItemtypeLocalization.pm
…
ItemtypesBranch.pm Bug 15497: Modify schemas 2019-09-12 16:31:06 +01:00
KeyboardShortcut.pm Bug 21411: DBRev 18.12.00.074 2019-05-10 19:05:38 +00:00
LanguageDescription.pm
…
LanguageRfc4646ToIso639.pm
…
LanguageScriptBidi.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
LanguageScriptMapping.pm
…
LanguageSubtagRegistry.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Letter.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
LibraryGroup.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
LibrarySmtpServer.pm Bug 22343: Add new tables schema file 2020-10-02 10:54:40 +02:00
Linktracker.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Localization.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
MarcMatcher.pm
…
MarcModificationTemplate.pm
…
MarcModificationTemplateAction.pm Bug 19166: DBRev 18.06.00.009 2018-07-19 17:33:55 +00:00
MarcSubfieldStructure.pm Bug 8643: DBRev 19.12.00.020 2020-02-11 14:37:34 +00:00
MarcTagStructure.pm Bug 8643: DBRev 19.12.00.020 2020-02-11 14:37:34 +00:00
Matchcheck.pm
…
MatcherMatchpoint.pm
…
Matchpoint.pm
…
MatchpointComponent.pm
…
MatchpointComponentNorm.pm
…
Message.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
MessageAttribute.pm
…
MessageQueue.pm Bug 10269: Schema Update 2020-03-18 14:03:32 +00:00
MessageTransport.pm
…
MessageTransportType.pm
…
MiscFile.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
NeedMergeAuthority.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
OaiSet.pm
…
OaiSetsBiblio.pm
…
OaiSetsDescription.pm
…
OaiSetsMapping.pm Bug 21520: (RM follow-up) Add missed schema update 2020-01-20 14:03:42 +00:00
OauthAccessToken.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
OldIssue.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
OldReserve.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
OpacNews.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Overduerule.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
OverduerulesTransportType.pm
…
PatronConsent.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
PatronList.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
PatronListPatron.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Patronimage.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
PendingOfflineOperation.pm
…
Permission.pm
…
PluginData.pm
…
PluginMethod.pm Bug 23152: (RM follow-up) Add handling for Koha::Plugin::Methods 2019-06-24 17:03:19 +01:00
PrintersProfile.pm
…
ProblemReport.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
PseudonymizedBorrowerAttribute.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
PseudonymizedTransaction.pm Bug 24151: DBIC changes 2020-07-20 15:17:42 +02:00
Quote.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Rating.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
RepeatableHoliday.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
ReportsDictionary.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Reserve.pm Bug 24488: Show correct first patron details on Holds to pull 2021-02-08 14:55:59 +01:00
ReturnClaim.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Review.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
SavedReport.pm
…
SavedSql.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
SearchField.pm Bug 19482: DBIC schema changes 2020-11-04 12:59:33 +01:00
SearchHistory.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
SearchMarcMap.pm
…
SearchMarcToField.pm Bug 21294: Replace BOOLEAN with TINYINT(1) in our DB structure 2020-04-29 16:58:45 +01:00
Serial.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Serialitem.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
Session.pm
…
SmsProvider.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
SmtpServer.pm Bug 22343: Add new tables schema file 2020-10-02 10:54:40 +02:00
SocialData.pm Bug 22782: DBIC update for SocialData 2019-05-10 12:14:00 +00:00
SpecialHoliday.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Statistic.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Stockrotationitem.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Stockrotationrota.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Stockrotationstage.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Subscription.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
SubscriptionFrequency.pm Bug 23152: Fix more pluralisation (and add tests) 2019-10-24 17:01:45 +01:00
SubscriptionNumberpattern.pm Bug 23152: Implement koha_object[s]_class when needed 2019-06-24 16:36:57 +01:00
Subscriptionhistory.pm Bug 21901: DBRev 19.12.00.076 2020-04-17 10:17:32 +01:00
Subscriptionroutinglist.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Suggestion.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Systempreference.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
TablesSetting.pm Bug 24156: DBIC changes 2020-06-25 10:51:59 +02:00
Tag.pm
…
TagAll.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
TagsApproval.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
TagsIndex.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
TmpHoldsqueue.pm Bug 22899: DBRev 18.12.00.075 2019-05-14 18:15:54 +00:00
TransportCost.pm
…
UploadedFile.pm
…
UserPermission.pm
…
Userflag.pm
…
VendorEdiAccount.pm
…
Virtualshelfcontent.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Virtualshelfshare.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Virtualshelve.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Z3950server.pm Bug 26947: DBIC schema changes 2021-01-21 14:39:51 +01:00
Zebraqueue.pm
…