]> git.koha-community.org Git - koha.git/log
koha.git
10 years agoUpdate release notes for 3.12.13 release
Kyle M Hall [Mon, 23 Jun 2014 13:59:18 +0000 (09:59 -0400)]
Update release notes for 3.12.13 release

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
10 years agoBug 11877 - Eliminate use of deprecated jQuery .live() method
Owen Leonard [Fri, 28 Feb 2014 19:48:36 +0000 (14:48 -0500)]
Bug 11877 - Eliminate use of deprecated jQuery .live() method

As of jQuery 1.9 the .live() method has been removed. A few templates
contain JavaScript which uses it. It can be easily replaced with .on().
This patch makes the correction.

To test, apply the patch and test the following pages:

- In the staff client, Administration -> OAI sets configuration:
  Define mappings for an existing set. You should be able to add rows by
  clicking the "OR" button. You should be able to delete or clear any
  line by clicking the "Delete" link.

- In the staff client, view the details for any patron and click the
  "Change password" button: In the change password form click the link
  to fill the password fields with a random password. This link should
  work correctly.

- If necessary enable OpacRenewalAllowed in system preferences. Log in
  to the OPAC as a patron who has checkouts. On the patron summary page
  (opac-user.pl) look for the "renew selected" and "renew all" links at
  the top of the table of checkouts. Both these links should work
  correctly. Test in prog and bootstrap themes.

Followed test plan. Same behaviour as without patch, i.e. patch OK
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described.
No Javasript errors found.

Note: The buttons on the form show up, even if no item shows the
checkbox. In my case the problem was that I had 0 renewals allowed
in the circulation rules. Maybe we could hide them, if no item
can be renewed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 330e903e798c22d041a0378ce4a806c3cdebd2bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 46c3fad78521af0cc1ceebf399fafbd3b65a27cf)

10 years agoBug 11939: set active currency for non-English sample data
Jonathan Druart [Mon, 17 Mar 2014 16:21:09 +0000 (17:21 +0100)]
Bug 11939: set active currency for non-English sample data

Revised Test Plan
-----------------
The following SQL commands were used to test this.

installer/data/mysql/en/optional/parameters.sql is part of the
first patch and didn't really need testing again.

installer/data/mysql/de-DE/optional/parameters.sql is not part
of the patch, but since I was playing with the script, which
is also attached here, it was included for good measure.

use kohadata;
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/pl-PL/optional/parameters.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/es-ES/optional/parameters.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/ru-RU/optional/sample_currency.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/uk-UA/optional/sample_currency.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/it-IT/necessari/parameters.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/de-DE/optional/parameters.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/nb-NO/2-Valgfritt/parameters.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/en/optional/parameters.sql

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ed10e5226cc8e9852dfee3f5520976695cb99412)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0e6a85ad7c09eccc99fbce9af47d4ae9ddae4350)

10 years agoBug 11939: set active currency when using English sample data
Zeno Tajoli [Fri, 14 Mar 2014 10:38:07 +0000 (11:38 +0100)]
Bug 11939: set active currency when using English sample data

This patch offers a better default for currencies,
with USA dollar as default active currency.

To test the patch:
1)Install master without the patch, during web installation
select 'parameters.sql' file
2)Finish install and go to Administration -Currencies & Exchange rates
3)No active currency

4)Install master with this patch, during web installation
 select 'parameters.sql' file
5)Finish install and go to Administration -Currencies & Exchange rates
6)Now USA dollar is the active currency

NOTE: This does solve the problem of everything being NULL for active,
      and lacking an active value. It also corrects the description
      of the optional item to check related to currencies.

Signed-off-by: Mark Tompsett <mtompset@hotmail.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>
(cherry picked from commit 6a5c2d51819c193580a2bc42856215a9b7d3b9f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9eb55874ca87794b1a254bd2a194d3f1453e14b8)

10 years agoBug 11973 - DBRev 3.12.12.001
Kyle M Hall [Fri, 13 Jun 2014 13:11:10 +0000 (09:11 -0400)]
Bug 11973 - DBRev 3.12.12.001

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
10 years agoBug 11973 - Fix Armenian language description
Bernardo Gonzalez Kriegel [Thu, 20 Mar 2014 11:45:14 +0000 (08:45 -0300)]
Bug 11973 - Fix Armenian language description

This patch fix Armenian language description

To test:
1) Do a fake translation to Armenian,
   mkdir koha-tmpl/intranet-tmpl/prog/hy-Armn
2) Go to Administration > System preferences > I18N/L10N
3) Armenian description looks like the second string in Bug description
4) Apply the patch
5) Run updatedatabase.pl
6) Reload page, now description look as first string in
Bug description (it's the sixth letter, similar to 't')

Ammended patch, wrong column.

Signed-off-by: Holger Meißner <h.meissner.82@web.de>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch fixes the English sample file for translations and includes
a database update to correct the string in existing installations.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8f8ce37e88e87b3286275f07f54832f82b9fce9e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b41e6ca1b697f1dc85a64c9043c9257dbe22dc47)

10 years agoBug 11957: reomve disused sample_only_param_tables.sql
Jonathan Druart [Wed, 19 Mar 2014 12:11:52 +0000 (13:11 +0100)]
Bug 11957: reomve disused sample_only_param_tables.sql

This sql file tries to insert data into nonexistent tables.
It is useless and can be removed.

Test plan:
  git grep sample_only_param_tables
should not return any result.

NOTE: This is basically a git rm. Simple patch.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
File is not used by the installers and it wouldn't work
with today's Koha for trying to insert data into non-existant
tables and tables with different structure.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9c7f137f5e518187f0b3a0fd3b3e55b75d07e362)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a9a15f38f5b3caedea1f1034be00c5ba05768b43)

10 years agoBug 8168: (follow-up) Use semicolon as default CSV delimiter
Jonathan Druart [Fri, 24 Jan 2014 11:49:39 +0000 (12:49 +0100)]
Bug 8168: (follow-up) Use semicolon as default CSV delimiter

installer/data/mysql/sysprefs.sql has semicolon as default.
This fixes both instances to use the same fallback value.

It also prevents CSV header info from being included in non-CSV messages.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7408fa5d7087fad5c8f15b742b9624cbfe652a61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 33e32758999c47549fba392f8c67fc0ca2917b3f)

10 years agoBug 8168: Fixing header of non CSV files for overdue notices
Daniel Barker [Tue, 14 Jan 2014 20:57:19 +0000 (09:57 +1300)]
Bug 8168: Fixing header of non CSV files for overdue notices

This determines if the CSV header should be included or not and
then generates it as needed using the delimiter specified in the
delimiter system preference.

TEST PLAN
---------
1. make some overdues books
2. run the overdue notices script without the -csv
3. check emails notice csv header is in the email
4. apply the patch
5. run the overdue notice again
6. check email notice CSV header is absent

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a31210efd34dc7e3c65f8491c26c2d8f8fc36dfb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 48ee914631cb1ec889db8a15085f3519c20b2b7e)

10 years agoBug 11935: fix capitalization: OPAC prog theme, checkouts tab
Owen Leonard [Fri, 14 Mar 2014 15:10:19 +0000 (11:10 -0400)]
Bug 11935: fix capitalization: OPAC prog theme, checkouts tab

opac-user.tt in the prog theme contains 'Renew Selected' and 'Renew
All'. These are incorrectly capitalized. This patch corrects.

To test you must have OpacRenewalAllowed enabled. Apply the patch,
switch to the prog theme, and log in to the OPAC as a patron who has
checkouts.

At the bottom of the table of checkouts you should see the renew buttons
with correct capitalization.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String change, all good.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 657cd3c4c0a784e2d8e202b94d538c9229fb463a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8dc1661d598aee9681f29794bf60dd2e4205d22d)

10 years agoBug 11762 - intranet & prog: Re-order 245 $a $b $h in results.
A. Sassmannshausen [Thu, 13 Mar 2014 16:06:29 +0000 (16:06 +0000)]
Bug 11762 - intranet & prog: Re-order 245 $a $b $h in results.

In the results view for OPAC and Intranet search results, titles are
currently displayed in 245 $a $b $h order. In detailed view the titles
are displayed in the better 245 $a $h $b order.

This patch corrects the behaviour for NORMARC and MARC21: all now
display 245 $a $h $b.

To test:
- Find records containing 245 $a $b and $h fields.
- Compare the way they look in detail and results view in OPAC
  (non-bootstrap) and intranet (you should see a discrepancies).
- Apply the patch.
- Re-check detail and results view: all should now look the same in
  both OPAC (non-bootstrap) and intranet.

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described.
Checked with Magnus Enger about the changes for the NORMARC
stylesheets and the changes are ok.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 266f6a095c15af1e56238e43c05bdbfc406afad4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9281c44a162f8b1da05086759056a4fabc68f140)

10 years agoBug 9114: Make frameworks import/export routines correctly use UTF-8
Tomas Cohen Arazi [Wed, 22 Jan 2014 18:38:41 +0000 (15:38 -0300)]
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>
(cherry picked from commit 40d3800cc4d73be3f40fb3b895de3e7fe29e4999)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 59036877f2cd8f817fd3689c8feeb91891428185)

10 years agoBug 11934: (follow-up) tidy up whitespace
Galen Charlton [Thu, 13 Mar 2014 15:17:37 +0000 (15:17 +0000)]
Bug 11934: (follow-up) tidy up whitespace

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3a99c0441a7400ddc2437300b94a98e645c89881)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f4a717106d8db4bbad991752109ac50fe52545d9)

