koha.git
10 years agoBug 10490: Overdue fines cap can't store decimal values
Katrin Fischer [Mon, 1 Jul 2013 19:58:57 +0000 (21:58 +0200)]
Bug 10490: Overdue fines cap can't store decimal values

When overduefinescap was added to the issuingrules the datatype
given was decimal. This translates in MySQL to decimal(10,0).
This doesn't allow you to store decimal values and therefore
values like 4.5 are saved as 5 in the database.

To test:

On a current installation:
1) Try to enter 4.5 as Overdue fines cap. Verify that the value
   is not correctly saved.
2) Apply patch and run database update.
3) Try adding/changing an issuing rule setting Overdue fines cap
   to 4.5 again.
4) Verify the value is saved correctly.

Create a new Koha installation from scratch:
1) Verify that the issuingrules table has been created correctly
   and that you can add/mofidy issuingrules correctly.

Because this bug can create data loss, the old database update
has also been changed to avoid this problem for people updating
at a later point in time. Checkout an older version of Koha
pre 3.09.00.027.

1) Run the database updates.
2) Verify again, that adding/modifying issuingrules works correctly.

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>
10 years agoBug 10422 - Remove references to unused and non-existent wizard.css
Owen Leonard [Tue, 2 Jul 2013 13:59:21 +0000 (09:59 -0400)]
Bug 10422 - Remove references to unused and non-existent wizard.css

doc-head-close.inc contains a reference to "wizard.css" which doesn't
exist. The option to include it never evaluates as true, and that
section can be removed from the template.

To test, apply the patch and view any page in the staff client.
Everything should be styled as before. A search of the Koha source
should return no references to "wizard.css" or a "wizard" variable.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
No occurrence of "wizard" in pl/pm files.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10560: add regression test
Galen Charlton [Fri, 12 Jul 2013 14:57:11 +0000 (14:57 +0000)]
Bug 10560: add regression test

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10560: make it possible for default interface language to not be English
Robin Sheat [Fri, 30 Nov 2012 02:48:50 +0000 (15:48 +1300)]
Bug 10560: make it possible for default interface language to not be English

If you enable another translation, and disable English, then if you dont
have a cookie set, or your browser is not set to that language, you will
get English. So you can not disable English in either the staff client
or the OPAC.

This patch fixes the language selection to do the right thing.

To test you must have at least one other language installed besides
English. Apply the patch and disable the en translation. Koha should
fall back to one of the enabled translations.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I added a patch description and test plan, missing from the
original patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I have tested with various combinations of activated languages
and have found no regression. If the cookie is set, the right
language is shown accordingly. Else the first language in the
list seems to be picked. It did never fall back to English
in my tests, when English was explicitly deactivated.

Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10535: by default sort funds by name
Fridolyn SOMERS [Wed, 3 Jul 2013 12:24:23 +0000 (14:24 +0200)]
Bug 10535: by default sort funds by name

In parcels.pl, and other acquisition pages, the funds are not sorted
by name in combo-box.  With a great number of funds, it is difficult
to find one.

This patch adds a default value to $orderby arg of C4::Budgets::GetBudgets.

Test plan :
- Create a new fund with a name beginning with 'z' and set you as owner.
- Create a new fund with a name beginning with 'a' and set you as owner.
- Go to a vendor and click "Receive shipments"
- Look at fund combobox
=> Funds are sorted by name

Signed-off-by: Silvia Simonetti <s.simonetti@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
When testing make sure your funds would sort the other way
around when sorting by code instead of description.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6898: fix DB update that assigns the circulate/overdues_report permission
Fridolyn SOMERS [Wed, 5 Jun 2013 12:16:14 +0000 (14:16 +0200)]
Bug 6898: fix DB update that assigns the circulate/overdues_report permission

This patch fixes a bug that prevented the circulate/overdues_report
permission from being assigned to staff users during upgrade.  This
patch will not affect databases that are already running 3.12.x
or later.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This will only fix the permissions for updates done
after the patch has been applied. But I agree with
Fridolyn, that we can not safely update permissions for
existing installations.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 10548: fix count of missing required dependencies by koha_perl_deps.pl
Mark Tompsett [Sat, 6 Jul 2013 19:50:54 +0000 (15:50 -0400)]
bug 10548: fix count of missing required dependencies by koha_perl_deps.pl

To test:

[1] ./koha_perl_deps.pl -m -u

If you have nothing missing, uninstall an optional component.

[2] ./koha_perl_deps.pl -m -u

You should get a number missing of at least 1.

[3] ./koha_perl_deps.pl -m -u -r

You should get the same number, even though the output is less.

[4] Apply patch

[5] ./koha_perl_deps.pl -m -u

Same results as in step 2.

[6] ./koha_perl_deps.pl -m -u -r

The number should differ from the results in step 3.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 10356: improve display of serial issue dates in staff bib details page
Chris Hall [Fri, 22 Mar 2013 02:33:50 +0000 (15:33 +1300)]
bug 10356: improve display of serial issue dates in staff bib details page

This patch adds the date published to the subscriptions tab in the staff
interface bib display and renames the former "Date" column to
"Date arrived".

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10496 - CCSR theme OPAC tabs to not show correct active state
Owen Leonard [Fri, 28 Jun 2013 18:11:48 +0000 (14:11 -0400)]
Bug 10496 - CCSR theme OPAC tabs to not show correct active state

When jQueryUI was updated in the CCSR theme the corresponding CSS
changes were not copied over at the same time, causing style problems
with jQueryUI widgets. This patch makes the necessary changes.

To test, apply the patch, clear your browser cache, and view any page
which uses jQueryUI tabs (advanced search, bibliographic detail page).
Tabs should look correct and correctly show which tab is active.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
CSS changes only.
Confirmed problem in CCSR OPAC templates.
Tested advanced search and detail pages in CCSR and prog.
In order to fully test advanced search I added location and
collection to AdvancedSearchTypes.
Also tested the branch tooltip as I spotted some CSS added for that.

Works beautifully, no problems found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7143: Updating history and about page
Chris Cormack [Sun, 7 Jul 2013 08:38:55 +0000 (20:38 +1200)]
Bug 7143: Updating history and about page

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5766 - Add configuration for excluding articles from DataTables sorting
Owen Leonard [Fri, 26 Apr 2013 20:18:05 +0000 (16:18 -0400)]
Bug 5766 - Add configuration for excluding articles from DataTables sorting

Client-side table sorting should exclude articles like "a," "an," and
"the" when sorting by title. This patch adds a custom sorting plugin for
use by DataTables and a configuration line to the DataTables string
configuration file which can be translated for any language.

As an example, this patch modifies the patron checkout history template
to use the new sort on the title column.

To test, apply the patch and clear your browser cache to ensure the
revised JavaScript file is loaded. Sort the table by title. Titles
should be sorted regardless of the presences of "a," "an", or "the" at
the beginning of the title.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and is a good improvement.
I have added German articles to the list for testing purposes
and it worked nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10448: can now change framework after duplicating bib record
David Cook [Wed, 12 Jun 2013 01:24:09 +0000 (11:24 +1000)]
Bug 10448: can now change framework after duplicating bib record

Changing the framework in the MARC editor immediately after duplicating
a bib record no longer clears the fields.

This patch changes the Changefwk Javascript function so that it passes
the "op" value and the "biblionumberdata" (as the biblionumber) from
addbiblio.pl back to itself, when submitting the form in order to
change the framework.

The reason we need to do this is because the form in addbiblio.tt
is hard-coded to always submit an "op" value of "addbiblio". Currently,
we need to have it hard-coded to "addbiblio", because all the magic
happens in addbiblio.pl when there is an "op" of "addbiblio". If we
always passed the "actual" "op" value, such as "duplicate", nothing
would ever happen when we clicked "save". It seems to me that this
is a flaw in the design of addbiblio.pl.

If we pass the "op" and "biblionumber" when changing frameworks, we're
able to tell addbiblio.pl that we're still wanting to "duplicate" this
"X" biblionumber. However, by having the form still hard-coded to
"addbiblio", when we hit save, the form will do the magic, check if
it's a duplicate, and save the record (or prompt for action if it
is a duplicate).

--

I also noticed that if you make changes to a record, then change
the framework before saving, your changes get cleared (since the
original record from the database is loaded when the page reloads).
It seems to me that this is a bug. Changing the framework should
change the layout while preserving the content. I think most users
would assume that when changing the framework.

This patch also introduces another hidden input into addbiblio.tt and
the Changefwk Javascript called "changed_framework". Basically, if
the Changefwk Javascript is run, it tells addbiblio.pl that the
framework is changed, and it uses the posted data from the form
(which we have been modifying) instead of reloading the record from
the database.

--

Test Plan:

A) Before Applying Patch:

To Show That Changing the Framework Erases All Fields When
Duplicating a Record:

