Commit graph

1077 commits

Author SHA1 Message Date
Jonathan Druart
aa6117da36 Bug 12230: Set a maximum suspension days as a new issuing rule
This patch adds a new issuing rule: maxsuspensiondays.

A new column "Max. suspension duration (day)" appears in the main table
of the issuing rules.

If this value is filled, on returning an item, a patron won't be
suspended longer than this cap.

Test plan:
1/ Set "suspension in days" to 2.
2/ Check an item out to a patron and specify a due date to today - 10
days.
3/ Check the item in and verify the patron is suspended until today + 10
* 2 days.
4/ Remove the suspension.
5/ Set "Max. suspension duration" to 10.
6/ Check an item out to a patron and specify a due date to today - 10
days.
7/ Check the item in and verify the patron is suspended until today + 10
days.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:39:19 +00:00
1511c55cde Bug 6254: (follow-up) tidy admin/categorie.pl ( whitespace changes only )
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:23:00 +00:00
1a737dcee6 Bug 6254: make it possible to set default privacy setting for new patrons
There is currently no way to set the privacy setting for newly created
patrons. This patch adds a new field "default privacy" to the patron
categories such that each patron category may have a different default
privacy setting.

Test Plan:
1) Apply this patch
2) Edit a patron category, change the default privacy to "forever"
3) Create a new patron of that category
4) Log into the catalog as that patron, verify the privacy setting
   is set to "forever"
5) Repeat steps 2-4 with the settings "never" and "default"

Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Bug 6254 [QA Followup 1] - can't set patron privacy by default

* Adds default privacy column to summary table
* Adds default privacy to delete category summary
* Adds "AFTER categorycode" to the database update
* Whitespace cleanup and formatting for affected code blocks
* Switch basic DBI queries to DBIx::Class to simplify code
* Adds reference to misc/cronjobs/batch_anonymise.pl to description

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Bug 6254 [QA Followup 2] - can't set patron privacy by default

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Bug 6254: QA FIX: remove trailing whitespaces

This patch removes trailing whitespaces/tab and fix the fields order in
the updatedb entry (according to the kohastructure.pl).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:17:37 +00:00
Jonathan Druart
75f00c3e30 Bug 12168: fix spent and ordered budget values are wrong when depth >= 2
A really weird (and old) code process the calculation for the spent and
ordered sublevel funds.

It only takes into account the direct children.

So if you have:
fund1 (spent=100) parent of fund11 (spent=10) parent of fund111 (spent=1),
you get:

fund     | base-level | total spent
fund1    | 100        | 110
fund11   | 10         | 11
fund111  | 1          | 1

which is wrong, it should be

fund     | base-level | total spent
fund1    | 100        | 111
fund11   | 10         | 11
fund111  | 1          | 1

Test plan:
- Create 1 budget and 3 funds with the same structure as above.
- Create some orders and receive them (not all).
- Go on the fund list view and verify the values are correct.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-19 21:54:41 +00:00
Chris Hall
80b7a8153d Bug 6739: make it possible to block expired patrons from OPAC actions
Test Plan:
 1) Apply patch
 2) Run updatedatabase.pl
 3) Pick a patron, note the patron's category
 5) Issue an item to this patron
 4) Edit that category, set "Block expired patrons" to "Block"
 5) Verify the patron cannot renew or place holds in the OPAC
 6) Edit the category again, set "Block expired patrons" to
    "Don't block"
 7) Verify the patron *can* renew and place holds in the OPAC
 8) Edit the category again, set "Block expired patrons" to
    "Follow system preference BlockExpiredPatronOpacActions"
 9) Set the system preference BlockExpiredPatronOpacActions to
    "Block"
10) Verify the patron cannot renew or place holds in the OPAC
11) Set the system preference BlockExpiredPatronOpacActions to
    "Don't block"
12) Verify the patron *can* renew and place holds in the OPAC

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-05 01:49:05 +00:00
Jonathan Druart
14def333db Bug 766: remove disused routine buildCGISort
buildCGISort can be deleted.

Test plan:
  git grep buildCGISort
should return no result.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

No more buildCGISort

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-04 23:03:24 +00:00
Lyon3 Team
94d3aed746 Bug 9593: improve parsing of prices from staged files
Initial bug :
When there's a round price with no decimals after it,
or when the symbol is after the digits, the price is not captured
by regular expression in MungeMarcPrice routine and the variable
is not initialized.

Enhancement :
The MungeMarcPrice routine had been widely modified.
It's still possible to priority pick the active currency but
unlike the previous mechanism that worked only for prices preceded
by the currency sign, it's now valid wherever the symbol is situated.
As symbol you may enter a pure currency sign as well as a string
including it like '$US'. Moreover, an 'isocode' column had been
added in currency table (editable in the staffo interface from
Administration/Currencies and exchange rates). So the active
currency can be picked either through its symbol or through its iso
code.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, especially t/db_dependent/MungeMarcPrice.t
Checked currencies can be added, edited and deleted.
Notes: new ISO code field is mandatory.
       Sample sql files need to be updated (bug 12146)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-04 22:02:08 +00:00
Jonathan Druart
56f3c32fe3 Bug 11578: Improve the funds list view
The current funds list view does not allow to search in the table and
the ergonomics of the page is quite bad.

This patch add the datatables plugin combined to the treetable plugin in
order to offer a better view of the budgets/funds.

Test plan:
- Verify there is no regression on this page: try to add/modify/delete a
fund and a budget.
- Verify the funds hierarchy is correctly displayed.
- Filter the funds using the branch and the budget filters.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:09:59 +00:00
Galen Charlton
eccf1fa5eb Bug 11351: (follow-up) ensure itemtypes.sip_media_type is set to NULL when cleared
This patch ensures that the sip_media_type is set to NULL
rather than the empty string when it is cleared via item
types administration.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-28 18:08:58 +00:00
fd3ab5e21a Bug 11351 - Add support for SIP2 media types
Koha's SIP2 server implementation does not currently support the SIP2
protocol field "media type" ( CK ).

This patch implements the SIP2 media type by allowing an arbitrary
mapping of itemtypes to SIP2 media types.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Edit an itemtype, select a SIP media type, and save the changes
4) Make a SIP2 Item Information Request
5) Verify that the CK field of the Item Information Response contains
   the correct media type code.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2014-04-28 17:54:42 +00:00
Julian Maurice
1e808f1805 Bug 7308: rework aqbudgets.pl table
admin/aqbudgets.pl should have the following columns:

Base-level allocated (or just Allocated)
Base-level ordered
Total sub-levels ordered
Base-level spent
Total sub-levels spent
Base-level available
Total sub-levels available

Base-level is always calculated for one level, without children.
Total sub-levels should include child funds.
Available is calculated as "allocated - (ordered + spent)".

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Seems to work alright for me.
Passes QA script and tests, after I fixed 2 tabs in admin/aqbudgets.pl.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-21 04:00:56 +00:00
Julian Maurice
dc3a90c411 Bug 7308: Show ordered amount in aqbudgets.pl
Signed-off-by: Cédric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-21 04:00:25 +00:00
Bernardo Gonzalez Kriegel
4a32a188ae Bug 11508: fix untranslatable pull-down in auth_subfields_structure.pl
This patch replaces occurrences of CGI::scrolling_list with
untranslatable labels. It also fixes capitalization.

To test
1. Go to Administration > Authority types,
click 'MARC structure' of any auth type,
click 'subfields' for any Tag >= 010,
clic 'Edit subfields'

Check pulldowns 'Managed in tab' and 'Select to display or not'

2. Apply the patch

3. Reload and verify functionality of both pulldowns

4. Check that strings are not present on staff PO file
egrep "^msgid \"(Show all|Hide all|ignore)" misc/translator/po/fi-FI-i-staff-t-prog-v-3006000.po

5. Update language file
(cd misc/translator/; perl translate update fi-FI)

6. Check that strings are now present, repeat 4.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

NOTE: drop-downs work identically. Show all, Hide all, and
      ignore were added to the po files too.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described and improves the page to manage authority
subfields.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-19 14:40:41 +00:00
Galen Charlton
ef25c3665b Bug 7413: (follow-up) validate norenewalbefore values better
This patch ensures both both '0' and strings consisting of zero
or more blanks are recognized by the circ rules editor as specifying
clearing the "no renewal before" value.  Concretely, this fixes
warnings of the following form when clearing this field:

    Argument "" isn't numeric in numeric eq (==)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-08 22:46:28 +00:00
Holger Meißner
6fd4b4f05a Bug 7413: Add "No renewal before" to the circulation and fine rules
This patch adds a column "No renewal before" to the circulation and
fine rules table.

To test:
1) Add or edit some issuing rules.
2) Confirm that an empty entry, zero and non-numerical values for
   "No renewal before" are saved as undefined.
3) Confirm that numerical values can be entered and saved.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2014-04-07 18:28:57 +00:00
40d3800cc4 Bug 9114: Make frameworks import/export routines correctly use UTF-8
Currently both the import_export_framework.pl script outputs data with
Perl's default encoding, ISO-8859. This patch properly sets
the binmode to UTF-8 when exporting SQL and CSV files using the PerlIO
layer (":encoding(UTF-8)") for STDOUT.

To test:

Export step test
- Use some ASCII character(s) with DIACRITICS in some field description
  in a chosen framework.
- Export the framework at Administration > MARC frameworks
- Run this to check the file is ISO-8859 encoded:
 $ file export_XXX.csv
 export_XXX.csv: ISO-8859 text, with very long lines
 (Note: try SQL and other output formats too. But not ODS)
- Apply the patch
- Export the framework again (change the name), and test encoding:
 $ file export_XXX_2.csv
 export_XXX_2.csv: UTF-8 Unicode text

Import step test
I assume you have two files, export_XXX.csv (ISO-8859 encoded) and
export_XXX_2.csv (XXX will depend on your framework's code)
- Reset your testing branch to master
- Import export_XXX.csv
- The string with non-ASCII chars is truncated at the first non-ASCII
  char's position (Note: this is the current behaviour).
- Import export_XXX_2.csv
- The non-ASCII chars are broken, the logs show errors on non-UNICODE
  chars.  (Note: even thou UTF-8 is the expected encoding it is
  treated as ISO-8859).
- Apply the patch
- Import the good (UTF-8 as expected) file and check everything worked
  as expected.

No double encoding should occur with either combination of formats.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
I put some Norwegian and accented letters in a fremawork to test.
Before the patch, the exported CSV came out as ISO-8859, after the
patch it came out as UTF-8. ODS and XML (viewed in LibreOffice)
both looked good, before and after the patch.

Importing the ISO-8859 CSV cut off the strings at the first non-ASCII
char. Importing the UTF-8 CSV worked as epected.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-14 14:37:31 +00:00
4edcec3d58 Bug 11531: make it possible to edit transport cost for a new libraries
If you are using the transport cost matrix, and you create a new
library, you cannot edit the fields for this library!

Test Plan:
1) Enable the transport cost matrix
2) Set some transport cost values in the matrix
3) Save the matrix
4) Create a new library
5) View the transport cost matrix again
6) Note the uneditable fields for the new branch
7) Apply this patch
8) View the transport cost matrix again
9) Note you can now edit the fields for the new branch

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-12 18:01:43 +00:00
Jonathan Druart
331ca7df3e Bug 11675: check allocated total correctly when editing a fund that has a parent fund
The sth was created before the query.
The query was modified after the sth creation and an error was raised.

Test plan:
0/ Don't apply the patch
1/ Create a budget A (amount=1000)
2/ Create a fund A1 (amount=1000)
3/ Create a child fund A11 (amount=1000)
4/ Edit A11 and change the amount to 2000
You are able to do it, an error appears in the Koha log:
  "check_parent_total.pl: DBD::mysql::st execute failed: called with 2 bind
  variables when 1 are needed"
5/ Apply the patch, edit A11 and save. You get an error
6/ Edit A11 and change the amount to <=1000
7/ Verify that there is no regression on adding/removing/editing budgets
and funds.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described, no regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 17:09:31 +00:00
Jonathan Druart
a691ebc3f1 Bug 7372: Move road types from the roadtype table to the ROADTYPE AV
Currently road types are stored in a specific table in DB. Moreover, an
admin page is present in order to manage them.
This patch proposes to remove this table and this page in favour of a
new authorised value category 'ROADTYPE'.

This patch:
- adds a new AV category 'ROADTYPE' (created from the roadtype table
  content).
- remove the roadtype table.
- remove the .pl and .tt file admin/roadtype
- remove the 2 routines C4::Members::GetRoadTypes and
  C4::Members::GetRoadTypeDetails

Test plan:
1/ Execute the updatedatabase entry and verify existing roadtypes are
now stored in the AV 'ROADTYPE'.
2/ Verify you can add/update a streettype for patrons.
3/ Verify on following pages the streettype is displayed in patron
information (top left):
  circ/circulation.pl
  members/memberentry.pl
  members/moremember.pl
  members/routing-lists.pl

Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-21 16:00:53 +00:00
Galen Charlton
7efc10542b Bug 11644: (follow-up) add FIXME
Arithmetic with monetary amounts is a *hard* problem -- or if
not hard, at least super-fiddly, particularly since in theory
a Koha database could have to deal with dozens of currencies
if used by a large research library.  This patch adds a FIXME
implicitly commenting on the poor state of affairs of available
monetary calculation modules on CPAN.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 20:04:22 +00:00
ba689152e4 Bug 11644: fix occasional failure to update fund amount due to floating-point math
When attempting to update a fund, if the amount unalloccated for the
fund is equal to the total, you can be prevented from saving. This is
due to imprecise floating point number comparison in
check_parent_total.pl

Test Plan:
1) Create a fund where the amount unallocated is equal to the amount
   unallocated for the budget period
2) Edit the fund, attempt to change the name of the fund
3) Note you recieve an error and cannot save
4) Apply this patch
5) Repeat step 2
6) Note you can now update the fund

Signed-off-by: Sean McGarvey <smcgarvey@pascocountyfl.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 20:04:19 +00:00
5ee8268a8d Bug 11767 - Use validation plugin when creating new authority framework tag
The page for adding a new tag to an authority framework includes some
custom form validation JavaScript which can be removed in favor of HTML5
validation attributes and Koha's built-in validation plugin. This patch
does so.

The patch also moves some tag markup out of the script and into the
template where it belongs.

To test, apply the patch and go to Administration -> Authority types ->
MARC structure -> New tag. Try submitting the form without entering a
tag number. This should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing tag should also work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 15:51:12 +00:00
d90b4b6a08 Bug 11771 - Use validation plugin when creating new MARC framework tag
The page for adding a new tag to a MARC framework includes some
custom form validation JavaScript which can be removed in favor of HTML5
validation attributes and Koha's built-in validation plugin. This patch
does so.

The patch also moves some tag markup creation out of the script and into
the template where it belongs.

To test, apply the patch and go to Administration -> MARC bibliographic
framework -> MARC structure -> New tag. Try submitting the form without
entering a tag number. This should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing tag should also work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Great improvement! Before this patch, I got a JS alert but the form was
submitted anyway.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 00:03:24 +00:00
Galen Charlton
94e349ff6c Bug 11666: remove SQL as an option for MARC framework exports and imports
The SQL option for MARC framework imports was subject to a bug whereby
somebody could use it to gain access to arbitrary information in the
database by uploading an SQL file containing unexpected statements.

As it is difficult to securely sanitize SQL, this patch removes the
option to use SQL as an import or export format.

To test:

[1] Verify that SQL no longer appears as an import or export option
    for the MARC frameworks.
[2] Verify that exports and imports in CSV, Excel XML, and ODS formats
    still work.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as advertised. The UI doesn't offer exporting/importing in the SQL format.
Crafting the URL to export SQL fallbacks to a spreadsheet format (ODS).

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-05 19:48:27 +00:00
Galen Charlton
03d4ed2468 Bug 11666: add permission check for MARC framework import/export
This patch makes the MARC framework import/export script require
that the staff user be logged in with appropriate permissions for
managing the MARC frameworks.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

I can confirm the bug and the solution. After applying the patch
downloading the file without logging in first is no longer possible.
Also passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-05 19:47:53 +00:00
Mark Tompsett
2870c6bd85 Bug 11513: fix log warning noise in patron category editor
Just going to the patron categories page triggered errors.
Running through all the plain options also triggered other
warnings. This fix silences them.

Discovered tabs I had not corrected by running qa test tool.

Some errors which I could not trigger were also fixed, such
as line 248 shown by Merllissia Manueli.

TEST PLAN
---------
 1) Log in to staff client
 2) Click 'Administration'
 3) Click 'Patron categories'
 4) Click '+ New category'
 5) Enter a dummy category and click 'Save'
 6) Click 'Edit' for the dummy category.
 7) Change a value and click 'Save'
 8) Click 'Delete' for the dummy category.
 9) Confirm to delete.
10) Review error log, several new warnings
11) Apply patch
12) Run the koha qa test tool.
13) Click 'Home'
14) Click 'Administration'
15) Click 'Patron categories'
16) Click '+ New category'
17) Enter a dummy category and click 'Save'
18) Click 'Edit' for the dummy category.
19) Change a value and click 'Save'
20) Click 'Delete' for the dummy category.
21) Confirm to delete.
22) Review error log, no new warnings

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Followed test plan, saw no errors in the log after applying the patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested various dates and enrollment periods with different settings of
dateformat pref. Works as advertised. No warnings.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-31 16:15:09 +00:00
b5eab7c20b Bug 8018: (followup) make the default more explicit
This patch:
- Makes the new subfield tab show maxlength=9999 as default (instead of
  empty-then-zero).
- Updates the help to make exlpicit that 0 or empty defaults to 9999.
- Assumes all the subfields created with maxlength=0 inadvertedly are
  meant to mean "no limit" and hence update the database to reflect
  that.