10 years agoBug 11934 - Replace given by if-else statements
Nicolas Legrand [Thu, 13 Mar 2014 09:40:27 +0000 (10:40 +0100)]
Bug 11934 - Replace given by if-else statements

To test:

[1] Verify that prove -v t/db_dependent/Circulation_issuingrules.t
    passes.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
replaces given-when with if-elsif-else constructs.
Tests still pass and code looks good.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 12df62ca33047df0c5cd372bf5574cf131f773e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e4c1de744b6fa0765aa3f308dba7234f71da71e9)

10 years agoBug 11647: (follow-up) add comment expressing that user must be logged in
Galen Charlton [Thu, 13 Mar 2014 14:57:04 +0000 (14:57 +0000)]
Bug 11647: (follow-up) add comment expressing that user must be logged in

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e34508744d3e76827e911531a56f84731a669784)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 21b766adc9e00ac98951c503b454f917d1a8cbd4)

10 years agoBug 11647: (follow-up) test if user is logged in before proposing to subscribe or...
Sophie Meynieux [Mon, 10 Mar 2014 16:07:07 +0000 (17:07 +0100)]
Bug 11647: (follow-up) test if user is logged in before proposing to subscribe or unsubcribe from serial routing list

To test :
1) Search for a subscription with patron notification active
2) If you're not logged in, a message warns you that you must log
   in to subscribe to notification on new issues
3) If you log in, and have not yet subscribed to this routing list,
   you've got a link to subscribe
4) Once you have subscribed, you've got a link to unsubscribe
5) If you log out, you've got a message saying you must log in to
   subscribe
6) If you log in with another user, you've got the link to subscribe
   or unsubscribe depending on if he has already subscribed.

Signed-off-by: remy juliette <remy.gonzalves@iepg.fr>
Signed-off-by: Aurelie Fichot <aurelie.fichot@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b056f93c4d33a9a56d56bbb081924f7c4c974a79)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a5588825138f2156682342eb012e3f08d65441d2)

10 years agoBug 11647: require that user log into OPAC to request email subscription notifications
Sophie Meynieux [Fri, 31 Jan 2014 11:22:05 +0000 (12:22 +0100)]
Bug 11647: require that user log into OPAC to request email subscription notifications

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: remy juliette <remy.gonzalves@iepg.fr>
Signed-off-by: Aurelie Fichot <aurelie.fichot@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Instead of hiding the feature completely, now a message
tells the user to login to subscribe to the email
notifications.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6310c992bf23d164f013ead7c0b2182226279454)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc7e66d984a7d113c940121a990606361d263332)

10 years agoBug 11366: make "no group" option in acq basket group drop-down translatable
Fridolin Somers [Wed, 5 Mar 2014 13:26:14 +0000 (14:26 +0100)]
Bug 11366: make "no group" option in acq basket group drop-down translatable

in Acq baskets, there's a pull-down for basket groups. One of the
entries in that pull-down is "No group", which is untranslatable.
This string is hard-coded in Perl.

This patch removes the string from Perl to set it has first option
in select. To allow it to be default value, the option "Add new group"
is moved to last position.

Test plan :
- Go to a closed aquisition basket in no basket group :
  cgi-bin/koha/acqui/basket.pl?basketno=x
=> You see "No group" selected in combobox "Basket group"
- Cick on this combobox
=> You see "No group", then existing basket groups and then "Add new
   group"
- Select a basket group and click on "change basket group"
=> You see the basket group name in combobox
Use translation, for example fr-FR
- go to src/misc/translator
- run : perl translate update fr-FR
=> You find in PO file :
  #: intranet-tmpl/prog/en/modules/acqui/basket.tt:365
  #, fuzzy, c-format
  msgid "No group"
  msgstr "Nom de groupe"
- remove ", fuzzy" and correct translation : "Pas de groupe"
- run : perl translate install fr-FR
- Go to translated aquisition basket page
=> You see translated option in combobox

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 21e6518d32477fa1fe59da64d735f3f07ae49bcd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1b760f8e4df32f73861b96ffc5ea4e2d0bd196a5)

10 years agoBug 11845 - set overlay and import status translatable in addorderiso2709.tt
Fridolin Somers [Wed, 26 Feb 2014 10:03:18 +0000 (11:03 +0100)]
Bug 11845 - set overlay and import status translatable in addorderiso2709.tt

In addorderiso2709.tt, the text for overlay and import status come from
database and was not translatable.  Ths patch fixes that.

Same as Bug 10170.

Test plan :
- Go to acquisition module
- Display an open basket
- Click on "From a staged file"
- Look at table
=> Without patch, you see codes in "Status" column : staged, imported, ...
=> With patch, you see descriptions in "Status" column : Staged, Imported, ...
- Click on a "Add orders"
- Look at table
=> Without patch, you see codes in "Match?" column : no_match, auto_match, ...
=> With patch, you see descriptions in "Match?" column : No match, Match found, ...

Signed-off-by: Nathalie CHATILLON <nathalie.chatillon@uhb.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This is an improvement. Only the translation of auto_match as Match found
could perhaps be further improved.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 20d0aff0e88544cdddfb4a6b90fc73ed652c84bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b505b7996c80d3740e7c0b12a650964018e92d5c)

10 years agoBug 11531: make it possible to edit transport cost for a new libraries
Kyle M Hall [Mon, 13 Jan 2014 17:39:51 +0000 (12:39 -0500)]
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>
(cherry picked from commit 4edcec3d5812b159b7012c43a04577bfd7e462bc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a143dec8a0b8490ff5ebae3e72599a2e94a0a8f7)

10 years agoBug 11459: use drop-down to set OrderPdfFormat syspref
Galen Charlton [Wed, 26 Feb 2014 16:45:09 +0000 (16:45 +0000)]
Bug 11459: use drop-down to set OrderPdfFormat syspref

This patch converts the OrderPdfFormat to a choice.

To test:

[1] Look at OrderPdfFormat in the system preferences editor. Verify
    that there is a drop-down giving a choice among the three PDF
    basketgroup printing formats.
[2] Change the OrderPdfFormat setting and print a basketgroup.  Verify
    that the chosen template is used.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
I followed the test plan. Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Improves usability of the OrderPdfFormat system preference.
Works as described, only changes YAML file.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3b7349e59005696094d5f7019583211140a355f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f1e42752cb265cecd4e29b1ee64a79d33d10f2b4)

10 years agoBug 11832: fix JavaScript error on staff client place hold screen if record has no...
Owen Leonard [Mon, 24 Feb 2014 16:35:52 +0000 (11:35 -0500)]
Bug 11832: fix JavaScript error on staff client place hold screen if record has no items

If a hold operation is blocked because the title has no items attached
the patron search autocomplete JavaScript triggers an error. This patch
modifies the template so that the JS is loaded only when items are
present.

To test, find a title which has no items attached. View the holds page
for that title. There should be no JavaScript error. Patron search
autocomplete should still work correctly for titles which have items
attached.

Deleted all items from a biblio record. Clicked the holds tab and
confirmed using firebug Javascript error occurs. Applied patch,
confirmed that the Javascript error described in comment 1 no
longer happens. Went to another biblio with items, and confirmed
patron auto-complete still functions.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0b5b8cef348b61761305dd0bbc574699404c7c69)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 07dc616de5a7483f4fe061c046c55ae7d880c7cb)

10 years agoBug 11833 - fix filtering on saved report subgroup
Owen Leonard [Tue, 25 Feb 2014 20:55:03 +0000 (15:55 -0500)]
Bug 11833 - fix filtering on saved report subgroup

Filtering the list of saved reports by subgroup doesn't work because the
filtering JavaScript was not updated when the table columns changed with
Bug 3134. This patch corrects the target column for filtering.

To test you must have multiple saved reports within one group, and at
least one of those in a subgroup.

- Apply the patch and go to Reports -> Use saved.
- Click the tab for the group which contains your reports.
- Choose the subgroup you want to filter on from the subgroup dropdown.

The list of reports should be correctly filtered by your subgroup.

NOTE: It seems weird to have the number of columns displayed change
      when filtered, but this patch does correct the filtering.

Signed-off-by: Mark Tompsett <mtompset@hotmail.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>
(cherry picked from commit 0039eee40c6f70023bfb93e8d3d011b47da6867a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit aa9ab3336653d079dab10f16c08ba4f4fa713f6a)

10 years agoBug 11918 : Fix typo on authorized values page
Nicole C. Engard [Sun, 9 Mar 2014 11:10:29 +0000 (05:10 -0600)]
Bug 11918 : Fix typo on authorized values page

This is a small string patch. On Authorized values this patch fixes
the wording next to the library limit.

To test:

Visit Authorized Values
Click 'Add new' or 'Edit' next to a value
Make sure that the text next to the library filter is right

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Text change, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2f0aac89709fec329436f15e259d49dd6072c6c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 78decc11a1b57413b5b531552ef9957100120958)

10 years agoBug 11695 - Fixed typo in marc21_field_008.xml
Jesse Maseto [Mon, 10 Mar 2014 13:39:22 +0000 (09:39 -0400)]
Bug 11695 - Fixed typo in marc21_field_008.xml