1) Go to any bib record
2) Go to Edit > Edit as new (duplicate). You should see filled
in fields.
3) Change the framework to any other framework than the one
that is currently specified.
4) Note that every single field is now blank

To Show That Changing the Record then Changing the Framework
Ignores Changes, When Editing a Record

5) Go to any bib record
6) Go to Edit.
7) Change the title of the record to "I've changed the title".
8) Change the framework to any other framework than the one that is currently specified.
9) Look at the title. You'll notice it is the original title, and NOT "I've changed the title".

B) Apply the Patch

Also, clear your memcache and shift+refresh your screen. You don't want to use cached templates/javascript.

C) After Applying the Patch

Repeat Steps 1-3 and 5-8.

You should now notice that changing the framework when duplicating the item does not clear all the fields.

You should also notice that any changes you make prior to changing the framework will still exist after changing it.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 4907: make 'Organize by' filter in suggestions reflect selected option
Katrin Fischer [Mon, 1 Jul 2013 21:44:39 +0000 (23:44 +0200)]
Bug 4907: make 'Organize by' filter in suggestions reflect selected option

When using the 'Organize by' option to change the display of the
suggestions, the option is applied, but the pull down always jumps
back to the first entry 'Status'.

This patch fixes that.

To test:
- Try out all settings and verify that after the page reloads the selected
  option is applied to your suggestions and the pull down shows
  the option you selected.

Note: Until bug 10519 is properly fixed the tabs will not show
the correct descriptions, but the URL will show you the selected
option as parameter: displayby=acceptedby

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10522: fix Javascript error on acquisition pages: YAHOO is not defined
Owen Leonard [Fri, 28 Jun 2013 18:46:44 +0000 (14:46 -0400)]
Bug 10522: fix Javascript error on acquisition pages: YAHOO is not defined

acq.js includes an immediately invoked function expression, which means
that it runs whether or not it is called. Because this function tries to
reference the YAHOO object, it triggers an error on pages which don't
include the main YAHOO assets. Only the basketgroups page uses this
function and YAHOO assets.

It's probably possible to make this a regular function, but I propose
simply wrapping it in a check for the YAHOO object so that it only
executes on pages where YAHOO exists--the basketgroups page.

To test, apply the patch, clear your browser cache, and test on both the
basketgroups page and at least one page which also includes acq.js
(addorderiso2709.pl, neworderempty.pl, aqbudgets.pl, suggestion.pl,
etc.) and confirm that the browser reports no JavaScript errors.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5858: Followup for INSERT IGNOREs in marc21_framework_DEFAULT.sql
Marcel de Rooy [Sun, 7 Jul 2013 12:40:19 +0000 (14:40 +0200)]
Bug 5858: Followup for INSERT IGNOREs in marc21_framework_DEFAULT.sql

Changes 8 INSERTs into INSERT IGNOREs.
This allows current installs to benefit easier from the new tags/subfields.
Note that running with --force will not achieve the same! The multi-value
inserts will still be aborted, though execution continues.

Test plan:
Run the file or do a new install.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Ran the file on a current install manually.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5858: update default MARC21 framework to April 2013 revision
Bernardo Gonzalez Kriegel [Wed, 20 Mar 2013 00:25:20 +0000 (21:25 -0300)]
Bug 5858: update default MARC21 framework to April 2013 revision

Applies to new installs, although with the follow-up
patch, users can run the installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
script through the mysql client to add new tag and
subfield entries.

To test:
1) Delete MARC21 default framework
2) Apply patch
3) Test that new default framework loads without problem

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Run this file with and without this patch.
This patch adds 24 tags (338 vs 314) and 323 subfields (3951 vs 3628).
Verified that last QA comments were incorporated.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10289: (follow-up) don't set cardnumber for test patron
Galen Charlton [Mon, 8 Jul 2013 14:29:32 +0000 (14:29 +0000)]
Bug 10289: (follow-up) don't set cardnumber for test patron

Since the patron barcode is nullable, and since the tests using
the test patron don't care what the barcode is, don't set it.  This
avoids the tests failing if the test database happens to already
have a patron record with the hard-coded barcode that used
to be supplied.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10289: (follow-up) wrap tests in transaction
Galen Charlton [Mon, 8 Jul 2013 14:27:14 +0000 (14:27 +0000)]
Bug 10289: (follow-up) wrap tests in transaction

Applying new standard method for handling tear-down
of test data.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10289: UT: Reserves.t needs to create its own data
Jonathan Druart [Mon, 20 May 2013 14:37:10 +0000 (16:37 +0200)]
Bug 10289: UT: Reserves.t needs to create its own data

Try before the patch:
prove t/db_dependent/Reserves.t

And after, it should produce:
  t/db_dependent/Reserves.t .. 1/4 #
  # Creating biblio instance for testing.
  # Creating item instance for testing.
  # Deleting item testing instance.
  # Deleting biblio testing instance.
  # Deleting borrower.
  t/db_dependent/Reserves.t .. ok
  All tests successful.
  Files=1, Tests=4,  1 wallclock secs ( 0.02 usr  0.01 sys +  0.39 cusr  0.02 csys =  0.44 CPU)
  Result: PASS

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9519: DBRev 3.13.00.011
Galen Charlton [Mon, 8 Jul 2013 14:03:37 +0000 (14:03 +0000)]
Bug 9519: DBRev 3.13.00.011

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9519: fix code for Italian language search limiter
Sonia LEMAIRE [Wed, 3 Jul 2013 13:53:49 +0000 (15:53 +0200)]
Bug 9519: fix code for Italian language search limiter

'ind' rather than 'ita' was set as the ISO639-2 language
code for Italian in the fr-FR, it-IT, pl-PL, ru-RU, and uk-UA
installation SQL.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I checked nb-NO and de-DE - language code there had already
been corrected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10125: Babeltheque does not depend on OpacStarRatings.
Jonathan Druart [Mon, 8 Jul 2013 08:18:49 +0000 (10:18 +0200)]
Bug 10125: Babeltheque does not depend on OpacStarRatings.

We have to load star ratings js and css file if Babeltheque is enabled
and OpacStarRatings is disabled.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10125: Babeltheque star image must use sprite
Owen Leonard [Wed, 3 Jul 2013 18:34:31 +0000 (14:34 -0400)]
Bug 10125: Babeltheque star image must use sprite

When I removed images from the OPAC in favor of sprites I didn't take
into account the display of star ratings from Babeltheque. This patch
copies the star ratings display from Koha's own ratings display,
though it is not dependent on JavaScript.

I'm sure testing would be easy for someone with access to the
Babeltheque service, but I do not. I temporarily modified the template
to set some variables for testing purposes:

    [% SET SEARCH_RESULT.score_int = 3 %]
    [% SET SEARCH_RESULT.score_avg = 3 %
    [% SET SEARCH_RESULT.num_scores = 87 %]

This enabled the display of the ratings, allowing me to confirm that
stars display correctly. Ratings should work with and without
OpacStarRatings enabled.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
I also fudged the template to test, so QA would need to be done with
someone with Babeltheque access

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10366: DBRev 3.13.00.010 - add AcqWarnOnDuplicateInvoice syspref
Galen Charlton [Sat, 6 Jul 2013 17:14:00 +0000 (17:14 +0000)]
Bug 10366: DBRev 3.13.00.010 - add AcqWarnOnDuplicateInvoice syspref

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10366: Alert librarian if an invoice number is duplicated
Jared Camins-Esakov [Wed, 29 May 2013 03:03:59 +0000 (23:03 -0400)]
Bug 10366: Alert librarian if an invoice number is duplicated

Some vendors ship materials from the same invoice in multiple packages.
In those cases, it would be good to notify the librarian when they enter
a duplicate invoice number, so that they can continue receiving on the
previously-created invoice, rather than creating an invoice with a
duplicate number.

To test:
1) Apply patch and run database update.
2) Make sure that you have created at least one invoice on
   acqui/parcels.pl and take note of the invoice number.
3) Try to create an invoice with the same invoice number.
4) Note that without changing your configuration this works exactly
   the same as before.
5) Turn on the AcqWarnOnDuplicateInvoice system preference.
6) Try to create a new invoice with the same number as the one you
   noted earlier.
7) Make sure you get a warning about a duplicate invoice.
8) Choose to receive on the existing invoice.
9) Confirm that you are receiving on said existing invoice.
10) Start the receiving process over, and this time choose "Create new
    invoice anyway."
11) Confirm that you are now receiving on a new invoice.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

I have followed the test plan, but also checked some more things:
- Checking the duplicate check works when you have the entered
  invoice number in your database multiple times already.
- Checking that no duplicate message is shown if you enter the
  invoice number and it's already been used for an invoice from
  another vendor.

