Bugzilla – Attachment 134630 Details for
Bug 30291
Rename recalls.* column names
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30291: (QA follow-up) Fix for revert to recall_id
Bug-30291-QA-follow-up-Fix-for-revert-to-recallid.patch (text/plain), 4.37 KB, created by
Martin Renvoize
on 2022-05-05 10:29:57 UTC
(
hide
)
Description:
Bug 30291: (QA follow-up) Fix for revert to recall_id
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2022-05-05 10:29:57 UTC
Size:
4.37 KB
patch
obsolete
>From ed4548b50553468f7704e0a28293cd93ab8df30c Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 5 May 2022 11:14:44 +0100 >Subject: [PATCH] Bug 30291: (QA follow-up) Fix for revert to recall_id > >--- > C4/Letters.pm | 2 +- > Koha/Recall.pm | 2 +- > t/db_dependent/Koha/Recalls.t | 20 ++++++++++---------- > 3 files changed, 12 insertions(+), 12 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index ddb43568fc..7c63b23d8e 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -751,7 +751,7 @@ sub _parseletter_sth { > ($table eq 'serial') ? "SELECT * FROM $table WHERE serialid = ?" : > ($table eq 'problem_reports') ? "SELECT * FROM $table WHERE reportid = ?" : > ($table eq 'additional_contents' || $table eq 'opac_news') ? "SELECT * FROM additional_contents WHERE idnew = ?" : >- ($table eq 'recalls') ? "SELECT * FROM $table WHERE id = ?" : >+ ($table eq 'recalls') ? "SELECT * FROM $table WHERE recall_id = ?" : > undef ; > unless ($query) { > warn "ERROR: No _parseletter_sth query for table '$table'"; >diff --git a/Koha/Recall.pm b/Koha/Recall.pm >index ebe2037c93..a97e741b64 100644 >--- a/Koha/Recall.pm >+++ b/Koha/Recall.pm >@@ -354,7 +354,7 @@ sub set_waiting { > biblio => $self->biblio_id, > borrowers => $self->patron_id, > items => $itemnumber, >- recalls => $self->id, >+ recalls => $self->recall_id, > }, > ); > >diff --git a/t/db_dependent/Koha/Recalls.t b/t/db_dependent/Koha/Recalls.t >index 3e5810ffaa..63d4c0dd05 100755 >--- a/t/db_dependent/Koha/Recalls.t >+++ b/t/db_dependent/Koha/Recalls.t >@@ -146,19 +146,19 @@ is( $messages_count, 3, "RETURN_RECALLED_ITEM notice successfully sent to checko > my $message = Koha::Recalls->move_recall; > is( $message, 'no recall_id provided', "Can't move a recall without specifying which recall" ); > >-$message = Koha::Recalls->move_recall({ recall_id => $recall->id }); >+$message = Koha::Recalls->move_recall({ recall_id => $recall->recall_id }); > is( $message, 'no action provided', "No clear action to perform on recall" ); >-$message = Koha::Recalls->move_recall({ recall_id => $recall->id, action => 'whatever' }); >+$message = Koha::Recalls->move_recall({ recall_id => $recall->recall_id, action => 'whatever' }); > is( $message, 'no action provided', "Legal action not provided to perform on recall" ); > > $recall->set_waiting({ item => $item1 }); > ok( $recall->waiting, "Recall is waiting" ); >-Koha::Recalls->move_recall({ recall_id => $recall->id, action => 'revert' }); >-$recall = Koha::Recalls->find( $recall->id ); >+Koha::Recalls->move_recall({ recall_id => $recall->recall_id, action => 'revert' }); >+$recall = Koha::Recalls->find( $recall->recall_id ); > ok( $recall->requested, "Recall reverted to requested with move_recall" ); > >-Koha::Recalls->move_recall({ recall_id => $recall->id, action => 'cancel' }); >-$recall = Koha::Recalls->find( $recall->id ); >+Koha::Recalls->move_recall({ recall_id => $recall->recall_id, action => 'cancel' }); >+$recall = Koha::Recalls->find( $recall->recall_id ); > ok( $recall->cancelled, "Recall cancelled with move_recall" ); > > ( $recall, $due_interval, $due_date ) = Koha::Recalls->add_recall({ >@@ -169,8 +169,8 @@ ok( $recall->cancelled, "Recall cancelled with move_recall" ); > expirationdate => undef, > interface => 'COMMANDLINE', > }); >-$message = Koha::Recalls->move_recall({ recall_id => $recall->id, item => $item2, borrowernumber => $patron1->borrowernumber }); >-$recall = Koha::Recalls->find( $recall->id ); >+$message = Koha::Recalls->move_recall({ recall_id => $recall->recall_id, item => $item2, borrowernumber => $patron1->borrowernumber }); >+$recall = Koha::Recalls->find( $recall->recall_id ); > ok( $recall->fulfilled, "Recall fulfilled with move_recall" ); > > $schema->storage->txn_rollback(); >@@ -191,7 +191,7 @@ subtest 'filter_by_current() and filter_by_finished() tests' => sub { > > my $recalls = Koha::Recalls->search( > { >- id => [ >+ recall_id => [ > $in_transit->id, > $overdue->id, > $requested->id, >@@ -201,7 +201,7 @@ subtest 'filter_by_current() and filter_by_finished() tests' => sub { > $fulfilled->id, > ] > }, >- { order_by => [ 'id' ] } >+ { order_by => [ 'recall_id' ] } > ); > > is( $recalls->count, 7, 'Resultset count is correct' ); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30291
:
132379
|
132380
|
132381
|
132382
|
132383
|
132384
|
132385
|
132386
|
134359
|
134360
|
134361
|
134362
|
134363
|
134364
|
134365
|
134366
|
134367
|
134389
|
134390
|
134391
|
134392
|
134393
|
134394
|
134395
|
134396
|
134397
|
134629
| 134630