Bugzilla – Attachment 121719 Details for
Bug 28520
Cancelling a hold that is in transit hides item's transit status
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28520: Revert "Bug 12362: Cancel transfer with hold cancelation"
Bug-28520-Revert-Bug-12362-Cancel-transfer-with-ho.patch (text/plain), 4.01 KB, created by
Martin Renvoize (ashimema)
on 2021-06-08 12:05:37 UTC
(
hide
)
Description:
Bug 28520: Revert "Bug 12362: Cancel transfer with hold cancelation"
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-06-08 12:05:37 UTC
Size:
4.01 KB
patch
obsolete
>From f5d124c1a134e349e8de798ddb268d3d294287c7 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Tue, 8 Jun 2021 07:50:05 +0000 >Subject: [PATCH] Bug 28520: Revert "Bug 12362: Cancel transfer with hold > cancelation" > >This reverts commit 6c105829144cd341a4bc65ad8d0ee1f996b423d4. > >This commit was part of a series adding adding reverse transfers, i.e. >transfers that were created for transfers that were cancelled and >we wanted the item to return back to its sending library. This however >hid the information about transfer happening and we need another approach >to the problem. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Hold.pm | 9 ------- > Koha/Item/Transfer.pm | 25 +++---------------- > .../prog/en/modules/circ/returns.tt | 2 -- > 3 files changed, 4 insertions(+), 32 deletions(-) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index 2bdae269ec..bd5458f494 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -511,17 +511,8 @@ Cancel a hold: > > sub cancel { > my ( $self, $params ) = @_; >- > $self->_result->result_source->schema->txn_do( > sub { >- if ( $self->is_in_transit ) { >- my $transfer = $self->item->get_transfer; >- # NOTE: Transfers are well bound with Holds.. as such we have to check that there is actually a >- # transfer enqueued and in transit here prior to trying to cancel it. >- if ( $transfer && $transfer->in_transit ) { >- $transfer->cancel({ reason => 'CancelReserve', force => 1 }); >- } >- } > $self->cancellationdate( dt_from_string->strftime( '%Y-%m-%d %H:%M:%S' ) ); > $self->priority(0); > $self->cancellation_reason( $params->{cancellation_reason} ); >diff --git a/Koha/Item/Transfer.pm b/Koha/Item/Transfer.pm >index 21d8a2938c..448e68cfff 100644 >--- a/Koha/Item/Transfer.pm >+++ b/Koha/Item/Transfer.pm >@@ -52,20 +52,6 @@ sub item { > return Koha::Item->_new_from_dbic($item_rs); > } > >-=head3 from_library >- >- my $from_library = $transfer->from_library; >- >-Returns the associated from_library for this transfer. >- >-=cut >- >-sub from_library { >- my ($self) = @_; >- my $from_library_rs = $self->_result->frombranch; >- return Koha::Library->_new_from_dbic($from_library_rs); >-} >- > =head3 transit > > Set the transfer as in transit by updating the datesent time. >@@ -159,15 +145,12 @@ sub cancel { > ->store; > > # Set up return transfer if transfer was force cancelled whilst in transit >- # and we were not notified that the transfer is being replaced. > # NOTE: We don't catch here, as we're happy to fail if there are already > # other transfers in the queue. >- if ($in_transit && !$params->{replace}) { >- try { >- $self->item->request_transfer( >- { to => $self->from_library, reason => 'TransferCancellation' } ); >- }; >- } >+ try { >+ $self->item->request_transfer( >+ { to => $self->from_library, reason => 'TransferCancellation' } ); >+ }; > > return $self; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 0fdb3fd6c6..8f06ab6d72 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -134,8 +134,6 @@ > [%- CASE 'Reserve' -%]Reserve > [%- CASE 'LostReserve' -%]Lost reserve > [%- CASE 'CancelReserve' -%]Cancelled reserve >- [%- CASE 'TransferCancellation' -%]Transfer was cancelled whilst in transit >- [%- CASE -%][% trigger | html %] > [%- END -%] > </p> > </div> >-- >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 28520
:
121686
|
121689
|
121690
|
121691
|
121693
|
121708
|
121709
|
121710
|
121711
|
121712
|
121718
|
121719
|
121720
|
121721
|
121722
|
121843
|
121844
|
121845
|
121846
|
121847
|
121951
|
121952
|
121953
|
121954
|
121955
|
121985
|
122005
|
122006
|
122007