"Tree-character alphabetic code", to "Three-character alphabetic code"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Trees are nice, but Three is better here.
String change, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1c794eaeca3877c8af32ea0b1cce7354541fdba7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11809: don't display 'Clear date' on OPAC patron details form if date of birth...
Owen Leonard [Fri, 21 Feb 2014 15:35:40 +0000 (10:35 -0500)]
Bug 11809: don't display 'Clear date' on OPAC patron details form if date of birth is required

On the OPAC's patron details form, if the date of birth field is
required we shouldn't offer the user a "clear date." This patch removes
the "clear date" link if the field is required.

To test, configure the BorrowerMandatoryField system preference to
require dateofbirth. Enable the OPACPatronDetails system preference and
log in to the OPAC. View the "personal details" form and confirm that
there is no "clear date" link next to the required date of birth field.

Remove dateofbirth from the BorrowerMandatoryField system preference and
re-test. The "clear date" link should appear.

Test in both prog and Bootstrap themes.

I tested with prog and bootstrap themes, adding/removing field 'dateofbirth'
in sys pref PatronSelfRegistrationBorrowerMandatoryField.
Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 234560a690c78ef7723f15c0cb31f0497d073988)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d10087c9765997fdf6db9ed8608a780f175cdda0)

10 years agoBug 11772: (follow-up) make warning about no active currency a link to currency setup...
Galen Charlton [Tue, 18 Feb 2014 20:59:56 +0000 (20:59 +0000)]
Bug 11772: (follow-up) make warning about no active currency a link to currency setup page

This patch standardizes the name of the currency and exchange rates
administration page (although I note that the breadcrumbs on that
page are inconsistent) and makes it a link.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4b4839e752d88c1ccba5f8c9a1296302747c0c6b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e8037d8d040a45673996162d07bc71fb2dfd4d69)

10 years agoBug 11772: Show warning on About page:System information if no active currency is...
Marc Véron [Sat, 15 Feb 2014 15:19:04 +0000 (16:19 +0100)]
Bug 11772: Show warning on About page:System information if no active currency is defined

This patch displays a warning on the About page when no active currency
is defined.

Test plan:
1)
Make sure that no currency is defined as active
(Home › Administration › Currencies & Exchange rates › Currencies)
2)
Go to Home › About Koha > System information
Result: No warning issued.
3)
Apply patch and reload About page
Result: Warning issued.

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>
(cherry picked from commit 9e01b7c1d6c32dfd9ae0af4e708ca598303fbcf1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e741435e351b7298ee79d51df32203efa135a582)

10 years agoBug 11821: disable catalog edit menu items and provide explanations when actions...
Owen Leonard [Fri, 21 Feb 2014 20:27:41 +0000 (15:27 -0500)]
Bug 11821: disable catalog edit menu items and provide explanations when actions cannot be done

Biblio edit menu items which are disabled should trigger a tooltip
on hover and an alert on click with explanations. This patch implements
this for the relevent menu items.

To test, apply the patch for Bug 11829 if necessary. Find a record which
has no items attached. Test the following views:

- Normal
- MARC
- Labeled MARC
- ISBD
- Items

Test these Edit menu items:

- Edit items in a batch
- Delete items in a batch
- Delete all items

Hovering over these menu items should trigger an explanatory tooltip.
Clicking the menu items should trigger a similar alert.

Next, locate a title with items attached. On the same pages above, test
the Edit -> Delete record menu item. Hovering should trigger an
explanatory tooltip. Clicking it should trigger a similar alert.

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 nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5c1691a8013bd38d6bae8b00a8950e1417695176)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 204d01187d697a2e95584d135bacfecc892fb7b3)

10 years agoBug 10729: Add phrases configuration for ICU
Colin Campbell [Wed, 14 Aug 2013 15:21:26 +0000 (16:21 +0100)]
Bug 10729: Add phrases configuration for ICU

Add a separate phrases-icu.xml for phrase indexes
The file is based on that distributed with zebra
with a couple of additions to reflect Koha usage

This patch adds a separate tokenizer variable
for phrase indexes so that default.idx is
correctly rewritten for sites using icu
indexing

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Applied patch
- perl Makefile.PL --prev-install-log ../koha-dev/misc/koha-install-log
- make upgrade
- Restarted Zebra server
- Did a full reindex of bibliographic and authorities
- Checked various searches
- Links records to authorities
- Checked created links work correctly

I couldn't find a regression with this patch.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 735381b371b128fed13b8b34c97746af21a17282)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c0adc32d23651ae89489b37db227a05a68ab8d6d)

10 years agoBug 11675: check allocated total correctly when editing a fund that has a parent...
Jonathan Druart [Tue, 4 Feb 2014 11:15:42 +0000 (12:15 +0100)]
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>
(cherry picked from commit 331ca7df3ec351a83982496bed7f103050e89af5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 098ffcdd9ad10307ab63ea49b05c474263561992)

10 years agoBug 10837: make it possible to export serial claims as CSV even when no notice defined
Jonathan Druart [Mon, 23 Dec 2013 08:58:30 +0000 (09:58 +0100)]
Bug 10837: make it possible to export serial claims as CSV even when no notice defined

On the serial claims page, it is possible to export (using a CSV
profile) or claim 1+ serials.
The checkboxes are not shown if the claiming notice is not defined.
So it is not possible to export claims.

Test plan:
- delete your notice "claimissues"
- go on the serial claims page
- verify that you are able to export them as CSV

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as described and enables use of the export
funtionality even if you are not using the email notifications.
Exporting the serials will also set the claim date.
Passes QA script and tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 88c052b0919142c9ff0c8d1e7ce4411c0fb1649e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fbe55ec2abd474e21c0001cdc22b893fc2bbe771)

10 years agoBug 10777: (follow-up) improve CSS3 for Zebra-striping report email output
Galen Charlton [Tue, 11 Mar 2014 14:57:26 +0000 (14:57 +0000)]
Bug 10777: (follow-up) improve CSS3 for Zebra-striping report email output

This patch improves the CSS used to attempt to Zebra-stripe the
output of emailed reports.  This will work with some email clients,
but other email clients (e.g., Gmail) don't handle style elements in the
body or head element.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 26cdaaae777dd21314df90177fe070730575fb85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d726bf355cc7daec12ac10adfad1f06be4fcc568)

10 years agoBug 10777: email HTML reports with the proper Content-Type
Nicholas van Oudtshoorn [Thu, 22 Aug 2013 08:56:25 +0000 (16:56 +0800)]
Bug 10777: email HTML reports with the proper Content-Type

The misc/cronjobs/runreport.pl allows for sending html reports
via email. The problem is that the Content-Type isn't set to
text/html, which means that the generated html email isn't
displayed properly.

This patch set the Content-Type, and also adds a tiny bit of
CSS to potentially alternate row colours (just to make long
reports a bit easier on the eye!)

TEST PLAN
----------
1. Run the script similar to this:
    ./misc/cronjobs/runreport.pl --format=html --to=YOUREMAIL --subject="Bad Formatting!" REPORTNUMBER
2. Look at the email - the html code should by visible and ugly.
3. apply the patch
4. Run the script again.
5. Look at the email - the data should look nicer now.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 25076dec54f06b6a7938f4a6cda0a80a1d3d51e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit eedb9c0e6743aa8739fc01a68145be5a605a7f3e)

10 years agoBug 11731 - Fixed typo in message_transport_types.txt file.
Jesse Maseto [Mon, 10 Mar 2014 13:14:44 +0000 (09:14 -0400)]
Bug 11731 - Fixed typo in message_transport_types.txt file.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String change, all good.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b648425aee8d23bfedf53b09593f5978ae667d7b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e83b77985ed0e6c06747a169ed449ef355edd6e7)

10 years agoBug 11819 - Don't show catalog edit menu if user has no edit permissions
Owen Leonard [Fri, 21 Feb 2014 19:52:22 +0000 (14:52 -0500)]
Bug 11819 - Don't show catalog edit menu if user has no edit permissions

Currently if the logged in user lacks any cataloging permissions the
bibliographic detail page (catalogue/detail.pl) still shows the Edit
button, but with an empty dropdown menu. This patch corrects the toolbar
include so that the button will not appear at all.

To test, view the biblio detail page as a user with various combinations
of the following permissions:

- edit_items
- edit_catalogue
- items_batchmod
- items_batchdel

The edit button should appear with the correct set of links when the
user has any combination of the above permissions. If user has none the
button should not appear.

Followed test plan, patch behaves as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, passes all tests and QA script.
Template only change.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a8ebfa4702e2492388b6f60a11921a8ab69d677b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 257923800cdc7e87b2ae29a1e98b502fe7b8b3c6)

10 years agoBug 11707: fix editing additional attributes for patron whose category code includes...
Fridolin Somers [Fri, 7 Feb 2014 09:13:39 +0000 (10:13 +0100)]
Bug 11707: fix editing additional attributes for patron whose category code includes a space

When editing additional attributes of a patron of a category with a
code with space (ie "CAT 3"), the Javascript is broken and Additional
attributes are not displayed.

This patch corrects by adding simple quotes around category code in JS
code.

Test plan :
- Create an patron additional attribute
- Create a new patron category with a space in code. ie "CAT 3"
- Create a new patron of this category : /cgi-bin/koha/members/memberentry.pl?op=add&categorycode=CAT 3
=> Without patch the JS is broken (Syntax error, unrecognized expression:
   [data-category_code=CAT 3]) and additional attributes are not
   displayed.