To test (this patch and Pablo's):
- Edit a MARC framework, edit some field's subfields.
- Use the 'New' tab to create a new subfield (choose an unused letter).
- See in "More constrains" that the "Max length" field is empty. Leave
  it as-is.
- Save the changes (the new subfield).
- Edit the field again, verify that "Max length" is 0.
- Try tu use the framework and the the field/subfield just created
  > FAIL
- Apply the patches, upgrade
- Try to use the framework/field/subfield > SUCCESS (0 was converted to
  9999)
- Repeat from the begining, "Max length" should show 9999 on the new
  subfield tab.
- Leave it empty, it is saved as 9999.

Edit: small typo

Sponsored-by: Universidad Nacionald de Cordoba
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests in t and xt.
Tested:
- deleting an existing subfield
- adding a new subfield with new default 9999
- editing the new subfield, changing value to 8888
- deleting new subfield
- adding new subfield, using 8888 as length

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-27 00:34:50 +00:00
Pablo Bianchi
1ebbf40ecc Bug 8018: MARC framework max subfield length should default to 9999
The default value for the marc_subfield_structure.maxlenght is 9999
in the DB. Currently the template passes an empty value which is casted to
0 by the CGI.

This simple patch validates the input and converts to the default (9999)
if not defined or 0.

Another approach could be changing the 9999 default and/or treating 0 as
'no-limit'.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works by defaulting 0 or "" to 9999.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-27 00:34:02 +00:00
Fridolyn SOMERS
484d149092 Bug 11166: make library filter in funds administration page more precise
In funds administration, admin/aqbudgets.pl, there is a combobox for
filtering by library code.

The bug is that the filter uses a pattern match  instead of equals :
  next unless $budget->{budget_branchcode} =~ m/$filter_budgetbranch/;

In this case, if there is a library with code '1' and one with code '12',
filtering by library '1' will also show funds of library '12'.

Test plan :
- Create a library with code '1' and one with code '12'
- Create funds in both libraries
- Go to admin/aqbudgets.pl
- Filter by branch '12'
=> You see only funds of this library
- Filter by branch '1'
=> You see only funds of this library

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-20 22:49:47 +00:00
Jonathan Druart
3c50683e0d Bug 11286: fix bug preventing adding a new subfield to an authority framework
Bug 10602 introduces a bug when adding a new subfield to an authority
framework. A new parameter is added in a sql query but the placeholder
is missing.

Test plan:
- edit an authority framework
- add a new subfield
- save
- boom!
DBD::mysql::st execute failed: called with 16 bind variables when 15 are
needed at
/home/home/src/admin/auth_subfields_structure.pl line 454.
- apply the patch and try again

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

Tested trying to add subfield to 100, 2 for example.
Without patch silently fails (but error is logged)
With patch subfield creation or elimination is fine

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
One line fix for a bad bug. Confirmed the bug on master and
the fix. Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 18:07:17 +00:00
39a656c6ba Bug 11163: display correct itemtype usage count when deleting an itemtype
Wrong usage of UNION instead of UNION ALL prevented the count to match
the expected value.

Steps to reproduce:
- Create an itemtype.
- Create some biblios setting the created itemtype at biblio level.
- Create some items setting the created itemtype on them.
- Try to delete the itemtype in Home > Administration > Item types, the
count is 1 and doesn't match the expected result.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-15 15:34:33 +00:00
Galen Charlton
c59f17e454 Bug 11135: (follow-up) improve testing of OVERRIDE_SYSPREF_NAMES
This is a bit pedantic -- since for obvious reasons, I can't
see us ever letting '0' be the name of a system preference,
and I suspect it's impossible for the value of something in the
$ENV hash to be undefined -- but better to test for exactly what
we mean.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:21:25 +00:00
Colin Campbell
ded0db9d63 Bug 11135: avoid logging warnings if OVERRIDE_SYSPREF_NAME is not set
Calling split on an undefined var generates warning to
the log. Let's check it exists before processing it

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:16:07 +00:00
Jonathan Druart
ea3b5aad21 Bug 9822: Alert on adding an order to a basket if budget s exceeded
2 DB fields are not used: aqbudgets.encumb and aqbudgets.expend.

This patch uses these fields in order to show a warning message if the
budget selected for an order has exceeded.

Test plan:
- Create a new active fund with at least 1 of both warning fields
  ('Warning at (%)' and 'Warning at (amount)').
- Create a new order for a basket with this new fund and a cost >
  warning amount defined for the fund (or using %).
- Save and check that a warning message appears
- Retry playing with all combinations of warning fields

Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-30 15:10:11 +00:00
Galen Charlton
ce9f504c79 Bug 10038: (follow-up) fix tabs
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-18 04:47:12 +00:00
Jonathan Druart
b04118df82 Bug 10038: fix doubled 'default' entry when creating a new authority type
Test plan:
- Create a new authority type
- Click MARC structure
- Verify the pull down has only 1 entry for Default
- Go on the authority type home (admin/authtypes.pl)
- Click on the "MARC structure" link for the default type
- Verify the pull down has only 1 entry for Default

This patch adds a sort (on the authtypecode) for these 2 lists.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described. No koha-qa errors.

When creating a new framework it would be better to have Default
on top, but one is way better than two :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Agreed, one is better than two :)
All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-18 04:43:28 +00:00
Bernardo Gonzalez Kriegel
329e7511b3 Bug 10602: (follow-up) to remove tabs
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 23:27:48 +00:00
Jonathan Druart
e273e11b08 Bug 10602: Set default value for authority fields via the framework
This patch allows to define default values in the authorities framework.

Some code already existed but the feature did not work.

Test plan:
1/ Choose a framework, field and subfields.
2/ Define a default value.
3/ Create a new authority and check that the subfield is
automatically filled with the default value.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. koha-qa reports some tabs, fixed in followup

Test
1) Apply patch, run updatedatabase.pl
2) Edit auth framework, put default value someware, save
3) Add new auth, default value present

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Verified database update is done correctly.

Controlfields 0xx
- Edited an existing field (001)
- Set a default value for subfield @
- Edited subfield again, checking default was saved correctly
- Verified the default shows up correctly when creating a
  new authority using this authority type

Fields
- Edited an existing field (100)
- Set a default value for subfield e
- Edited subfield again, checking default was saved correctly
- Verified the default shows up correctly when creating a
  new authority using this authority type

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 23:25:47 +00:00
Mirko Tietgen
8369aa8431 Bug 9295: Introduce operator equal/ notequal to OAI set mapping instead of hardcoded 'equal' value.
In OAI set mappings, the value "is equal to" is hardcoded. This
enhancement changes it to a dropdown menu to choose between "is equal
to" and "not equal to".

To test:

* define a set
* define a mapping for said set with "is equal to"
* run /misc/migration_tools/build_oai_sets.pl -r -v
* confirm that you have correct entries in SQL: select * from
  oai_sets_biblios;
* change mapping to 'not equal to', save
* run /misc/migration_tools/build_oai_sets.pl -r -v
* confirm that you have correct entries in SQL: select * from
  oai_sets_biblios;

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Fix bug id in updatedb.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 23:03:30 +00:00
1e0b890b0c Bug 10096 - Add a Z39.50 interface for authority searching
This patch introduces a new Z39.50 interface for searching Z39.50
compliant databases for MARC authority records.

These databases aren't as common as their bibliographic equivalents,
but they're out there and very useful. I have included info at the
bottom of this messsage for sample authority databases you can try.

To test this patch:

1) Set up Z39.50 client targets for authority databases. (I've included
information at the bottom of this message for LibrariesAustralia's
test server for authorities as well as instructions on how to use
your Koha's z39.50 authority server as well. The Library of Congress
also has authority databases available (unsure if these are test or
prod), and you might have access to others through OCLC or RLIN. OCLC
provides login credentials for their test databases.

2) Go to the Authorities module

3) Click on the new "Z39.50 search button"

4) Select your authority search targets from the list.

5) Do a search for an authority you would like using either the "Raw"
input box or the more specific input boxes for names, subjects, subject
sub divisions, or titles. (I like searching Name (personal): Eric on
the LibrariesAustralia test DB.)

6) You should see a table listing the server, heading, authority type,
and two other columns (MARC and a nameless column). "Authority type"
is the type of authority it will become when imported in to Koha. In
the Eric example, "PERSO_NAME".

7) Click on "MARC" next to the results of interest to review the MARC
authority record.

8) When you're satisfied with a record, click on "Import".

9) The pop-up window will close and your original Koha window will
change to the "Adding authority Personal Name" screen (in the Eric
example).

10) All the relevant fields should be filled out for the record. Review
them and make any changes as necessary. (N.B. The 001 will be cleared
when saved, so if you have a use for the imported control number, move
it to the 010, 016, or 035 as appropriate. If you have a default value
for the 003, this will also likely be overwritten. Move it if necessary.
The 005 will also be updated when saved, so do not worry about that.)

11) When you're satisfied, click save.

12) Presto! You've imported your first authority record via Z39.50!

--

Here is the info for the LibrariesAustralia test Z39.50 authority
database:

Z39.50 server: LibrariesAustralia Authorities
Hostname: z3950-test.librariesaustralia.nla.gov.au
Port: 210
Database: AuthTraining
Userid: ANLEZ
Password: z39.50
Syntax: MARC21/USMARC
Encoding: utf8

-

The U.S.A. Library of Congress also provides Z39.50 access to its Name
and Subject Authorities (http://www.loc.gov/z3950/lcserver.html).

Name Authority:
Z39.50 server: Library of Congress Name Authority File
Hostname: lx2.loc.gov
Port: 210
Database: NAF
Syntax: MARC21/USMARC
Encoding: utf8

Subject Authority:
Z39.50 server: Library of Congress Subject Authority File
Hostname: lx2.loc.gov
Port: 210
Database: SAF
Syntax: MARC21/USMARC
Encoding: utf8

(N.B. Both of these databases also include title authorities.)

-

For testing purposes, you can also set up a Z39.50 client target,
which points at your own Koha instance's Z39.50 authority server.

To find the hostname, go to /etc/koha-conf.xml and find the value for
the <listen id="authorityserver"> element. Depending on your
configuration, this could be something like the following:

unix:/zebra/koha/var/run/zebradb/authoritysocket

(N.B. You might be using a different scheme than unix sockets...)

To find the database, scroll down to the bottom of koha-conf.xml until
you reach the <config> element. Within this, look for the value of the
element <authorityserver>. It should probably be "authorities".

To set up this Z39.50 client target in Koha...

Z39.50 server: my koha authorities
Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket
Port:
Database: authorities
Userid:
Password:
Syntax: MARC21/USMARC (or whichever flavour you need)
Encoding: utf8

Signed-off-by: Mason James <mtj@kohaaloha.com>

Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching

This patch adds the "recordtype" column to the "z3950servers" table.

The value in this column (biblio or authority) then controls whether
the z3950 server shows up in a bibliographic search (through the
Acq and Cataloguing modules) or in an authority search (through
the Authorities module).

I also edited the z3950 management console to show this value
and allow users to edit it. The default value is "biblio", since
the vast majority of z3950 targets will be bibliographic. However,
there is an option to add/edit a z3950 target as a source of
authority records.

Test Plan:

1) Apply both patches
2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5
environmental variables)
3) Use the test plan from the 1st patch

N.B. Make sure that your Z39.50 client target has a Record Type
of Authority, otherwise it won't display when you're doing a
Z3950 search for authorities.

Signed-off-by: Mason James <mtj@kohaaloha.com>

Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 14:26:29 +00:00
Magnus Enger
9dca7096c8 Bug 10513: display a warning/message when returning a chosen item type
This patch adds a new column to item types. Text in this column is
displayed as a warning when an item of the given type is checked in.
The type of message can also be chosen, affecting how the message is
displayed.

Use case: Items that are on inter-library loan can have a separate
item type, and when items of this type are checked in a message
saying something like "ILL! Remember to return it to the owning
library!" can be displayed.

To test:
- Apply the patch
- Go to Home > Administration > Item types administration
- Check that there is a new column, called "Check in message"
- Edit an item type and add a check in message
- Check that the check in message you added is displayed in the table
- Check in an item with an item type that has a check in message
- Check that the message is displayed
- Repeat the steps above, but select "Alert" instead of the default
  "Message" as the "Check in message type". Check that the message
  is displayed in a yellow alert box, not a blue message box.
- Check in an item with an item type that does *not* have a check
  in message, and make sure no false messages are displayed
- Create a new item type from scratch and check that it works
  the way it is supposed to
- Run the tests in t/ItemType.t, which are updated by this patch

This patch also removes backticks around column names in the
itemtypes table in installer/data/mysql/kohastructure.sql

UPDATE 2013-07-22
- Rebased on current master (no changes)
- Added "AFTER summary" to the SQL statement in updatedatabase.pl
- Added another placeholder on line 170 of admin/itemtypes.pl
Thanks Katrin!

UPDATE 2013-07-29
- Make this message independent of all other messages - thanks Owen!
- Make it possible to choose the type of message ("alert" or
  "message")

Sponsored-by: Kultur i Halland - Regionbibliotek
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed some tabs to make the QA script happy.
All old and new tests pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 17:45:31 +00:00
47bd795b82 Bug 10325 - Allow system preferences to be overridable from koha-httpd.conf
For Koha installations with multiple OPAC URLs, It would be nice to be
able to override systeprefs from the http conf file. Case in point,
a library wants to have two separate opacs, one the is only viewable
from within the library that allows patrons to place holds, and a second
public one that does not. In this case, overriding the system preference
RequestOnOpac would accomplish this simply, and with no ill affects.

This feature would of course be should only be used to override
cosmetic effects on the system, and should not be used for system
preferences such as CircControl, but would be great for preferences
such as OpacStarRatings, opacuserjs, OpacHighlightedWords and many
others!

Test Plan:
1) Apply this patch
2) Disable the system pref OpacHighlightedWords
3) Do a seach in the OPAC, not the term is not highlighted
4) Edit your koha-http.conf file, add the line
     SetEnv OVERRIDE_SYSPREF_OpacHighlightedWords "1"
   to your koha-http.conf file's OPAC section.
   Also add the line
     SetEnv OVERRIDE_SYSPREF_NAMES "OpacHighlightedWords"
   to the Intranet section
5) Restart your web server, or just reload it's config
6) Do a seach, now your search term should be highlighted!
7) From the intranet preference editor, view the pref,
   You should see a warning the this preference has been overridden.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 02:09:53 +00:00
Marc Veron
9bc53a0fcc Bug 8887: only display desired result when doing exact syspref search
This patch fixes an issue where entering the complete name of a system
preference when doing a syspref search in the staff interface resulted
in the display of *all* preferences belonging to the desired one's
module.

Since providing a more specific search string should result in getting
back more specific results, the previous behavior was not intuitive.

Test scenario:

a) In sysprefs, do a search with partial match (e.g. intranetcolor)
-> Result shows one entry: intranetcolorstylesheet
b) Do an exact search. e.g. intranetcolorstylesheet
-> Result shows all Staff Client preferences

Apply patch, test again. Now b) behaves like a).

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-16 16:17:41 +00:00
5c60ae40f9 Bug 10516 - Improve titles, breadcrumbs, and confirmation messages for Z39.50 server adds and updates
The template for adding/editing Z39.50 servers shows the same title,
breadcrumbs, etc. for add and edit operations. This patch creates
separate text for each case.

To test, try both adding and editing a Z39.50 server. The page title,
breadcrumb, and heading should correctly reflect the operation you
perform.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely and all strings are translatable.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 18:44:02 +00:00
Jonathan Druart
ec3735433a Bug 10515: make behavior of library category fetchers consistent with other fetchers
The prototype is not consistent, GetBranchCategory should return only 1 result
and GetBranchCategories should not have a categorycode argument.
This patch fixes that.

Test plan:
1/ Try to add/remove/modify a library.
2/ Add some groups
3/ Add these groups to a library

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-17 17:27:24 +00:00
Jonathan Druart
e2b49e1e28 Bug 9307: QA Followup
- Remove an old DHTMLcalendar_dateformat variable
- Add SUGGEST_STATUS to the "Koha system categories"

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2013-06-19 07:19:39 -07:00
be869ab279 Bug 8215 - Course Reserves
Adds a course reserves system for academic libraries.

The course reserves system allows libraries to create courses
and put items on reserves for those courses.

Each item with at least one reserve can have some of its attributes
modified while it is on reserve for at least one active course.
These attributes include item type, collection code, shelving location,
and holding library. If there are no active courses with this item
on reserve, it's attributes will revert to the original attributes
it had before going on reserve.

Test Plan:
  1) Create new authorised value categories DEPARTMENT and TERM
  2) Create a new course, add instructors to that course.
  3) Reserve items for that course, verify item attributes have changed.
  4) Disable course, verify item attributes have reverted.
  5) Enable course again, verify item attributes again.
  6) Delete course, verify item attributes again.
  7) Create two new courses, add the same item(s) to both courses.
  8) Disable one course, verify item attributes have not reverted.
  9) Disable both courses, verify item attributes have reverted.
 10) Enable one course, verify item attributes are again set to the
     new values.
 11) Edit reserve item attributes, verify.
 12) Disable all courses, edit reserve item attributes, verify
     the item itself still has its original attributes, verify
     the reserve item attributes have been updated.
 13) Verify the ability to remove instructors from a course.
 14) Verify new permissions, top level coursereserves, with
     subpermissions add_reserves and delete_reserves.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

http://bugs.koha-community.org/show_bug.cgi?id=8125
2013-05-21 15:50:55 -07:00
Jonathan Druart
537c664038 Bug 9508: Standardize 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

- Remove "all" occurrences (those I found!) of dateformat_*
From now the only way to get the date format is a string comparaison
(dateformat == "metric")

Checked with the command:
  git grep "\(dateformat_us\|dateformat_metric\|dateformat_iso\)" | grep
  -v translator

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Tested all the datepickers I could find, looks good.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-20 09:05:01 -07:00
Galen Charlton
5e47f766a2 Revert "Bug 6554: Followup for preferences.pl"
This reverts commit c78b905811.

Rolling back bug 6554 work until we have more comprehensive tests.
2013-04-29 15:17:31 -07:00
Galen Charlton
a7eb34f2c8 Revert "Bug 6554 - make Koha internally utf-8 clean"
This reverts commit d542740ab8.

Rolling back bug 6554 work until we have more comprehensive tests.

Conflicts:

	opac/opac-search.pl
2013-04-29 15:12:32 -07:00
c78b905811 Bug 6554: Followup for preferences.pl
Decodes searchfield.

Test plan:
Look for e accent in preferences. You should no longer see converted chars.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works ok, no errors.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-01 18:51:50 -04:00
Dobrica Pavlinusic
d542740ab8 Bug 6554 - make Koha internally utf-8 clean
In current implementation (mostly commented out in this patch)
uses heuristic to guess which strings need decoding from utf-8
to binary representation and doesn't support utf-8 characters
in templates and has problems with utf-8 data from database.