Looks all good. I think the only thing we could argue about here
is if this could be activated by default for new installations.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10390: (follow-up) correct description of a test
Galen Charlton [Fri, 5 Jul 2013 17:01:28 +0000 (17:01 +0000)]
Bug 10390: (follow-up) correct description of a test

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10390: Add ability to delete empty invoices
Jared Camins-Esakov [Sun, 2 Jun 2013 11:50:43 +0000 (07:50 -0400)]
Bug 10390: Add ability to delete empty invoices

There is currently no way to delete unused invoices (for example,
invoices created by mistake), and there really should be, since errors
and absent-mindedness can result in numerous empty invoices over the
course of years.

To test:
1) Apply patch.
2) Create three invoices in the Acquisitions module. For one of them,
   receive at least one item. For the other two, do not receive any
   items.
3) View one of the invoices that does not have any items on it.
4) Try to delete it. This should succeed.
5) View the invoice that has an item. There should not be any option
   to delete it.
6) Do an invoice search that brings up the other invoice with no items
   on it. Try to delete it from the results page. This should succeed.
7) Run the unit test:
   > prove t/Acquisition/Invoice.t
8) Sign off.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass. I also did another test:

I cancelled all receipts from an existing invoice and then could
successfully delete it in the last step.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10317: improve display when order receiving page is given an invalid invoiceid
Jonathan Druart [Thu, 23 May 2013 14:42:38 +0000 (16:42 +0200)]
Bug 10317: improve display when order receiving page is given an invalid invoiceid

This patch fixes some things on the order receiving/parcel page.

1/ Removes dead code
2/ Displays an error message if invoiceid is unset or does not refer to an
invoice
3/ Fixes a bug in the note ("change note" and "add note" links)

Test plan:
1/ Try to call the invoice page with an existing invoiceid and check
that order results are consistent.
2/ Try without invoiceid or a bad invoiceid and check that an error
message is displayed.
3/ Add and change notes.

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely for all tests done.
- parcel.pl with invalid invoicenumber gives a nice error message
- parcel.pl with a valid invoicenumber looks normal
- changing and editing order notes works well

Passes QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10384: fall back to normal authentication if LDAP server is not available
Fridolyn SOMERS [Fri, 31 May 2013 08:17:08 +0000 (10:17 +0200)]
Bug 10384: fall back to normal authentication if LDAP server is not available

This fixes a bug where, assuming LDAP authentication is enabled, if a user
tries to log in while the LDAP server is down, the following fatal error
is displayed:

Can't call method "bind" on an undefined value at C4/Auth_with_ldap.pm line 134, <DATA> line 558.

This patch catches this error to allow normal authentication when LDAP connexion fails.

Test plan :
- Configure LDAP connexion with a host not having LDAP. ie :
 <useldapserver>1</useldapserver>
 <ldapserver id="ldapserver">
    <hostname>localhost</hostname>
    <base>dc=test,dc=com</base>
    <user>cn=Manager,dc=test,dc=com</user>
    <pass>passwd</pass>
    <replicate>0</replicate>
    <update>0</update>
    <auth_by_bind>0</auth_by_bind>
    <mapping>
      <firstname    is="givenname"      ></firstname>
      <surname      is="sn"             ></surname>
      <branchcode   is="branch"         >MAIN</branchcode>
      <userid       is="uid"            ></userid>
      <password     is="userpassword"   ></password>
      <email        is="mail"           ></email>
      <categorycode is="employeetype"   >PT</categorycode>
    </mapping>
 </ldapserver>
- Try to connect with mysql user (defined in koha-conf.xml)
- Try to connect with a user defined in borrowers
You may try to connect with working LDAP connexion

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9533: batch item modification form now shows default field values only by request
Kyle M Hall [Wed, 17 Apr 2013 13:33:55 +0000 (09:33 -0400)]
Bug 9533: batch item modification form now shows default field values only by request

This patch makes the pre-population of the fields for the batch
item editor with the default values from the default framework
optional and off by default.

Test Plan:
1) Apply patch
2) Add default values for cost and replacement cost to the
   default framework.
3) Browse to Tools / Batch item modification
4) Choose a file, or entire some barcodes in the text area
5) Ensure that the 'Populate fields with default values from default
   framework' is *not* checked
6) Click 'Continue'
7) Observe that the fields for cost and replacement cost are blank
8) Click the 'back' button on your browser
9) Check the checkbox to enable the default value
10) Click 'Continue'
11) Observe that the fields for cost and replacement cost now contain
    the default values you assigned them in the default MARC framework

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Switch works correctly, all tests and QA script pass.

Note: there is a bug with default values for all non text input
fields. Default values won't be applied for those fields as the
pull downs are not preselected correctly with the default values
defined in the framework.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9113: fix handling of certain characters by item batch modification tool
Fridolyn SOMERS [Wed, 26 Jun 2013 15:52:40 +0000 (17:52 +0200)]
Bug 9113: fix handling of certain characters by item batch modification tool

If you're using the batch modification tool and entering a call number
like "E+ 123 ABC", the tool removes the + and puts a space in its place,
e.g., "E  123 ABC"

This is because the form is posted via Ajax by background-job-progressbar.js.
Values are URI-encoded using escape(), but this method does not escape some
characters: * @ - _ + . /

Also, "+" is considered as a space in a URI.

This patch replaces escape() by encodeURIComponent() which encodes every character.

Test plan :
Perform an items batch modification by setting '* @ - _ + . /' in a field
(notes for example) and see that all characters are saved correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5894: Display all titles when confirming copy of items from cart to list
Marc Veron [Fri, 14 Jun 2013 14:37:23 +0000 (16:37 +0200)]
Bug 5894: Display all titles when confirming copy of items from cart to list

Adds missing code that splits biblios before calling template.

To test:
- Add some items to cart
- Open cart, select some or all items
- Add to list; with patch, following window shold show something
  like "Add 3 items to a list:", followed by list of items

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10474: Translate some English strings in German sample notices
Katrin Fischer [Sun, 16 Jun 2013 07:09:33 +0000 (09:09 +0200)]
Bug 10474: Translate some English strings in German sample notices

This translates 2 strings missed doing the initial translation in
ISSUESLIP.

To test:
- Run the web installer in German.
Altnernatively:
- Truncate your letters table and run the SQL against the database.

Check that the notices were added correctly, especially ISSUESLIP.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10431 - Redundant mappings removed
Tomas Cohen Arazi [Mon, 24 Jun 2013 17:40:36 +0000 (14:40 -0300)]
Bug 10431 - Redundant mappings removed

There were 5 redundant mappings left in the file. They are removed.
Its almost a QA followup as everything went fine anyway.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10431 - Spanish Zebra character sorting file
Tomas Cohen Arazi [Tue, 11 Jun 2013 13:46:36 +0000 (10:46 -0300)]
Bug 10431 - Spanish Zebra character sorting file

This patch provides a definition file for Spanish (es) character
sorting in Zebra. It is based on the ideas from Hugo Agud <hagud@orex.es>
and Pablo Bianchi <pablo.bianchi@gmail.com>.

Makefile.PL is fixed to notice the existence of the 'es' language. The
docs for koha-create are touched too.