=> With patch the JS is not broken and additional attributes are
   displayed and can be edited.

Signed-off-by: Marc Véron <veron@veron.ch>
In current Koha version it is not possible to create category codes
with blanks.

To test, I changed an existing category code directly in the database.
Then I followed the Test plan.
Without patch, attribute types were not displayed.
With patch, they were displayed as expected.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I recommend not using codes with spaces and fix existing ones.
Koha doesn't allow you to add category codes with spaces, so the only way
to do it is via SQL.
This patch fixes a problem and passes all tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 521d7173720b4acbf4ecf40ed114520d500c5f6a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d56d855914fbb6fc512fdffe86961822680176b6)

10 years agoBug 10751: standardize validation of title in staff purchase suggestions form
Owen Leonard [Fri, 21 Feb 2014 14:22:50 +0000 (09:22 -0500)]
Bug 10751: standardize validation of title in staff purchase suggestions form

The form for adding a new purchase suggestion in the staff client
indicates that the title field is required but does nothing to enforce
this rule. This can be handled client-side with HTML5 validation
attributes and Koha's built-in validation plugin. This patch implements
this.

To test, apply the patch and go to Acquisitions ->
Suggestions -> New purchase suggestion. Try submitting the form without
entering a title. Doing so should trigger a validation warning.

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

The patch displays a message 'Required' near the title field.
After submitting a empty title it changes to 'This field is required'
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The title field is required since commit
d565fb02e9fca2ac9c506e4e7d44fd8b0d66f06a
This one makes it more consistent with formatting. It makes sense.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 59b9078a3f7cf240bd814ee611e8f553d043491e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0092cd702e706a3564bcfd1dcdc1457615c09bb1)

10 years agoBug 11803: use $dbh consistently in _koha_modify_item
Marcel de Rooy [Thu, 20 Feb 2014 18:39:10 +0000 (19:39 +0100)]
Bug 11803: use $dbh consistently in _koha_modify_item

This is just some code cleanup, no behavior change expected.
Also replacing errstr with err in testing the results. (See DBI.)

Test plan:
Modify an item and save it.

Followed test plan. No problems found.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a07b32f4f9090ba0c50c3e510f0be56b8805faeb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c9057046766fc695385449766d29e011d08de574)

10 years agoBug 11471: Display the currency for baskets in a basketgroup
Jonathan Druart [Tue, 18 Feb 2014 14:07:38 +0000 (15:07 +0100)]
Bug 11471: Display the currency for baskets in a basketgroup

On editing a basketgroup, the currency for baskets in a basketgroup is
always '0'.

With this patch, the currency is correctly displayed.

TEST PLAN
=========
 1) Log into staff client
 2) Acquisitions
 3) Click 'Search' in the 'Manage orders' box
 4) Click '+ New basket' because a vendor name
 5) Type 'Test Basket' into basket name
 6) Click 'Save'
 7) Click 'Add to basket'
 8) Click 'From an external source'
 9) Type 'Green Eggs and Ham' into the Title text box
10) Click 'Search'
11) Click 'Order' on any one of the results
12) Click 'Add Item' in the 'Item' box
13) Select a Fund from the dropdown in the
     'Accounting details' box
14) Click 'Save'
15) Click 'Close the basket'
16) Click 'Yes, close (Y)' without checking attach to a
     basket group
17) Click the 'Basket groups' tab
18) Click '+ New basket group'
19) Notice the listing in the 'Ungrouped baskets'.
20) Drag and drop the entry into the 'Baskets in this group'
     text area
21) Click 'Save'
22) Click 'Edit'
23) Notice it displays incorrectly. (e.g. Total: 0 0)
24) Apply the patch (git bz apply 11471)
25) Refresh the page
26) Notice it displays the currency correctly. (e.g. Total: 0 USD)
    NOTE: If there is a space issue, see Bug 9654.
          This can be applied separately from that bug.
27) Run the Koha QA Tool: (~/qa-test-tools/koha-qa.pl -v 2 -c 1)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7a2dec05eddc979b5a957a651e393838c13560c4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
acqui/basketgroup.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f5e8df8e4b60ab70ab524c6dab2ec4c7d55539f8)

10 years agoBug 11799: Housekeeping: Remove _biblionumber_sth from VirtualShelves.pm
Marcel de Rooy [Thu, 20 Feb 2014 11:54:32 +0000 (12:54 +0100)]
Bug 11799: Housekeeping: Remove _biblionumber_sth from VirtualShelves.pm

This routine is no longer used.

Test plan:
Do a grep on the name.
(Bonus points:) Verify if you can perform some actions on lists.

No more occurences of _biblionumber_sth found
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5e0d450875f24d1f9ef6620b033b5179633589da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 84a9b3192e82484dba6cbe041028b0c8818eb41b)

10 years agoBug 10580: (follow-up) tweak wording about looking for zebrasrv & zebraidx
Galen Charlton [Fri, 21 Feb 2014 17:38:42 +0000 (17:38 +0000)]
Bug 10580: (follow-up) tweak wording about looking for zebrasrv & zebraidx

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1d276d58099fa60666bccc13c7b9d839946946c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8d988dbdcaebfe3d1cc325e5342951dbc0e3ed1b)

10 years agoBug 10580: adjust Makefile.PL to reflect that Zebra no longer optional in Koha setup
Tomas Cohen Arazi [Fri, 24 Jan 2014 13:40:03 +0000 (10:40 -0300)]
Bug 10580: adjust Makefile.PL to reflect that Zebra no longer optional in Koha setup

Running Makefile.PL asks the user whether to install the Zebra
configuration files and different texts relate to the user having
chosen to use Zebra.

This patch removes references to choosing to use Zebra and removes
the related variables from the code.

To test:
- Apply the patch
- Go through the different install modes
- Verify that nothing nothing is broken

Sponsored-by: Universidad Nacional de Cordoba
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>
(cherry picked from commit 0b989fe0b2097d747da1fd6d04aa8aecc5652d06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 996060aa92aa091a991ebe25cd2cd255b0d9d694)

10 years agoBug 11272 - add second submit button to inventory form
Nicole C. Engard [Fri, 24 Jan 2014 15:47:53 +0000 (09:47 -0600)]
Bug 11272 - add second submit button to inventory form

The inventory tool allows for 2 ways of processing files. The first
is to upload a file. The second is to generate the shelf list.
Most libraries think they have to fill in all fields because the
submit button is at the bottom of the second option. They do not.
This patch adds a second submit button under the first method to
make this clearer.

To test:

* Generate a file of barcodes for inventorying
* Before applying the patch use the file upload method to mark as seen
* Apply the patch
* Use the file upload method to mark as seen using the new submit
* Repeat the above for the shelf list method
* Confirm that inventory still works as expected with 2 buttons

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 40ba1763afc40cd47b23892a3248fd877dc8edce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fdeb2a0cad0b686617d8376842408bb437fa26c4)

10 years agoBug 11796: fix display of search result facets if facet happens to have exactly six...
Kyle M Hall [Wed, 19 Feb 2014 20:26:24 +0000 (15:26 -0500)]
Bug 11796: fix display of search result facets if facet happens to have exactly six entries

If a search gives results with 6 facets, one of those facets won't be
displayed. This is due to a bug in the code that only considers great
than 6 facets in one area, and less than 6 in another.

Test Plan:
1) Perform a search that should give results for 6 different libraries
2) Note you only see 5 libraries in the facets with no option to expand
3) Apply this patch
4) Repeat step 1
5) Note you now have the option to expand the facets list

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This patch should provide a regression test but I really don't know how
to write it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e7286e05137276f0a916f06d60a13c22c93294b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dc842baa70e5dcf232f15cff232409fdcd833014)

10 years agoBug 11785 - Use validation plugin when uploading local cover images
Owen Leonard [Tue, 18 Feb 2014 17:13:39 +0000 (12:13 -0500)]
Bug 11785 - Use validation plugin when uploading local cover images

When uploading local cover images the form should not be submitted if
no file has been selected. The existing form validation script doesn't
work. This patch adds HTML5 validation attributes and use of Koha's
built-in form validation plugin.

To test, apply the patch and go to Tools -> Upload local cover image.
Try to submit the form without selecting a file to upload. You should be
prevented from doing so. Choose a file and confirm that the upload
completes 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>
(cherry picked from commit 7faff33c8b9bd670cf7813f4cefb7aee38709ebb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc50362c231ceb9a410dcbcbce94b8124db1aa13)

10 years agoBug 10714 [Follow-up] Redirect to list contents view upon cancel after initiating...
Owen Leonard [Wed, 19 Feb 2014 20:06:36 +0000 (15:06 -0500)]
Bug 10714 [Follow-up] Redirect to list contents view upon cancel after initiating edit from list contents view (staff)

This follow-up corrects the "cancel" action on list edit actions based
on whether the edit was initiated from the list of lists or the list
contents view.

To test, view the list of lists and click the edit link next to one of
them. Click the cancel link. You should return to the list of lists you
were just viewing.

View the contents of a list. Choose "Edit list" from the edit menu.
Click the cancel link on the edit screen. You should return to the list
contents view from which you initiated the edit action.

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>
(cherry picked from commit 6a323ce4ce914e757d5c1c999237ad2c0efc15e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7d40a4c9081d50b15652f80a0d65d8a60f7a57b5)