With this changes, Koha perl code always uses utf-8 encoding
correctly. All incomming data from database is allready
correctly marked as utf-8, and decoding of utf8 is required
only from Zebra and XSLT transfers which don't set utf-8 flag
correctly.

For output, standard perl :encoding(utf8) handler is used
so it also removes various "wide character" warnings as side-effect.

Test scenario:
1. make sure that you have utf-8 characters in your biblio
   records, patrons, categories etc.
2. try to search records on intranet and opac which contain
   utf-8 characters
3. install language which has utf-8 characters, e.g. uk-UA
   dpavlin@koha-dev:/srv/koha/misc/translator(bug_6554) $
   PERL5LIB=/srv/koha/ perl translate install uk-UA
4. switch language to uk-UA and verify that templates
   display correctly
5. test search and Z39.50 search and verify that caracters
   are correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

I followed the test plan, adding utf-8 characters to library names,
patron categories, titles, and authorized values. I tried the uk-UA
translation and everything looked good.

When performing Z39.50 searches for titles containing utf-8 characters I
got results which were still occasionally contaminated with dummy
characters [?] but I assume this is Z39.50's fault not the patch's.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Already signed, add mine.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-01 18:51:49 -04:00
719044f771 Bug 9257 - Add "groups" to normal search pulldown
This patch adds the ability to add groups to the library select
pulldown on the opac, if it is enabled.

Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Go to Administration › Libraries and groups
4) Create a new group, or edit an existing one
5) Ensure the 'Show in search pulldown' checkbox is checked
6) Save the group
7) Enable OpacAddMastheadLibraryPulldown if it is not already enabled
8) Load the OPAC, try the group search from the libraries pulldown menu

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Yes! Now this works, and well.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-22 08:20:08 -04:00
Jonathan Druart
8ad00bc02f Bug 8365: Add a renewal duration in the issuing rules
Renew an issue for a number of days (filled in the issuing rules).

Test if rules work for any i[item]types and if there is no regression.

- new column issuingrules.renewalperiod
- remove all occurrences of an already removed syspref (globalDueDate)
- remove an unused routine (Overdues::GetIssuingRules)

How it works:
- On existing installations, the issuingrules.renewalperiod =
  issuingrules.loanlength. So the behaviour is the same before and after
  this patch.
- when you add a rule, you can choose a renewal period (the unit value
  is the issuingrules.unit). So you can have a renewal period in hours
  or days.
- The default value for the renewal period is 21 days (same as
  loanlength)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test comments on second patch.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-22 07:56:59 -04:00
e49e611c95 Bug 9760: Simplify local use preferences
Removes a lot of code that was needed to handle prefs the old way.

Test plan:
Goto Local use preferences. Do you see some local preferences?
Add a new pref, edit and delete it.
Modify the url to systempreferences.pl?tab=OPAC or tab=log. You should only see
a short message.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Remove the $sth->finish statements
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-13 08:56:30 -04:00
81c90ba3bf Bug 8913 [Revised] Improve acquisitions navigation
This patch adds a new menu for vendor-related pages in which
vendor related "views" can be linked to: baskets, basket groups,
contracts, invoices, uncertain prices.

The acquisitions toolbar is pared down to vendor-related actions:
New basket, contract, or vendor; edit vendor, delete vendor,
receive shipment.

Other small improvements have been made to other pages: corrections
to breadcrumbs and title tags, adding useful links betweeen pages.

Vendor menu and toolbar are added to booksellers.pl
when there is only one "search result" (i.e. a vendor id is passed).

- Menu appears when booksellerid variable is present
- Redundant heading removed
- Additional variables added to enable proper display of the toolbar

- Revision corrects broken links pointed out by QA.
- Revision adds check of existing baskets and subscriptions as a
  condition on display of the vendor delete button.

TODO: Add coverage of Basket groups page.

To test, navigate Acquisitions pages and test as many links and buttons
as you can, confirming that nothing is broken on vendor pages, invoice
pages, contract pages, uncertain price pages, etc.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

All tests pass - I like this very much!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.

Tests done:
1) New toolbar - vendor search
  - no results = button to create new vendor shows
  - 1 result = additional new options show
  - more than one result = button to create new vendor shows

2) Vendor views
  - acq toolbar consistent with 1 result in vendor search
  - new tabs on the left
  - checked all links have the needed parameters and work correctly

3) New toolbar - different pages
  - Toolbar is formatted consistently
  - Delete vendor shows only up when it should - no baskets or
    subscriptions
  - Links work correctly

Works nicely, great groundwork for further improvements.

TODO Add new toolbar to (new) invoices page.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-02-20 09:17:21 -05:00
Mirko Tietgen
a972742b26 Bug 9201 OAI-PMH mapping value cannot be 0
Allow the value of a OAI set mapping to be 0 / empty. Delete the mapping if field or subfield are empty.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Now it is possible to add a value == 0 or an empty string.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-02-04 08:15:54 -05:00
Magnus Enger
3f2b5d270c Bug 9497 - Make it easier to add new encodings for Z39.50 servers and add ISO 8859-1
This patch does three things:
- Makes admin/z3950servers.pl create one variable for encoding,
  not one variable for each encoding
- Makes the template create encoding options from a list
- Adds ISO 8859-1 to the list of available encodings
See the bug for a lengthier description

To test:
- Apply the patch
- Edit one Z39.50 server several times, choosing each available
  encoding in turn
- Check that for each encoding, the correct encoding is shown both in
  the list of Z39.50 servers and in the dropdown on the edit screen

Comment: Works as described, no errors.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-31 10:53:11 -05: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
Jonathan Druart
85c3d9409f Bug 9272: Eliminate error when deleting authorized value
Try to delete an authorized value. if you don't get any error, this
patch works.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Enabled debug, tried with and without Plack, works fine for both.

Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Works as advertised. Follows coding guidelines.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-28 20:10:55 -05:00
Jared Camins-Esakov
7535f2bfa3 Revert "Bug 7167: New version for updatedatabase"
This reverts commit c9cb55ef47.
2012-12-27 14:02:56 -05:00
Jonathan Druart
c9cb55ef47 Bug 7167: New version for updatedatabase
This patch use DataTable, see BUG|BZ 6836
      - css/datatables.css
      - lib/jquery/plugins/jquery.dataTables.min.js
      - js/datatables.js

http://bugs.koha-community.org/show_bug.cgi?id=7167

Bug 7167 follow-up

Major changes:
* creating database tables for update on the fly, the  1st time the update script is called
* version is checked on mainpage.pl (and here only). If syspref Version differ from kohaversion.pl, the old updatedatabase is launched. If there are updates missing from new mechanism, the updatedatabase page is reached
* kohaversion check on each page is now useless in Auth.pm, removed dead code
* Updated installer: at the end of the process, retrieve all updates and automatically mark them "OK", as they're included in installer

Minor changes:
* adding copyright
* adding poddoc
* updating a warning, for better clarity
* switching from $$var to $var->
* small TT glitch fixed in updatedatabase.tt
* about.pl now returns the Version systempreference PLUS all the patches that have been applied

Bug 7167 follow-up perlcritic & numbers display & partial apply depending on DEBUG

* add use strict to updatedatabase, that is now perlcritic compliant
* partial apply of DB revs is now managed by DEBUG env variable = if DEBUG=0, the user can just apply every DBrev. If DEBUG=1, we're in a dev env, the user know has the option to apply DBrevs one by one
Display:
* in updatedatabase, small spelling changes
* in about.pl, remove 0 just after . (3.06.01 is displayed as 3.6.1)
* improve the display of applied numbers on about.pl
 - before this patch, if you have N, N+1, N+2, N+3 and N+10 DB rev applied, about was displaying : , N+1 / N+2 / N+3 / N+10
 - after this patch you have N......N+3 / N+10
* add ORDER BY into list_versions_already_knows to have number retrieved in the same order whatever the order they are applied

http://bugs.koha-community.org/show_bug.cgi?id=6679
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: Improve the update.pl script

 * Added CLI options to update.pl
 * Call update.pl from the installer.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: Now, we check versions on mainpage.pl and after login

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: Reimplementing Marcel's suggestions & fixes

 * Fixing the bugguy old version check (that was made against 3.0900000 instead of 3.0900027 -the last current kohaversion number
 * in the CLI script, if there is nothing to report, just say it

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Bug 7167: Remove check_coherency

As suggested by Katrin, we've removed the call to check_coherency. It intended to provide readable comments when some SQL was wrong. Removing this sub result in the SQL error being displayed. That's OK because the sysadmin or the developer can google the error, understand it, then fix it.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: Changing in .sql parsing

We first split on delimiter and then extract comments. You can now put
\n for delimiter comments.
ex:

DELIMITER ;
-- this is a comment
SELECT * FROM  my_table;
-- another comment

Before this patch, we had to write:
DELIMITER ;
-- this is a comment;
SELECT * FROM  my_table;
-- another comment;

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: Add .pl and .sql examples

Those files are in version directory, so will never be executed by the updater
If you want to provide an update, do it in a 3.09/ directory (if your update is expected for 3.10 version)

Note that the updater use a md5sum checker. So, if the same update is in 2 different places, it will be detected. That will be handy for changes made on both stable and master: a library running stable will get the update when updating. When upgrading to the next major release, Koha will detect the patch has already been applied, and no error will be thrown. With the previous mechanism, a DBRev ported to stable was re-executed when upgrading to master, resulting in a nasty (but usually harmless) error message

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: Improve display + factorize get_queries

Despite it's size, this patch is dealing with display questions only:
 * The text "comments" and "queries" was hardcoded in ajax-updatedb-getinfo.pl script. It has been replaced by a JSON call, returning 2 separate values, "comments:" and "queries:" is now in the template, making it translatable
 * Some minor tweak in the display (like putting things in bold, displaying OK in green, warnings in yellow and KO in red)
 * Reordering the column headers for more readability:
    * Status column is merged with availability, column is after status
    * Status/availability terms more clear: "Not applied" instead of "unknown", "Applied and OK", "Applied and failed", "Applied and forced" are the 3 other statuses
    * Removed one click to display comments on DBREv not yet applied: before the patch, one had to click "Show details", then "Get comments", now, "Get comments" is enough

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: FIX typos & moving a script to a proper place

* renamed availables to available
* renamed already_knows to already_applied
* fixed FSF & copyright headers
* removing a "use strict" because we already had use Modern::Perl
* fixed a tiny typo in about.tt

* moving update.pl to misc/bin because it's a CLI script

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: Add dependency File::Find::Rule

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: We want to execute non-numeric version with the -all option

Dealing with Marcel comment 100:
> Note that the current code around line 52/53 does not
> handle that correctly:
> Argument "\x{74}\x{65}..." isn't numeric in numeric ge (>=) at
> installer/data/mysql/update.pl line 52.

Now, a non-numeric DBRev will be applied if you provide the --all parameter, without throwing the error

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167 reindentation & removing dead code

* The if (! defined $ENV{PERL5LIB}... block was wrongly intented
* The 3 lines running update.pl are useless: the update (new mechanism) is run from admin/updatedatabase.pl script. This part of install.pl is run only when you have "old style" DB revisions.

Summary:
 * old mechanism = it's run as previously, by reaching the installer/install.pl?step=3 page, that applies all revisions
 * new mechanism = when you log-in or reach mainpage.pl, you reach admin/updatedatabase.pl, where you can see what will be run, and run it

Tiny side effect = the check for old mechanism is now done *after* authentification (thus it's not done on each page call). It means that the user will have to enter login/password twice :
 * first to log-in to Koha
 * second to run installer/updatedatabase.pl?step=3
As the old mechanism is deprecated, we can expect this will happend only a few time in the history of a setup, it's not a big deal.

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: Don't raise an error in routine TableExists

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: FIX merge

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167: Add .pl and .sql examples

Those files are in version directory, so will never be executed by the updater
If you want to provide an update, do it in a 3.09/ directory (if your update is expected for 3.10 version)

Note that the updater use a md5sum checker. So, if the same update is in 2 different places, it will be detected. That will be handy for changes made on both stable and master: a library running stable will get the update when updating. When upgrading to the next major release, Koha will detect the patch has already been applied, and no error will be thrown. With the previous mechanism, a DBRev ported to stable was re-executed when upgrading to master, resulting in a nasty (but usually harmless) error message

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 7167 follow-up fix POD syntax to please koha-qa.pl
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-27 11:13:54 -05:00
Jonathan Druart
acbfe26c9e Bug 7919 : Display of values depending on the connexion library
In a librairies network, we would like to declare specific values just
for one (or more) library.
Here we implement the ability to associate categories, patron attributes
types and/or authorised_values with librairies (branches).

This patch adds 3 new association tables:
- categories_branches ( association table between categories and branches )
- authorised_values_branches ( association table between
  authorised_values and branches )
- borrower_attribute_types_branches (association table between
  borrower_attribute_types and branches )

Plan test:
  - Create (or modify) categories, patron attributes and
    authorised_values and link it with one (or more) library.
  - Set one of these librairies
  - Go to one of the multiple pages where this specific value must be displayed
    and check that it does appear.
  - Set a library not concerned.
  - Check on the same pages this value is doest not appear.

A page list:
cataloguing/addbiblio.pl
cataloguing/additems.pl
members/members-home.pl
members/memberentry.pl
acqui/neworderempty.pl
tools/modborrowers.pl
and others :)

Please say me if filters don't work on some pages.

Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>
Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-05 10:10:57 -05:00
Paul Poulain
205993cf65 Bug 8895 follow-up fix for Jonathan's QA comment
useless use of defined($data->{value}) because it's set to "" 2 lines earlier
2012-10-25 16:08:31 +02:00
Marc Veron
56cf444927 Bug 8895 - Warning in systempreferences.pl: Use of uninitialized value in length...
Clicking on Local use tab in system preferences results in warning in log file:

systempreferences.pl: Use of uninitialized value in length at (...)/admin/systempreferences.pl line 456

Reason: content field "value" in table "systempreferences" can be NULL (and is tested for length).

Added test for "defined" at to places.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-25 15:09:23 +02:00
Mark Tompsett
b570a76064 Bug 8849 - Error log generated when not a demo system
Changed two lines similar to:
   unless (C4::Context->config('demo') == 1) {
into lines similar to:
   unless (C4::Context->config('demo')) {
By removing the == 1, undefined = false without an error. The
value of demo is supposedly set by a koha-conf.xml variable,
but there is very little documentation on this "demo mode"
beyond the set it to 1 in koha conf for demo mode.  Also, demo
doesn't exist in the default koha-conf.xml file generated.
So anyone who knows to create it, will likely create it the
proper way and with the proper value.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-24 18:07:59 +02:00
d1f67b1034 Bug 8907 - Last updated date does not appear on currency edit form
No value for $date was getting passed to the format_date function.
This patch changes the way the timestamp is passed.

Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-24 17:58:49 +02:00
Mark Tompsett
3779dcd085 Bug 8772 - Uninitialized variable triggers error log entry in smart_rules.pl
Changed declartion from:
  my $op = $input->param('op');
to
  my $op = $input->param('op') || q{};
in order to give an empty string default preventing error
logs from filling needlessly.

Signed-off-by: Marc Veron <veron@veron.ch>

The patch removes warnings like:
Use of uninitialized value $op in string eq at...

However there is one more warning, but it is not related to $op (addressed by this patch):
smart-rules.pl: Use of uninitialized value in string ne at .../admin/smart-rules.pl line 388.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-09 11:52:07 +02:00
Paul Poulain
07a55421e2 Bug 8379 don't close dbh
don't close the DBH handler, because under plack this cause a lot of problem
and in CGI mode, closing the dbh handler is useless

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
2012-10-05 11:46:00 +02:00
Paul Poulain
7576704d3f Bug 8379 removing another useless ->disconnect line
and s/tab/spaces/

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
2012-10-05 11:45:57 +02:00
Jared Camins-Esakov
d2cd2e09aa Bug 8726: ExplodedTerms suggestion plugin (functionality)
When working with hierarchical subject headings, it is sometimes helpful
to do a search for all records with a specific subject, plus
broader/narrower/related subjects. This patch adds a suggestion plugin for
these "exploded" subject searches to Koha. Note that this patch depends on
both bug 8211 AND bug 8209.

To test (NOTE: this test plan covers both 8211 and 8726):
1) Make sure you have a bunch of hierarchical subjects. I created
   geographical subjects for "Arizona," "United States," and "Phoenix,"
   and linked them together using 551s, and made sure I had a half
   dozen records linking to each (but not all to all three).
2) Do a search for su-br:Arizona (or choose "Subject and broader terms"
   on the advanced search screen with "more options" displayed), and
   check that you get the records with the subject "Arizona" and the
   records with the subject "United States"
3) Do a search for su-na:Arizona (or choose "Subject and narrower terms"
   on the advanced search screen with "more options" displayed), and
   check that you get the records with the subject "Arizona" and the
   records with the subject "Phoenix"
4) Do a search for su-rl:Arizona (or choose "Subject and related terms"
   on the advanced search screen with "more options" displayed), and
   check that you get the records with the subject "Arizona," the
   records with the subject "United States," and the records with the
   subject "Phoenix"
5) Ensure that other searches still work (keyword, subject, ccl,
   whatever)
6) Use "Did you mean?" page in admin section to enable ExplodedTerms
   plugin
7) Do a keyword search on the OPAC, confirm that searching for exploded
   terms is suggested.
8) Do a subject search on the OPAC, confirm that searching for exploded
   terms is suggested.
9) Do a non-keyword, non-subject search on the OPAC, confirm that
   searching for exploded terms is NOT suggested.
10) Disable ExplodedTerms plugin and enable AuthorityFile plugin.
11) Do search on OPAC, confirm suggestions are made from authority file.
12) Sign off

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Split into two patches. This patch includes only the functionality.
2012-09-28 17:08:21 +02:00
Fridolyn SOMERS
9ee5c9ec1e Bug 8702: System preferences search does not allow accented letters
This bug enables accented/diacritic system preference text to be matched
when searching for sysprefs.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-26 19:02:18 +02:00
Jared Camins-Esakov
6e71b80ca3 Bug 7475: Teach matching rules to handle authorities
* Add the code necessary to handle authorities with matching rules and
  import batches.
* Update all the scripts that use the matcher and import batch code
  to use the new API.
* Add authority records to the matching rules interface in the staff
  client.

