Bugzilla – Attachment 117598 Details for
Bug 24446
Stockrotation: Update to use daterequested in branchtransfers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24446: Add datesent/datecancelled handling to GetTransfersFromTo
Bug-24446-Add-datesentdatecancelled-handling-to-Ge.patch (text/plain), 3.08 KB, created by
Jonathan Druart
on 2021-03-03 14:32:18 UTC
(
hide
)
Description:
Bug 24446: Add datesent/datecancelled handling to GetTransfersFromTo
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-03-03 14:32:18 UTC
Size:
3.08 KB
patch
obsolete
>From 4fa77ef5d7a2fe824598553356aef494c31c762f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 7 Oct 2020 08:21:16 +0100 >Subject: [PATCH] Bug 24446: Add datesent/datecancelled handling to > GetTransfersFromTo >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >With the first uses of Koha::Item->request_transfer and >Koha::Item::Transfer->cancel having been added, we need to update >GetTransferFromTo to respect transfers that have been requested but >not yet sent and not cancelled. > >Test plan >1/ Run the included unit test >2/ Confirm the "Transfers to recieve" page loads >3/ Signoff > >Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> >Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> >--- > C4/Circulation.pm | 2 ++ > t/db_dependent/Circulation/transfers.t | 38 ++++++++++++++++++++++++++ > 2 files changed, 40 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 7b119e169d..2229f3edb0 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3462,6 +3462,8 @@ sub GetTransfersFromTo { > FROM branchtransfers > WHERE frombranch=? > AND tobranch=? >+ AND datecancelled IS NULL >+ AND datesent IS NOT NULL > AND datearrived IS NULL > "; > my $sth = $dbh->prepare($query); >diff --git a/t/db_dependent/Circulation/transfers.t b/t/db_dependent/Circulation/transfers.t >index 8ca9e31682..215afad81a 100755 >--- a/t/db_dependent/Circulation/transfers.t >+++ b/t/db_dependent/Circulation/transfers.t >@@ -89,6 +89,26 @@ my $item_id2 = Koha::Item->new( > itype => $itemtype > }, > )->store->itemnumber; >+my $item_id3 = Koha::Item->new( >+ { >+ biblionumber => $biblionumber, >+ barcode => 3, >+ itemcallnumber => 'callnumber3', >+ homebranch => $branchcode_1, >+ holdingbranch => $branchcode_1, >+ itype => $itemtype >+ }, >+)->store->itemnumber; >+my $item_id4 = Koha::Item->new( >+ { >+ biblionumber => $biblionumber, >+ barcode => 4, >+ itemcallnumber => 'callnumber4', >+ homebranch => $branchcode_1, >+ holdingbranch => $branchcode_1, >+ itype => $itemtype >+ }, >+)->store->itemnumber; > > #Add transfers > ModItemTransfer( >@@ -106,6 +126,24 @@ ModItemTransfer( > $branchcode_2 > ); > >+# Add an "unsent" transfer for tests >+ModItemTransfer( >+ $item_id3, >+ $branchcode_1, >+ $branchcode_2 >+); >+my $transfer_requested = Koha::Item::Transfers->search( { itemnumber => $item_id3 }, { rows => 1 })->single; >+$transfer_requested->set({ daterequested => dt_from_string, datesent => undef })->store; >+ >+# Add a "cancelled" transfer for tests >+ModItemTransfer( >+ $item_id4, >+ $branchcode_1, >+ $branchcode_2 >+); >+my $transfer_cancelled = Koha::Item::Transfers->search( { itemnumber => $item_id4 }, { rows => 1 })->single; >+$transfer_cancelled->set( { daterequested => dt_from_string, datesent => undef, datecancelled => dt_from_string } )->store; >+ > #Begin Tests > #Test CreateBranchTransferLimit > is( >-- >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 24446
:
105943
|
105944
|
105945
|
107246
|
107247
|
107248
|
107249
|
107250
|
107252
|
107253
|
107254
|
107255
|
107256
|
107301
|
107302
|
107303
|
107304
|
107305
|
110280
|
110281
|
110282
|
110283
|
110533
|
110534
|
110535
|
110536
|
110537
|
110538
|
110539
|
110540
|
110541
|
110542
|
111322
|
116557
|
116558
|
116559
|
116560
|
116561
|
116562
|
116563
|
116564
|
116565
|
116566
|
116567
|
116568
|
116569
|
116570
|
117589
|
117590
|
117591
|
117592
|
117593
|
117594
|
117595
|
117596
|
117597
| 117598 |
117599
|
117600
|
117601
|
117602
|
117603
|
117604
|
117605
|
117606
|
117607
|
120116