10 years agoBug 10714: Redirect to list contents view upon save after initiating edit from list...
Owen Leonard [Mon, 12 Aug 2013 19:30:16 +0000 (15:30 -0400)]
Bug 10714: Redirect to list contents view upon save after initiating edit from list contents view (staff)

In the staff client, if you initiate a list edit from the list contents
view you should be redirected to that same view after saving your
changes. The OPAC already works this way.

To test, view the contents of an existing list. Click the "Edit list"
item under the "Edit" menu. Click save on the list edit form and you
should be redirected back to the contents view of that list.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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>
(cherry picked from commit daa98e73f8baf178f2b0f32b4988d2414519ea4b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3ef4918dc7afcc58ea180d40768344a558799931)

10 years agoBug 11644: fix occasional failure to update fund amount due to floating-point math
Kyle M Hall [Thu, 30 Jan 2014 17:39:19 +0000 (12:39 -0500)]
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>
(cherry picked from commit ba689152e431217c8dd02d6ce0b8d14ae8d9f5da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 984758cd3c76276366be05149324df6a17916cad)

10 years agoBug 11779: (follow-up) improve GetLoggedInBranchcode() and add test cases
Galen Charlton [Wed, 19 Feb 2014 16:40:06 +0000 (16:40 +0000)]
Bug 11779: (follow-up) improve GetLoggedInBranchcode() and add test cases

This patch adjusts the new GetLoggedInBranchcode() template function so
that it returns the empty string rather than undef if there is no
active user environment.  That way, there won't be lots of undefined
value warnings if/when this function gets used in the OPAC.

This patch also adds test cases.

To test:

[1] Verify that there are no regressions in the main test
    plan for this bug.
[2] Verify that prove -v t/db_dependent/Koha_template_plugin_Branches.t
    passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 065a3a5efa9b90723460a607ac85591c17945b00)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1b02c031a34e7e3e3caabbe0184fb5fe71447d95 )

10 years agoBug 11779: fix unexpected change in logged-in library when changing overdue notice...
Kyle M Hall [Tue, 18 Feb 2014 12:43:44 +0000 (07:43 -0500)]
Bug 11779: fix unexpected change in logged-in library when changing overdue notice triggers

Steps to reproduce:
1) Log into staff intranet
2) Set logged in branch
3) Browse to tools/overdue notice triggers
4) Select a branch from the pulldown that is not your logged in branch
5) use the "Check out" bar at the top of the page to search for a patron
to check out to
6) Once you have landed here, click the "check out" tab link again, or
   the Edit button ( any action really )
7) Note your logged in branch has now changed to the once selected
   when editing the notice/status triggers

This is due to the way the patron search passes the branchcode to be
used via the form. This form assumes the branchcode variable is
always the currently logged in branch, which may not and is not
always the case.

Test Plan:
1) Apply this patch
2) Repeat the steps to reproduce above
3) Note your logged in branch does not change

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Funny bug :) This patch fixes the described issue and should not
introduce regression.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 858083c8e907bde4efa6842cd45ff91bf1f6e24f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f08154588cb07d8d85b25d13a566c2c689148577)

10 years agoBug 11756: improve default sorting on hold ratios report
Owen Leonard [Fri, 14 Feb 2014 13:48:46 +0000 (08:48 -0500)]
Bug 11756: improve default sorting on hold ratios report

The DataTables plugin doesn't by default take multiple columns into
account when sorting. The hold ratios report presents a situation where
it makes sense to sort by default based on two columns: hold count and
title, since there are likely to be many titles with the same hold
count.

This patch adds sorting by default on holds (descending) and title
(ascending). It also modifies the configuration of the title sort to
exclude articles when sorting.

To test, view the hold ratios report. If necessary use the filter form
to reduce the minimum hold ratio and generate more results. Confirm that
the correct columns can be sorted.

Note that by default one can manually trigger sorting on two columns by
shift-clicking the second column header.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7514dc897cc49683915112229667ec1f654873ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ca668451a71b178dbb37539c329af1de9726513e)

10 years agoBug 11730: ensure that C4::Charset loads C4::Context
Stéphane Delaune [Mon, 10 Feb 2014 09:52:59 +0000 (10:52 +0100)]
Bug 11730: ensure that C4::Charset loads C4::Context

C4::Charset::SetMarcUnicodeFlag() fetches system preference
values, so since it invokes routines in C4::Context, it should
load the module.

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>
(cherry picked from commit b9d2a832db6d2a75d6466a349b769e8285d1f0c8)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit acec28bc4c9319da4490eb940ef54d0875c97c48)

10 years agoBug 10789: Follow-up: Fix typo "infermation"
Marcel de Rooy [Tue, 18 Feb 2014 15:04:46 +0000 (16:04 +0100)]
Bug 10789: Follow-up: Fix typo "infermation"

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 201af593f885ecb11c76d02baa6e27ef5e744e30)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b1e4073208ceb902e391820c650b7f89111a4ab8)

10 years agoBug 11773: fix crash in sco-main.pl if no active currency is set
Marc Véron [Sat, 15 Feb 2014 16:07:55 +0000 (17:07 +0100)]
Bug 11773: fix crash in sco-main.pl if no active currency is set

If no currency is defined as active and a patron with debts tries to
check out in welf checkout moduel, sco-main.pl crashes with:

Software error:
Can't use an undefined value as a HASH reference at /usr/share/kohaclone/opac/sco/sco-main.pl line 190.

This patch tests for active currency and simply does not display a
currency symbol if appropriate.

Test plan:

1) Make sure you have a patron with debts and no currency defined as
   active.  (Home › Administration › Currencies & Exchange rates
   › Currencies )
2) Go to Self checkout module and try to checkout an item to this patron
   Result: Crash with error message "Can't use an undefined value as a
   HASH..."
3) Apply patch
4) Reload and try to checkout again
   Expected result: Message "You owe the library..." without currency
   symbol
5) Define a currency as active and try to checkout again
   Expected result: Message "You owe..." with currency symbol

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>
(cherry picked from commit 1db56c834b297eb7fd968691f66ef3517771cba5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0e0b39deafed3376bc65af9bf9ee7ec678c60d35)

10 years agoBug 11757: remove dependency on POE
Galen Charlton [Fri, 14 Feb 2014 00:24:56 +0000 (00:24 +0000)]
Bug 11757: remove dependency on POE

The last use of the POE family of Perl modules went away with
the removal of zebraqueue_daemon.pl per bug 9001.  Consequently,
this patch removes POE as a dependency.

To test:

[1] Verify that "git grep POE" and "git grep libpoe" report
    nothing.
[2] Verify that koha_perl_deps.pl -a does not report POE
    as a dependency.
[3] (extra credit) verify that Debian packages can be built
    that do not list libpoe-perl as a dependency.

This patch also updates some distro-specific installation
instructions and scripts, but makes no representations about
whether those instructions currently work.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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>
(cherry picked from commit b67dac81cceaab356486001292cff40977682fff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ab85f0c5d03df5cbdeecac94cc9ae5e4b327a083)

10 years agoBug 11704: Make */svc/report print the correct headers
Tomas Cohen Arazi [Thu, 6 Feb 2014 20:30:24 +0000 (17:30 -0300)]
Bug 11704: Make */svc/report print the correct headers

To test:
1 - Go through the first comments instructions to reproduce
    and verify the bug is present (OPAC and STAFF)
2 - Apply the patch
3 - Repeat step 1 and notice
   * characters are not broken anymore
   * the header is correct
4 - Sign off

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit aace5d436dbab1f13e2e1c06d0b4ed5f1ec13ced)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a47eb5ea549b63d8fb410f966124c7ef0fdc3227)

10 years agoBug 11687: remove disused script statecollection.pl
Jonathan Druart [Wed, 5 Feb 2014 09:39:26 +0000 (10:39 +0100)]
Bug 11687: remove disused script statecollection.pl

It can be removed.

Test plan:
  git grep statecollection
returns no occurrence.

Signed-off-by: Holger Meissner <h.meissner.82@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b2d08f8359c187f92e1df46ad29b83852fb03079)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6162e63b2223101210724572da5b8af6365c6990)

10 years agoBug 10611: (follow-up) cache DBMS driver code in context object
Galen Charlton [Mon, 10 Mar 2014 22:48:03 +0000 (22:48 +0000)]
Bug 10611: (follow-up) cache DBMS driver code in context object

Rather than use a package-level variable, use an object-level
one.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7d39b3c72ea2422b09e3411bef974d87aecdabf9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
C4/Context.pm

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1de3d85574568b8eef769dc5d16af879b920b65f)

10 years agoBug 10611: Use mysql_auto_reconnect instead of ping
Jonathan Druart [Tue, 16 Jul 2013 09:53:47 +0000 (11:53 +0200)]
Bug 10611: Use mysql_auto_reconnect instead of ping

DBD::Mysql provides a mysql_auto_reconnect flag. Using it avoids
the time required to do a $dbh->ping().

Benchmarks:

use Modern::Perl;
use C4::Context;
for ( 1 .. 1000 ) {
    $dbh = C4::Context->dbh;
}

* without this patch on a local DB:
perl t.pl  0,49s user 0,02s system 98% cpu 0,525 total
* without this patch on a remote DB:
perl t.pl  0,52s user 0,05s system 1% cpu 37,358 total
* with this patch on a local DB:
perl t.pl  0,46s user 0,04s system 99% cpu 0,509 total
* with this patch on a remote DB:
perl t.pl  0,49s user 0,02s system 56% cpu 0,892 total