http://bugs.koha-community.org/show_bug.cgi?id=2060
Signed-off-by: Elliott Davis <elliott@bywatersolutions.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on latest master 11 September 2012
2012-09-19 17:15:56 +02:00
Paul Poulain
d3fcc8b973 Bug 8117 follow-up remove perl warning
first & last were already defined, removing my
2012-09-19 16:29:46 +02:00
Jonathan Druart
4b312b141a Bug 8117: Divide budget periods into two tabs
Budget periods are now divided into two tabs : active and inactive
budget periods.

The original author of this patch is Julian Maurice

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Michael Davis <m.r.davis@cranfield.ac.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
2012-09-19 16:17:16 +02:00
Srdjan
42acfbf75b Bug 7993: Save reports with Group/Subgroup hierarchy
This should make saved reports more manageable.
Group/Subgroup hierarchy is stored in authorised_values,
categories REPORT_GROUP and REPORT_SUBGROUP, connected by
REPORT_SUBGROUP.lib_opac -> REPORT_GROUP.authorised_value

Database changes:
* authorised_values: expanded category to 16 chars
* created default set of REPORT_GROUP authorised values to match
  hardcoded report areas
* reports_dictionary: replaced area int with report_area text, converted
  values
* saved_sql: added report_area, report_group and report_subgroup;
  report_area is not currently used, saved for the record

C4/Reports/Guided.pm:
* Replaced Area numeric values with the mnemonic codes
* get_report_areas(): returns hardcoded areas list
* created get_report_areas(): returns full hierarchy (groups with belonging
  subgroups)
* save_report(): changed iterface, accepts fields hashref as input
* update_sql(): changed iterface, accepts id and fields hashref as input
* get_saved_reports():]
- join to authorised_values to pick group and subgroup name
- accept group and subgroup filter params
* get_saved_report():
- changed iterface, return record hashref
- join to authorised_values to pick group and subgroup name
* build_authorised_value_list(): new sub, moved code from
  reports/guided_reports.pl
* Updated interfaces in:
cronjobs/runreport.pl, svc/report, opac/svc/report: get_saved_report()
reports/dictionary.pl: get_report_areas()
reports/guided_reports.pl

reports/guided_reports_start.tt:
* Reports list:
- added group/subgroup filter
- display area/group/subgroup for the reports
* Create report wizard:
- carry area to the end
- select group and subgroup when saving the report; group defaults to area,
  useful when report groups match areas
* Update report and Create from SQL: added group/subgroup
* Amended reports/guided_reports.pl accordingly

Conflicts:

    C4/Reports/Guided.pm
    admin/authorised_values.pl
    installer/data/mysql/kohastructure.sql
    installer/data/mysql/updatedatabase.pl
    koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
    koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl
    misc/cronjobs/runreport.pl
    reports/dictionary.pl
    reports/guided_reports.pl

Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-18 17:49:08 +02:00
Ian Walls
850b4eeab9 Bug 6151: Add AllowReturnToBranch system preference
In order to solve the issue of IndependantBranches being incompatible with HomeOrHoldingBranchReturn,
this patch changes the mechanism by which the question "can I return this material here?" is answered.  Before,
the conditions were "if IndependantBranches is on, and this branch isn't HomeOrHoldingBranchReturn for the item,
then no, otherwise yes".  Now, the question is answered by consulting CanBookBeReturned (new subroutine)

New system preference:  AllowReturnToBranch
Possible values:
  - anywhere (default for new installs, and for existing systems with IndependantBranches turned off)
  - homebranch
  - holdingbranch (which is also the issuing branch in all normal circumstances)
  - homeorholdingbranch (default for existing systems with IndependantBranches turned on)

New subroutine:  CanBookBeReturned
Input:  $item hash (from GetItems), and $branchcode
Output: 0 or 1 to indicate "allowed" or not, and an optional message if not allowed.  Message is the 'correct' branchcode
to return the material to

To Test:
1.  Install patch and new syspref
2.  Check that default value of the preference:
    - if IndependantBranches was OFF at install time, should be 'anywhere'
    - if IndependantBranches was ON at install time, should be 'homeorholdingbranch'

Case:  'anywhere'
1.  Checkout a Library A book at Library A.  Return at Library A should be successful
2.  Repeat step 1, returning to Library B.  Return should be successful
3.  Checkout a Library A book at Library B.  Return to A should be successful
4.  Repeat step 3 with Library B and Library C

Case: 'homebranch'
1.  Checkout a Library A book at Library A.  Return at Library A should be successful
2.  Repeat step 1, returning to Library B.  Return should FAIL (returning message to return at A)
3.  Checkout a Library A book at Library B.  Return to Library A should be successful
4.  Repeat step 3 with Library B and Library C.  Both should FAIL (returning message to return at A)

Case: 'holdingbranch'
1.  Checkout a Library A book at Library A.  Return at Library A should be successful
2.  Repeat step 1, returning to Library B.  Return should FAIL (returning message to return at A)
3.  Checkout a Library A book at Library B.  Return to A should FAIL (returning message to return at B)
4.  Repeat step 3 with Library B. Return should be successful
5.  Repeat step 3 with Library C. Return should FAIL (returning message to return at B)

Case: 'homeorholdingbranch'
1.  Checkout a Library A book at Library A.  Return at Library A should be successful
2.  Repeat step 1, returning to Library B.  Return should FAIL (returning message to return at A)
3.  Checkout a Library A book at Library B.  Return to A should be successful
4.  Repeat step 3 with Library B. Return should be successful
5.  Repeat step 3 with Library C. Return should FAIL (returning message to return at A)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-09-17 19:17:41 +02:00
Mark Tompsett
5231545bf4 Bug 8713 - Warning message triggered by clicking Keywords to MARC mapping
In the Koha Administration screen, clicking
Keywords to MARC mapping triggered an uninitialized $op warning
in the koha error logs. Added a "|| q{}" to ensure it is set.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-17 18:48:21 +02:00
Mark Tompsett
b20c00ee2d Bug 8714 - Poorly ordered and triggers warning in marctagstructure.pl
An array boundary check was after a comparison using the array.
By changing the logic which had " and ( $j < $cnt)" to be at the
beginning "( $j < $cnt ) and ", the warning is no longer shown
in the error log.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-17 18:25:28 +02:00
Srdjan
86c2c4626d bug_5911: Transport Cost Matrix
Create transport_cost table,  added UseTransportCostMatrix syspref.
transport_cost table contains branch to branch transfer
costs. These are used for filling inter-branch hold transfers.

Moved GetHoldsQueueItems() from .pl to HoldsQueue.pm

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-12 14:49:25 +02:00
ff7417fa91 Bug 8679 [REVISED] Remove usage of Amazon API
This patch removes the AmazonReviews and AmazonSimilarItems
features from the OPAC and staff client. With on Amazon
feature remaining, cover images, the *AmazonEnabled preference
is also removed in favor of checking the *AmazonCoverImages
preference. Two other system preferences, AWSAccessKeyID and
AWSPrivateKey are removed as they were required only by the
removed features.

Handling of book cover images from Amazon is unchanged.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Turned on amazon covers in opac and staff client and all
worked as expected. Then tested to make sure other cover image
services still worked and they do.

Signing off.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-29 16:05:29 +02:00
daeb964996 8263 Consistent stylesheet prefs
This patch makes the use of opaccolorstylesheet and opaclayoutstylesheet more consistent. They may be: 1) just a file name, 2) a complete local path or 3) a full URL starting with http: for a remote css file.
This makes the syspref opacstylesheet that was only used for a remote css file obsolete.

June 20, 2012 Rebased.
July 18, 2012: Regex allows https too (thanks to Owen Leonard).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-03 12:03:30 +02:00
Elliott Davis
381794ff4e [PATCH] bug_7420: Added overduefinescap to issuingrules
Replaced existing MaxFine syspref logic with overduefinescap.
Repurposed MaxFine to be the overall overdue limit for all items
overdue. Implemented new MaxFine logic in UpdateFine().

Signed-off-by: Elliott Davis <elliott@bywatersolutions.com>
Tested according to Srdjan's test plan and everything worked like he said it would.  I set fined equal to $2 and max fine equal to $1.      When I ran the fines script for overdue items fines assessed were only $1.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-25 18:33:20 +02:00
Srdjan
c1e5462db1 bug_8083: parameters subpermissions: manage_circ_rules and parameters_remaining_permissions
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-07-23 10:43:59 +02:00
Jonathan Druart
9f1dab122a Bug 8233: Hide the search engine configuration link for Zebra
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2012-07-06 16:53:53 +02:00
Jonathan Druart
623f3a2c84 Bug 8233 : SearchEngine: Add a Koha::SearchEngine module
First draft introducing solr into Koha :-)