To test:
Tarball
=======
- Go through the install process, choosing 'es' for the Zebra's language step
- Koha should work as usual.
- Running this should show the lang definition is properly set.
$ grep -R "lang_defs/es" /etc/koha/*
(stuff like zebradb/zebra-biblios-dom.cfg:profilePath:...etc/koha/zebra/lang_defs/es... should show)
- This file should be present:
 /etc/koha/zebradb/lang_defs/es/sort-string-utf.chr

Packages
========
- Build your own package, it shouldn't break the packaging
- Try the new package, using koha-create to set an instance using --lang 'es'

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10346 - "Add multiple copies" should be labelled "Add multiple items"
Owen Leonard [Wed, 5 Jun 2013 18:03:51 +0000 (14:03 -0400)]
Bug 10346 - "Add multiple copies" should be labelled "Add multiple items"

The Koha interface standardizes on the term "item" instead of "copy," so
the "Add multiple copies" button would be more correctly labeled "Add
multiple items."

To test, view the add item screen for an existing or new record. You
should see a button labeled "Add multiple items."

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10428: undefined check in add additem.pl
Fridolyn SOMERS [Fri, 7 Jun 2013 08:17:54 +0000 (10:17 +0200)]
Bug 10428: undefined check in add additem.pl

In additem.pl, in the code that generates item form you find:

@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)->subfield($subtag)));

This patch adds the check of $itemrecord->field($tag) undef.
I did not found a way to test it because item tag is always defined
when editing an item, but it would be safer/prettier to add this check.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passed-QA-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10488: Followup replacing DELETEs by more restricted INSERTs
Marcel de Rooy [Mon, 1 Jul 2013 11:37:39 +0000 (13:37 +0200)]
Bug 10488: Followup replacing DELETEs by more restricted INSERTs

Instead of inserting followed by deleting, this patch combines the two where
clauses of both sql statements, meanwhile leaving the separation intact.

As suggested by Galen, removed all 162's from the non-default types.
The 162 calls for a new authority type. We can add that later on.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Ran this .sql script after deleting all auth records.
The former version had 9 types, 1148 tags and 11621 subfields.
This one has 9 types, 1140 tags and 11597 subfields.
That is expected: 8 tags 162 less and 8x3 subfields less.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10488 - New MARC21 authority tags and subfields should be propagated to non-defau...
Bernardo Gonzalez Kriegel [Thu, 27 Jun 2013 01:27:14 +0000 (22:27 -0300)]
Bug 10488 - New MARC21 authority tags and subfields should be propagated to non-default frameworks

As proposed by the report creator, this patch
rewites authorities_normal_marc21.sql
using default authority framework to build all
current authtypes, then deleting irrelevant tags.

It also updates default authority framework
to last update (April 2013) adding new or
updated tags/subtags.

All new tags/subtags from Bug 9826 and this
one are included in all authtypes.

Deleted tags reflect current situation except
for 7XX tags thatl must be present for all authtypes.

Only for new installs

To test:
1) Apply patch
2) Delete all authtypes
exec in database
    delete from auth_types;
    delete from auth_tag_structure;
    delete from auth_subfield_structure;
3) Insert new auth framework
4) Verify absent tags. This can be done running

    select tagfield as from auth_tag_structure
    where authtypecode ='' and tagfield not in
    (select tagfield from auth_tag_structure
    where authtypecode = 'AUTH_TYPE')

for each authtype ( UNIF_TITLE, TOPIC_TERM, etc.)
The attached PDF could be used as a reference,
all that is white or green for each authtype must be
in the list (except for white 7XX tags)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9987: remove reference to biblioitemnumber from test case
Galen Charlton [Wed, 3 Jul 2013 05:03:07 +0000 (22:03 -0700)]
Bug 9987: remove reference to biblioitemnumber from test case

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9987: DBRev 3.13.00.009 - remove acqorders.biblioitemnumber
Galen Charlton [Wed, 3 Jul 2013 01:46:27 +0000 (18:46 -0700)]
Bug 9987: DBRev 3.13.00.009 - remove acqorders.biblioitemnumber

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9987: Remove DB field aqorders.biblioitemnunmber
Jonathan Druart [Thu, 4 Apr 2013 10:04:46 +0000 (12:04 +0200)]
Bug 9987: Remove DB field aqorders.biblioitemnunmber

The DB field aqorders.biblioitemnumber seems to be unused except to get
the itype on the spent.pl page.

This information can be retrieved uising another SQL join.

Test plan:
Try a complete workflow in the acquisition module: create an order,
receive it, play with the syspref AcqCreateItem.
Check that no regression is found and that the data for existing
orders don't change.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10029 - CAS authentication fails in OPAC reserve
Fridolyn SOMERS [Thu, 11 Apr 2013 14:46:23 +0000 (16:46 +0200)]
Bug 10029 - CAS authentication fails in OPAC reserve

If OPAC reserve page is accessed without being logged-in, login form is displayed as well as a CAS authentication link (if enabled). A click on this link will lead to CAS server but one comming back to Koha, page shows an error : "ERROR: No biblionumber received".
This is because CAS link only contains the query path "/cgi-bin/koha/opac-reserve.pl", not the query parameters.

This patch adds query parameters to URI sent to CAS.

Test plan :
- Enable CAS
- Go to opac without been logged-in
- Try to place hold on a record
=> You get to /cgi-bin/koha/opac-reserve.pl?biblionumber=XXX showing authentication page
=> Check that CAS link contains query param "biblionumber"
- Click on CAS link and log in
=> Check you return well logged-in to reserve page with biblionumber param

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I have followed the test plan as far as I could and the links
contain the biblionumber now, which they didn't before.
I couldn't check the CAS login, but my normal login worked
as expected.
All tests and the QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 9998: (follow-up) use Modern::Perl as per coding guidelines
Galen Charlton [Tue, 2 Jul 2013 14:09:22 +0000 (07:09 -0700)]
bug 9998: (follow-up) use Modern::Perl as per coding guidelines

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9998: new tool to import/export and compare system preferences
Marcel de Rooy [Wed, 8 May 2013 14:29:23 +0000 (16:29 +0200)]
Bug 9998: new tool to import/export and compare system preferences

This patch adds a new maintenance script: cmp_sysprefs.pl

Test plan:
1 Run with -cmd backup -file zz01. Check that file.
  Run with -cmd test -file zz01. Check zz01.sav.
2 Run with -cmd compare -file zz01. No differences expected.
3 Edit zz01: delete two prefs, change two prefs and add two new prefs.
4 Run with -cmd compare -file zz01. Are all six changes reported?
5 Add local use preference zz02 in the staff client (no explanation, options).
6 Run with -cmd backup -file zz02.
7 Delete local use pref zz02 from the staff client.
8 Run with -cmd restore -file zz02. Check if local pref zz02 came back.
9 Delete local use pref zz02 again from the staff client.
10 Run with -cmd compare -file zz02 -add. Check if local pref zz02 came back.
11 Change the value of zz02 in the staff client.
12 Run with -cmd compare -file zz02 -add. Check the value: not updated?
13 Run with -cmd compare -file zz02 -upd. Check the value: updated now?
14 Edit file zz02. Add a comment line and delete the line for pref zz02.
15 Run with -cmd compare -file zz02 -del. Is pref zz02 deleted?
16 Add local use preference zz02 in the staff client (WITH explanation).
17 Run with -cmd compare -file zz02 -del. pref zz02 should not be deleted.
18 Run with -cmd compare -file zz02 -del -ign-opt. zz02 should be deleted now.

Do the next steps only on a restorable test db:
19 Create file zz03. Leave it empty.
   Compare with: -cmd compare -file zz03 -del -ign-opt.
   All prefs gone except Version?
20 Restore with: -cmd restore -file zz01.sav.
   Compare with -cmd compare -file zz01.sav. Nothing reported?
   Note: The explanation or options are not recovered. (See also BZ 10199.)
   This affects local use preferences only.
   If you need them, restore your test db. Remove the zz files.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Amended patch
Only cosmetic stuff:
Perltidied with xt/perltidyrc.
Replaced most double quotes by single quotes around SQL statements.
Moved the usage into POD for pod2usage.
Passing no file shows help screen too.
Counting the db updates more accurately with return value of do.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10510 - OPAC's renew selected link has glitchy icon
Owen Leonard [Wed, 26 Jun 2013 16:54:15 +0000 (12:54 -0400)]
Bug 10510 - OPAC's renew selected link has glitchy icon

The "renew selected" link on the list of a user's checkouts looks bad
because the next icon in the sprite shows through. This patch modifies
the sprite to give it proper spacing and corrects the CSS to accommodate
the change.

To test, apply the patch, clear your browser cache, and view the
following pages to confirm that the change works:

- With TagsEnabled and TagsInputOnList enabled, view a search results
  page when logged in and when not logged in. Tag links should be
  styled correctly.

- With OpacBrowseResults enabled, open the detail page for any record
  and click the "browse shelf" link. The "forward" and "back" arrows
  should be styled correctly.

- With OpacRenewalAllowed enabled, log in to the OPAC and view your
  checked out items. The "renew selected" and "renew all" links should
  look correct.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Note: this will fix only the prog theme, but not the ccsr theme.
And it works perfectly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10524 - dependency updates
Robin Sheat [Mon, 1 Jul 2013 15:06:09 +0000 (03:06 +1200)]
Bug 10524 - dependency updates

Include liblibrary-callnumber-lc-perl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10497 - star ratings not showing right in ccsr detail
Owen Leonard [Fri, 28 Jun 2013 18:21:03 +0000 (14:21 -0400)]
Bug 10497 - star ratings not showing right in ccsr detail

Star ratings do not appear correctly in the CCSR theme because it lacks
the image sprite used to display them. This patch adds the required
file.

To test, apply the patch and view a search results set which includes
titles which have an existing rating. Ratings should appear correctly.

View a detail page for an title which has a rating, and add a rating to
a title which has no rating. Ratings should look correct and work
correctly.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests pass - including leaving a rating on the newly visible stars

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
In order to test this, make sure you have set OpacStarRatings set
to 'results and details'.

The star images show up in OPAC results with the correct amount
of stars after applying the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6553 - Parentheses in Corporate author break tracings
Liz Rea [Thu, 9 May 2013 21:32:17 +0000 (09:32 +1200)]
Bug 6553 - Parentheses in Corporate author break tracings

To test:

If an author's name includes parentheses or other escape-characters, the tracing links
produced in the OPAC fail in XSLT mode.  This patch wraps the author names
in double-quotes, providing the necessary escapement.

Test plan:
- Create a new framework, delete Thesaurus from 100 and other fields
- Create a new record in this framework (or change an existing record to this framework)
- Add 100$a - use parentheses
- Check the search links in OPAC detail pages

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
XSLT change adding quotes. Search now matches search in the intranet.
Passes all tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10484: serials-edit.pl not checking for barcode field before checking for barcode...
Kyle M Hall [Mon, 17 Jun 2013 16:28:13 +0000 (12:28 -0400)]
Bug 10484: serials-edit.pl not checking for barcode field before checking for barcode subfield

The script serials-edit.pl is not checking for the existence of the
barcode field before checking for barcode subfield for autoBarcode =
incremental. If the barcode field doesn't exist, the script dies with
errors.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Checked that adding items on serial receive still works.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10494: remove spurious warnings from the KohaBranchName plugin
Galen Charlton [Wed, 19 Jun 2013 15:52:56 +0000 (08:52 -0700)]
Bug 10494: remove spurious warnings from the KohaBranchName plugin

The KohaBranchName plugin now returns an empty string if
given a NULL (undefined) library code or a library code that
is not present in the database (e.g., the '__ANY__' placeholder
that purchase suggestions can use).

To test:

[1] Create a purchase suggestion, setting the library
    to 'Any'.  Create a second one setting the library to
    a specific one.
[2] Go to the suggestions overview page in the staff interface.
    When you do so, the Apache logs should contain a warning
    that looks like this:

[Wed Jun 19 07:13:06 2013] [error] [client 192.168.1.10] [Wed Jun 19 07:13:06 2013] suggestion.pl: Use of uninitialized value in concatenation (.) or string at /home/koha/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt line 487., referer: http://koha-staff.metaquarry/cgi-bin/koha/acqui/acqui-home.pl

[3] Apply the patch.
[4] Refresh the suggestions overview page.  This time, there should be
    no new warning logged.
[5] Verify that the library names for the two pending suggestions
    created in step 1 are displayed correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Also adds new tests!

Note: For the test plan to work you have to add the suggestion
from the intranet, as Any is not an available option in OPAC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10494: test cases for the KohaBranchName plugin
Galen Charlton [Wed, 19 Jun 2013 15:47:34 +0000 (08:47 -0700)]
Bug 10494: test cases for the KohaBranchName plugin

To test, in a test database that has the sample branches
loaded, run

prove -v t/db_dependent/Koha_template_plugin_KohaBranchName.t

Note that this includes regression tests for the issues
reported in bug 10494; these won't pass without applying
the patch that fixes them.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8884: (follow-up) rearrange placement of the top-bar div in CCSR
Galen Charlton [Fri, 14 Jun 2013 22:55:02 +0000 (15:55 -0700)]
Bug 8884: (follow-up) rearrange placement of the top-bar div in CCSR

This patch makes it easier to avoid having the top bar
overlap other OPAC page content (particularly custom
header content set via the opacheader system preference).

This is done by moving the top-nav div outside of the
main doc3 div and adjusting the CSS accordingly.  Yes,
this does end up having top-nav.inc be included from
opac-bottom.inc, but it would require touching rather
more templates to have it be included immediately after
the <body> tag.

This patch also removes a duplicate instance of the
cmspan span.

To test:

[1] Change to the CCSR OPAC theme.
[2] Before applying the patch, open a set of OPAC
    pages (e.g., main page, user page, search results, bib
    details) in your web browser.
[3] Apply the patch, and open the same OPAC pages in separate
    tabs.  Comparing the pre- and post- version of each page
    to verify that the placement
[4] Add an OpAC header using the opacheader system preference.
[5] Verify that the header is displayed without overlapping
    the top bar.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8884: opacheader is not in the header on CCSR
Jared Camins-Esakov [Mon, 20 May 2013 16:55:17 +0000 (12:55 -0400)]
Bug 8884: opacheader is not in the header on CCSR

In CCSR the opacheader preference isn't really in the header it's to the
right of the search box (see attached). I'm okay with a customizable
region over there, but we should have a new preference for that and
header should be above the search box as it implies.

To test:
1) Put something in the OpacHeader syspref. Preferably something large
   and header-like for maximum effect.
2) Select CCSR theme.
3) View OPAC. Notice placement of "header" content.
4) Apply patch.
5) View OPAC. Notice placement of "header" content.
6) Sign off.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised with one caveat; the content of
opacheader is by default underneath the div "top-bar". A couple breaks
in my OpacHeader test made it visible, so I'm going to assume this is a
styling issue and not a bug as such.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10386: improvements to VirtualShelves.t
Marcel de Rooy [Mon, 3 Jun 2013 13:27:50 +0000 (15:27 +0200)]
Bug 10386: improvements to VirtualShelves.t

Most important: Does no longer delete all shelves!
Checks if there are ten borrowers for testing. But even works without them :)
When creating or modifying lists, takes name clashes into consideration.

Small change to _CheckShelfName in VirtualShelves module. Making it possible to
check a name for a list whose owner has been set to NULL. Note that a test
like field=? with undef for placeholder will not work in MySql.

Test plan:
How do you test a test? Well, you could run it on various databases..
But for real hacking, you could also add some debug lines.
I tested this by forcing 10 undefs in @borrowernumbers.
And by overwriting the return value of randomname with an existing name.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7368: Followup for columns names in userflags.sql
Marcel de Rooy [Mon, 24 Jun 2013 10:33:58 +0000 (12:33 +0200)]
Bug 7368: Followup for columns names in userflags.sql

An insert statement should contain the column names to avoid confusion and
future problems with table definition changes.

This patch updates the English userflags.sql.

Will send updates for the other languages in connection with replacing inserts
by updates for the additional languages (where possible). For userflags this
will be possible.

Test plan:
Do an install (English).

Or -- as a dangerous(!) alternative--:
Do this ONLY on a restorable database.
Delete all records in userflags. (Note: This cascades to permissions a.o.)
Run this file from command line.
Check if you have records again in userflags. (You also messed up your Koha.)
Restore your database.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested both ways myself :)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. No errors.
Tested using second alternative

Just a note: if you update other lang files replacing INSERTs for UPDATEs
then you must install using EN and later apply lang files by hand.
If you do a translate first before webinstaller, and finish your install
in your lang, then that kind of file will fail.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
mysql> create database test;
Query OK, 1 row affected (0.00 sec)

% mysql -u koha -p test < installer/data/mysql/kohastructure.sql
% mysql -u koha -p test < installer/data/mysql/en/mandatory/userflags.sql

mysql> select count(*) from userflags;
+----------+
| count(*) |
+----------+
|       19 |
+----------+
1 row in set (0.00 sec)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10336: HoldsQueue.t needs to create its own data
Jonathan Druart [Fri, 24 May 2013 14:18:59 +0000 (16:18 +0200)]
Bug 10336: HoldsQueue.t needs to create its own data

After applying this patch and the patch submitted in bug 10495, you can
run prove t/db_dependent/HoldsQueue.t and admire that all tests pass.

This patch creates a borrower and uses Koha routines instead of directly
updating the database.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 10495: set precondition for HoldsQueue test
Galen Charlton [Wed, 19 Jun 2013 17:30:58 +0000 (10:30 -0700)]
bug 10495: set precondition for HoldsQueue test

t/db_dependent/HoldsQueue.t assumed, but did not check,
that the AutomaticItemReturns system preference was off
at the beginning of the test un.  This patch makes sure
that that assumption is met.

To test:

[1] Make sure that at least one item is on loan (this is
    another assumption that the test case makes, one
    that should be corrected with the work proposed
    for bug 10336.
[2] Turn the AutomaticItemReturn system preference on.
[3] Run the test:

prove -v t/db_dependent/HoldsQueue.t

[4] Tests 4 and 6 should fail.
[5] Apply the patch.
[6] Run the test case again; this time, all tests should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9757: Remove duplicated action buttons.
Jonathan Druart [Wed, 19 Jun 2013 09:50:00 +0000 (11:50 +0200)]
Bug 9757: Remove duplicated action buttons.

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>
10 years agoBug 9757: Make staff client list contents view more like search results
Owen Leonard [Wed, 6 Mar 2013 01:23:56 +0000 (20:23 -0500)]
Bug 9757: Make staff client list contents view more like search results

This patch revises the staff client list contents view to better match
staff client search results, showing more information and offering more
ways to interact with the contents than before.

- List contents output has been modified so that the staff client can
  use XSLT-formatted data just as the OPAC can. As in the OPAC it
  depends on XSLTResultsDisplay being enabled.
- A "toolbar" has been added which is similar to that in search results,
  offering the option to add items to a Cart, add them to a different
  list, place multiple holds, remove items from the list, or merge
  records.
- This toolbar has been made to float on scroll like the one on the
  MARC edit page.
- Library and shelving location have been added to the display of call
  numbers. Call numbers are linked to a search as they are in search
  results.
- Edit links are included just as they are in search results.
- Automatic focus on the add by barcode form has been removed so that
  the page doesn't jump to the bottom unnecessarily.
- basket.js's "addMultiple" function has been modified so that it
  receives an array of checkboxes rather than looking for checkboxes in
  a specific form. This helps abstract its functionality for use on both
  search results and lists. results.tt is modified accordingly.
- The page layout has been widened to make room for the increased amount
  of information on the page.
- A new "merge" icon has been added to the default Bootstrap sprite.

To test:

- View both public and private lists in the staff client.
- View lists with and without contents.
- Test the functionality of options in the toolbar: Add to cart, add to
  lists, place multiple holds, remove items, merge items.
- Test with users with and without cataloging privileges to confirm that
  catalog-related controls are correctly shown or hidden.
- Test with XSLTResultsDisplay set both to "default" and empty.
- Since the staff client and OPAC use some of the same code, test that
  lists in the OPAC have not broken.
- Since JavaScript was modified which affects both lists and search
  results, confirm that adding items to the Cart and Lists from search
  results hasn't been broken by this patch.

Revision corrects conditional display of hold link, hiding it in cases
where there are no items or the record's itemtype is not for loan.

Also corrected is the behavior of the Cart/List "save" button in order
to prevent it from submitting the "remove items" action which is the
default for the form.

Signed-off-by: jmbroust <jean-manuel.broust@univ-lyon2.fr>
Edit: Patch rebased against current master and hard-coded paths to
/prog/ corrected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10379 - Followup: add koha-rebuild-zebra -q to the man page
Magnus Enger [Tue, 25 Jun 2013 06:39:23 +0000 (08:39 +0200)]
Bug 10379 - Followup: add koha-rebuild-zebra -q to the man page

The first patch on this bug forgot to add the new -q option to
koha-rebuild-zebra to the man page for that command. This patch
fixes it.

To test, run something like these commands:

$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-rebuild-zebra.xml
$ man -l koha-rebuild-zebra.8
This should display the man page. (Remember to remove koha-rebuild-zebra.8
when you are done :-)

$ prove xt/verify-debian-docbook.t
All tests should pass.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10379: silence zebra rebuild cron when no instances are enabled
Robin Sheat [Thu, 30 May 2013 04:12:13 +0000 (16:12 +1200)]
Bug 10379: silence zebra rebuild cron when no instances are enabled

This adds a -q option to koha-rebuild-zebra that prevents it outputting
help if no instances are provided on the command line. This means that
if you've just installed the package, you won't get messages from cron
telling you how to use the script.

Test plan:
* install koha-common 3.12 or master onto a system with no enabled
  instances.
* note that you or the sysadmin will start getting emails every 5
  minutes.
* replace /etc/cron.d/koha-common and /usr/sbin/koha-rebuild-zebra with
  the versions from this patch.
* note that the emails stop flowing.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
"sudo koha-rebuild-zebra -q" gives no output, as expected.
Followed the test plan, all looks good.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9890: fix plugin handling by koha-create and koha-create-dirs
Tomas Cohen Arazi [Mon, 27 May 2013 15:17:15 +0000 (12:17 -0300)]
Bug 9890: fix plugin handling by koha-create and koha-create-dirs

1) koha-create: fill in __PLUGINS_DIR__
2) koha-create-dirs: create the directory, set permissions (writeable by the koha user)

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10334: remove t/db_dependent/needs_user_input/* tests
Jonathan Druart [Fri, 24 May 2013 13:09:47 +0000 (15:09 +0200)]
Bug 10334: remove t/db_dependent/needs_user_input/* tests

t/db_dependent/needs_user_input/Auth.t and
t/db_dependent/needs_user_input/Auth_with_ldap.t seem not really useful.
If I refer to the git history, it seems that they are antiquated tests.

The first one is not compilable:
perl -wc t/db_dependent/needs_user_input/Auth.t
Can't locate override_context_prefs.pm

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10010 - Use jQueryUI Accordion to display constraints in MARC subfield editor
Owen Leonard [Tue, 9 Apr 2013 14:52:12 +0000 (10:52 -0400)]
Bug 10010 - Use jQueryUI Accordion to display constraints in MARC subfield editor

The jQueryUI Accordion widget, included by default in Koha, is
well-suited to handle the kind of show/hide actions which are used in
the MARC subfield editor. This patch replaces the custom-writted JS with
jQueryUI JS and markup.

To test, load the tag subfield editor: Admin -> MARC frameworks -> MARC
structure -> Subfields -> Edit. Confirm that basic, advanced, and other
contraints panels are show/hidden correctly. Confirm that tabs work, and
that edit operations are not disrupted.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Looks nice, passes all tests and QA script.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7110: Renewal messages no longer displays in OPAC if OpacRenewalAllowed is disabled
Owen Leonard [Tue, 27 Nov 2012 16:16:14 +0000 (11:16 -0500)]
Bug 7110: Renewal messages no longer displays in OPAC if OpacRenewalAllowed is disabled

Prior to this patch, if a patron has fines which exceed the limit set by
OPACFineNoRenewals but OPAC renewals are disallowed by OpacRenewalAllowed,
a message was displayed in their OPAC summary like this:

"Please note: You currently owe XXX in fines. Please pay your fines if you wish
to renew your books."

Information about outstanding fines in this case has no bearing on
how the user sees his summary of checkouts; since the user cannot
renew the loans from the OPAC regardless of their fine balance if
OpacRenewalAllowed is not enabled, this patch removes the message.

To test, try various combinations of OpacRenewalAllowed and
OPACFineNoRenewals with a patron who has outstanding fines:

- OpacRenewalAllowed ON and OPACFineNoRenewals ON (set to be triggered
  by the test patron's fines): Logging in to the OPAC the patron should
  see a warning on opac-user.pl about not being able to renew items
  because of fines.

- OpacRenewalAllowed ON and OPACFineNoRenewals OFF (threshold high
  enough not to trigger a block): No warning appears.

- OpacRenewalAllowed OFF and OPACFineNoRenewals ON: No warning appears.

- OpacRenewalAllowed OFF and OPACFineNoRenewals OFF: No warning appears.

If OpacRenewalAllowed is diabled and a patron's fines exceed the limit
set by OPACFineNoRenewals they should see no message.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-ql.pl and perlcritic

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9307: (follow-up) help text tweaks
Galen Charlton [Wed, 19 Jun 2013 15:14:51 +0000 (08:14 -0700)]
Bug 9307: (follow-up) help text tweaks

- per bug 10420, use 'authorized'
- add a period

10 years agoBug 9307: QA Followup
Jonathan Druart [Tue, 18 Jun 2013 10:33:05 +0000 (12:33 +0200)]
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>
10 years agoBug 9307 - Allow libraries to add/edit status for suggestion management.
Kyle M Hall [Thu, 20 Dec 2012 14:31:23 +0000 (09:31 -0500)]
Bug 9307 - Allow libraries to add/edit status for suggestion management.

This patch allows for the addition of new suggestion status by adding
authorised values of the category SUGGEST_STATUS

I sign it off. Details of my test plan :
1. Applying the patch
2. Checking existing suggestions, in staff view and opac :  ok
3. Creating a new suggestion in staff and in opac :  ok
4. Moving a suggestion into one of the old categories : ok
5. Adding a new authorized value category named SUGGEST_STATUS and fill it with 3 values :
value    Description    Description (OPAC) =)>
tata    tatapro         tataopac
titi    titipro         titiopac
toto    totopro         totoopac
For "tata", I defined a branch restriction on branche B.
6. Connecting in staff interface as a librarian of branch A : I could only use codes titipro and totopro. On OPAC, these codes were displayed as totoopac and titiopac
7. Connecting as librarian of branch B : I could use the 3 codes
8. Checking tabs visible : new tabs for tata, titi, toto, but also a new "Unknown" tab with 0 record.

Maybe point 8 could be fixed in a followup.
I sign off the patch.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
10 years agoBug 10332: further improvements to course reserves tests
Galen Charlton [Tue, 18 Jun 2013 15:37:09 +0000 (08:37 -0700)]
Bug 10332: further improvements to course reserves tests

- Wrap tests in a database transaction; that
  way, no special cleanup code is required
- Use AddItem rather than AddItemFromMarc to create
  test items; there's no need to build in a
  dependence on any particular MARC flavor or
  framework in our test cases (except, of course,
  for test cases that are explicitly exercising
  code that involves the frameworks).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10332: Data could exist in the courses table.
Jonathan Druart [Mon, 17 Jun 2013 09:16:10 +0000 (11:16 +0200)]
Bug 10332: Data could exist in the courses table.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10332: CourseReserves.t needs to create its own data
Jonathan Druart [Fri, 24 May 2013 12:23:45 +0000 (14:23 +0200)]
Bug 10332: CourseReserves.t needs to create its own data

prove t/db_dependent/CourseReserves.t
t/db_dependent/CourseReserves.t .. ok
All tests successful.
Files=1, Tests=20,  2 wallclock secs ( 0.02 usr  0.00 sys +  0.43 cusr
0.03 csys =  0.48 CPU)
Result: PASS

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Without correct data, test fails prior to patch, passes no matter what
after patch is applied.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9728: XISBN unit test update
Fridolyn SOMERS [Tue, 18 Jun 2013 14:52:12 +0000 (16:52 +0200)]
Bug 9728: XISBN unit test update

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9826 - Missing fields in MARC21 authority framework
Bernardo Gonzalez Kriegel [Thu, 14 Mar 2013 21:37:05 +0000 (18:37 -0300)]
Bug 9826 - Missing fields in MARC21 authority framework

This patch updates MARC21 authority framework adding
missing tags/subtags up to Update No. 15 (September 2012)

Missing tags and corresponding subtags only added to
default authority framework.

For present authtypes only missing subtags are added.

Also updates a few legends to match those from LOC.

No deletions except for a few not relevant tags in
present authtypes without subfields.

Only to new installs.

To test:
1) Delete present authority frameworks
2) Load new frameworks. On default there are
many new tags/subtags. On present authtypes
only a few new/renamed subtags.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9541: make OPAC login page respect OPAC_CSS_OVERRIDE
Kyle M Hall [Tue, 19 Feb 2013 16:41:59 +0000 (11:41 -0500)]
Bug 9541: make OPAC login page respect OPAC_CSS_OVERRIDE

When clicking the login link for opac-user.pl in a multiple branch
scenario the environment variable for OPAC_CSS_OVERRIDE was ignored from
the koha-conf.xml file.  It seems like is is working on every page in
the opac except for the login page.

Test Plan:
1) Set up a Koha server with 2 separate catalog configurations
   ( e.g. opac1.kohatest, opac2.kohatest )
2) Set the OPAC_CSS_OVERRIDE directive for separate css files
   in each opac
3) Browse to the opac login page, note the css is not applied
4) Apply this patch
5) Reload the page, note the css is now applied

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9728: XISBN use bibliographic search instead of SQL to fetch related bibs
Fridolyn SOMERS [Thu, 28 Feb 2013 11:36:24 +0000 (12:36 +0100)]
Bug 9728: XISBN use bibliographic search instead of SQL to fetch related bibs

XISBN API uses normalized ISBN of a biblio to get a list of ISBNs
of related editions, then searched via SQL in database for biblios
with those ISBNs.

I noticed that if input ISBN has hyphens, the ISBNs returned by the
OCLC XISBN service also have hyphens; otherwise, if the input ISBN
doesn't have hyphens, the returned ISBNs don't either.

Consequently, an SQL query on biblioitems.isbn may not turn up
the right biblios.

Also, if biblio has several ISBNs, only first one can be found with
the original SQL query (isbn LIKE '$xisbn%').

This patch replaces SQL query by a simple search "nb=$xisbn". This will
find biblio from ISBN with or without hyphen.

Test plan :
- Activate FRBRizeEditions and XISBN sysprefs
- Go to a biblio witch has several editions
- Note its normalized ISBN (you may look in amazon links)
- Replace [ISBN] by biblio normalized ISBN in this URL : http://xisbn.worldcat.org/webservices/xid/isbn/[ISBN]?method=getEditions&format=xml&fl=form,year,lang,ed
- Go to this URL and see which ISBNs are returned
- Perform a simple search on thoses ISBNs : nb:1234567890
- Look at "Editions" tab
=> Check that diplayed biblios are the same you found by simple search

Signed-off-by: jmbroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10182: Stay on the same tab after saving a biblio
Jonathan Druart [Fri, 3 May 2013 09:53:10 +0000 (11:53 +0200)]
Bug 10182: Stay on the same tab after saving a biblio

When editing a biblio, the bug 7883 introduces the "save and continue
editing" feature.  After saving, the page is loaded with the first
tab selected.  This patch refresh the page with the same tab selected.

Test plan:
1/ Edit a biblio.
2/ Click on the 5th tab.
3/ Click on the "Save and continue editing" button.
4/ You are redirected on the same page with the same tab selected

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9665: QA follow up fixing tabs
Chris Cormack [Thu, 13 Jun 2013 08:36:36 +0000 (20:36 +1200)]
Bug 9665: QA follow up fixing tabs

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9665: add RIS and BIBTEXT bibliographic record export to staff interface
Owen Leonard [Fri, 31 May 2013 15:03:56 +0000 (11:03 -0400)]
Bug 9665: add RIS and BIBTEXT bibliographic record export to staff interface

The OPAC offers RIS and BIBTEX as choices for bibliographic downloads,
but the staff client was missing these options. This patch adds them.

To test, view a record in the staff client (detail.pl, MARCdetail.pl,
etc.) and click the "Save..." toolbar button. BIBTEX and RIS should be
available and functional.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10256: Remove some unused subs from Overdues module
Marcel de Rooy [Thu, 16 May 2013 07:52:41 +0000 (09:52 +0200)]
Bug 10256: Remove some unused subs from Overdues module

Removes the following exported but unused subs from Overdues.pm:
CreateItemAccountLine
UpdateAccountLines
CheckAccountLineLevelInfo
CheckAccountLineItemInfo
CheckExistantNotifyid
GetNextIdNotify
GetNotifyId
ReplacementCost
ReplacementCost2
GetOverdueDelays
GetOverduerules

Test plan:
It is hard to test the removal of something that was not used :) Try this:
Do a recursive grep on these routine names in the Koha codebase.
Compile some scripts that use the Overdues module.
And just to be sure we do not break something:
Go to Circulation: Do a checkout, checkin, place and confirm a hold.
Go to Patrons: Goto Check out. Goto Fines.
Run the command line scripts: fines.pl and overdue_notices.pl.
Go to opac-user.pl.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10291: Clarify misleading variable name
Colin Campbell [Mon, 20 May 2013 15:54:53 +0000 (16:54 +0100)]
Bug 10291: Clarify misleading variable name

Remove the unrequired extra processing and pass
the array of itemnumbers as itemnumbers_array

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10396: remove unnecessary date-picker widgets from Catalog statistics form
Sophie Meynieux [Mon, 10 Jun 2013 13:32:57 +0000 (15:32 +0200)]
Bug 10396: remove unnecessary date-picker widgets from Catalog statistics form

In particular, removed it from the call number and publication year
input fields.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10439: fix bug preventing the library for a notice from being changed
Jonathan Druart [Mon, 10 Jun 2013 12:05:32 +0000 (14:05 +0200)]
Bug 10439: fix bug preventing the library for a notice from being changed

2 javascript functions should be apply only in a specific case, not for all
views.

Test plan:

- Switch on the IndependentBranches pref and log
  in as a superlibrarian.
- Try to change the library for a notice. Before the patch,
  no change is applied.
- Try to create a new notice, changing the library from
  default in the process.  Before the patch, the notice
  is not created.

The bug can also be reproduced when IndependentBranches is
off, in which case the staff user need not be a superlibrarian.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10464: Patron search on placing a hold now supports autocomplete
Tomas Cohen Arazi [Thu, 13 Jun 2013 17:20:43 +0000 (14:20 -0300)]
Bug 10464: Patron search on placing a hold now supports autocomplete

The patron search box for placing a hold request on a bib in the
staff interface now supports autocomplete if the CircAutocompl
system preference is enabled.

This patch grabs the autocomplete handling javascript stuff from patron-search-box.inc
and puts an adjusted version on reserve/request.tt.  It sets form and input
IDs to match those configured in the autocomplete call, adjusted where needed to
avoid name collisions with the patron-search-box.inc that is present everywhere.

This patch also doubles the width of the patron search input field.

To test:
- On a biblio record, go to the Holds tab, mine looks like
  /cgi-bin/koha/reserve/request.pl?biblionumber=2
- A search box is shown for patron searching.
- Search for a patron: it works as usual.
- Make sure CircAutocompl is "Don't try"
- Apply the patch
- Click the Holds tab again, and do the same search: functionality should remain intact.
- Change CircAutocompl to "Try"
- Click the Holds tab again
- Autocomplete should show you the possible options, and once you choose one result,
  it should work as usual.

Sponsored-by: Universidad Nacional de Córdoba
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.
Adding a nice new autocomplete feature.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10141: improve editing of MARC21 bib 008/18-21 and 008/24-27
Bernardo Gonzalez Kriegel [Thu, 2 May 2013 11:13:05 +0000 (08:13 -0300)]
Bug 10141: improve editing of MARC21 bib 008/18-21 and 008/24-27

This patch changes the MARC21 008 editing form to create dropdowns
for each of the 008/18-21 (Illustrations) and 008/24-27 (Nature of contents)
positions.

To test:
1) Edit or add a new bibliographic record
2) Click on field 008 value builder, positions 18-21 and 24-27 only
show an input text box
3) Apply the patch
4) Reload value_builder page, now each position (18-21,24-27) has
its own dropdown.  Note that it may be necessary to clear
the browser cache for the change to be visible.

Similar changes could be made for the 006 value builder.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9779 - Remove global include of YUI assets from the staff client
Owen Leonard [Sun, 10 Mar 2013 13:47:55 +0000 (09:47 -0400)]
Bug 9779 - Remove global include of YUI assets from the staff client

There are no pages in the staff client which use YUI JS assets other
than basketgroups.tt. The links to YUI assets can therefore be removed
from the global include and put directly into the basket groups
template.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Really nice to see YUI go.
Checked that the drag&drop functionality in basket groups still works.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7143: Release team 3.14 on about page
Marcel de Rooy [Thu, 23 May 2013 08:49:59 +0000 (10:49 +0200)]
Bug 7143: Release team 3.14 on about page

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change only, looks all ok to me.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10466: fix glitch in OPAC display of titles saved to list
David Cook [Fri, 14 Jun 2013 03:03:19 +0000 (13:03 +1000)]
Bug 10466: fix glitch in OPAC display of titles saved to list

When displaying (in the OPAC) the set of records saved to a list,
an apparently random number (typically 33 or 34) is sometimes
displayed at the end of the publication description.  In particular,
this can occur when XSLT is *not* being used to display search results;
this patch corrects the problem.

Now for the technical details:

This patch checks to see if "size" is undefined. If it is, we add a
blank (i.e. "") value to it in place of undef.

If we do not do this, calling "itemloo.size" will return the size
of the "itemloo" hash, rather than the value for the "size" key.

This is because "size" is a virtual method in Template Toolkit. It's
uncertain why the value is retrieved for the "size" key when there is
a defined value and why TT doesn't use the method instead, and that
it uses "size" as a method only if there is either no "size" key or
if the value tied to the "size" key is null/undef. This might be a
feature or it might be a bug in TT...

In the meantime, we will check to see if it's undefined. If it is,
we'll give it a value.

This bug has been identified in the opac-search.pl, search.pl and
addbooks.pl pages before. To address it, we're currently checking
if there is a "size" key, and if not...we're adding one with a blank
value.

This patch takes up that same idea, although I think it might be better
to rename the variable before passing it to TT in case the behaviour
of TT changes in the future in regards to how it handles virtual
methods.

N.B. Obviously, this only affects users not using XSLTs.

--

Test Plan:

Before applying the patch:

0) Make sure you have opac search result XSLT turned off

1) Find bib records that do not have a 300$c (Dimensions) value.
2) Find bib records that do have a 300$c (Dimensions) value.

(N.B. These values should be stored in the `size` column of biblioitems).

3) Add items from both sets of records to a List
4) Note that records without a 300$c will display a number at the end
of the "Publication" description/string. It should be something like
33 or 34 in most cases.
5) Note that records with a 300$c don't display this number. They just
show the value from 300$c.

Apply the patch.

6) Clear your cache, refresh the page, etc.
7) Note that the number (e.g. 33 or 34) has disappeared from the end
of the "Publication" description/string.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Added a small comment at the end of this one line.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10245: add CSS classes to OPAC detail items table header
Chris Hall [Wed, 15 May 2013 07:30:57 +0000 (19:30 +1200)]
Bug 10245: add CSS classes to OPAC detail items table header

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Classes now appear on <th> as well for easy styling.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, template changes only. Adds classes and id's to table
headers, makes no other changes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10418 - Correct template markup problems on course reserves add item page
Owen Leonard [Wed, 5 Jun 2013 13:56:23 +0000 (09:56 -0400)]
Bug 10418 - Correct template markup problems on course reserves add item page

This patch corrects several problems with the course reserves add item
pages:

- Non-standard grid markup.
- Extra </div>.
- Incorrect styling of errors and messages.
- Redundant JS for adding focus to a field (use "focus" class).
- Invalid use of <label> with no corresponding input (use <span
  class="label"> instead).
- Incorrect capitalization.

To test, apply the patch and examing both steps of the process of adding
an item to an existing course: The initial "scan barcode" form, and the
form for editing details of a scanned item.

Some cases to check:

- Scan an invalid barcode.
- Scan a barcode which has already been added to a course.
- Scan a barcode wihch has already been added to the course you're
  working with.

Forms should look correct and work correctly.

This patch contains whitespace changes, so please ignore whitespace when
examining changes.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
The add item screen continues to work as before.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl. Works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10416 - Correct template markup problems on course detail page
Owen Leonard [Wed, 5 Jun 2013 13:19:26 +0000 (09:19 -0400)]
Bug 10416 - Correct template markup problems on course detail page

This patch corrects several problems with the course reserves course
detail page:

- Unescaped ampersands
- Extra </div>
- Incorrect text in title tag
- Use of a table to display information which is more consistently
  displayed as a list.
- More accurate alert message, "Are you sure you want to remove this
  item from the course?" rather than "Are you sure you want to delete
  this item?"
- Missing icons from toolbar buttons

To test, apply the patch and view the details of an existing
course (Course reserves -> [Course name]). Confirm that these changes
are present and look like an improvement.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
The course details screen looks much more consistent with other parts
of Koha now.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, template only changes. Everything checks out and
works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10425: tweaks to text of help for local use system preference
Galen Charlton [Fri, 14 Jun 2013 15:30:35 +0000 (08:30 -0700)]
Bug 10425: tweaks to text of help for local use system preference

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10425 - Help page missing for Local Use preferences
Fridolyn SOMERS [Thu, 6 Jun 2013 08:57:29 +0000 (10:57 +0200)]
Bug 10425 - Help page missing for Local Use preferences

When viewing Local Use system preferences tab, the help button will lead to an error page.
This is because Local Use tab uses not the same script has other tabs : systempreferences.pl.

This patch adds help/systemprefences.tt

Test plan :
- Go to Local Use preferences : /cgi-bin/koha/admin/systempreferences.pl
- Click on Help link (at right top)
- See you get the same page as other preferences tab help

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10315 - Use easier readable font for generated passwords
Owen Leonard [Thu, 23 May 2013 16:44:58 +0000 (12:44 -0400)]
Bug 10315 - Use easier readable font for generated passwords

The text inputs on the change password form are not very big, and the
default sans-serif font isn't always good for showing unambiguous
characters. This patch sets a larger, monospace font for those fields.

To test, apply the patch, clear your browser cache, and open the patron
change password form (members/member-password.pl). The inputs should be
more readable, especially the password fields when you click to fill
with a randomly generated password.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10444: Fix prevent the default action on click
Jonathan Druart [Thu, 13 Jun 2013 09:11:07 +0000 (11:11 +0200)]
Bug 10444: Fix prevent the default action on click

In particular, clicking the [+] and [-] links on the
OPAC advanced search page will no longer scroll
the page back to the top.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10444 - (CCSR followup) In advanced search(more), [+] and [-] should behave like...
Tomas Cohen Arazi [Tue, 11 Jun 2013 14:49:06 +0000 (11:49 -0300)]
Bug 10444 - (CCSR followup) In advanced search(more), [+] and [-] should behave like links on hover

Same fix for CCSR.

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10444 - In advanced search(more), [+] and [-] should behave like links on hover
Tomas Cohen Arazi [Tue, 11 Jun 2013 12:54:13 +0000 (09:54 -0300)]
Bug 10444 - In advanced search(more), [+] and [-] should behave like links on hover

This patch add href="#" to the [+] and [-] links for adding and removing
search terms. It also defines its style so it doesn't show underlined.

To test:
- Browse your OPAC to "Advanced Search" and then "More options".
- The [+] and [-] don't change the cursor on hover
- Apply the patch, reload and see the cursor changes
- Functionality should remain unchanged

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10458: t/Z3950.t should be removed too
Jonathan Druart [Fri, 14 Jun 2013 12:48:46 +0000 (14:48 +0200)]
Bug 10458: t/Z3950.t should be removed too

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10458: Remove obsolete Z3950 module and test
Marcel de Rooy [Thu, 13 Jun 2013 08:20:27 +0000 (10:20 +0200)]
Bug 10458: Remove obsolete Z3950 module and test

Are not used. Contain several FIXMEs.
Removing them makes life easier.

Test plan:
Actually, you cannot test this.
But for confidence: do a Z3950 search in cataloguing and acquisition.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10443: DBRev 3.13.00.008 - make sure borrower_files exists
Galen Charlton [Fri, 14 Jun 2013 14:50:02 +0000 (07:50 -0700)]
Bug 10443: DBRev 3.13.00.008 - make sure borrower_files exists

This schema update ensures that the borrower_files table
will exist for libraries who first installed Koha at
3.10.x.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>