Testing the auto reconnect:
use Modern::Perl;
use C4::Context;
my $ping = $dbh->ping;
say $ping;
$dbh->disconnect;
$ping = $dbh->ping;
say $ping;

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

prove t/db_dependent/Circulation_issuingrules.t produces no error
prove t/db_dependent/Context.t produces no error

Test
1) dumped Koha DB, load it on a non-local server
2) run sample script whit and without patch, local and remote

use Modern::Perl;
use C4::Context;
for ( 1 .. 100000 ) {
    my $dbh = C4::Context->dbh;
}

Main difference I note is with remote server
a) without patch
real    0m16.357s
user    0m2.592s
sys     0m2.132s

b) with patch
real    0m0.259s
user    0m0.240s
sys     0m0.012s

I think this could be good for DBs placed on
remote servers

Bug 10611: add a "new" parameter to C4::Context->dbh

When dbh->disconnect is called and the mysql_auto_reconnect flag is set,
the dbh is not recreated: the old one is used.

Adding a new flag, we can now force the C4::Context->dbh method to
return a new dbh.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 10611: Followup: remove useless calls to dbh->disconnect

These 3 calls to disconnect are done at the end of the script, they are
useless.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4ae3665ad8afb5d283d989c4622a91690e1c4f8a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
C4/Context.pm

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 82f5b527d8cb79e8d1309b42faa461bcea12924d)

10 years agoBug 11493: Revert "Bug 6869 Batch item modification fails whit accented characters"
Jonathan Druart [Wed, 5 Mar 2014 12:44:49 +0000 (13:44 +0100)]
Bug 11493: Revert "Bug 6869 Batch item modification fails whit accented characters"

This reverts commit c9905750e53e2e1615842ac696d5eeb0a8ac07fc.

Test plan:
1/ Open a bib record with more than 1 item ,
2/ Select all items
3/ Chose Modify selected items
4/ put you "ق ك و" in notes
5/ Verify the items have been updated correctly
6/ put you "éàç" in notes
7/ Verify the items have been updated correctly
8/ put you "ق ك و éàç" in notes
9/ Verify the items have been updated correctly

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed bug on master and that the patch fixes it.
Passes all tests and the QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e55d89be20acb58deb45a30c113bf0f07170fd33)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1bf1dacc7b2ec64b9b17d9b3947209918b3ba02f)

10 years agoBug 11608: Delete unused commented lines in template
Jonathan Druart [Fri, 24 Jan 2014 15:07:08 +0000 (16:07 +0100)]
Bug 11608: Delete unused commented lines in template

On the way, these lines are commented and can be deleted safely.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Removes an HTML comment with unused code.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fb8e159daad8556832d45c9581e32b76aee02e1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6f9e61df9a9fec128fda5c264d6a99d2451e839d)

10 years agoBug 11608: Remove the word 'library' from funds list
Nicole C. Engard [Fri, 24 Jan 2014 14:34:27 +0000 (08:34 -0600)]
Bug 11608: Remove the word 'library' from funds list

The list of funds on the main acq page shows the library's name
followed by the word 'library'. I don't think this word is necessary
as most libraries have the word 'library' in their names. Even
if they don't they probably just want their library name to show
without extra words.

To test:

* Visit the acquisitions module before applying
* See the library's name + 'library' above the funds list
* Apply patch
* Look again at funds list and 'library' should be gone

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: remove a space

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b865e1a024331fbbb76570f84afc9302a7340f7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 740bd016a035d4e8b2fcfc385c10dbbe979ec227)

10 years agoBug 11290: fix display of patron home page for certain translations
Chris Cormack [Fri, 22 Nov 2013 22:04:00 +0000 (11:04 +1300)]
Bug 11290: fix display of patron home page for certain translations

To test
1) In a fresh Koha, generate translation into XX
2) Select XX for the staff interface (i.e. enable it, and choose it)
3) Go to the Patrons page
4) Everything looks fine
5) In the admin page, create a patron category with any non-ASCII
   character.
6) Go back to the Patrons page, everything is broken
7) Apply patch
8) regenerate translation
9) Go back to the Patrons page, everything looks fine
10) Switch to english it still looks fine

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Tried with ru-RU and fixes the problem.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Problem is also visible on untranslated templates changing
one of the sample category descriptions to include diacritics.

[RM note: I wasn't able to reproduce this on an unstranslated
 template -- I tried using Arabic, Cyrllic, and Spanish characters]

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3e1b781adc253722209e46385fb3248ae8d668f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 923657526c2d7ac6d39ce5fd998c8249f43e3f51)

10 years agoBug 11513: (follow-up) format enrollment end date consistently
Galen Charlton [Fri, 31 Jan 2014 16:21:05 +0000 (16:21 +0000)]
Bug 11513: (follow-up) format enrollment end date consistently

The previous patch added use of the KohaDates TT plugin, so this
patch makes sure that it gets used to format the display of all
occurrences of the enrollment end date.

To test:

[1] Create a patron category with a fixed end date.
[2] Bring up the list of all categories and verify that the date
    is displayed based on the dateformat value.
[3] Delete the category, and verify that the confirmation dialog
    formats the date correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6b6377316eb49d94476e9442728389cc4c9297ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1448ee66b6dff5d9fd4caa0789fe49d83906f0c8)

10 years agoBug 11513 - Warnings in Patron categories
Mark Tompsett [Fri, 10 Jan 2014 05:06:21 +0000 (00:06 -0500)]
Bug 11513 - Warnings in Patron categories

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: Kyle M Hall <kyle@bywatersolutions.com>
10 years agoBug 11138 - auto_unsuspend_holds cronjob not in default cron jobs.
Liz Rea [Fri, 25 Oct 2013 03:40:03 +0000 (16:40 +1300)]
Bug 11138 - auto_unsuspend_holds cronjob not in default cron jobs.

to test:
Install the packages with this patch, observe the /etc/cron.daily/koha-common file - auto_unsuspend_holds should now be in the default list.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
10 years agoBug 11138 - Add auto_unsuspend_reserves to crontab.example
Liz Rea [Thu, 14 Nov 2013 01:52:28 +0000 (14:52 +1300)]
Bug 11138 - Add auto_unsuspend_reserves to crontab.example

To test:

Set up and run the cronjobs from crontab.example with a hold set to unsuspend today.
The hold should be unsuspended.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
10 years agoBug 11363 - Label printer profile units are not translatable
Roman Amor [Thu, 16 Jan 2014 02:55:03 +0000 (15:55 +1300)]
Bug 11363 - Label printer profile units are not translatable

Changed the unit names form an import to a switch case so that it is in
the .tt so that it can be translated

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
10 years agoBug 10691: 5xx not properly linked by authid in authority search result list
Tomas Cohen Arazi [Wed, 18 Sep 2013 14:33:07 +0000 (11:33 -0300)]
Bug 10691: 5xx not properly linked by authid in authority search result list

This patch changes the URL and data used to show the 'see also' links
on the OPAC's authority search results page.

Bonus points: makes some strings translatable.

To test:
- On your dev setup (master) create some authority records (i created personal name authorities).
- Pick one of them and link 400$a to another one, do the same with 500$a
- Add some other 400$a and 500$a without linking (i.e. plain text)
- Make sure zebra is running and changes got indexed.
- In the OPAC search for the authority that is linked to the others.
- Check the 'see also:' link points to an authority search
- Apply the patch
- Reload/re-do the search
- Check the 'see also:' link points to the authority id in the case of linked authorities,
  and to an authority search in the case of plain text names.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
10 years agoBug 10691: 5xx not properly linked by authid in authority search result list [Staff]
Tomas Cohen Arazi [Wed, 18 Sep 2013 15:18:20 +0000 (12:18 -0300)]
Bug 10691: 5xx not properly linked by authid in authority search result list [Staff]

This patch changes the URL and data used to show the 'see also' links
on the Staff's authority search results page.

Bonus points: makes some strings translatable.

To test:
- On your dev setup (master) create some authority records (i created personal name authorities).
- Pick one of them and link 400$a to another one, do the same with 500$a
- Add some other 400$a and 500$a entries with plain text (i.e. no linking)
- Make sure zebra is running and changes got indexed.
- In the staff interface search for the authority that is linked to the others.
- Check the 'see also:' link points to an authority search
- Apply the patch
- Reload/re-do the search
- Check the 'see also:' link points to the authority id for linked authorities,
  and to an authority search result in the case of plain text entries.
- Check that the authority search from the cataloguing interface still works as usual.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
10 years agoBug 11554 Capitalization fix in patron account on fines tab
Holger Meißner [Wed, 15 Jan 2014 09:16:08 +0000 (10:16 +0100)]
Bug 11554 Capitalization fix in patron account on fines tab

Works as described.

To test: Create patron account with outstanding fines. Open "Fines" tab.
Confirm that capitalization is correct.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
String patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
10 years agoBug 11476 - Opac self registration title pull down offers 2 empty options
Owen Leonard [Fri, 10 Jan 2014 16:56:15 +0000 (11:56 -0500)]
Bug 11476 - Opac self registration title pull down offers 2 empty options

If you have patron titles enabled, the OPAC patron details form lists 2
empty spaces instead of 1. An empty option is passed by the script, so
the template does not need to include one.

To test you must have at least one patron title set in BorrowersTitles
system preference and OPACPatronDetails must be set to "allow."

1. Apply the patch
2. Log in to the OPAC
3. Click the "personal details" tab.
4. Click the "salutation" dropdown. There should be only one blank line
   preceding the existing titles.

Test in both prog and bootstrap.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described for existing and creating new accounts.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
10 years agoBug 11522 self-registration formating
Francesca Moore [Tue, 14 Jan 2014 22:43:00 +0000 (11:43 +1300)]
Bug 11522 self-registration formating

1. in prog theme, enable opac self-registration and inspect clear date with firebug
   note that there are empty paragraph tags
2. add date of birth as a requirment in self-registration
3. apply patch
4. refresh page and notice that empty paragraph tags have been deleted,
   so that required lines up with clear date
5. repeat the above steps for bootstrap theme

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
10 years agoFixing typo in updatedatabase
Chris Cormack [Wed, 26 Mar 2014 15:39:22 +0000 (04:39 +1300)]
Fixing typo in updatedatabase

10 years agoBug 11329: Check for MARC record existence in catalogue/showmarc
Marcel de Rooy [Mon, 2 Dec 2013 08:41:53 +0000 (09:41 +0100)]
Bug 11329: Check for MARC record existence in catalogue/showmarc

Intranet counterpart patch. Same check as in opac/opac-showmarc.

Test plan:
[1] Run showmarc.pl with valid biblionumber in id parameter.
[2] Remove id parameter from URL. You should get a 404 now.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.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>
(cherry picked from commit d92dc91f778f5db3360f3070d0bb5d44a0d75024)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ce7cd56c0b60031d6140a61e0f135db17deeba31)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
10 years agoBug 11329: Check for MARC record existence in opac-showmarc
Marcel de Rooy [Mon, 2 Dec 2013 08:30:13 +0000 (09:30 +0100)]
Bug 11329: Check for MARC record existence in opac-showmarc

Instead of just running as_formatted, check if GetMarcBiblio returned
a reference. If you e.g. did not pass an id, return 404 instead of 500.
Consistent with opac-export.pl

Test plan:
[1] Run opac-showmarc.pl with valid biblionumber in id parameter.
[2] Remove id parameter from URL. You should get a 404 now.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 80bcbd798991eaa57bcc7b5ac8906b276fbed5bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5d4a6bb712fe2d4b6179cc15eaf29cda2676b547)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
10 years agoBug 11352: fix unexpected data loss issues with batch patron deletion/anonymization
Jacek Ablewicz [Mon, 24 Feb 2014 16:37:43 +0000 (17:37 +0100)]
Bug 11352: fix unexpected data loss issues with batch patron deletion/anonymization

Batch patron deletion/anonymization tool has some issues:

1) If 'dateformat' setting in I18N/L10N system preferences is set
to anything other then 'iso' (eg. 'metric'), bulk deletion when using
'expiration date is before' criterion is not working properly. Date
entered in this field will be efectivelly ignored (or possibly
sometimes wrongly interpreted as different date, in other format)
on the final patron deletion stage. This may result in deleting
(or moving to trash) more borrower records then intended.
2) Bulk/batch patron deletion should skip borrowers with
nonzero account balance (ones with oustanding fines or credits)
3) This tool shouldn't offer to choose as deletion criterion
those patron categories which have category_type set to 'S'
(= staff patron categories)

This patch fixes above mentioned problems. It also adds an option
to "test run" patron batch deletion, and makes this option
the default choice in "warning" stage.

Test plan:
- prepare test database with some patron records (at least 2,
the more the better) set up in such a way that they will be vulnerable
to issues 1 & 2
- confirm issues 1,2
- restore test database
- apply patch
- ensure issues 1 & 2 are no longer present - first by using new "test
run" option: for #1, record counts in "warning" stage and "final" stage
should be now the same; for #2, observe that patron records with nonzero
balance are now excluded from deletion
- redo the tests, this time choosing "delete permanently" and "move
to trash" instead of "test run"
- test #3 by changing "Category type" to "S" in some
test patron categories - after that, those categories should no
longer be choosable as deletion criteria.

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
Tested with dateformat = dd/mm/yyyy. I tested with two expired patrons,
one with fines and one without. Before the patch a lot of unexpected
patrons were deleted along with the expected ones. After
applying the patch only the expired patron was deleted, not the
one with fines. The test run and the "real" run reported correct numbers.

The patch also makes sure no patron categories with category_type = S
are suggested for batch deletion.

Note: The ergonomics of the "Batch delete/anonymize" tool is hardly
optimal, but this patch fixes a real, data-loosing bug, so let's
deal with the ergonomics later.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 69216d2217519cd6d8ad97710236251abdd89ae9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0853bfd32c840aedf13a5aa3327905c8c6b2067e)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
10 years ago3.12.12 release notes v3.12.12
Chris Cormack [Mon, 24 Mar 2014 20:40:28 +0000 (09:40 +1300)]
3.12.12 release notes

10 years agoBumping version number for release
Chris Cormack [Mon, 24 Mar 2014 20:11:54 +0000 (09:11 +1300)]
Bumping version number for release

10 years agoBug 9210: wrap long lines in printed hold notices
Sophie Meynieux [Tue, 4 Dec 2012 17:05:36 +0000 (18:05 +0100)]
Bug 9210: wrap long lines in printed hold notices

This commit adds wrapping styles to print-notices.tt template

Test plan:
  * place a hold on a title with a very very long title or author
  * mark it as "waiting for pickup" by doing a checkin
  * go to command line interface, and run
  * misc/cronjobs/gather_print_notices.pl /tmp
  * misc/cronjobs/printoverdues.sh /tmp
  * if your title/author is long enough, it's split on 2 lines
    with this patch (it is not before this patch)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 06a8b6f314ded89fa6b4f94276e68e390b7afc3a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 18c295a49ac2614d37ee6efdce774b65ea381617)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
10 years agoBug 11502: make library filter in "Holds To Pull" more precise
David Cook [Thu, 9 Jan 2014 06:12:26 +0000 (17:12 +1100)]
Bug 11502: make library filter in "Holds To Pull" more precise

This patch uses regex checking via the DataTables fnFilter API method
to make the branch filter more precise on the "Holds to Pull" page.

The ability to use regex is built into DataTables so this just adds
the actual expression.

_TEST PLAN_

Before applying:

1) Add library (branches) with codes of NM, NMH, and NB
2) Add items (that can be placed on hold) at all these branches
3) Place a hold on an item that is only available at NM
4) Place a hold on an item that is only available at NMH
5) Place a hold on an item that is only available at NM and NB
6) Go to "Holds to Pull" in the Circulation module
7) Filter by these three different values
8) Note that filtering by "NM" will incorrectly bring up all three
holds, while "NMH" and "NB" will only pull up one (like they should).

Apply the patch.

9) Shift+refresh the page so that your Javascript refreshes
10) Repeat step 7 (filtering by the different branch values)
11) Note that filtering by "NM" will now only bring up the hold for "NM"
and the hold for "NM" and "NB", while the others still only bring up
one hold.

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>
(cherry picked from commit e96d73aa9f462fb653b8b67d7d5bff81dab94be7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8a0e92c718e7c180a44b98fbe380c26667deacd)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
10 years agoBug 11505: fix untranslatable table headers in Label batch manager
Owen Leonard [Fri, 10 Jan 2014 20:46:29 +0000 (15:46 -0500)]
Bug 11505: fix untranslatable table headers in Label batch manager

The label batch manager script hard-codes the table header cell labels
in order to pass them to an HTML-building function. This obviously isn't
the best solution for internationalization, but picking the whole scheme
apart would be very complicated.

Instead this patch uses a SWITCH statement to check for each possible
case and outputs the correct translatable string for each.

To test, apply the patch and run "perl translate update" for any
translation. Check the revised po file and confirm that the new strings
are present. View the label batch edit page and confirm that the table
headings look correct: Tools -> Labels -> Manage batches -> Edit batch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests.
Similar fixes are probably needed for other pages of the labels
modules.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e8f5ee9eef7a558ae1af8237493f8dc52e52945a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
10 years agoIncrement version for 3.12.11 release v3.12.11
Tomas Cohen Arazi [Tue, 25 Feb 2014 14:12:57 +0000 (11:12 -0300)]
Increment version for 3.12.11 release

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoTranslation updates for 3.12.11 release
Bernardo Gonzalez Kriegel [Tue, 25 Feb 2014 13:11:11 +0000 (10:11 -0300)]
Translation updates for 3.12.11 release

(cherry picked from commit afa4450d02123c595300af726af4717184b7efe7)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoUpdate release notes for 3.12.11 release
Tomas Cohen Arazi [Tue, 25 Feb 2014 14:09:52 +0000 (11:09 -0300)]
Update release notes for 3.12.11 release

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 10896: Add a --verbose option to koha-translate
Tomas Cohen Arazi [Mon, 6 Jan 2014 13:52:38 +0000 (10:52 -0300)]
Bug 10896: Add a --verbose option to koha-translate

The -v and --verbose option switches add the --verbose switch to the
misc/translator/translate script call in the packages' 'koha-translate'
command.