List of files :
  $ tree t/searchengine/
  t/searchengine
  |-- 000_conn
  |   `-- conn.t
  |-- 001_search
  |   `-- search_base.t
  |-- 002_index
  |   `-- index_base.t
  |-- 003_query
  |   `-- buildquery.t
  |-- 004_config
  |   `-- load_config.t
  `-- indexes.yaml
  just do `prove -r t/searchengine/**/*.t`

  t/lib
  |-- Mocks
  |   `-- Context.pm
  `-- Mocks.pm
  provide a mock to SearchEngine syspref (set_zebra and set_solr).

  $ tree Koha/SearchEngine
  Koha/SearchEngine
  |-- Config.pm
  |-- ConfigRole.pm
  |-- FacetsBuilder.pm
  |-- FacetsBuilderRole.pm
  |-- Index.pm
  |-- IndexRole.pm
  |-- QueryBuilder.pm
  |-- QueryBuilderRole.pm
  |-- Search.pm
  |-- SearchRole.pm
  |-- Solr
  |   |-- Config.pm
  |   |-- FacetsBuilder.pm
  |   |-- Index.pm
  |   |-- QueryBuilder.pm
  |   `-- Search.pm
  |-- Solr.pm
  |-- Zebra
  |   |-- QueryBuilder.pm
  |   `-- Search.pm
  `-- Zebra.pm

How to install and configure Solr ?
  See the wiki page: http://wiki.koha-community.org/wiki/SearchEngine_Layer_RFC

http://bugs.koha-community.org/show_bug.cgi?id=8233
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2012-07-06 16:51:58 +02:00
Julian Maurice
203757e353 Bug 7304: More permissions for budgets
- Possibility to add users to a budget
- Restrictions changed to:
  - None
  - Owner
  - Owner and users
  - Owner, users and library
- Restricted users cannot spent on these budgets (they cannot modify them
  either)

Modified pages:
 - admin/aqbudgets.pl
 - admin/aqplan.pl
 - suggestion/suggestion.pl
 - acqui/acqui-home.pl
 - acqui/addorderiso2709.pl
 - acqui/basket.pl
 - acqui/neworderempty.pl

Unit tests in t/Budgets/CanUserUseBudget.t and t/Budgets/CanUserModifyBudget.t

Bug 7304 tmp

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-27 16:25:44 +02:00
47e4f3ed84 Talking Tech Support - Phase I - Followup - Fix Messaging Preferences
There is a flaw in C4::Members::Messaging::GetMessagingPreferences where
the system assumes that every transport will use the same letter. This
is not necessarily true. Even with the default preferences of just
'email' and 'sms', we should be able to have different letters
for each, as one has a maximum character length ( sms ) and one
does not. GetMessagingPreferences currently uses the letter code
of the last result of its query as the letter code for every transport type.

The returned data is a hashref with a key 'transport_types' that is
an array of transport_types this borrower has selected for the given
alert.

This commit modifies GetMessagingPreferences such that the the
'transport_types' array is now a hash where the name of the transport
type is now a key to the value of the letter code set for that transport
type.

It also modifies code calling GetMessagingPreferences where necessary,
and as a side benefit will correctly get the letter codes for email
and sms correctly, if they are defined differently.

http://bugs.koha-community.org/show_bug.cgi?id=4246
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

In use in production by two libraries: Middletown and Washoe
who give their sign off but don't have git to do so.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-10 17:46:58 +02:00
Ian Walls
d29efac4f3 Talking Tech Support - Phase I
Implements support for Talking Tech I-tiva phone notification for OVERDUE, PREDUE and HOLD notifications.
Overdues respect triggers as configured for the patron's branch.
Predue and Holds notifications respect patron's messaging preference choices.
A new column for phone notification is added if the TalkingTechItivaPhoneNotification system preference is turned on

Record of phone messages being sent to patrons is added to the patron's Notices
tab; notice of success or failure can be retrieved from I-tiva.

See the TalkingTech.README for installation and set-up instructions.

Aside from the control system preference, and the necessary changes to Messaging Preferences
forms to make use of phone notifications, the bulk of the code resides in external
cronjobs.

TalkingTech_itiva_outbound.pl generates the Spec C file to send to I-tiva.  Actual transmission
of the file must be handled by the system administrator.

TalkingTech_itiva_inbound.pl processes the received Results file from I-tiva.  Getting the
file from I-tiva to Koha is the job of the system administrator, as well.

Both scripts have a --help option with full documentation.

The only necessary change to core Koha behavior is in C4::Letters::EnqueueLetter.  The return
value was changed from 0 or 1 (successful addition of letter to message_queue or not), to the actual
insert ID of the letter.  This was required by the outbound script to present a unique Transaction ID
for the notice added to the patron's record (so a 'sent' or 'failed' status could be updated).  Since
the dbh and sth are not shared, and the last_insert_id() command is table-specific, this should be thread-safe.
No changes are necessary to any parts of Koha, as all usage of EnqueueLetter currently ignores the return value.

To Test:

1. Turn on TalkingTechItivaPhoneNotification system preference
2. Verify that 'phone' is now a valid notification option for patrons on both staff and OPAC side
3. Attempt to set a 'phone' preference for PREDUE or HOLD messaging; attempt should succeed
4. Set up the patron for notices to triggers:
   a. include checked out items due in a range of days, including the value set up in their messaging preferences.
   b. place several holds, some in position, others waiting for pickup, others in transit.
   c. set the patron up to have overdues, overdue by a range of days that includes the delay values for
the patrons branch and categorycode
5. Run TalkingTech_itiva_outbound.pl --type=RESERVE --type=PREOVERDUE --type=OVERDUE --outfile=/tmp/talkingtechtest.csv

The resulting talkingtechtest.csv file should include all the items due on X days (where X is the patrons' preference),
and none of the ones due in other increments.  Similarly, overdues messages should be added for each item due by a delay
value as configured; overdues of other numbers of days should be ignore.  Holds that are waiting pick up or in transit should
have messages, those still pending should not.

Messages should be added to the patron's notices tab for each issue sent.  Verify these messages exist, and all Notices
tokens are replaced with appropriate information.

Repeat, this time with 4c making use of the default branch overdue triggers, instead of branch-specific triggers.

To test the inbound script, create a CSV with rows in the format "<<Message_id>>","<<SUCCESS or FAIL>>"
Message ID should correspond to the final column of the talkingtechtest.csv file (the transaction id) for the message.

Primary Authorship: Ian Walls
Additional modifications: Kyle M Hall

http://bugs.koha-community.org/show_bug.cgi?id=4246
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Tested and in use in production by two public libraries : Middletown
and Washoe. Both have given their sign off, but don't have git to
actually sign off.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-10 17:46:52 +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
Katrin Fischer
22b6705b4f Bug 3413: Checkboxes for new subfields not saving correctly
The bug was in the numbering of the fields and subfields in the form.
The form elements for the 'new subfield' got the same numbered names and ids as
the form elements for the second subfield. (example: repeatable1)
The patch fixes the numbering to continue to the new subfield.

To test:
- Create some new subfields and check all checkbox fields save correctly
  (mandatory, repeatable, is url)
- Check that other subfields' checkboxes are not changed
- Check existing subfields and newly created subfields can be edited

Signed-off-by: mveron <veron@veron.ch>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-07 22:23:49 +02:00
Adrien Saurat
d2bdcb4ca5 Bug 8027: fix param order for z3950 INSERT
In the z3950servers.pl order of columns which are inserted
for new server is wrong, which results in empty timeout
and encoding values when new server is added.

Test scenario:

1. Open Z39.50 server administration
2. add new server with encoding and timeout
3. save server and verify that it has encoding and timeout

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-07 21:58:25 +02:00
Paul Poulain
67942f7432 Bug 3969 follow-up = budget name field is budget_name, not name 2012-04-20 16:59:35 +02:00
Katrin Fischer
eb2cedbfba Bug 3969: Budget search in acquisition does't work (search)
Search term was never evaluated.
Patch makes sure input param is correctly stored in the variable
and changes comparison to be case insensitive.

To test:
- Check search for fund codes (case insensitive) works
- Check search for fund code in combination with library works

The budgets to be shown can depend on your permissions.
Testing with with a superlibrarian should bring up all funds.

Also fixes warns in the logs that appeared when viewing the funds
for a budget without funds.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Funds are now searchable.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-20 16:41:11 +02:00
Katrin Fischer
443cd120f3 Bug 7354: Can't edit local use system preferences
Fixes adding and editing of local use system preferences and redirects to correct
page after saving.

To test:
- Create a new local use system preference
- Edit an existing local use system preference from summary page
- Edit an existing local use system preference using 'Edit'
- Delete a local use system preference

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-18 18:03:34 +02:00
Colin Campbell
6078c1acf6 Bug 2505 : use warnings in smart_rules.pl
Fix some careless code redeclaring a variable
declaring a variable in a condition
so that these don't generate errors

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2012-04-10 11:30:20 +02:00
Dobrica Pavlinusic
d4233cf1dd Bug 7799 - admin/marctagstructure.pl plack scoping
duplicate_framework needs $dbh so we get it from C4::Context

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 18:15:56 +02:00
Dobrica Pavlinusic
9b403f8607 Bug 7801 - admin/patron-attr-types.pl plack scoping
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 18:12:36 +02:00
Dobrica Pavlinusic
c508a8c1b3 Bug 7800 - admin/matching-rules.pl plack scoping
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 18:11:57 +02:00
Dobrica Pavlinusic
4905c80974 Bug 7798 - admin/item_circulation_alerts.pl plack scoping
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 18:09:36 +02:00
Dobrica Pavlinusic
ef3a2c62df Bug 7795 - admin/authorised_values.pl breaks with plack
scoping fixes for Variable "*" is not available errors

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 18:08:28 +02:00
Dobrica Pavlinusic
18eb3ea59a Bug 7797 - admin/currency.pl needs scoping for plack
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 16:27:15 +02:00
Juan Romay Sieira
020c095377 Bug 7263 - Determine maximum length of some fields or subfields when cataloguing a biblio or an item.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 10:51:22 +02:00
Juan Romay Sieira
21b3f8a7bf Bug 6140 - Set a timeout to z3950 servers that could have network problems occasionally
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2012-03-22 18:22:02 +01:00
Paul Poulain
d5542514d2 Merge remote-tracking branch 'catalyst/merged_5549' into new/bug_5549
Conflicts:
	installer/data/mysql/updatedatabase.pl
	members/moremember.pl
2012-03-22 17:34:26 +01:00
Jonathan Druart
bb35b60828 Bug 7154: Modification in borrower attributes
* group some attributes for a more friendly display

* allow a link between a borrower category and an attribute to display
  it only for the specified category

* Attr classes filled with AV 'PA_CLASS' category (you have to create AV
  with a new category 'PA_CLASS' to fill class list)

this patch add 2 fields in borrower_attribute_types :
    category_code
    class

Signed-off-by: Julien Sicot <julien.sicot@gmail.com>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-22 16:08:28 +01:00
Srdjan Jankovic
f4ab1e836f bug_7264: [SIGNED-OFF] Branch popup on OPAC detail.Added opac_info field to branches table.
Signed-off-by: Delaye stephane <stephane.delaye@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-22 11:50:00 +01:00
Adrien Saurat
59f183ce19 Bug 7778: fixes creation of a new server
It is now possible to add a new server
The page also now complies with the bug 2505 request
(use warnings has been added, and variables declarations
corrected to prevent warnings)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works perfectly, tested adding, editing and deleting z39.50 servers.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-22 08:54:43 +01: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
Ian Walls
d92c595dc4 Enhancement 7144: Floating Collections (per branch/itemtype)
Adds support for Floating Collections (i.e. items that don't automatically return
home when checked in at another branch) on a per branchcode/itemtype basis.

This patch adds a new column (returnbranch) to the default_circ_rules, default_branch_item_rules,
default_branch_circ_rules and branch_item_rules tables, after the 'holdsallowed' column.  While
this is coded as a varchar(15), the only currently supported values are 'homebranch', 'holdingbranch',
'noreturn' and NULL.

On upgrade, the value of HomeOrHoldingBranchReturn is used to populate the global default (which is
stored in default_circ_rules.returnbranch).

To access this value, use C4::Circulation::GetBranchItemRule.  This subroutine is altered to supply
an additional key, "returnbranch", containing this value (or 'homebranch' as a default).  No existing
usage of GetBranchItemRule should need to be modified.

The use of HomeOrHoldingBranchReturn is removed in AddReturn to instead use this subroutine.  This will
determine, on a more granular level, where the item should be transferred, after all is said and done.  If
'noreturn' is specified, then the material will remain at the branch doing the checking in.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Passes prove t xt t/db_dependent

I was able to make this feature work as advertised.
As noted above, if you want a floating rule applied across all branches, adding a single default rule won't suffice, you'll need to add the rule to all branches. That issue is not related to the functioning of *this* patch however.
2012-03-21 10:28:26 +01:00
Julian Maurice
3b0d4e04e0 Bug 6440: Implement OAI-PMH Sets
New sql tables:
  - oai_sets: contains the list of sets, described by a spec and a name
  - oai_sets_descriptions: contains a list of descriptions for each set
  - oai_sets_mappings: conditions on marc fields to match for biblio to be
    in a set
  - oai_sets_biblios: list of biblionumbers for each set

New admin page: allow to configure sets:
  - Creation, deletion, modification of spec, name and descriptions
  - Define mappings which will be used for building oai sets

Implements OAI Sets in opac/oai.pl:
  - ListSets, ListIdentifiers, ListRecords, GetRecord

New script misc/migration_tools/build_oai_sets.pl:
  - Retrieve marcxml from all biblios and test if they belong to defined
    sets. The oai_sets_biblios table is then updated accordingly

New system preference OAI-PMH:AutoUpdateSets. If on, update sets
automatically when a biblio is created or updated.

Use OPACBaseURL in oai_dc xslt
2012-03-20 11:38:26 +01:00
Colin Campbell
8cea8e5cc0 Bug 5549 : Allow hourly loans to be indicated in the loan rules
Add a column indicating whether we are talking days or hours here
This work is merely a holding version pending a better version
2012-03-20 12:07:19 +13:00
1a5afaa26d Bug 7582 - When adding a Z39.50 server the "checked" option should use a checkbox
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-27 18:33:12 +01:00
7fcff602f5 Bug 7113: Standardize vendor id name in templates and scripts
New revision updates for current master and cleans up new
instances introduced by recent commits.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2 problems found, fixing those in follo up patches:
- late orders don't allow more than 1 order to be selected
- basketgroups: 'Edit vendor' does the same as 'Manage orders'
2012-02-17 19:04:00 +01:00
Paul Poulain
098ac93315 Merge remote-tracking branch 'origin/new/bug_6842' 2012-02-10 15:19:20 +01:00
Chris Hall
deeefdeaec Bug 6943: Added ability to duplicate a budget tree (from the edit sub menu)
http://bugs.koha-community.org/show_bug.cgi?id=6943
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- all new javascript alerts have translations markers _()
- hierarchies and permissions were copied correctly

Possible enhancements:
- make it possible to move orders from old to new funds
- make it possible to change description while copying, saving 1 additional
step

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-03 17:53:59 +01:00
Paul Poulain
1034b21dea bug 7450 small follow-up, removing warn
removing an unconditional warn. It was already here before the patch,
but my pre-applypatch script complained, so I fix as a follow-up
2012-02-03 12:09:24 +01:00
Adrien Saurat
f0a6600934 Bug 7450: missing placeholders in authorised_values.pl
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Successfully added, edited and deleted authorised values.
No problems found.
2012-02-03 12:06:48 +01:00
Henri-Damien LAURENT
54e6b44da9 Bug 6842 FU : library transfer limits edits not stored
Followup :
Changes the DeleteBranchTransferLimits signature :
one now needs to delete only the limits for ONE branch
2012-02-01 22:47:56 +01:00
Colin Campbell
263dded818 Bug 6752: Be stricter with utf-8 encoding of output
use encoding(UTF-8) rather than utf-8 for stricter
encoding
Marking output as ':utf8' only flags the data as utf8
using :encoding(UTF-8) also checks it as valid utf-8
see binmode in perlfunc for more details
In accordance with the robustness principle input
filehandles have not been changed as code may make
the undocumented assumption that invalid utf-8 is present
in the imput
Fixes errors reported by t/00-testcritic.t
Where feasable some filehandles have been made lexical rather than
reusing global filehandle vars

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-27 12:11:06 +01:00
Srdjan Jankovic
26e9c67755 Bug 6190: BorrowerUnwantedField syspref and removing fields from the patron entry
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with example from bug and by deleting parts of it:
cardnumber|surname|firstname|title|othernames|initials|streetnumber|streettype|address|address2|city|state|zipcode|country|email|phone|mobile|fax|emailpro|phonepro|B_streetnumber|B_streettype|B_address|B_address2|B_city|B_state|B_zipcode|B_country|B_email|B_phone|dateofbirth|branchcode|categorycode|dateenrolled|dateexpiry|gonenoaddress|lost|debarred|contactname|contactfirstname|contacttitle|borrowernotes|relationship|sex|password|userid|opacnote|contactnote|sort1|sort2|altcontactfirstname|altcontactsurname|altcontactaddress1|altcontactaddress2|altcontactaddress3|altcontactstate|altcontactzipcode|altcontactcountry|altcontactphone

Note: This only affects the edit screen, not the patron detail tab.
A nice enhancement would be to make this page follow the system preference too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
QA comments on Bugzilla. Passing QA.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
* DBrev defined
* small improvement suggested by Marcel added = there is now a link to the schema page on the systempreference
2012-01-06 17:30:25 +01:00
0817902956 Bug 7330 - System preferences editor generates errors in the log with each search
Adding a check for an empty value in a couple of places
which seem to always get one.

As far as I can tell these places in the script are looping
over ALL the data in the pref files, and sometimes an empty
value comes through. I wonder if this is because of a minor
syntax error in the pref file?

My correction is a stab in the dark since I haven't determined
where the empty value is actually coming from. This change
quiets the errors in the log and doesn't seem to affect
preference search results.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
No more messages in the logs. Yay!

Ran unit tests on this (t, xt/author, xt, t/db_dependent)- nothing out of the ordinary in any.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-15 17:24:44 +01:00
Salvador Zaragoza Rubio
042f89e939 Bug 6475 - Edit it's not possible in subfield "0" in MARC framework
When trying to modify the subfield "0" on a field in the
MARC subfield structure admin -> Tag xxx Subfield Constraints,
the boolean condition on liblibrarian fails for the initial "0" value.
Modified condition to allow the value "0"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-18 22:32:35 +01:00
Chris Cormack
ee0627f20b Bug 6679: Fixing admin/aqplain :encoding(UTF-8) gives strict validation
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
tested with diacritics, no changes before and after the patch
2011-11-06 18:29:12 +01:00
Srdjan Jankovic
18b8991cf1 bug_6253: Unified member Search()
Removed SearchMembers() and replaced with more generic Search()
Amended Search() to try cardnumber first
Replaced SearchMembers() calls with Search()
Replaced SELECT with Search() where appropriate
C4::SQLHelper:
- added support for '' key for search filter.
- when passing an array to filter, join with OR (rather than AND)
- added support for key => [val1, val2] in filter
- did not document - there was no input documentation to start with,
  and SQLHelper should be replaced with something better anyway

Signed-off-by: Liz Rea <lrea@nekls.org>
(again - testing merge issue)
The functionality of the patch seems to be maintained with Biblibre's changes.

I tested the following:
Extended attribute searching: works
3 part name searching: works
2 part name searching: works
1 part name searching: works

From:
mainpage.pl
members-home.pl
	Patron search limited by branch: Works
	Patron search limited by patron category: works
	Ordering by cardnumber instead of surname: works
The "Check Out" field in the masthead.

Circ Autocomplete is not reliably functional at this time, but the problem appears to predate this patch.
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-19 16:23:02 +13:00
Jonathan Druart
8f75c19afd Bug 6390: Implement 'see mine/my branches/all baskets'-syspref
Code written by Edgar Fuß <ef@math.uni-bonn.de>,
Mathematisches Institut der Uniersität Bonn

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- rebased on current master, fixed a conflict in booksellers.pl
- reworked permission checks to account for general acq permissions and
  superlibrarian permission
- rephrased text of system preference (Thx to Jared Camins-Esakov)

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-18 09:39:45 +13:00
5d5c4a67ec Fix for Bug 6872 - Can't set default SMS messaging options for patron category
Passing SMS driver preference value to the template so that SMS
options can be displayed when appropriate.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-27 21:35:41 +13:00
Henri-Damien LAURENT
061f2e9251 Fix for Bug 5436 - Extended patron attributes display improvements
Show patron attributes in the sidebar on circ and patron pages

[Edit from Owen Leonard: This patch takes changes originally in
Bug 5436 and isolates just the parts relating to display of
patron attributes. Because function for pulling patron attributes
was merged with the function for displaying address information
in SetMemberInfosInTemplate() (also found in Bug 5749), I moved
the call to GetBorrowerAttributes into the individual scripts.
That keeps the functionality relating specifically to patron
attributes separate from the proposed changes to displaying
addresses.

Because I think it's important to keep the display consistent,
I added display of patron attributes to all pages which include
the patron information sidebar.]

Rebased for compatability with bug 3489 and database documentation by
Ian Walls, 9-21-11

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-23 15:35:54 +12:00
Alex Arnaud
d60732119c Bug 6755 follow up
Use C4::Templates::_get_template_file instead od C4::Output::_get_template_file
in preferences.pl

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-23 09:48:28 +12:00
6b8be20497 Bug 6755 Problems with switching languages
This patch solves the situation that news is in another language than
the Koha interface AND makes that themelanguage routine is always called
the same way in order to prevent mixed display.

It fixes also a bug related to language preselection based on web
browser prefered language.

September 9: Adjusted with input of Frederic Demians.

Septembre 10: Avoid circular dependency, as pointed by Chris Cormack.
Templates related functions are moved from C4::Output to C4::Templates

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-23 09:47:09 +12:00
Chris Cormack
7cdea5de35 Bug 6679 Fix scripts in admin & acqui to pass Perl::Critic
Scripts in admin & acqui subdirectores weren't passing t/00-testcritic.t. This
patch add admin & acqui scripts to test case and fix various errors related to
Perl::Critic compliancy.

- Fixing a style error to pass Perl::Critic, plus silencing a warn
- More style errors, plus fixing a security issue
- Explicitly using Carp

Contrary to common belief, subroutine prototypes do not enable
compile-time checks for proper arguments. Don't use them.

Defining a named sub within another sub, does not prevent that
subroutine being global

Signed-off-by: Frédéric Demians <frederic@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-21 14:56:29 +12:00
377f174b06 Fix for Bug 6842 - Branch transfer limits broken
- Changing library select form so that chosen library is preselected
- Changing pager <form> to a <p> so that nested form tags don't
  conflict. It was the addition of the javascript table pager
  which broke the functionality on this page.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- It's possible to select a different library now. The pull down shows
the chosen library correctly.
- I can make changes and save them without any problems.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-21 09:37:31 +12:00
3e1203c95e Fix for Bug 6458 - incorrect parsing result in translation processing / branches
Correction for branch admin template stops tag attribute markup from
being passed to the template directly in favor of using template
logic.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-14 10:08:47 +12:00
e1bbff6b7f Fix for Bug 6458 - incorrect parsing result in translation processing / patron-attr-types
Correction for patron-attr-types.tt stops tag attribute markup from
being passed to the template directly in favor of using template
logic.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Read the patch and tested the page, didn't find any problems.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-14 10:07:50 +12:00
Chris Cormack
0dbad3efce Bug 6834 : Removing last of the $template->{param_map}
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-03 06:37:50 +12:00
Colin Campbell
1a03a8a38e Bug 6181: Remove CGI Scolling lists from C4::Budgets
As noted on bug 766 more cases of usage of
CGI::scrolling_list were imported into C4::Budgets
Even if we were not trying to remove usage of this
the C4 modules are not the place to generate markup
Most of these routines are noise as they are not used in
any current code but cause confusion and increase
maintenance overhead. They are removed

The sort dropboxes on order create are the only
references in current templates to these routines
they have been replaced by a select list generated
by the markup.
They can probably be removed too but their existence
although the option that causes them to be displayed
seems unlikely to be set. I've left them pending
resolution of some of the inconsistencies and
confusions surrounding Budgts

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-14 20:24:31 +12:00
Chris Cormack
9b38eccf73 Bug 6713, editing matching rules broken
Was a template error, but also a bug that had been in there for a
while fixed too

Please test by editing a matching rule, match sure no new match checks
are added, and that the matchpoint components survive.

Then try importing some marc records using that match rule

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-13 20:06:41 +12:00
902d19dfa9 Fix for Bug 5433 - Separate state field for cities
- Updates cities management (admin/cities.pl) to record a separate
  state and country field.
- Updates the cities table with these new columns
- Modifies the patron entry form to populate city, state, zip
  and country when the user chooses a prepopulated city entry

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-04 20:54:49 +12:00
Colin Campbell
df6ba9bc5f Bug 5453: Move declarations out of conditionals
Patch admin/*.pl scripts

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-15 15:50:20 +12:00
Fridolyn SOMERS
8e8093b4fb BUG6436 Don't allow deletion of an itemtype used in items.itype
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-03 14:24:54 +12:00
D Ruth Bavousett
eba64bf25d Bug 6351: Unable to delete branch-specific circulation rule
The URL on the page did not have a branchcode, so the delete failed silently, and
returned the user to the "All" rules page.  Turns out, the array for the rules was
not being populated with the branchcode!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-05-27 21:02:44 +12:00
Chris Cormack
26e7237046 Bug 6208 : Cant add funds to a budget
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-20 14:39:40 +12:00
Chris Cormack
77167b3b17 Merge remote branch 'kc/master' into new/enh/bug_5917
Conflicts:
	installer/data/mysql/updatedatabase.pl
2011-04-10 20:00:04 +12:00
Katrin Fischer
ac2da44b69 Bug 5431: Separate state field for library addresses
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 12:01:48 +12:00
Alex Arnaud
18b89e9a67 Bug #6052 - BranchTransfer Limit :Adds a default value
Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 10:41:14 +12:00
Chris Cormack
1e7c5166aa Merge remote branch 'kc/master' into new/enh/bug_5917 2011-04-08 14:29:21 +12:00
Chris Cormack
9a54047b6d Merge remote branch 'kc/new/enh/bug_5547' into kcmaster 2011-04-08 08:39:14 +12:00
Mark Gavillet
0ee5b38b1c Bug: 5547 - corrected insert to database
Inserting a new category failed because only 10 bind variables were present and 11 were required.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 08:37:54 +12:00
Chris Cormack
363ea5ce08 Merge remote branch 'kc/master' into new/enh/bug_5917
Conflicts:
	installer/data/mysql/updatedatabase.pl
2011-04-05 15:39:12 +12:00
f22b8bcd45 Fix for Bug 5989 - Funds filter does not remember library choice
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-04 22:53:24 +12:00
Chris Cormack
eb4ad6e44e Merge remote branch 'kc/master' into new/enh/bug_5917 2011-04-03 22:35:24 +12:00
Salvador Zaragoza Rubio
689bc19154 Bug 5478 - Automate MARC framework import/export
Module to Import/Export a Framework structure to CSV/Excel-xml/ODS/SQL in Intranet Administration - MARC Frameworks section.
    There are two new links: "Export" to export to a format; and "Import" to import from a file.
    The data exported/imported is the one stored in the MySQL tables marc_tag_structure, marc_subfield_structure.

    Exported works as follows:
    1) CSV: As this format only allows one worksheet, the data from the tables is splitted with a row with #-# cells or with the
    names of the fields of the next MySQL table. Each row has as much cells as fields has the MySQL table. The first row contains the
    field names, the remaining holds the data.
    2) Excel: Excel xml 2003 format. Each MySQL table has its own worksheet in the spreadsheet. Rows and cells data as CSV.
    3) ODS: OpenDocument Spreadsheet compressed format, creates a temporary directory to generate the files needed to create the zip file.
    Each MySQL table has its own worksheet in the spreadsheet. Rows and cells data as CSV.
    4) SQL: Text file, the first row for each table is a delete and the remaining are inserts.

    Importing reads the rows from the spreadsheet/text-file as follows:
    1) CSV: Each row inserts or updates the associated MySQL table for this framework. At the end of the importing for a MySQL table, deletes the rows in the database that don't possess a correspondence with the spreadsheet.
    2) Excel: Imports each worksheet to the associated MySQL table. Works as the CSV for each worksheet.
    3) ODS: Creates a temporary directory to decompress and read the content.xml. This file has the data needed to import.
    Works as the CSV for each worksheet.
    4) Executes the SQL file.
    If the file imported has a different frameworkcode that the framework importing, the framecode is changed along the process.

    The Csv format will be the default.
    It uses perl module Archive::Zip or zip/unzip system command to process ODS files.
    To parse the sql files when importing it uses SQL::Statement or homemade parsing.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 21:17:33 +13:00
Chris Cormack
8e00f55216 Merge remote branch 'kc/master' into new/enh/bug_5917
Conflicts:
	installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
2011-03-30 20:53:45 +13:00
Ian Walls
e57dadf762 Bug 5548: Hard Due Dates Circ Rule
Implements the RFC found at http://wiki.koha-community.org/wiki/Hard_Due_Dates_Circ_Rule_RFC.  See squashed commits
messages below for details of implementation.

Squashed commit of the following:

commit 871b91af00871146eb1216ebf5ce673dda2c5925
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Tue Dec 28 15:09:49 2010 -0500

    Hard Due Dates dev part 3: implementing the due dates in circ

    CalcDateDue now calls GetLoanLength, rather than each invocation running separately one after another.  Therefore, instead of
    the 'loanlength' param, CalcDateDue now takes 'itype', and uses the info to get both the issuelength and the hardduedate info (if it exists)

    Global Due Date no longer populates in the sticky due date field in Circ, since it can't be determined before the item is scanned.  Any specified
    due date still overrides the circulation rules, if allowed.

    Hard Due Dates in the past will return an error message, but can be manually specified if truly desired.

    Also, a small fix to updatedatabase.pl to allow the old data to populate if possible.

commit 14d5505f3c01287a2464a759f0076c1d4b665c49
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Mon Dec 27 18:28:11 2010 -0500

    HardDueDates dev part 2:  adding admin interface

    Adds columns to Smart Rules page, including calendar for easy date selection.

    Removes globalDueDate and ceilingDueDates from system preferences editors

commit 76e3e3d86a7a54c6ce4253e7f68278b4dc75a0bb
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Mon Dec 27 15:58:05 2010 -0500

    HardDueDates dev part 1: database changes

    Adds two new columns to issuingrules, a hardduedate and a hardduedatecompare.  If globalduedate is set, use that as the universal value
    for all circ rules.  Else, if ceilingduedate is set, use that as the universal value.  Adjust the comparison accordingly (-1 before, 0
    exact, 1 after).  the old system preferences globalDueDate and ceilingDueDate are then removed.

    Rebased onto 3.03.00.032

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 20:35:45 +13:00
Ian Walls
48ee1dcb3f Bug 5547: Hide Lost Items dev
Adds a Hide Lost Items option to the staff client, as detailed in the enhancement request
at http://wiki.koha-community.org/wiki/Hidelostitems_option_for_the_staff_client_RFC

Minor edits: Whitespace

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 20:20:05 +13:00
Christopher Hall
0eb6be9d05 Bug 5917 : fixed branches.pl and made template::param handle empty array/hashes better 2011-03-30 08:55:57 +13:00
Chris Cormack
fbb48436b7 Merge remote branch 'kc/master' into new/enh/bug_5917 2011-03-23 16:56:55 +13:00
Srdjan Jankovic
670a262504 Bug 5928 :wr77152 : AllowPurchaseSuggestionBranchChoice sys pref
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-23 10:35:16 +13:00
Chris Cormack
03890c90ac Merge remote branch 'kc/master' into new/enh/bug_5917
Conflicts:
	installer/data/mysql/en/mandatory/sysprefs.sql
2011-03-21 19:54:11 +13:00
Paul Poulain
ddbedbfc2f Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
Sophie Meynieux
6282f652b2 Bug 5889: Messages name in english for notifications on public interface.
Modification of template to allow multilanguage support. Alsa fixing columns
overflow.

BibLibre bug #5939

Tests: It works. Messages strings can now be extracted and placed in .po file
for translation.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-18 09:25:08 +13:00
Chris Cormack
2c470899b3 Merge remote branch 'kc/new/bug_4438' into kcmaster 2011-03-14 20:48:50 +13:00
Henri-Damien LAURENT
3e297c6cb8 bug4438/MT5496 budget Exceeds total allocation
This is a followup :
When editing a budget, the check for the total allocation would take into account the budget itself.
Showing an improper error message
The problem was solved when adding a child budget but not when editing the same budget.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-14 20:45:58 +13:00
Ian Walls
4735e296cf Bug 5824: Creating a circ rule for a specific library causes anomalies
The variable name for the current branch being edited was the same as the variable used in
cat-search.inc, which passed along the circ-rule library to circulation.pl, and then overriding
the set library from there.

This patch renames the template variable 'current_branch', so that it does not populate the 'branch'
param in cat-search.inc

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-05 20:38:36 +13:00
Frère Sébastien Marie
55af15be84 Use placeholders in sql
Signed-off-by: Frère Sébastien Marie <semarie-koha@latrappe.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-28 08:41:38 +13:00
Christopher Hall
0088c5da53 Bug 5462: fixed current preferences tab highlighting bug created by dashfix
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
2011-02-03 09:58:52 +00:00
Christopher Hall
236ba72ef6 Bug 5462: more dash fixing for variable names within scripts
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
2011-02-03 09:57:45 +00:00
Christopher Hall
f03000f50f Bug 5462: modified intranet scripts to match templates
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
2011-02-03 09:57:24 +00:00
b69ad9de3e Fix for Bug 5650, item type page key wrong
- Fixes for authorised_values.pl and itemtypes.pl
- Hiding table when there are no values to prevent js error
- Hiding table pager when there are no values
- Removing paging code from the script

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-26 19:50:49 +13:00
Henri-Damien LAURENT
9bf9e2d9b4 Bug 4438: incorrect "Budget total exceeds period allocation" error when editing fund
The process in check_parent_total for period allocation was not good.
It took all the children of a period.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-14 09:39:48 +13:00
Chris Cormack
a75a9264e1 Merge remote branch 'kc/new/bug_5240' into kcmaster 2011-01-10 09:16:50 +13:00
Henri-Damien LAURENT
150f67e896 branch transfer limits 2010-12-21 21:18:12 +13:00
Stéphane Delaune
fbfe0276a0 (MT #1654) followup : Adding jquery.tablesorter and jquery.tablesorter.pager support for auth_tag_structure.pl 2010-12-21 21:18:12 +13:00
Stéphane Delaune
f1762530d1 (MT #1654) followup : Adding jquery.tablesorter and jquery.tablesorter.pager support for marctagstructure.pl 2010-12-21 21:18:12 +13:00
Henri-Damien LAURENT
fb804b6020 Followup admin/categorie.pl
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2010-12-21 21:17:30 +13:00
Robin Sheat
692786b519 Bug 4500 - remove commas from price formatting
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-12 20:16:06 +13:00
Christopher Hall
50466277f7 fixed preferences with group titles not being displayed 2010-11-26 15:48:00 +13:00
88a15a71d5 Fix for Bug 5240 - next link hidden on edit subfields
This patch removes the pagination altogether, displaying
everything on one page. It also moves some HTML out of the
script and into the template.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-22 13:43:20 +13:00
14b66041f0 Another bug 5004 fix, this time for road types
The road types interface didn't block deletion of road
types in use, but the script included the same queries
that cities.pl did, as if it intended to.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-19 09:29:48 +13:00
a36a7e1e61 Fix for Bug 5004, Don't block deletion of cities when instances exist in borrowers table
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-19 09:28:33 +13:00
4b69538f9b Fix for Bug 4913 - Budget pages should show currency name instead of symbol
This patch adds a new include file to handle the display of the active
currency name and a warning if no currency is active.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-15 15:13:55 +13:00
Andrew Elwell
9fa574f609 Bug 5385: POD Cleanups (part 1)
working through the master branch to eliminate all
podchecker warnings/errors

Actual improvement to the quality of the POD will
come later (hopefully with assistance of others)

Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:06:55 +13:00
51405bcce4 Fix for Bug 4963, sys prefs need date hints and/or picker
This patch adds the standard date format hint used elsewhere
in the interface.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-02 15:17:40 +13:00
bd28366523 Fix for Bug 4980 - Acq: pull down 'Restrict access to:' for funds not translatable
Applied Owen's patch to current head, updated de-DE translation. The pull down values are now  translated.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-02 15:16:50 +13:00
3c36084b29 Fix for Bug 4261 - keyword mapping should show which framework the map is for
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-01 20:34:36 +13:00
7a72f49ecf standardize name of ILS-DI:AuthorizedIPs syspref
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-22 00:17:18 -04:00
dcbcf8815c bug 3881: remove unused OpacPrivacy syspref
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 22:21:24 -04:00
b49a0a30a1 bug 4176: remove references to unimplemented system preference MIME
The intended functionality of this system preference was never
implemented.  To avoid template changes prior to 3.2.0, put in
hard-coded string 'CSV' to (accurately) identify the type of
the output files in the affected reports.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 21:36:45 -04:00
5bd8e829ae bug 3756: remove more references to disused sysprefs
OPACSubscriptionDisplay
OPACDisplayExtendedSubInfo
OAI-PMH:Set
OAI-PMH:Subset
ILS-DI:AuthorizedIPs
libraryAddress
kohaspsuggest
OrderPdfTemplate
marc
acquisitions

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 21:21:21 -04:00
2b8470ddf8 bug 3756: start removing references to disused sysprefs
holdCancelLength
PINESISBN
sortbynonfiling
TemplateEncoding

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 20:35:35 -04:00
Henri-Damien LAURENT
45604b8d17 (bug 3536) fix homeorholdingbranch on return
this patch create a new systempreference "homeorholdingbranch"-like used only for returns.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

An additional edit was made to circ/returns.pl by Ian Walls of ByWater Solutions to force the dialog message for the return to
use the branch specified by the new HomeOrHoldingBranchReturn system preference, rather than always Homebranch.
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 20:04:30 -04:00
Jared Camins-Esakov
9f7f61be4a Fix Bug 5261 broken link in Local Use sysprefs
This patch eliminates the sysprefs-menu.inc include file and changes the
systempreferences.pl and systempreferences.tmpl files to work with the
prefs-menu.inc instead. This will centralize the syspref tabs and make it
easier to modify tabs in the future if necessary.

This commit also changes the default tab to Acquisitions, since the Local Use
tab does not work with preferences.pl at present.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 06:18:44 -04:00
ec3913e1aa Bug 3756 Don't display as local AutoSelfCheckID syspref and others
Improve how sysprefs are extracted from .tmpl file in order not to miss
some of them.
2010-07-26 16:18:37 +02:00
4dc85d2f0a Bug 3756 Difference between original and local sysprefs
Amend Chris N. patch in order to display local sysprefs as the
difference between DB sysprefs and .pref files sysprefs.

As a side effect, local sysprefs editor displays also deprecated
sysprefs which is a feature from my point of view. For example,
GranularPermissions is displayed as a local syspref because it has been
removed recently from admin.pref but hasn't been yet removed from DB
(could be done later with a DB update).

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-07-15 23:29:32 -04:00
Chris Nighswonger
141313666f Bug 3756: Adding the ability to have localuse systempreferences
Squashed commit of the following:

commit d42198bfadff20f40c38b3d9bc7f210ecc372e7c
Author: Chris Nighswonger <cnighswonger@foundations.edu>
Date:   Mon Jul 12 16:48:16 2010 -0400

    Bug 3756 [4/?] new sys prefs - no way to add a new local use preference

        Fixing Global Administration link

commit 060a52bc8d9da1d83387455967ca05292e5987b9
Author: Chris Nighswonger <cnighswonger@foundations.edu>
Date:   Mon Jul 12 16:45:07 2010 -0400

    Bug 3756 [3/?] new sys prefs - no way to add a new local use preference

        Hiding non-local sysprefs

commit d63858e13037fa91f18bc248ab770d757e31153c
Author: Chris Nighswonger <cnighswonger@foundations.edu>
Date:   Mon Jul 12 16:44:40 2010 -0400

    Bug 3756 [2/?]new sys prefs - no way to add a new local use preference

        Fixing a typo

commit 5b23a615018e049b1e11dbc10b131ecb30dfc6ab
Author: Chris Nighswonger <cnighswonger@foundations.edu>
Date:   Mon Jul 12 15:52:04 2010 -0400

    Bug 3756 new sys prefs - no way to add a new local use preference

        A quick and dirty fix

Signed-off-by: Chris Cormack <chrisc@catalyst.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-07-15 23:29:30 -04:00
Alex Arnaud
47f49d2e7f (BUG #4857) aqplan.pl: consideration of Planning categories with authorised values
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-24 20:42:47 -04:00
Alex Arnaud
1e8c06c522 (BUG #4521) aqbudgets.pl - Transform undefined budget spent value to 0.00 value
This patch tranform the undefined value of budget spent to a money value which equals 0.00.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-24 14:25:46 -04:00
0700a8b732 bug 4896: granular permissions now always on (DB rev 138)
Per the following koha-devel thread, the use of
staff user subpermissions, AKA granular permissions, is
now the default behavior in Koha.  This patch removes
the GranularPermissions system preference.

[1] http://lists.koha-community.org/pipermail/koha-devel/2010-February/033670.html

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-19 07:56:03 -04:00
Garry Collum
34936223f3 Bug 2505: Enabled warnings in patron-attr-types.pl
Fixed all resulting  errors.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-09 09:49:34 -04:00
6af71b5f8d Fix for Bug 3722 - Branch deletion results in incorrect message
A fix was submitted by Nahuel on 23 Nov 2009 and pushed, but
it combined messages for existing patrons and existing items.
This patch defines separate messages for the various cases and
corrects a typo in the original fix which left existing patrons
unreported.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-03 20:46:31 -04:00
Nahuel ANGELINETTI
d43cf08837 (MT #2565) fix aqplan csv export, and turn off debug
This fix the csv export that doesn't export correctly the budget name, it's empty column.
And it turn off some SQL debug that slow down the result of the page and the csv export.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-26 10:53:01 -04:00
ef58c445d3 removed needless imports of the YAML module
Removed instances of 'use YAML' that were either completely
unnecessary or which were used only in debug code.  Also
removed a needless import of Data::Dumper.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 23:30:48 -04:00
Alex Arnaud
d6e6d920b5 (BUG #4521) aqbudgets.pl - Transform undefined budget spent value to 0.00 value
This patch tranform the undefined value of budget spent to a money value which equals 0.00.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-24 10:33:47 -04:00
60be9d291f bug 4509: remove references to PINESISBN system preference
This system preference never worked; also, as far as I can tell,
the PINES oISBN service was experimental, not meant for production
use, and is not currently advertised.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-17 08:59:10 -04:00
f319e850d6 Bug 3768 (Bibliographic Framework Test)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-17 08:26:21 -04:00
Jane Wagner
dc0b98eb9e Bug 3093 add syspref to turn off multiholds button
Having the place multiple holds button at the top of the OPAC and staff search results has caused problems for some sites with tight holds policies; this syspref allows those sites to turn off the button.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-11 07:44:17 -04:00
Chris Cormack
86fbe2ec21 Bug 4405 - Overdues block check out
[Documentation note by RM:

This patch adds a new system preference, OverduesBlockCirc,
that can take one of three values:

  - noblock:      checkouts permitted even if patrons
                  have overdue items (default)
  - confirmation: circ operator asked to confirm checkout
  - block:        checkouts to patrons who have overdue
                  items are forbidden

]

Squashed commit of the following:

commit 6a1f66e0686a14d8a89abfc3fe5978dabd0b7af7
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Mon Apr 26 10:27:39 2010 +1200

    Tidy up ready to send patch

commit 4d1398df18dcce4fd888cf17a0e2955fdf6ee1e4
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Mon Apr 26 10:26:15 2010 +1200

    Bug 4405 - tidy up

commit 3daeb71bc6b690e18dda96aa3c767c2bb0521038
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Mon Apr 26 10:02:04 2010 +1200

    Bug 4405 - Overdues block checkout

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-01 10:39:11 -04:00
59a6072c77 bug 4333 followup - fix an uninitialized value warning
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-30 05:50:45 -04:00
Colin Campbell
7604bf89f5 Bug 4333 Fix erroneous message re Active Currency
Script was incorrectly asking user to define an active currency
Now test for active currency in the standard way
Use the currency routines in Budgets where applicable
Move the code paths in the if else to subroutines to clarify flow
Enable warnings

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-30 05:42:05 -04:00
Henri-Damien LAURENT
e40728f4d5 MT2464 : branch_transfer_limit.pl usability change
Adds branchnames along with branchcodes for display

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 22:01:27 -04:00
ffdcd06fac Fix for Bug 4424, MARC Framework deletion incorrectly reports usage count
Thanks to Thomas Dukleth for the fix.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 20:59:29 -04:00
c9ba8c899d Merge branch 'bug2505_patches' of git://git.catalyst.net.nz/koha into to-push
* 'bug2505_patches' of git://git.catalyst.net.nz/koha: (24 commits)
  Bug 2505 - use strict and warnings in sax_parser_test
  Bug 2505 - enable warnings for link_bibs_to_authorities
  Bug 2505 - add strict and warnings to perlmodule_ls
  Bug 2505 - add strict and warnings to check_sysprefs
  Bug 2505 - Add commented use warnings where missing in *.t
  Bug 2505 - Add commented use warnings where missing in *.pm
  Bug 2505 - Add commented use warnings where missing in the cataloguing/ directory
  Bug 2505 - Add commented use warnings where missing in the misc/ directory
  Bug 2505 - Add commented use warnings where missing in the tools/ directory
  Bug 2505 - Add commented use warnings where missing in the installer/ directory
  Bug 2505 - Add commented use warnings where missing in the rotating_collections/ directory
  Bug 2505 - Add commented use warnings where missing in the C4/ directory
  Bug 2505 - Add commented use warnings where missing in the serials/ directory
  Bug 2505 - Add commented use warnings where missing in the catalogue/ directory
  Bug 2505 - Add commented use warnings where missing in the sms/ directory
  Bug 2505 - Add commented use warnings where missing in the opac/ directory
  Bug 2505 - Add commented use warnings where missing in the virtualshelves/ directory
  Bug 2505 - Add commented use warnings where missing in the suggestion/ directory
  Bug 2505 - Add commented use warnings where missing in the admin/ directory
  Bug 2505 - Add commented use warnings where missing in the circ/ directory
  ...

Conflicts:
	C4/Auth_with_cas.pm
	acqui/supplier.pl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-23 07:13:37 -04:00
Alex Arnaud
e4addf296f (BUG #4388) aqbudgets.pl: add a column in the table for display the total spent of level and sublevels
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-23 06:42:51 -04:00
Alex Arnaud
8eac9d8180 (BUG #4360) aqbudgets.pl: Adding the hierarchy of budgets in the tooltip
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-23 06:42:49 -04:00
Donovan Jones
bce3e2e619 Bug 2505 - Add commented use warnings where missing in the admin/ directory 2010-04-21 20:20:11 +12:00
Alex Arnaud
2e9c62278c (bug #4318) remove the confirmation step in validating a form
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-16 07:32:58 -04:00
956e0e9c62 bug 4358: remove disused ReadingHistory syspref and related code
The ReadingHistory sytem preference is no longer used, and possibly
was used by only one library anyway.  Removed references to it; note
that had it been turned on, a patron viewing checkout history would have
seen old loans showing up twice.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-07 10:27:56 -04:00
Paul Poulain
c3fe3af209 Using only default framework for koha2marclinks
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 21:27:20 -04:00
Lars Wirzenius
2c67656108 Fix FSF address in directory admin/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:50 -04:00
Colin Campbell
a034d305da bookseller is returned as a scalar hashref not an array
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-18 10:29:48 -05:00
Henri-Damien LAURENT
9d6df13554 (bug #4135) fix aqplan form
This fix the form to have always the submit button, and fix security issue in aqplan.pl(authnotrequired set to 1)

Conflicts solved:

	koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-17 05:10:11 -05:00
2b125a6f93 bug 2885: attempting to add library with existing code now gives error message
If one attempts to add a new library with a code already in use,
an error message is shown.  The main library data input by the user
is preserved, allowing the user to try a new code.

This also corrects a glitch in the previous patch concerning
adding a branch category whose code is already in use.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-14 21:13:50 -05:00
c097736084 Fix for bug 2885, now an error message is thrown instead of a silent fail
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-14 20:29:44 -05:00
c5da83f020 remove unconditional warn
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-10 22:51:51 -05:00
Garry Collum
92702aa010 Bug 2505: Enables warnings in matching-rules.pl.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-10 22:10:43 -05:00
3d19eb7fef bugs 3912, 4144: can now add contracts if dataformat is not metric
Fixed bug in date validation that prevented adding new contracts
if the dateformat syspref was set to something other than 'metric'.

In process, also removed three hand-written date validation routines
in favor of using JavaScript Date objects and the Date_from_syspref
function provided in calendar.inc.

This fixes bug 3912, and partially addresses bug 4144.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-10 08:41:47 -05:00
Zeno Tajoli
1d0bd7fc59 Bug 3162 Fix only for [forward port of tempoary fix 3.0.x]
Note that this patch causes the authority subfield visibility
to match 3.0.x, but at a cost - only two options are available now,
hide all and show all, and much flexibility is lost.  This will
need to be improved.

(cherry picked from commit 56831089ed)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-10 06:23:08 -05:00
Colin Campbell
7f0f83a6ec Enable warnings in koha2marclinks.pl
Fix code generating warnings with warnings enabled

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-08 21:25:47 -05:00
Colin Campbell
eee07ae861 Enable warnings in marctagstructure.pl
Fix a couple of comparisons generating warnings

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-08 21:25:45 -05:00
Jane Wagner
f52c54eb35 Bug 3738 Automate login to web-based self-check system
Some small, single-branch corporate and special libraries use unattended self-checkout stations, and would like to automate the staff login, so that just going to the sco/sco-main.pl URL would bring the self-check up ready for patron use.  This patch create three sysprefs, AutoSelfCheckAllowed, and AutoSelfCheckID/AutoSelfCheckPass. If the site wants to allow automated login, staff would then need to create the selfcheck user record and enter that login ID and password into the sysprefs.  The kohaclone/opac/sco/sco-main.pl script has been modified to check these sysprefs and pass values (if present and allowed) into the self-check URL.  The URL then bypasses the staff login page and comes up ready for checkout, waiting for the first patron barcode.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-08 08:43:07 -05:00
3f45f621e6 Fix for Bug 3970, Warn user when there is no active currency
- Adds warning to budget admin pages
- Adds warning to currency admin page

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-02 18:43:09 -05:00
Nahuel ANGELINETTI
dc9991d9b4 (MT823) add the possibility to have enrolment end date
this patch add the possibility to have an end date of enrolment, instead of a period. Like for a user category, all this category can have the same expiry date.
The librarian can configure one of both, but not both.
2010-01-28 15:11:55 +01:00
Jean-André Santoni
73605d792f [MT2590] Removed root budget duplicate checkings 2010-01-28 15:11:52 +01:00
Matthias Meusburger
0b5cc8f809 MT2345 : Changes on contracts 2010-01-28 15:11:51 +01:00
Paul Poulain
c85e22ad53 aqbudget display, minor changes
- removed 2 total that means nothing (and were troubling users)
- reindented a little (removed tab)
2010-01-28 15:11:50 +01:00
Jean-André Santoni
0ed6bcdabb [MT1234] Huge rewritte to use the API instead of hardcoded SQL in the script
Also fixes a bug in the template.
2010-01-28 15:11:44 +01:00
Jean-André Santoni
10c9610058 [MT1234] Code cleaning 2010-01-28 15:11:44 +01:00
Jean-André Santoni
2a84ad3223 [MT1234] Fixed aqcontract breadcrumb 2010-01-28 15:11:44 +01:00
Jean-André Santoni
922ae0b782 [MT1234] Replaced useless selectbox in the title of contact form 2010-01-28 15:11:44 +01:00
Jean-André Santoni
e7753ce465 [2343] Fix currency not showing in aqbudgets 2010-01-28 15:11:43 +01:00
b6c043147f final fix for sysprefs merge, hopefully
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-01-27 09:33:14 -05:00
0c3fde5cd3 handle error if no active currency is defined
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-01-27 09:30:22 -05:00
2c9e28e63e fix silly typo
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-01-27 09:19:13 -05:00
880a2088ad bugfix - fix compilation error
Reflect change of GetLocalCurrency to GetCurrency
in new_acq

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-01-27 08:58:26 -05:00
8ad2c7d7ac Merge commit 'pianohacker-koha/prefs-submit' into master
Merge in Jesse Weaver's system preference editor changes.

Conflicts:
	C4/Bookfund.pm
	koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
	koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
	koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tmpl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-01-26 20:26:17 -05:00
Henri-Damien LAURENT
d339abf0bf Merge branch 'patroncards-wip' of git://git.foundations.edu/koha into community
Conflicts solved:
	Makefile.PL
	installer/data/mysql/en/mandatory/sysprefs.sql
	installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
	installer/data/mysql/updatedatabase.pl
	kohaversion.pl
2010-01-20 23:16:34 +01:00
b407a95fb8 Add OverdueNoticeBcc syspref required by overdue_notices.pl 2010-01-15 10:19:26 +01:00
Chris Cormack
89b3e11356 Can now add rental discounts - wr62194 2010-01-15 10:14:55 +01:00
Chris Nighswonger
c44d08bff2 [22/30] Adding a syspref to limit the number of images which can be stored in the db at any one time by the Patron Card image managera
This will keep the db a sane size. Setting this to NULL will result in no
    limit being enforced.
2010-01-11 18:21:16 -05:00
Nahuel ANGELINETTI
5aad8d7591 Authtypecode return an warning even if subfield is ignored
this patch just add a condition to the sql request to return a warning
only if authtypecode is not in an ignored subfield.
2009-12-31 10:54:26 +01:00
Jean-André Santoni
23b356105a [MT2343] Select in budget add forum
Sorted the branches select.
Modified display to "branchcode - branchname"
Fixed a bug, selection was inverted.
2009-12-20 14:31:23 +01:00
Jean-André Santoni
b14efbc832 [MT2343] Prevents Koha to format total amount in budget period add/edit form
+ Forgot a "my"
2009-12-20 14:31:21 +01:00
Jean-André Santoni
b641eb0fce [MT2338] Fixed the missing content in the "active" column 2009-12-20 14:31:12 +01:00
Nahuel ANGELINETTI
5ed631c850 (bug #3802) fix branch deletion checks
This fix checks that are done when a branch is deleted, and the message shown.
Now it check for borrowers and items attached to the deleted branch.
2009-11-23 10:35:25 +01:00
Nahuel ANGELINETTI
e88fbd627b (bug #3801) fix itemtype administration
This delete all code related to renewals allowed in itemtype administration.
2009-11-23 10:34:44 +01:00
Jesse Weaver
cdb3d52423 Move jumping functionality to search
This moves the "Jump to name preference functionality" to the search
bar: if your search term is found to be the exact name of a syspref,
then it is jumped to instead of executing a normal search.
2009-11-04 20:36:08 -07:00
Jesse Weaver
870abd703b Fix handling of pref defaults (#3747, #3588) 2009-11-03 21:27:30 -07:00
Jean-André Santoni
7e872e0a1f [3.2.x](bug #3623) PDF printing enhancements
Renamed pdfformat to OrderPdfFormat and created OrderPdfTemplate to stock the PDF in the database.
Added a new type of syspref nammed "Upload".
Rewritte, translation and cleaning of the PDF template.
2009-11-03 16:35:29 +01:00
Henri-Damien LAURENT
da49fc77df 3736 enh : Adding syspref RoutingListAddReserves
Adding syspref RoutingListAddReserves
Using it in routing-preview
2009-10-29 15:29:04 +01:00
Paul Poulain
209b614eb1 fixing currency.pl
if active not set, mySQL complains for a missing argument
2009-10-28 17:51:56 +01:00
Paul Poulain
ad1e018667 removing warn and reindenting
+ \\n fixes (for error message better display)
2009-10-28 17:51:20 +01:00
Henri-Damien LAURENT
fd75507a55 (bug #3370) add keyword to MARC field mapping
This add the support of keyword => MARC field mapping, ton abstract the relation between human readable fields like subtitle, title, authors, location, ... and MARC fields in each framework.
This will allow to koha developper to be more flexible with each framework and don't care about the MARC flavour, just require some "keywords" to the user.

Conflicts solved :
	C4/Biblio.pm
	installer/data/mysql/kohastructure.sql
	installer/data/mysql/updatedatabase30.pl
	kohaversion.pl

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-30 11:30:42 +02:00
Paul Poulain
89c0cda081 [replace previous] fix for 3612 (bookseller improvements)
- removing useless fields from aqbooksellers table: specialty, deliverydays,followupdays,followupscancel,nocalc, invoicedisc They were in the DB schema, but unused for years
- reworked bookseller and contract gui
- no warning thrown

NOTE : updatedatabase not done for field removal in aqbooksellers table. Should have:
ALTER TABLE `aqbooksellers`
  DROP `deliverydays`,
  DROP `followupdays`,
  DROP `followupscancel`,
  DROP `specialty`,
  DROP `nocalc`;
2009-09-30 11:30:34 +02:00
Nahuel ANGELINETTI
d399ff3494 [biblibre-newacq](bug #3611) fix user interface and others
This big patch, fix xhtml code, and user interface.
It Delete the term of budget period and use it as "Root Budget".
It add improvment on UI, adding tooltip, and table tree.
2009-09-30 11:30:34 +02:00
Henri-Damien LAURENT
0f015abd99 smart-rules : clonerules enhancement
Cloning rules should be available as soon as there is one rule
2009-09-30 11:30:33 +02:00
Nahuel ANGELINETTI
29ed0f384b [biblibre-newacq](bug #3611) fix aqbudgets.pl page
do not show total available if total is zero.
Adding a budget, does not show the available parent budgets.
2009-09-30 11:30:32 +02:00
Henri-Damien LAURENT
e3a9d21d6e Improving and bug fixing admin/aqbudgets
Adding FormatData and FormatNumber in C4::Output
Using them
Adding duplication detection for budget periods
Factorizing some code
2009-09-30 11:30:30 +02:00
Henri-Damien LAURENT
d1416ed8a7 Removing fines getting from user search on budgets administration 2009-09-30 11:30:29 +02:00
Henri-Damien LAURENT
38b61303bd Bug Fixing : 1st Step Bookfund has become Budgets
More bug fixing on Suggestions and Budgets
2009-09-30 11:30:29 +02:00
Matthias Meusburger
96fc46e2e1 MT 1717 : Opac descriptions for authorised values 2009-09-30 11:30:28 +02:00
Paul Poulain
521bb9654d code cleaning
* removed unused sub in Budgets.pm
* lot of cleaning in aqplan.pl
* typo changes in aqplan.tmpl
2009-09-30 11:30:25 +02:00
Paul Poulain
d347b15163 budgfixing budgets & planning and code cleaning
* fix a bug for new orders budget : the Asort1 was displayed by default. Now, it's the sortN_authcat of the 1st budget (the one selected by default)
* change in GetBudgetAuthCats : returns all auth values used by at least one budget (not Asort* categories, as previously)
* code cleaning in GetAuthvalueDropbox (and select aqbudgets.* instead of *, to avoid data corruption due to duplicate column name)
2009-09-30 11:30:25 +02:00
Paul Poulain
1664c47420 bugfixing & improving budgets managements
* the budget hierarchy had been removed by the merge by mistake
* don't limit the authorized_values list, show all of them
* cleaning & reindenting
2009-09-30 11:30:25 +02:00
Mason James
5022a8583a big aqplan commit v2 for mantis:1177 2009-09-30 11:30:25 +02:00
Paul Poulain
7486cdea99 bugfix: haspermission API 2009-09-30 11:30:24 +02:00
Paul Poulain
1894ea54b2 improvement/bugfix : search budget
* there can be more than 1 active period. This has been added to deal with temporary budgets (like "10000€ to spent in the next 3 months")
* all active budgets are retrieved
* budget available for everyone now displayed correctly

also :
* fixing some hardcoded values
* removing a warn
2009-09-30 11:30:24 +02:00
Paul Poulain
80227720fe merging new_acq fix: budget_parent dropbox was wrong
(Probably need to patch SAN-OP branch as well)
2009-09-30 11:30:23 +02:00
Paul Poulain
1d4fb38a27 planning management
for each budget period and budget, the library can enter planning on branches, itemtype, month or any auth_value selected as planning category for a given budget
2009-09-30 11:30:16 +02:00
Paul Poulain
4ec7a86abe Budget management
* budget period management
* budget management (budgets lines are defined for a given budget period)

budget_owner_search is the popup to select a librarian as budget owner
2009-09-30 11:30:16 +02:00
Paul Poulain
25fe55509b removing aqbudget & aqbookfund
* aqbookfund is now useless
* aqbookbudget will be replaced by a aqbudgets, that is a new one.
2009-09-30 11:30:15 +02:00
Paul Poulain
6358e6b580 currencies admin: managing active field 2009-09-30 11:30:15 +02:00
Paul Poulain
fd882db020 adding contract management 2009-09-30 11:30:15 +02:00
Paul Poulain
a3dfe58e01 Updatedatabase (big)
* adding aqcontracts, that will contain contracts attached to a given bookseller. Each basket can be attached to a contract
* adding columns to aqbasket: basket name, note, booksellernote and contractnumber
* adding column to aqorders: uncertainprice, budget_id and statistical fields
* adding table aqbasketgroups: will be used to collate X basket into a single basketgroup
* adding table aqbudgetperiods: will be used to manage budget periods, 1st step to define a budget
* dropping & re-creating a aqbudgets table: completly new content, no update from previous acq
* adding table aqbudget_planning table: will be used to store library budget planning (by ccode, branch, month, and other authorised_values)
* adding column to currencies table: active, that will tell which currency is the used one.
* adding sub permissions for acquisitions module
* adding column to booksellers table: gstrate that will tell the gst rate for the bookseller.
* adding sysprefs: AcqCreateItem (define when item creation is done ordering/recieving/cataloguing), CurrencyFormat
* adding aqordersitems table: link between order and items
* dropping aqorderbreakdown: useless
2009-09-30 11:30:15 +02:00
Paul Poulain
34f1987dcb fix for #2884: Add error management to branches
While trying to add a new Branch with an existing Branch code, the UI says "Library saved" instead of something such as "Please select a unique branch code".
2009-09-30 11:30:14 +02:00
Nahuel ANGELINETTI
ded4fc407e (bug #3553) do not allow users to create code-less frameworks
This patch, disallow the users to create frameworks without frameworkcode.
It adds some javascripts checks, and some perls checks(for non-javascript users).
2009-09-30 11:30:12 +02: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
868b8cdbaa Merge commit 'origin/master' into bl-sopac 2009-09-29 20:22:11 -04:00
58ee841a73 DB rev 061: added ShowPatronImageInWebBasedSelfCheck (bug 3436)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-16 07:44:09 -04:00
Colin Campbell
6fb8ef0d79 New Messaging System.
This system is indended to replace the old opacnotes
  and borrowernotes fields in the borrowers table.
  This system allows an unlimited number of Libraran and OPAC notes to be
  attached to a borrower. Each note has a message, a message type,
  the data it was created, and which library created it.
  Each message can only be deleted by the library that created it unless the syspref
  AllowAllMessageDeletion has been set.

  This system may be used simultaneously with the old notes system and does not affect it in any way.

  A new database table (messages) was added for this feature.

  The System also allows for pre-defined notes for Borrower records

  To use these, just create authorised values with the category BOR_NOTES
  where the Authorized Value is the short description shown in the pulldown,
  and the description is the text that should be in the note.

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

  This work co-sponsered 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>
2009-09-15 22:11:38 -04:00
Jane Wagner
486a9496de Bug 3098, Bug 3108, Bug 3545 -- Make MARC21 XSLT obey sysprefs in OPAC
The MARC21slim2OPACDetail.xsl and MARC21slim2OPACResults.xsl XSLT
stylesheets do not obey any of the OPAC sysprefs, OPACURLOpenInNewWindow,
URLLinkText, or a new one added for Bug 3545, DisplayOPACiconsXSLT.
Modified C4/XSLT.pm based on code written by Fréric Demians (thanks!) to
pass the values of the sysprefs to the .xsl files.  Modified the .xsl
files to implement them.  If the respective sysprefs are set, the OPAC
results and display pages will/will not display the format/material
type/audience icons, will/will not open URLs in new browser windows,
and will/will not use the text entered in URLLinkText as generic link
text when there is no value in the 856 subfield y, 3, or z.  (Note that
if subfields y, 3, or z do contain text, the first match is what will be displayed.)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-15 21:40:47 -04:00
2f99d99991 Merge commit 'origin/master' into sopac 2009-09-08 17:16:22 -04:00
Jesse Weaver
fdd82e8054 Add new system preferences editor
This new editor uses data files instead of descriptions stored in the
database. It also has improved search.
2009-09-06 23:02:47 -06:00
Nicole Engard
6dd6af59c2 Bug 2576: Added OPACFinesTab Syspref
This preference allows library staff to decide whether to show
the fines tab in the OPAC for logged in patrons.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-06 13:47:35 -04:00
Nicole Engard
e71c8a4343 Bug 1172: Added OPACPatronDetails system preference
This patch allows library staff to disable the patron details
tab on the OPAC.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-06 13:47:34 -04:00
Jean-André Santoni
070aacf4a8 Added ILS-DI module
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-06 13:41:25 -04:00
ec6aaaebb0 bug 3581: fix staff permission for item circ alerts
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-06 09:46:39 -04:00
73dd78ce1c Revamp interface of branch transfer limits to give finer conrol of bulk selections.
Adds selection by row and by column, all/none/toggle for individual ccode/itype sets, and a tabbed interface for a more compact display.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-06 09:31:30 -04:00
Michael Hafen
ee83c4ae80 smart-rules load users library instead of default
If the user isn't a super librarian load their library by default instead of
the default settings.

This would eliminate some confusion amoung my librarians.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-06 09:13:16 -04:00
Garry Collum
aa3e066b5f Bug 2505: Enabled warnings in admin-home.pl and roadtype.pl.
Fixed warnings generated by roadtype.pl and tightened up the code (referred to cities.pl).

No warnings were generated by admin-home.pl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-06 09:13:14 -04:00
Nicole Engard
8f2d9cd6ce Bug 1934: Add system preference to handle editing of 'More searches'
This preference allows librarians to control which links appear
in the 'More Searches' box on the opac detail page. If the
preference is left blank the 'More Searches' menu will not apear
on the opac detail page at all.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 19:55:31 -04:00
Chris Cormack
634df1c76c Bug 3539, Adding a systempreference to hide borrowers name on the catalogue detail page, and holds page
Squashed commit of the following:

commit e9dd6e1dee03fe3503f7995b57510f9edfe6b333
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Wed Aug 19 08:14:53 2009 +0000

    Version number

commit df3ee5473e79b760a91c62b96d7ce19229e0fd27
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Wed Aug 19 08:08:11 2009 +0000

    French systempref

commit c4b036e4e43947d7d1fb9f2e18e460788cb4e1ec
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Wed Aug 19 00:25:33 2009 +0000

    Code to update the database, and updating the sysprefs.sql

commit f74b942c24d5e9c33a4ec0e5ac706a0e347eb1a7
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Tue Aug 18 02:07:22 2009 +0000

    Now hides the name on the detail screen too

commit 53c80dbef88e360a4bbb78ecff3a6ca6ec401398
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Tue Aug 18 01:35:19 2009 +0000

    Allowing the librarians to choose to hide the borrowers name on holds

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 13:52:26 -04:00
PTFS Contractor
36ec435cd9 bug 3485: Clear Borrower record after checkout.
Button added to clear the last Borrower record after transaction is complete
To enable, turn on the syspref DisplayClearScreenButton.

This work was sponsored by Middletown Township Public Library, Middletown, NJ USA

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 13:21:21 -04:00
40ad4d2129 bug 3481 followup - add new sysprefs to circulation section 2009-08-23 13:07:32 -04:00
Jesse Weaver
f8a43317b1 Prevent OPAC renewals if fines are over limit
This introduces a new system preference, OPACFineNoRenewals, that sets a
limit on the total fines a patron can have before they can no longer
renew their own books. opac-user.pl has been updated to obey this limit.

This work sponsered by 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 10:13:26 -04:00
678262db3d bug 3204: tweaks to AWS request signing
* Add AWSPrivateKey system preference to the
  Enhanced Content tab in the syspref editor
* Now warns to log if attempting to use
  the Amazon API without setting AWSPrivateKey

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-13 09:29:57 -04:00
Michael Hafen
0458639566 Allow the reserve date to be set on holds - sysprefs
This is the two system preferences controlling this feature, and the
updatedatabase addition using db verion 3.01.00.040

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-11 18:02:30 -04:00
636bb72702 quick spoine label followup: sysprefs
* Added missed SpineLabelAutoPrint to updatedatabase;
  this preference controls whether labels generated
  by the new quick spine label tool are printed automatically
* put SpineLabelAutoPrint and SpineLabelFormat in the
  Cataloging section of the syspref editor
* set height and width for the SpineLabelFormat textarea
  in the syspref editor

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-02 11:08:16 -04:00
Sébastien Hinderer
1ac250ea27 bug 3440: Modifies branches script and template so that the newly added rows are taken into account.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-01 09:44:22 -04:00
38a0e22d2e Spelling correction per convention: cataloguing -> cataloging (Bug 3277)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-29 08:11:24 -05:00
Joe Atzberger
c8cbf6b5f2 Cleanup stopwords.pl and .tmpl
Remove "toggle" code and useless javascript.
Rework "SimpleSearch" to use just one argument.
Remove unnecessary dependencies.
Remove incorrectly pasted comments.
Remove queries that didn't do anything.
Enable warnings.  Use one $dbh.  Remove $sth->finish calls.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 18:00:57 -05:00
Garry Collum
f18df06e5d Bug 2889: Removed toggle variable from auth_tag_structure.pl and auth_subfields_structure.pl
Removed toggle variable from auth_tag_structure.pl and .tmpl.  Used template __odd__ in auth_tag_structure.tmpl.

Removed toggle variable from auth_subfields_structure.pl and .tmpl. Use __odd__. Removed a type in the highlight class definition. Fixed a minor xhtml error.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 10:47:52 -05:00
Galen Charlton
11916ad734 followup - restore correct conditional
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 10:46:11 -05:00
Joe Atzberger
f226b02dd4 Cleanup: biblio_framework and marctagstructure
Removed unused javascript.  Enabled warnings.  Use common $dbh.
Removed sth->finish calls.  Removed toggle code.  Added row highlight where
none had been implemented.  Repaired validation error w/ mislocated input tag.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 09:58:53 -05:00
Joe Atzberger
8db0cc330b Cleanup classsources.pl and .tmpl
Relatively minor cleaning.
Remove unused javascript.  Add row highlighting to both tables.  Remove conditionals where the
behavior is the same for both possibilities.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 09:58:52 -05:00
Garry Collum
7d4a962a18 Bug 2889: Removed toggle from marc_subfields_structure.pl and .tmpl
Removed toggle variable from marc_subfields_structure.pl and marc_subfields_structure.tmpl.  Used template __odd__ variable instead.

Corrected a typo in the highlight class definition in .tmpl.

Corrected a readability issue with the description when deleting a subfield in .tmpl.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 09:58:38 -05:00
Garry Collum
7f4a8f90b0 Bug 2889: Removed toggle variable from stopwords.pl and .tmpl.
Removed toggle variable from stopwords.pl and stopwords.tmpl. Used template __odd_ variable instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 09:58:10 -05:00
Joe Atzberger
f4ec623939 Cleanup - admin scripts
Fixed useless redirect statements that weren't even printed.
Removed unused javascript and script variables;
Removed sth->finish.  Use get instead of post on "cancel" button (no data to post).
Reduce duplicative variables (e.g. scriptname and script_name).

Many other problems are still in the scripts, including use of META-REFRESH instead of
redirect, and the whole idea of redirecting back to the same page for no valid reason.
We should be able to formulate the right response on THIS pass, not ask the browser to start over.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 09:58:07 -05:00
Garry Collum
7f28053a65 Bug 2889: Removed toggle variable from aqbudget.tmpl. Used template variable __odd__ instead.
Removed toggle variable from aqbudget.pl and aqbudget.tmpl. Used template variable __odd__ instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-11 06:10:58 -05:00
Garry Collum
368681f9dd Bug 2889: Removed toggle variable from categorie.pl and categorie.tmpl.
Removed toggle variable from categorie.pl and categorie.tmpl.  Used template __odd__variable in categorie.tmpl.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-11 06:10:50 -05:00
Garry Collum
d5904a0835 Bug 2889: Removed toggle variable from aqbookfund.pl and aqbookfund.tmpl.
Removed toggle variable from aqbookfund.pl and aqbookfund.tmpl. Used template __odd__ variable in aqbookfund.tmpl.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-11 06:10:47 -05:00
Joe Atzberger
dcf25a5b44 Cleanup authtypes and currency .pl and .tmpl
Removed unused javascript.  Enabled warnings.  Use common $dbh.
Removed sth->finish calls.  Removed toggle code.  Added row highlight where
none had been implemented.  Added some HTML escaping in TMPL.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-11 06:10:45 -05:00
Garry Collum
ccb39e40de Bug 2889: Removed toggle variables from z3950servers.pl and .tmpl
Removed toggle variables from z3950servers.pl and z3950servers.tmpl.  Used template __odd__variable instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-11 06:10:42 -05:00
Garry Collum
b776266faa Bug 2889: Added highlighting to smart-rules.tmpl
Removed unused toggle variable form smart-rules.pl and added highlighting to smart-rules.tmpl through template __odd__.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-11 06:10:41 -05:00
Garry Collum
0b3f75183b Bug 2889: Removed toggle variable from roadtype.pl and .tmpl.
Removed toggle variable from roadtype.pl and roadtype.tmpl.  Corrected typo in class definition in roadtype.tmpl and add highlighting through the templated __odd__ variable.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-11 06:10:39 -05:00
Garry Collum
7f555830aa Bug 2889: Removed toggle variable from itemtypes.tmpl. (resubmittal)
Removed toggle variable from itemtypes.tmpl and itemtypes.pl.  Used the __odd__ template variable instead.

Resubmittal - first patch contained a typo.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-09 09:00:29 -05:00
Galen Charlton
e92b346f89 fixed bug resulting in invalid XHTML
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-08 16:57:47 -05:00
Garry Collum
fc8b7c27bb Bug 2889: Removed toggle variable from koha2marclinks.tmpl. Used template __odd__ variable.
Removed toggle variable from koha2marclinks.tmpl and koh2marclinks.pl.  Used template __odd__ variable instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-08 16:47:55 -05:00
Garry Collum
c09bdabaf4 Bug 2889: Removed toggle variable from currency.tmpl. Used template __odd__ instead.
Removed toggle variable from currency.tmpl and currency.pl.  Used template __odd_ variable instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-08 16:47:53 -05:00
Galen Charlton
bea8db3072 bug 3278: move three sysprefs to Staff client tab
* viewMARC
* viewISBN
* viewLabeledMARC

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 13:17:04 -05:00
Joe Atzberger
c90dd8b512 Cleanup branches.pl and .tmpl
Remove entire subs that were unused.  Remove "toggle" code.
Comment out unconditional warn.
Remove inaccurate comments regarding long-fixed bugs and obsolete processes.
Remove unused variables.
Added "dialog message" div around MESSAGE8.

NOTE: all printer functions currently useless, unfixed by this patch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-06 15:19:15 -05:00
Joe Atzberger
7bebd743d0 Cleanup cities.pl and .tmpl - major
80% of the javascript was junk.
Bad check failed on non-existant field borrowers.select_city.
Enabled warnings.  Reduced "StringSearch" to 3 lines, removed unused args and vars.
Fixed row highlighting and removed "toggle" code.  Etc.

TODO: Stop redirecting to the same page.  Instead get the correct data and show it
on THIS pass.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-05 17:15:05 -05:00
Galen Charlton
aaf3f9fea7 bug 2884: followup patch
[1] Restore behavior of the input field for the library
    code; when adding a new library, it should be a
    a text box; when editing an existing library,
    should be a hidden input.
[2] When user attempts to add a new library with the same
    code as that of an existing library, populate the form
    with what the user entered for the new library, not the
    values from the existing library.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 20:17:44 -05:00
Paul Poulain
950f753f11 fix for #2884: Add error management to branches
While trying to add a new Branch with an existing Branch code, the UI says "Library saved" instead of something such as "Please select a unique branch code".

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 19:55:09 -05:00
Galen Charlton
ab44e2986a bug 2866: Overdues Reports - Upgrading to filter by patron extended attributes
Patch by Rick Welykochy <rick@praxis.com.au> with some squashing
by me.

Bug Report: 2866 Filtering and sorting the overdue report using patron attributes

1. Create a new system preference ?FilterBeforeOverdueReport?
2. Option to filter *before* the overdue report runs, avoiding report slowness
3. Add searchable patron attributes to the list of overdue report filters
4. Add searchable patron attributes to the sort fields on the overdue report
5. add item call number and replacement price
6. the CSV download link now returns the same
   data as the web report, rather than (inconsistently)
   trying to run the overdue_notices.pl batch job
7. always run report if requesting CSV
8. barcodes are now links
9. use item-level item type for overdue itemtype filter

Included is a new callback for searching patron attributes, similar
to circ/ysearch.pl.

The following additional bugs are fixed:

2748: Nothing is output to the .csv file for the "Overdues" circulation report

This is fixed by having circ/overdues.pl produce the CSV output directly instead
of trying to call the overdues cronjob.  The CSV output includes all of the fields
that are displayed on the web table plus the item replacement price and any extended
patron attributes.

2836: overdues.csv may contain HTML
2837: Descending sort doesn't descend on the overdues report plus other probs with report

This enhancement was sponsored by the Plano Independent School District.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 19:20:36 -05:00
Paul Poulain
0fdb397ec6 removing useless line (use Data::Dumper)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 17:31:02 -05:00
Galen Charlton
42b58a7e52 bug 1933: started work fixing IntranetBiblioDefaultView syspref
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 06:42:22 -05:00
Galen Charlton
a1200e6498 bug 3222: messaging preferences for patron categories
Add the ability to set the default circulation messages preferences
for a patron category.  When the EnhancedMessagingPreferences
syspref is ON, the administrator will be able to define
default patron messaging preferences for a patron category.  When
a new patron record is created (either manually or via a patron
import), the new patron's preferences will be copied from the default
for that patron's category.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 13:20:52 -05:00
Garry Collum
7fe2fb0956 Bug 3245: advancedMARCeditor syspref not returning to cataloguing tab
The advancedMARCeditor system preference was not returning to the cataloguing tab after you changed its value in system preferences.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 15:56:10 -05:00
Galen Charlton
741af686ce bug 2770: add RenewalPeriodBase syspref for 3.2 (DB rev 032)
Reconciliation patch to add the RenewalPeriodBase system
preference, which per code by Nahuel Angelinetti changes
the process of calculating the due date after a renewal:

If RenewalPeriodBase is set to 'now', the due date is
set to the current date + the loan period.  This is the
current behavior.

If RenewalPeriodBase is set to 'date_due', the due date
is set to the due date before the renewal + the loan period.

Unless like the corresonding database update in the 3.0.x branch
(3.00.01.007), the default value of RenewalPeriodBase is set to
'now' so as not to unexpectedly change the calculation.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 15:36:37 -05:00
Colin Campbell
e60fbf4c30 (bug #3197) Subfield code box was not present on new subfield tab in Admin/Authority
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 07:10:19 -05:00
Joe Atzberger
970fcce040 Remove duplicate assignments for $template->param(script_name)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-07 16:26:55 -05:00
Garry Collum
8c850ff3fe minPasswordLength not returning user back to systempreferences.pl?tab=Patrons. Incorrect reference MinPasswordLength fixed. Could not find bug report.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-29 07:47:37 -05:00
Galen Charlton
46037ac61a bug 2893: tweaks to AllowNotForLoanOverride (DB rev 030)
* moved to DB rev 030
* assigned AllowNotForLoanOverride to circulation syspref category
* added a hint to the circulation operator: when the
  AllowNotForLoanOverride is ON, if the operator attempts
  to check out an item that is normally not for loan due to
  its item type or because the item is explicitly marked as
  not-for-loan, the operator is given the chance to check
  out the item anyway.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 14:44:09 -05:00
f6aeeeb3c0 Bug 2920 Display AmazonReviews syspref in the enhanced content category
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 09:46:33 -05:00
Michael Hafen
454dd9376b New feature Number of Returned Items to Show
This adds a system preference controlled feature.  This controls how
many returned items are shown on the check-in page.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 13:23:44 -05:00
Michael Hafen
7d61fd62f5 New feature ceiling Due Date.
This adds a feature and system preference: ceilingDueDate.  If this is
set to a valid ( according to dateformat syspref ) date, then calculated
due dates will be less than this date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 12:49:54 -05:00
Galen Charlton
11fef5234c fixed typos in LTFL sysprefs
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 07:40:37 -05:00
Galen Charlton
0a8b0f44ba bug 3155 followup: tweak OPACAmazonReviews syspref
* add to enhanced content tab of syspref editor
* during upgrade, if database has OPACAmazonEnabled
  turned on, ensure that OPACAmazonReviews is on
  as well.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 06:08:22 -05:00
Christopher Hyde
1d4892cf1c Changes Added to existing LTFL code to give option of placing LTFL content in Tabs on OPAC details page
modified:   admin/systempreferences.pl
	modified:   installer/data/mysql/en/mandatory/sysprefs.sql
	modified:   koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
	modified:   opac/opac-detail.pl

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-23 15:34:56 -05:00
John Beppu
286c3c3a9e bug 1546 - replacing REPLACE statements
replaced REPLACE statements with a pair of INSERT and UPDATE statements.
Hopefully, these are the last ones.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-23 15:00:02 -05:00