Commit graph

56 commits

Author SHA1 Message Date
Colin Campbell
e40e11ab0c bug 3481: Allow Item Temporary Locations for Processing and Shelving.
Allows temporary locations corresponding to 'in processing' and 'shelving'
so that newly-created items, and newly-returned items do not show
immediately as a available. Three new system preferences govern the usage
of these features.

NewItemsDefaultLocation. If system pref NewItemsDefaultLocation is set to a location code,
 all newly catalogued items will be set to the location set in this preference.
 Location code must be a valid LOC authorized value type.

InProcessingToShelvingCart. if the system pref InProcessingToShelvingCart is turned on,
any items run through returns.pl with a location code for 'PROC', will be modified to
have a new location code of 'CART'.

ReturnToShelvingCart.  If the syspref ReturnToShelvingCart is turned on,
all items returned other than confirmed holds will have a new location code of 'CART'.
Any item issued is automatically taken of the shelving cart.

Adds a cron script shelf_to_cart.pl which should be run hourly.
Updates all items with a location of CART to the item's permanent location.

The original location code is stored in the new items column 'permanent_location'.

Original Author: PTFS Contractor <dbavousett@ptfs.com>

This work co-sponsored by
  Middletown Township Public Library, Middletown, NJ USA  and
  East Brunswick Public Library, East Brunswick, NJ USA

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 11:54:46 -04:00
4ecaa1f9bd future hold request followup 2 - fix queries
Clarify when it is necessary to add a
'reservedate <= CURRENT_DATE()' clause.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-11 19:23:40 -04:00
Michael Hafen
74a4f29236 Allow the reserve date to be set on holds
This adds to the interface and code the ability to set the reserve date when
requesting a hold.

Resubmit.  Sorry, I formatted it from the wrong branch.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-11 18:02:26 -04:00
Joe Atzberger
08816bab07 bug 3435: SIP Checkin extension for 3M SmartChute - partial
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 11:06:47 -04:00
Joe Atzberger
232aa85009 Fix POD for GetReservesFromBiblionumber
Only one argument is needed, as the name suggests.
Also removed unused package variable, added comments.

Fix POD for GetReservesFromBiblionumber

Only one argument is needed, as the name suggests.
Also removed unused package variable, added comments.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 11:27:39 -04:00
Joe Atzberger
3dac018ccf Cleanup _Findgroupreserve.
Mostly formatting SELECT statement for readability.  Also updated POD
and added a comment.  This command:
    git diff -w C4/Reserves.pm
shows only the POD and comment chnages.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 11:27:36 -04:00
Galen Charlton
17475d7772 bug 3222: tweak sending of hold filled notification
Send a hold filled notification only when the item
is (assumed) to enter the hold shelf, i.e., when
the request status (reserves.found) is set to 'W'.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 13:20:57 -05:00
Ryan Higgins
af2c4340ad bug 3195 : Item Transfers and Holds disrupted.
This follows revert of commit 257a439d (bug 3025).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 11:18:39 -05:00
Ryan Higgins
09a5613586 Revert "(bug #3025) multiple check-in of a multiple times reserved item go wrong"
This reverts commit 257a439daf.
This patch causes Bug 3195 .

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 11:18:37 -05:00
Galen Charlton
3c04a7915a fix error introduced in a previous commit
Change to GetReservesFromBiblionumber() had effect
of causing all requests of constrainttype other
than 'o' to not be included in result.

while ($foo) {
    $bar or next;
    # do stuff
    # do other stuff
}

is not equivalent to

