Bugzilla – Attachment 81835 Details for
Bug 21608
Arranging holds priority with dropdowns is faulty when there are waiting/intransit holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21608: (follow-up) Use RevertWaitingStatus and do not alter _FixPriority
Bug-21608-follow-up-Use-RevertWaitingStatus-and-do.patch (text/plain), 3.86 KB, created by
Nick Clemens
on 2018-11-01 18:56:44 UTC
(
hide
)
Description:
Bug 21608: (follow-up) Use RevertWaitingStatus and do not alter _FixPriority
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2018-11-01 18:56:44 UTC
Size:
3.86 KB
patch
obsolete
>From 06fe73bcaf8fe1605cee192671dbba41f71ef013 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 1 Nov 2018 18:56:18 +0000 >Subject: [PATCH] Bug 21608: (follow-up) Use RevertWaitingStatus and do not > alter _FixPriority > >--- > C4/Reserves.pm | 5 +---- > .../intranet-tmpl/prog/en/includes/holds_table.inc | 2 +- > reserve/request.pl | 19 ++++++++++++------- > 3 files changed, 14 insertions(+), 12 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index bdf0e0a130..41bdb4a35f 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -129,6 +129,7 @@ BEGIN { > > &AlterPriority > &ToggleLowestPriority >+ &RevertWaitingStatus > > &ReserveSlip > &ToggleSuspend >@@ -1425,10 +1426,6 @@ sub _FixPriority { > my $sth = $dbh->prepare($query); > $sth->execute( $reserve_id ); > } >- elsif ( $hold && $hold->found() && $rank > 0 ) { >- $hold->found(undef); >- $hold->store(); >- } > > my @priority; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >index 27c380a775..744672ef99 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -191,7 +191,7 @@ > [% END %] > > [% ELSE %] >- <input type="button" value="Revert found status" onclick="window.location.href='request.pl?action=move&where=down&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=0&next_priority=1&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]'"> >+ <input type="button" value="Revert found status" onclick="window.location.href='request.pl?action=move&where=down&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=0&next_priority=1&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&itemnumber=[% hold.itemnumber %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]'"> > [% END %] > </td> > [% END # IF SuspendHoldsIntranet %] >diff --git a/reserve/request.pl b/reserve/request.pl >index a1668a48b8..4629e3450e 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -86,13 +86,18 @@ my $action = $input->param('action'); > $action ||= q{}; > > if ( $action eq 'move' ) { >- my $where = $input->param('where'); >- my $reserve_id = $input->param('reserve_id'); >- my $prev_priority = $input->param('prev_priority'); >- my $next_priority = $input->param('next_priority'); >- my $first_priority = $input->param('first_priority'); >- my $last_priority = $input->param('last_priority'); >- AlterPriority( $where, $reserve_id, $prev_priority, $next_priority, $first_priority, $last_priority ); >+ my $where = $input->param('where'); >+ my $reserve_id = $input->param('reserve_id'); >+ my $prev_priority = $input->param('prev_priority'); >+ my $next_priority = $input->param('next_priority'); >+ my $first_priority = $input->param('first_priority'); >+ my $last_priority = $input->param('last_priority'); >+ my $hold_itemnumber = $input->param('itemnumber'); >+ if ( $prev_priority == 0 && $next_priority == 1 ){ >+ RevertWaitingStatus({ itemnumber => $hold_itemnumber }); >+ } else { >+ AlterPriority( $where, $reserve_id, $prev_priority, $next_priority, $first_priority, $last_priority ); >+ } > } elsif ( $action eq 'cancel' ) { > my $reserve_id = $input->param('reserve_id'); > my $hold = Koha::Holds->find( $reserve_id ); >-- >2.11.0
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 21608
:
80933
|
81131
|
81134
|
81272
|
81835
|
82157
|
82322
|
82652
|
82956
|
82957
|
82958
|
82959
|
83541