bug 4224: explicitly mark hold requests as being handled by item in transit
This patch defines a new values of reserves.found, 'T', to indicate that an item has been allocated to fill a hold request and is currently in transit from one branch to another. This explicit value is meant to filter out hold requests from processing by holds queue batch job. Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
a9c90b6dfb
commit
fcb21ec94c
|
|
@ -57,7 +57,8 @@ This modules provides somes functions to deal with reservations.
|
||||||
- priority >0 : then the reserve is at 1st stage, and not yet affected to any item.
|
- priority >0 : then the reserve is at 1st stage, and not yet affected to any item.
|
||||||
=0 : then the reserve is being dealed
|
=0 : then the reserve is being dealed
|
||||||
- found : NULL : means the patron requested the 1st available, and we haven't choosen the item
|
- found : NULL : means the patron requested the 1st available, and we haven't choosen the item
|
||||||
W(aiting) : the reserve has an itemnumber affected, and is on the way
|
T(ransit) : the reserve is linked to an item but is in transit to the pickup branch
|
||||||
|
W(aiting) : the reserve is linked to an item, is at the pickup branch, and is waiting on the hold shelf
|
||||||
F(inished) : the reserve has been completed, and is done
|
F(inished) : the reserve has been completed, and is done
|
||||||
- itemnumber : empty : the reserve is still unaffected to an item
|
- itemnumber : empty : the reserve is still unaffected to an item
|
||||||
filled: the reserve is attached to an item
|
filled: the reserve is attached to an item
|
||||||
|
|
@ -67,15 +68,15 @@ This modules provides somes functions to deal with reservations.
|
||||||
a library having it run "transfertodo", and clic on the list
|
a library having it run "transfertodo", and clic on the list
|
||||||
if there is no transfer to do, the reserve waiting
|
if there is no transfer to do, the reserve waiting
|
||||||
patron can pick it up P =0, F=W, I=filled
|
patron can pick it up P =0, F=W, I=filled
|
||||||
if there is a transfer to do, write in branchtransfer P =0, F=NULL, I=filled
|
if there is a transfer to do, write in branchtransfer P =0, F=T, I=filled
|
||||||
The pickup library recieve the book, it check in P =0, F=W, I=filled
|
The pickup library recieve the book, it check in P =0, F=W, I=filled
|
||||||
The patron borrow the book P =0, F=F, I=filled
|
The patron borrow the book P =0, F=F, I=filled
|
||||||
|
|
||||||
==== 2nd use case ====
|
==== 2nd use case ====
|
||||||
patron requests a document, a given item,
|
patron requests a document, a given item,
|
||||||
If pickup is holding branch P =0, F=W, I=filled
|
If pickup is holding branch P =0, F=W, I=filled
|
||||||
If transfer needed, write in branchtransfer P =0, F=NULL, I=filled
|
If transfer needed, write in branchtransfer P =0, F=T, I=filled
|
||||||
The pickup library recieve the book, it checks it in P =0, F=W, I=filled
|
The pickup library receive the book, it checks it in P =0, F=W, I=filled
|
||||||
The patron borrow the book P =0, F=F, I=filled
|
The patron borrow the book P =0, F=F, I=filled
|
||||||
|
|
||||||
=head1 FUNCTIONS
|
=head1 FUNCTIONS
|
||||||
|
|
@ -1222,7 +1223,8 @@ sub ModReserveAffect {
|
||||||
$query = "
|
$query = "
|
||||||
UPDATE reserves
|
UPDATE reserves
|
||||||
SET priority = 0,
|
SET priority = 0,
|
||||||
itemnumber = ?
|
itemnumber = ?,
|
||||||
|
found = 'T'
|
||||||
WHERE borrowernumber = ?
|
WHERE borrowernumber = ?
|
||||||
AND biblionumber = ?
|
AND biblionumber = ?
|
||||||
";
|
";
|
||||||
|
|
@ -1509,13 +1511,13 @@ sub _FixPriority {
|
||||||
}
|
}
|
||||||
if ( $rank eq "W" || $rank eq "0" ) {
|
if ( $rank eq "W" || $rank eq "0" ) {
|
||||||
|
|
||||||
# make sure priority for waiting items is 0
|
# make sure priority for waiting or in-transit items is 0
|
||||||
my $query = qq/
|
my $query = qq/
|
||||||
UPDATE reserves
|
UPDATE reserves
|
||||||
SET priority = 0
|
SET priority = 0
|
||||||
WHERE biblionumber = ?
|
WHERE biblionumber = ?
|
||||||
AND borrowernumber = ?
|
AND borrowernumber = ?
|
||||||
AND found ='W'
|
AND found IN ('W', 'T')
|
||||||
/;
|
/;
|
||||||
my $sth = $dbh->prepare($query);
|
my $sth = $dbh->prepare($query);
|
||||||
$sth->execute( $biblio, $borrowernumber );
|
$sth->execute( $biblio, $borrowernumber );
|
||||||
|
|
@ -1532,7 +1534,7 @@ sub _FixPriority {
|
||||||
SELECT borrowernumber, reservedate, constrainttype
|
SELECT borrowernumber, reservedate, constrainttype
|
||||||
FROM reserves
|
FROM reserves
|
||||||
WHERE biblionumber = ?
|
WHERE biblionumber = ?
|
||||||
AND ((found <> 'W') or found is NULL)
|
AND ((found <> 'W' AND found <> 'T') or found is NULL)
|
||||||
ORDER BY priority ASC
|
ORDER BY priority ASC
|
||||||
/;
|
/;
|
||||||
my $sth = $dbh->prepare($query);
|
my $sth = $dbh->prepare($query);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue