Commit graph

103 commits

Author SHA1 Message Date
8016d2bd0d Bug 10166 - Can't place holds on multiple titles if one or more are un-holdable
opac-reserve.pl tries to check whether all selected titles in a
multiple-hold batch are unavailable to be placed on hold. However, the
logic is flawed in such a way that if the last item in the batch cannot
be placed on hold the script assumes none can be placed on hold.

This patch modifies the way the script tracks the "no titles available
for holds" variable in order to correct the error.

To test, place multiple holds by selecting titles from a list of search
results. Test three conditions:

- All titles are available to be placed on hold

  You should see no onscreen warnings, and all titles should be
  selectable on the place hold screen. A "Place hold" button should
  appear at the bottom.

- Some titles can be placed on hold, some cannot

  The titles which can be placed on hold should be selectable.
  Titles which cannot be placed on hold should show a warning
  message. A "Place hold" button should appear at the bottom.

- No titles can be placed on hold

  "Sorry, none of these items can be placed on hold." should appear at
  the top of the page. All titles should appear with warning messages.
  There should be no "Place hold" button.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-06 08:33:35 -04:00
Bernardo Gonzalez Kriegel
2d9f5fc69e Bug 9457: [ENH] Ordering branches should be case independent (2)
This patch replace use of CGI::scroll_list() to show list of branches.

In two files, marc21_linking_section.pl and unimarc_field_4XX.pl,
the scrolling list is created but not used in the template file,
so the code is removed.

Also minor renaming/normalizing of variables.

To test:
1) Install with some branches, records and patrons

2.1) Select a record, click 'Place hold', select user,
     there is a library pull-down next to 'Pickup at:',
     list is ordered case sensitive
2.2) Go to Reports > Average loan time,
     next to Library is a pull-down,
     list without order
2.3) Go to Reports > Catalog by item type,
     next to 'Select a library' is a pull-down,
     list is ordered case sensitive
2.4) This is tricky, go to Reports home,
     change last part of URL 'reports-home.pl' with
     'manager.pl?report_name=issues_by_borrower_category'
     (can't find a direct link), next to 'Select a library'
     is a library pull-down,
     list without order
2.5) Edit/Add a patron, on section 'Library management'
     there is a library pull-down, case sensitive
2.6) OPAC, as logged user, make a suggestion or hold,
     there is library pull-down, correct order

3) Apply the patch

4.1) Repeat 2.1), correctly ordered list
4.2) Repeat 2.2), correctly ordered list
4.3) Repeat 2.3), correctly ordered list
4.4) Repeat 2.4), correctly ordered list
4.5) This is a bit more work
     There are 3 possible situations to test:
     A) No branches, must show a message that are no
        libraries defined
     B) New patron, must show a correctly ordered
        list of branches, current branch selected
     C) Edit patron, must show a correctly ordered
        list of branches, patron branch selected
4.6) Small changes on variable names, so retest 2.6)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-20 15:35:58 -04:00
Jonathan Druart
a469663d7b Bug 9108: Followup: send the dateformat value from C4::Auth
- the dateformat value is send to all templates (from
  C4::Auth::get_template_and_user)
- remove all assignment of dateformat in all .pl files
- the DHTMLcalendar_dateformat variable is unused

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed conflicts:
 - opac/sco/sco-main.pl
 - reports/acquisitions_stats.pl
 - tools/cleanborrowers.pl

All tests pass, perlcritic problems appeared in some files
before and after these patches were applied.

Checked sorting in following pages:
- acqui/addorderiso2709.tt - list of staged imports in acq
- acqui/histsearch.tt - sorting of dates in acq search result list
- acqui/invoices.tt - billing date in list of invoices in acq
- acqui/lateorders.tt - list of late orders in acq
- acqui/ordered.tt - ordered titles and estimated costs for a fund
- acqui/parcels.tt - receive shipment page
- acqui/spent.tt - received titles and actual costs for a fund
...
- serials-search.tt - subscription search result list
...
- opac/sco/sco-main.tt - due dates in list of checked out items
- reports/acquisitions-stats.tt - date searches, display of dates
- tools/cleanborrowers.tt
- tools.holidays.tt - different views of dates library is closed,
  adding dates

Checked dates display according to system preference everywhere and
searching, entering dates etc. still worked as expected.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-17 21:59:30 -05:00
Vitor FERNANDES
63f2ceb603 Bug 9206 - Only allow place holds in records that the patron don't have in his possession
Added a system preference to turn on/off this feature.
By default the system allow the patron to place holds even if it is in his possession.
Script to place holds check if the system preference is off and if patron has at least one item to block holds.
Messages to say that are already in patron possession added to templates.
Method to check if patron has one issue from one record added to C4::Circulation

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-27 09:48:03 -05:00
af355d17f0 Bug 5801 - C4::Circulation::_GetCircControlBranch wrongly used in opac-reserve.pl
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and perlcritic pass.

Tests done:
holds policy vs. circulation rules seemed to make the difference for me,
I am not totally sure why that is, but see no reason to fail this patch as
results are ok.

System preferences
- CircControlBranch = the library the item is from
- ReservesControlBranch = patron's home library

Circulation rules
- Library A - Holds policy: Books can not be put on hold.
- Library B - Holds policy: Books can be put on hold. (no special setting needed)

Catalog data
- A record with an item for library B, itemtype Books.

Test without patch:

1) Patron A (home library A) places a hold in OPAC on an item from library B.

Should be: hold is NOT allowed.
Before patch: hold IS allowed.
After patch: hold is NOT allowed.
OK

2) ReserveControlbranch = item's home library
Patron A (home library A) places a hold in OPAC on an item from library B.

Should be: hold is allowed.
Before patch: hold is allowed.
After patch: hold is allowed.
OK

3) ReservesControlBranch = patron's home library
Circulation rules: Remove hold policy for library B.
Library A: no holds allowed for books using 'Holds allowed (count)' = 0
Library B: 5 holds allowed for books using 'Holds allowed (count)' = 5
Patron A (home library A) places a hold in OPAC on an item from library B.

Should be: hold is NOT allowed
Before patch: hold is NOT allowed
After patch:  hold is NOT allowed
OK

4) ReserveControlbranch = item's home library

Should be: hold is allowed
Before patch: hold is allowed
After patch:  hold is allowed
OK
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-29 22:03:51 -05:00
Colin Campbell
3b608056d9 Bug 6976 Close loophole allowing borrowers extra holds via opac
The check that the max number of reserves has
not been reached needs to take account of the fact
that we may have added enouch reserves to
reach the limit while this script is running.
Add a check against the incrementing count

The variable canreserve was only used when looping
through multiple holds but was not being
reinitialized on every iteration
make variable local to loop it is used in and
initialize to zero

Have used perltidy to correct the indention of
the while loop as it was misleading to the reader

Some numeric comparisons were using a string operator
fix them before strange bugs manifest themselves

The loophole manifests thus:
borrowers are only allowed Y holds.
If holds are done individually, it is
obeying that law i.e. X has held Y separate books –
 when I tried to do a 6th
book it told me that I could not place a hold.
However, if a borrower checks the catalogue,
gets the intial list up and clicks items on the “results”
box and then clicks “place hold” they can hold more than Y
items Please enter the commit message for your changes. Lines starting

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-14 15:22:46 +02:00
Colin Campbell
6fd9b3febe Bug 8479 Calculate rank irrespective of display option
Calculation of rank was being skipped based on display
option but it is used in calculating the rank passed
to AddReserve resulting in reserves being created with
null priorities causing them to be skipped in subsequent
processing

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-31 22:32:29 +02:00
341031c54e Bug 6679: Fixing 5 perlcritic violations in opac/*
1 more to go... :)

opac/changelanguage.pl: Code before strictures are enabled at line 24, column 1.
See page 429 of PBP.  (Severity: 5)

Note: Rebased on master 06/09/2012 by jcamins
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-10 15:12:39 +02:00
fffe2ccbf5 Bug 4330 : Fixing FSF address and copyright statements
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-28 17:53:46 +02:00
Srdjan
c80fe2be2d bug_7398: Replaced OPACDisplayRequestPriority syspref with OPACShowHoldQueueDetails
New syspref is Choice, options being:
- None
- Priority only
- Holds number only
- Holds number and priority

Show holds count on OPAC detail

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-24 15:32:19 +02:00
Chris Cormack
0c40ff9f98 Merge remote-tracking branch 'kc/master' into merged_5549
Fixed conflicts

Conflicts:
	catalogue/moredetail.pl
	installer/data/mysql/updatedatabase.pl
	koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
2012-03-22 09:36:55 +13:00
Maxime Pelletier
b67e1304f6 Singlebranchmode was always 0 causing the branch to be null and the reservations in the OPAC not to work in singlebranchmode.
Signed-off-by: Kristina D.C. Hoeppner <kristina@catalyst.net.nz>

http://bugs.koha-community.org/show_bug.cgi?id=7581
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-21 18:01:45 +01:00
Elliott Davis
96c63b0568 Bug 5549 : Fixed bracketing error 2012-03-20 13:29:23 +13:00
Colin Campbell
b946d16ec5 Bug 5549 : Format due dates in opac
Further change to ensure that where dates are formatted from the
db form the duedate loses the 23:59
2012-03-20 13:24:51 +13:00
Colin Campbell
17657b6094 Bug 5549 : Duedate formatting : reserves and opac 2012-03-20 12:36:52 +13:00
Paul Poulain
41b42dbe32 Bug 6328 follow-up for QA comments
* fixed documentation in C4/Auth_with_ldap.pm
* updated ILSDI/Utility.pm to work with debarred being a date
* updated Members.pm/patronflags to work with debarred being a date (copy/paste of BibLibre code that had not been backported)
* fixed opac-reserve to check correctly for debarred status

I also have removed a duplicate line on circulation.pl when the patron was restricted = the information was displayed twice
2011-11-25 14:00:47 +01:00
Jared Camins-Esakov
f09e2ca27e Bug 5528: Analytic records support
Display links to parent biblios, show linked items in holdings, allow holds on
linked items. This uses MARC to maintain relationships.

Sponsored by the Mississippi Department of Archives and History and RapidRadio
Solution. Originally developed by Savitra Sirohi and Amit Gupta at OSSLabs, with
UNIMARC support added by Zeno Tajoli. Commits squashed and merge conflicts
resolved by Chris Cormack from Catalyst. Respect for NORMARC and some small
framework portability fixes made by Jared Camins-Esakov of C & P Bibliography
Services.

IMPORTANT NOTE: A bug in the 773 coding for MARC21 was corrected from the
original OSS Labs code. The 773s generated by the pre-release code did not have
the first indicator set to '0', which means that they were not supposed to
display. Going forward, the first indicator will be set correctly, but existing
records created with this code will no longer appear (they appeared before only
due to another bug). To correct this, you could globally (or, to make sure you
only modify records created with the Analytics tool, for records with 773$0)
change the first indicator of the 773 from blank to '0'.

== Background ==
An analytic record for an item is a more detailed, monographic biblio for an
item attached to a serial record .  This is often used for special issues of a
journal that are released as books on their own (assigned an ISBN, as well as an
ISSN/volume/issue).  It is important for researchers to be able to search for
these items both as issues of the serial, and as monographs.  It is equally
important for the library to not have duplicate item records for the item in
question to have to keep synchronized.

== Establishing relationships ==
Analytical records are connected to items belonging to parent or host
bibliographic records. This can be accomplished by:
* From an analytical bibliographic record linking to an host item by providing
  the item barcode as input
* From a host item by using option "analyze", this creates a new empty
  bibliographic record with field 773 (MARC21) populated
* Running a new CLI script that establishes a relationship between the
  analytical record and the host item identified by the barcode in the
  analytical record's 773$o (MARC21)

== Connecting Records ==
The relationships are maintained in the MARC records, we have not used database
tables at all.

== MARC Representation ==
In MARC21/NORMARC we have used:
* 773$9 to store the Koha item number of the host item
* 773$0 to store the Koha biblio number of the host bibliographic record

The above fields are used to display the relationships in various screens in the
OPAC and the staff interface. Additionally, when populating field 773 with host
item's details, we have used following MARC 21 mapping:
* 'a' <= 100/110/111 $a (author main)
* 'b' <= 250$a (edition)
* 'd' <= 260$a, 260$b, 260$c (place, publisher, year)
* 'o' <= barcode
* 't' <= 245$a (title)
* 'w' <= (003)001 --> if no 001 is available, we can populate biblionumber
* 'x' <= 022$a (issn)
* 'z' <= 020$a (isbn)

In UNIMARC, this code uses:
* 461$9 to store the Koha item number of the host item
* 461$0 to store the Koha biblio number of the host bibliographic record

When populating field 461 in UNIMARC, the following mapping is used:
* 't' <= 200$a (title)

== Treatment of Holds ==
A key requirement was to allow holds to be placed on host items from the
analytical record. We have accomplished this by allowing holds on specific
copies only. Biblio level holds are not allowed. This ensures that holds are
placed on specific items that are relevant to the analytical record.

== Deleting host items with linked analytical records ==
As we have not used database tables to maintain relationships, we had to use
search to find out if any linked analytical records are present. If 1 or more
analytical are present, we do not allow deletion of items. This is similar to
what we see when we try to delete authority records.

== Importing analytical records ==
Analytical records can be imported using bulkmarcimport or the GUI tools. The
new CLI script can be executed after the import to establish relationships with
host items. The script will establish relationships using the host item's
barcode, the barcode must be present in 773$o of the analytical record.

== What if there are two or more copies of the host item? ==
The current design will require that there be two host (773) fields, one for
each copy.

== What if there is no barcode available for the host item? ==
It is still possible to establish a relationship, by populating 773$9 with the
host's item number. However the CLI script uses barcode in 773$o to establish
relationships so it won't work where barcodes are unavailable. Also from an
analytical record, it is possible to establish a relationship to a host item by
providing the barcode as input, this option will not be available as well.

Commits that added the following features were squashed by Chris Cormack (this
is not a list of every commit):
* Display links to host records from biblio detail screens
* Support for UNIMARC, respecting the system preference 'marcflavor'
* Support holds from the OPAC
* Ability to link to items belong to host records from a analytical record
* Display items belonging to host records in the moredetail page
* Ability to edit items belonging to host records, also ability to delink from
  them
* Move get host items code into a C4 routine, also calling the new routine in
  related perl scripts
* Move host field population to a C4 routine, all changes in pl files to call
  new routine
* Allow only specific copy holds for analytical records plus changes to use new
  C4 routines
* Support for holds on items linked via host records
* Storing bibnumber and itemnumber in subfields 0 and 9, plus other mapping
  changes
* New command line script that establishes relationships between analytical
  records and host items and bibs. The script looks for host field (MARC21 773)
  in records, and based on barcode in subfield 'o' populates host bibnumber in
  subfield '0' and host itemnumber in subfield '9'. The script can be run after
  an import of analytical records, it can also be run in the crontab to maintain
  the relationships
* Ability to create analytical records from items, to view linked analytics, and
  prevent deletion of items that have linked analytics
* New template for catalogue/detail.pl (NOTE: not a new template file, just a
  new way of displaying analytics), template displays linked analytics and
  allows creation of analytical records
* New zebra index for item number in host fields. This index will be used to
  display links to analytical records from host records
* Display title of host record instead of the phrase host record
* Using detail.tmpl for analytics tab instead of a new template file
* Improved qualification info prepration in Prephostmarcfield
* Check for linked analytics before deleting item
* Display link to host record and more meaningful anchor text for edit item link
* Analytical record: Unimarc index in record.abs and help in
  create_analytical_rel.pl
* Adding a sys pref that controls display of options to create analytical
  relationships
* Add host entry in XSLT stylesheet in staff item detail
* Added host record support to OPAC detail XSLT
* Adding 773$0 and 773$9 to all frameworks
* Adding 773 subfields 0 and 9 to default marc framework via updatedatabase.pl
* Display create analytics and used in links in catalog detail
* Fixed problem where analytical records not showing in OPAC search results
  because GetMarcBiblio now needs a flag to add item records
* Fixed problem where analytics count was set to 1 for all records, not just
  those with analytics
* Fixed catalogue detail page not to show analytics counts if count is 0

Conflicts:
	installer/data/mysql/updatedatabase.pl
	koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
	kohaversion.pl

Co-author: Savitra Sirohi <savitra.sirohi@osslabs.biz>
Co-author: Zeno Tajoli <tajoli@cilea.it>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-13 10:03:39 +13:00
Srdjan Jankovic
8b65b94636 Bug 6405: added enumchron to reserve copy list
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-09 20:01:24 +13:00
Robin Sheat
4c1d203980 Bug 6857: display a charge warning alert for reserves
If a user is placing a reserve on the OPAC, this'll let them know that
it's going to cost them.

Author: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-11 21:35:52 +12:00
481ffe7474 Bug 6347 - Fix for itemlevel holds in OPAC
Edits by Owen:

- More variable scope corrections
- Minor markup and style tweak
- Table column span correction

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Item level holds can be placed and hold saved
- Table and layout are ok now

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-05-29 15:46:57 +12:00
Chris Cormack
c88f43fc67 Bug 5669: Adding a system preference to control whether a user can select a pick branch for their hold or not
Default is on

Part of bug 5609

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-14 16:18:08 +13:00
6709d0e4f7 Follow-up correction for Bug 5462 - Fix variable names for template::toolkit
Previous commit modified checks for the item-level_itypes preference
to look for a different variable name but didn't update where that
variable is set in Auth.pm.

Other scripts perform a direct check of item-level_itypes and must
continue to use the name of the variable in the database.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-08 21:03:28 +13:00
Christopher Hall
c02e4d02d5 Bug 5462: fixed dashes (replaced with _) and fullstops (removed) for variable names
Done within opac and intranet templates, still needs to be done for corresponding scripts.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
2011-02-03 09:54:50 +00:00
a95385c23a Fix for Bug 4950 - checkbox should be removed when can't place a hold
- Hiding form controls for titles which can't be placed on hold
- Highlighting hold blocked message for better visibility
- Showing table of blocked holds even if none can be placed on
  hold: hiding the table hides the messages explaining why
  titles can't be placed on hold
- Removing an unused line from the script which was leaving errors
  in the error log
- Consolidating error messages into one box which were displaying
  in two.
- Correcting link to unused opac-userdetails.pl

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-06 12:47:31 +13:00
b2b74a22ed bug 3164: fix OPAC holds in SingleBranchMode
Account for case where no branch is explicitly supplied.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-17 13:17:06 -04:00
21c7f786bf bug 1532: various code cleanup
* export C4::Reserves::CancelExpiredReserves
* rename  misc/cronjobs/cancel_expired_reserves.pl
  to misc/cronjobs/holds/cancel_expired_holds.pl
* added cancel_expired_holds.pl to example crontab
* fix staff crash if AllowHoldDateInFuture is on
* expirationdate is now nullable instead of relying
  on 0000-00-00

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-18 22:49:48 -05:00
Kyle M Hall
3502810346 (bug 1532) Reserves Updates Ported From Dev_Week
This is a much improved re-implementation of the reserves updates from dev_week.
Less new code has been added, and more existing functions are used instead of adding new ones.

The 'Lock Hold' function has been removed due to it not working as intended.

[RM note for documentation: this adds the following features:

* ability to specify an expiration date for a hold request
  when placing it via the staff interface or OPAC
* daily batch job to cancel expired holds
* nice interface to change the priority of hold
  requests for a bib in the staff interface]

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-18 22:49:47 -05:00
Chris Nighswonger
6e376d0484 Bugfix:[3.2] Corrects bad behavior in opac-reserve.pl
When AllowOnShelfHolds is enabled, but maxreserves is NULL, attempting to reserve
an item results in a basically blank page being returned with no error message.

This patch adds a check to see if the check for maxreserves has returned a value and
bypasses the application of it if it has not.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-03 08:53:19 -05:00
168f0aed4f Fix for Bug 4080, OPAC hold screen doesn't obey OPACDisplayRequestPriority pref
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-02 18:43:02 -05:00
Nahuel ANGELINETTI
c0edb3adef (bug #3897) hold policies and circcontrol
This patch fix hold policies way to do, make it using circcontrol syspref to know the branch the rule must be based.
2009-12-20 14:31:33 +01:00
Chris Cormack
e291d4c401 Bug 3861 cannot place hold in opac 2009-12-20 14:27:50 +01:00
Henri-Damien LAURENT
3c741d2376 Smart Rules enhancements
Adding finedays and reservesallowed and renewalsallowed management in smart rules
Adding Clone Rules
Adding CanBookBeReserved and CanItemBeReserved in C4::Reserves
Manage Reservesallowed in opac and staff interface
Manage renewalsallowed in C4/Circulation.pm
Update Database follow

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:22:20 +02:00
Katrin Fischer
edff257753 BUG 3380 Show serial enumeration on opac holds screen
Shows column Vol Info if serial enumeration is used for one of the items.
Replaces first patch.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-29 18:49:07 -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
92051e44dd Convert opac-reserve to use GetBranchesLoop.
Removed irrelevant and unused variables dealing with branches.
Also pulled default branch from userenv when not specified as a param.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 19:06:54 -05:00
Joe Atzberger
c16d624f8f whitespace cleanup and remove editor comments
No functionality affected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 19:06:43 -05:00
4a962af1f4 UI tweaks to OPAC holds screen following addition of multiple holds functionality. Addition of subtitle and copy number to output.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:11 -05:00
Stephen Edwards
15c0ac756e bug 2991: Request hold on multiple items at one time.
Updated the results, cart, and shelf pages to include a button
or link to initiate a hold request based on checked items.

Updated the request CGI scripts to handle multiple biblio items.

Updated the reserve confirmation page to display multiple items,
with an optional list of copies for each one.

Turned on warnings in opac/opac-reserve.pl and fixed resulting
warnings.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 09:52:39 -06:00
Galen Charlton
b50051a8e5 holds policies fixes
* use item branch instead of patron's branch to
look up the applicable hold policies - this makes
requesting in the OPAC consistent with the intranet.
* when generating pick list using build_holds_queue.pl, only match items
to patrons if request is allowed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-09 14:30:41 -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
Ryan Higgins
761a589fc0 bug 1891 : bib-level itemtype was required in order to place a hold.
This patch removes some superfluous logic left over from early Koha
when a multi-step holds process allowed you to limit your choices to
specific biblioitems.itemtype values.  Code previously required a value
in biblioitems.itemtype in order to place hold.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-17 09:05:01 -06:00
Jesse Weaver
7da895cda7 fix for bug 1771: Template errors with remote itemtype image
This adds a new function, getitemtypeimagelocation, that returns the image
unmodified for absolute urls and returns the proper intranet or opac path
otherwise. It also updates all of the relevant files to use that function.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-21 16:50:29 -05:00
Galen Charlton
1999d41392 bug 2341: OPAC title-level holds permitted when items are on-order
Changed so that the presence of an on-order item (items.notforloan =- -1)
permits a title-level hold request to be made.  Prior to this patch,
if all of the items linked to the bib were on-order, no title-level
request was permitted.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-18 07:15:32 -05:00
Galen Charlton
c80b328aae clean up old-style calls to GetMemberDetails
GetMemberDetails() returns only one hashref now,
not two.  In all cases where the caller was
expecting two output values, the $flags return
was ignored anyway.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:22 -05:00
Joe Atzberger
b1465be2f0 Use C4::Debug to conditionalize warn.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 15:32:41 -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
Joe Atzberger
b7baaaa3ab Bugfix 1979 - display hold numbers. Note that hold priorities are still buggy.
But that is a separate bug from whether they display or not.
Also added basic error handling if biblionumber is not received, or
if biblionumber is bad, since that otherwise crashes the page.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-31 21:59:50 -05:00
b329ce233b Changes to allow librarian to turn off item-level holds in the OPAC. Requires the addition of OPACItemHolds system pref ("Allow OPAC users to place hold on specific items. If OFF, users can only request next available copy." Type: YesNo). Also modifying redirect to show Holds tab in opac-user.pl.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:44:33 -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
Chris Cormack
7bce030fc6 Fix for bug 1741, max reserves not being respected in the opac
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-07 20:02:53 -06:00