The docs are updated accordingly.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as expected with and without -v. Man page looks good.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cfc3ce6772b908bb73a38a3bb778b8f25bb4ac9e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3f19528b9a28a8b3b91d40b3b36bfbfef3b8dc25)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11510: koha-translate usage message fixes
Tomas Cohen Arazi [Thu, 9 Jan 2014 15:37:20 +0000 (12:37 -0300)]
Bug 11510: koha-translate usage message fixes

The koha-translate's usage message has a couple of inconsistencies:

'--all' should be '--available'
and '--help' is missing from the usage examples.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tested using instructions on
http://wiki.koha-community.org/wiki/Testing_man_pages

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 83ab4edc5a79c6e2ca0f4d394387d20c9aee7453)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0fb4373e31af2671f9917505aed3a7eff3d05dc2)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11439: (follow-up) adjust for change in list returned by OCLC XISBN
Galen Charlton [Thu, 30 Jan 2014 15:48:48 +0000 (15:48 +0000)]
Bug 11439: (follow-up) adjust for change in list returned by OCLC XISBN

The set of related ISBNs for the first Harry Potter book returned
by OCLC's XISBN service has changed recently, so this patch adjusts
the test to match.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6e21422d00f02c88384ce361dab86ccc44e92e49)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11540: (follow-up) add a couple of tests more
Tomas Cohen Arazi [Tue, 14 Jan 2014 14:35:31 +0000 (11:35 -0300)]
Bug 11540: (follow-up) add a couple of tests more

This patch makes sure all scenarios are covered for SetUTF8Flag.

Signed-off-by: Emma Heath <emmaheath.student@wegc.school.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0db732980aec0e7f7257b559419781adfab538ed)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11540: increase test coverage of Charset.pm
Emma Heath [Tue, 14 Jan 2014 01:18:47 +0000 (14:18 +1300)]
Bug 11540: increase test coverage of Charset.pm

To test
1. run prove t/Charset.t
2. apply patch
3. run prove t/Charset.t
 notice more tests are run

Signed-off-by: Tom Houlker <thomas.houlker@hibs.school.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests pass!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6a6df3f5d755aa462f727fa21464883b31d51462)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 9579: fix truncation of facets containing multi-byte characters
Tomas Cohen Arazi [Thu, 16 Jan 2014 00:06:04 +0000 (21:06 -0300)]
Bug 9579: fix truncation of facets containing multi-byte characters

We seem to be relying on whatever Zoom::Results->render return, and
Perl doesn't explicitly consider it UNICODE data. That's why CORE::substr
(and probably CORE::length too) cut the bytes wrong.

This patch just decodes the UTF-8 data that render() returns and then
Perl behaves, heh.

It uses Encode::decode_utf8 which is already a dependency for the current
stable Koha releases.

REVISED TEST PLAN
-----------------
1) Import the attached sample records.
2) Rebuild your indexes
3) In OPAC search for يكيمكتبات : قبسي ، كرم
-- There will be ugly diamonds with question marks in the facets
4) apply the patch
5) Search again.
-- The names will be properly truncated.
NOTE: This test assumes FacetLabelTruncationLength = 20.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described, tested with several German, English and
the Arabic test record. Arabic strings now display correctly
and no regression was found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
I've reviewed it and approve its inclusion in 3.14.x and earlier.  I
will use the patches for bug 11096, once they pass QA, for the master
branch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 171e2b47460c7afa489b16eb885a9862eef9d43a)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11398: A typo occurred with occured
Marcel de Rooy [Mon, 16 Dec 2013 11:01:21 +0000 (12:01 +0100)]
Bug 11398: A typo occurred with occured

This patch cures occured and makes occurred occur.
Note that I found them while testing bug 11170.
In a follow-up of 11170, I corrected this typo in parcels.tt.
This patch touches update22to30.pl and modborrowers.tt

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes a typo in 2 files.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9921228f2a12de47d8e1fc85e936562c20a7abe4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f69e836569ee122ca42d6bf77ebac9dd656f55e5)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11402: (follow-up) add one more unit test
Galen Charlton [Mon, 30 Dec 2013 16:22:05 +0000 (16:22 +0000)]
Bug 11402: (follow-up) add one more unit test

This test exercise the case where defined parameters
are passed to the _guide_box() routine.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7d01e61cdf96f06d3f823eaaa435e2850bacf7e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ef6eeba806fcea5e9cab652f425546de90147285)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11402: make Labels::_guide_box return undef if undefned data is passed
Tomas Cohen Arazi [Mon, 16 Dec 2013 14:55:56 +0000 (11:55 -0300)]
Bug 11402: make Labels::_guide_box return undef if undefned data is passed

That's it. A guide box cannot be created if invalid data is passed.

Sponsored-by: Universidad Nacional de Cordoba
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, includes new unit tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4720cbc4145223f1ffd653efdefd1a4f724d3144)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c129755ce41fcc3712c987149d5cbc4dec696cf6)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11188 - Make gather_print_notices.pl die on failed open()
Magnus Enger [Sat, 23 Nov 2013 21:57:03 +0000 (22:57 +0100)]
Bug 11188 - Make gather_print_notices.pl die on failed open()

Problem:
If you tell gather_print_notices.pl to write output to a location
you do not have write access to, it will silently fail to write the
data, but still mark unsent messages as sent.

Solution:
This patch adds two lines of defense:
1. Check that the location given for the output is writable
2. use "open() or die" instead of just "open()" when writing the
   output
The first measure should catch most of the potential errors, but
I guess a directory can be writable, but the open() still can fail
because the disk is full or something similar.

To test:
- Make sure you have some unsent messages in the message_queue table,
  that do not have an email adress
- Apply the patch
- Run the script, pointing at a location you do not have access to
  write to. Check that the script exits with an appropriate error
  message, and that the unsent messages are still unsent. Do this
  both with and without the -s option.
- To fake passing the first line of defence, comment out line 62
  and put this in instead:
  if ( !$output_directory || !-d $output_directory ) {
- Run the script again as above, check you get an appropriate
  error and that the message queue is not touched
- Reset line 62 to how it was
- Run the script against a directory you do have access to write to
  and check that output is produced as expected and that messages
  are marked as sent
- Sign off

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.
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e8a24c35f64cb461a80f768b505bbf16c49dfeff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ac5a13eaa34b2377d39b362ed0326f200b5365e5)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11417: make sure remove_unused_authorities.pl accepts --test
Gaetan Boisson [Wed, 18 Dec 2013 14:19:50 +0000 (15:19 +0100)]
Bug 11417: make sure remove_unused_authorities.pl accepts --test

This patches adds support for the --test option, as well as a
short message telling the user the script is running in test mode.

Test plan :
- Launch the script with -h to see the help
- Launch the script with --test and --aut with an authtypecode
  that is used in your instance
- Make sure it does the same thing as launching it with -t
- Launch the script for real and make sure it still works as
  expected, deleting unused authorities.

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>
(cherry picked from commit 6657860010ef27792251596590c1471ad5d08ad8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f6ab47d2e2039fde60670e7541f030d44dbc6bae)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11279: (follow-up) remove unnecessary check on number of quotes
Jonathan Druart [Thu, 19 Dec 2013 10:05:54 +0000 (11:05 +0100)]
Bug 11279: (follow-up) remove unnecessary check on number of quotes

It is not necessary to process the case where the number of quotes
is just one, as int(rand(1)) will always produce 0, which is a valid
offset.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8ee6e4290e2d1ca4fea53363b7ca3275cb0e6f58)
(cherry picked from commit bff4fac7b78fe8573527c8733f8364af351d23a9)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11279: Improve how a new quote of the day is selected
Katrin Fischer [Wed, 11 Dec 2013 23:54:08 +0000 (00:54 +0100)]
Bug 11279: Improve how a new quote of the day is selected

If there is a gap in the id sequence for the quotes table, it
is possible that no new quote will be selected. This will happen
particularly when a lot of the older quotes with low ids have been
deleted.

This patch improves the selection of a new quote.

To test:
- Load sample quotes
- Delete the first half of the quotes.
  Note: With 34 quotes, delete the quotes with ids from 1-17
- Activate the QuoteOfTheDay system preference
- Check if a quote is displayed in OPAC
- Reload the page a few times, no quote should be displayed
  Note: make sure you don't have a quote with the current
  date in your quotes table before running those tests
- Run 'perl t/db_dependent/Koha.t'
  Note: requires sample quotes!
- Apply patch
- Reload the OPAC start page
- Verify a quote was now picked
- Run 'perl t/db/dependent/Koha.t' again - all tests should still pass

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Patch modified to use "LIMIT 1 OFFSET ?" rather than "LIMIT ?, 1"; the
latter construction does not work in PostgreSQL.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5a3db23362eb076a2f6d5a87f87b29f4a436a14f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ae55277499f06ae0d3e2973349d1f34cf7f60ec8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11279: regression test for picking random quote
Katrin Fischer [Thu, 12 Dec 2013 19:50:52 +0000 (20:50 +0100)]
Bug 11279: regression test for picking random quote

This patch adds new tests based on the db_dependent tests in
t/db_dependent/Koha.t for GetDailyQuote().

Tests run on an empty database and don't require Test::Deep.

Tests will fail before applying the patch for 11297, but will
pass after applying the patch.

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>
(cherry picked from commit f874eec0793f83c3c0f1461fecb878ca57ed701b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 252051df7378d1d23e726a8757efb4e6af22d1fa)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>