while ($foo) {
    if ($bar) {
        # do stuff
    }
    # do other stuff

}

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 10:39:33 -05:00
Nahuel ANGELINETTI
257a439daf (bug #3025) multiple check-in of a multiple times reserved item go wrong
This patch check that an item is not "Waiting" before do something in GetOtherReserves(because is the item is waiting, we don't need to do something).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:36:58 -05:00
Joe Atzberger
0c84d36353 AddReserve had bogus prepare statement.
This patch was not fully tested because the actual behavior intended
by constraints 'o' and 'e' was apparently never implemented here.
But it had no chance of success as with:
    my $sth = $dbh->prepare("");

This uses the inteneded query, removes unneeded $sth->finish calls and
fixes *some* redeclaration of my $variables in the same scope, as
would be needed to run under warnings pragma.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 12:44:51 -06:00
Jesse Weaver
1301705150 Add holds policies
This adds holds policy creation support to smart rules and read support to
C4/Circulation.pm, and the two reservation pages. It also adds a system
preference, AllowHoldPolicyOverride, to control whether the staff can override
these policies.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-16 08:21:07 -06:00
Jesse Weaver
c9a50403e5 bug 2848 [1/2]: Send notifications to patrons when hold is received
This adds notification code to Reserves.pm to send notifications through email
or SMS to patrons when their hold is filled. It does not send the letter
directly, but instead uses EnqueueLetter. Also, it relies on
EnhancedPatronMessaging being on and the hold notification being turned on for
the specific patron through the 'Messaging' tab.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-08 08:51:12 -06:00
Galen Charlton
8b48780665 bug 2522 [2/3]: C4::Reserves support for request targeting
_Findgroupreserve, which identifies which hold request an
item should fill, is modified to check to see if
that item is targeted to fill a specific hold request.

It first checks for a targeted match with an item-level hold request,
then a targeted match with a title-level request.  If no
such targeted match exists, it then checks for the top entries
in the holds queue.

The hold targeting map (i.e., the hold_fill_targets table) is
populated by the build_holds_queue.pl batch job.  If that
job is not used, the behavior of _Findgroupreserve
is not changed.

This patch also

* adjusts ModReserveMinusPriority so that it calls
  _FixPriority().
* adjusts circ/returns.pl so that it
  correctly detects transfers.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-18 07:15:52 -05:00
Galen Charlton
c7bc867695 bug 2519: clear waitingdate if request is moved off waiting status
* Changed C4::Reserves::ModReserve so that if using it to take an
  item off the hold shelf, reserves.waitingdate is cleared.
* Improved POD.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-18 07:15:21 -05:00
Ryan Higgins
87a8103c48 Further update to allow notforloan < 0 items to be placed on hold. This is a workaround for the lack of a notforhold flag.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 15:40:06 -05:00
Ryan Higgins
a8d2b44a4c Allow holds to be placed on items with notforloan set as a negative value. See http://wiki.koha.org/doku.php?id=en:development:kohastatuses
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 15:31:24 -05:00
Galen Charlton
d79f050ce3 bug 2252: item-level hold not waiting until priority = 0
When returning an item that has an item-level hold on it,
CheckReserves() will not consider it waiting unless the
priority has been set to 0 (i.e., the item has specifically
been marked as filling the request.)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:20 -05:00
Galen Charlton
98e2db8278 bug 2273: not-for-loan item should not fill hold request
If an item is not for loan (i.e., items.notforloan is not null),
do not use it to fill a title-level hold request when
item is checked in.  Prior to this patch, a notforloan item
could fill a request - CheckReserves() was checking only
the item's item type's not for loan flag.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:19 -05:00
Galen Charlton
784316826c bug 1710 and 1739: availability for item-level holds
Fixed rules for determining whether an item is
available for an item-level hold request.  Create a
new function in C4::Reserves, IsAvailableForItemRequest(),
that checks whether an item is potentially available for
an item-level hold request.

An item is considered available if:

* it is not lost AND,
* it is not marked not for loan AND,
* it is not withdrawn AND,
* it is not damaged (unless the AllowHoldsOnDamagedItems syspref is ON), AND
* it is not on loan (unless the AllowOnShelfHolds syspref is ON)

Preventing a hold request on withdrawn items is bug 1739, as is
the new preference on whether to allow holds on damaged items.

Removing the condition that an item cannot be requested if
it has already been requested by another patron is the topic of bug 1710.

Note that this patch does not change the behavior where if
independent branches is on and the canreservefromotherbranches
syspref is off, a staff operator is prevented from placing
an item-level hold request on an item from a different branch.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 14:14:49 -05:00
Galen Charlton
ce1fbe0785 bug 2252 - check correct items for item-specific holds
C4::Reserves::_Findgroupreserves(), instead of
getting all requests for a bib, now gets only the
requests that are title-level (itemnumber is null)
or for that specific item.  This prevents an item
from filling an item-level hold for a different item
attached to the same bib, which is the expected
behavior for item-level holds.

[LL Bug 22]

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-17 13:09:41 -05:00
Joshua Ferraro
2e3b63e4d2 Revert "2 FixPriority calls were broken. FixPriority itself may be broken too,"
This reverts commit ea9e0804cd.
2008-04-22 19:16:30 -05:00
Joe Atzberger
ea9e0804cd 2 FixPriority calls were broken. FixPriority itself may be broken too,
but we can't test that withtout calling it correctly.
Note FIXME for questionable use of @-.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-22 18:06:54 -05:00
Ryan Higgins
86ee8ee384 Add print slip to hold confirmation dialog.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-25 07:20:25 -05:00
Galen Charlton
9222f7a6ca created old_issues and old_reserves tables
The new tables have the same structure and constraints
as the tables they archive with the following exceptions:

* borrowernumber and biblionumber in old_reserves can be
  NULL
* the FK constraints (e.g., for itemnumber) on old_reserves
  set the child column to NULL if the parent row is deleted
  instead of deleting the child row.
* there is no FK constraint on old_issues.branchcode, allowing
  a branch to be deleted without changing archived requests.

Some miscellaneous cleanup was done as part of this patch:

* GetMemberIssuesAndFines (C4::Members) now uses bind variables
* fixed POD for GetMemberIssuesAndFines

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-15 08:36:31 -05:00
Joe Atzberger
159f1b6293 Reserves.pm - BEGIN block VERSION and vars related to export.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-07 20:02:41 -06:00
Galen Charlton
25cb12ec97 add INIT block to import C4::Items
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 20:24:11 -06:00
Galen Charlton
9e7c94bf96 item rework: moved GetItem
Moved from C4::Biblio to C4::Items.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:24:04 -06:00
Chris Cormack
fdda3d48d1 Fix for bug 1708
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 20:51:24 -06:00
Chris Cormack
eddd6c2181 Fix for reserve notes not showing
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-11 18:42:45 -06:00
Chris Cormack
53be8065d1 Fix for bug 1456
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-22 19:58:14 -05:00
Chris Cormack
c3c520b385 Working on a fix for bug 1456
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-21 21:55:57 -05:00
Chris Cormack
b9c20fa9cf Patch from Galen Charlton, removing $Id$ $Log$ and $Revision$ from files
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-18 20:22:01 -05:00
Paul POULAIN
7ec8571d88 #668 cancel reserve on checkout does not work
The reserve was cancelled only under certain circumstances (depending on reserve status)
cancelling everytime.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-08 15:51:03 -05:00
Henri-Damien LAURENT
04a108482d BUG FIXING : Using LEFT JOIN in replacement of implicit inner joins. WARN NOT FULLY TESTED
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-10-03 14:58:35 -05:00
Joshua Ferraro
06d8e7d4cf chmod 644 on all modules
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-10-02 19:11:35 -05:00
Chris Cormack
6c871b7847 Fix for a bug in reserves, if a charge was incurred we got a server error, and it wasnt listing the itemtypes available
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-10-01 18:25:19 -05:00
Chris Cormack
1a4fc157bf Applying the fix for bug 1416 from paul
Had to edit the patch as it was corrupt
2007-09-20 17:39:43 -05:00
toins
a3135df486 really minor change : POD fixing, indentation & some compilation warn removing. 2007-07-26 15:18:46 +00:00
toins
6ec59c52b9 using 'our' instead of 'use vars' which is deprecated.
removing some compilation warns.
2007-07-12 15:22:09 +00:00
hdl
18cefded0e Bug Fixing : Deleting an unused variable 2007-07-12 12:51:34 +00:00
hdl
a54c939f05 Bug Fixing : Reserves in OPAC or in intranet lead to an internal server error 2007-07-12 12:47:19 +00:00
hdl
6883d37fe7 Bug Fixing : reserves in OPAC and intranet. 2007-07-09 08:29:51 +00:00
toins
38f7d2148a removing warn compilation. 2007-06-13 13:03:34 +00:00
tipaul
fb143b71ba BIG COMMIT : cleaning of Reserves.pm. See detail on koha-devel 2007-04-24 16:10:36 +00:00
tipaul
4dea4d29b3 moving dotransfer to Biblio.pm::ModItemTransfer + some CheckReserves fixes 2007-04-24 09:07:53 +00:00
tipaul
9f42b8ad49 renaming currenttransfers to transferstoreceive 2007-04-23 15:21:17 +00:00
tipaul
3ddec89262 moving Reserves2.pm to Reserves.pm 2007-04-23 14:08:47 +00:00
tipaul
9d263d065b replaced by Reserves2 2004-03-17 15:59:39 +00:00