koha.git
10 years agoBug 11846: Correct database update for restrictions with date 9999-12-31
Fridolin Somers [Mon, 24 Feb 2014 11:15:55 +0000 (12:15 +0100)]
Bug 11846: Correct database update for restrictions with date 9999-12-31

The borrowers with indefinite restrictions have borrowers.debarred with '9999-12-31'.

Database update for this bug contained :
  INSERT INTO borrower_debarments ( borrowernumber, expiration, comment )
  SELECT borrowernumber, debarred, debarredcomment FROM borrowers WHERE debarred IS NOT NULL

For borrowers where borrowers.debarred is '9999-12-31', this value
is copied into borrower_debarments.expiration.

This is not correct because borrower_debarments.expiration must be
NULL for indefinite restrictions.

This patch corrects update 3.13.00.035 and also adds an update for
databases already updated.

Test plan :
- Use a database with version 3.13.00.000
- Set a borrower as restricted for ever (leave until empty)
- Use sources to master + patch
- Perform updatedatabase
- Look at borrower details, tab "Restrictions"
=> Without patch, you see Expiration 31/12/9999
=> With patch, you see Expiration Infinite

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I tested both DB revisions by resetting Version of my database (and
adding a SetVersion after the revised older dbrev). This was possible
since the debarred field still exists in borrowers. (I have my doubts
about that, but that goes outside the scope of this report.)

Also note that routine _UpdateBorrowerDebarmentFlags puts back 9999-12-31
into borrowers for indefinite restrictions (which looks not very consistent).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f6131d8e6094ae9e221a9d5750d744ed1f91dd85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11403: (follow-up) Fix typo in renew help
Nicole C. Engard [Wed, 12 Mar 2014 20:29:48 +0000 (14:29 -0600)]
Bug 11403: (follow-up) Fix typo in renew help

This patch adds a missing letter to the Renew help file

To test:

Go to Circulation > Renew
Click Help
Confirm that the text now reads 'scan' instead of 'can'

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 353418dee043ccd332ef3f24d1f1bd330a6d2dd1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoIncrement version for 3.14.5 release v3.14.05
Fridolin Somers [Wed, 26 Mar 2014 10:37:15 +0000 (11:37 +0100)]
Increment version for 3.14.5 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoMerge remote-tracking branch 'translator/3.14.05-translate' into 3.14.x
Fridolin Somers [Wed, 26 Mar 2014 10:32:43 +0000 (11:32 +0100)]
Merge remote-tracking branch 'translator/3.14.05-translate' into 3.14.x

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoUpdate release notes for 3.14.5 release
Fridolin Somers [Wed, 26 Mar 2014 10:31:35 +0000 (11:31 +0100)]
Update release notes for 3.14.5 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoTranlation updates for 3.14.05 release
Bernardo Gonzalez Kriegel [Tue, 25 Mar 2014 12:35:56 +0000 (09:35 -0300)]
Tranlation updates for 3.14.05 release

Two new languages: Belarusian and Faroese

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>
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>
10 years agoBug 11473: (follow-up) ensure link to item is construct correctly
Galen Charlton [Fri, 17 Jan 2014 06:04:37 +0000 (06:04 +0000)]
Bug 11473: (follow-up) ensure link to item is construct correctly

This patch adjusts the check on action_logs.info to better detect
if the event concerns an item.  This fixes a problem where the links
from log entries on item modifications would, if followed, result
in internal server errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 490e38069c0b9fcf71449d7812a0056b68318c64)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11473 - add 'biblio' and 'item' to cataloguing logging info
David Cook [Mon, 6 Jan 2014 04:01:10 +0000 (15:01 +1100)]
Bug 11473 - add 'biblio' and 'item' to cataloguing logging info

This patch adds the words 'biblio' and 'item' to the 'info'
of the cataloguing logs which were missing them (such as biblio
delete, biblio mod, item mod, upload cover image).

This patch also adds 'authority' for authority mod.

_TEST PLAN_

Before applying:
1) Create/view mods for items, biblios, and authorities.
2) Create/view biblio deletion
3) Create/view upload cover image log
4) Note that none of these contain the words 'biblio','item',or
'authority' in their "Info" columns.

Apply patch.

5) Repeat steps 1-3
6) Note that the new logs contain 'biblio','item', and 'authority'
in their "Info" column, while the past ones don't.
7) Note also that 'biblio' and 'item' will have 'Biblio' and 'Item'
appear in their "Object" column for the new logs

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 5885077fbbc97add0d077898c06726ef3106eee9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11473 - Improve wording in log viewer template
David Cook [Mon, 6 Jan 2014 03:49:01 +0000 (14:49 +1100)]
Bug 11473 - Improve wording in log viewer template

This patch capitalizes 'member' and 'biblio' as object labels in the
log viewer.

It also adds a "Subscription" label, and changes "auth" to "Authority".

_TEST PLAN_

Before applying patch:

1) View logs for patrons, new biblio, serials, and authorities.

Apply the patch:

1) Notice the capitalization and new/modified labels.

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 8b386419c07413c810c56482cd4b505cdb5f43f2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11473 - Remove boilerplate in log viewer template
David Cook [Mon, 6 Jan 2014 03:43:53 +0000 (14:43 +1100)]
Bug 11473 - Remove boilerplate in log viewer template

This patch eliminates unnecessary conditions and boilerplate.

_TEST PLAN_

Apply the patch.

1) Try viewing logs for circulation, patrons, fines,
cataloguines, serials, authorities, etc.
2) Note that everything should look exactly the same as before,
with one exception: FINES
3) Fines will now show "member X" for the user associated with
the fine.

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 5b3535899acfdcd309d722dba39a8bdcdbdc54e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11473 - Fix log viewer template conditions
David Cook [Mon, 6 Jan 2014 03:32:31 +0000 (14:32 +1100)]
Bug 11473 - Fix log viewer template conditions

This patch adds the 'loopro' key to the 'module' value, so that
conditions are actually triggered in the template logic.

(Note: loopro.CIRCULATION is valid, but I changed it for the sake
of consistency across the different conditions.)

This patch also adds substr checks to the 'info' column when
using the cataloguing module. This will check for 'item' and 'biblio',
so that the appropriate label qualifer can be shown in the log viewer.
If either term is absent, the unqualified number will be shown instead
(this will be the majority of action logs at this point).

_TEST PLAN_

Before applying:

1) Access log viewer from Tools (or wherever really)
2) Look up logs for circulation, patrons, cataloguing, serial,
authorities, etc.
3) Note that the "Object" will always just be a number without qualification.

After applying the patch:

1) Look at those same logs
2) Note that the object number for borrowers will usually be prefaced
by 'member' (notwithstanding FINES which aren't taken into account in
this template yet); new bibs and new items should say 'Item X' or
'Biblio X'. Serials should have a link. Authorities should have a link
and an 'auth' preface.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ac6fb12c9aff29a652ee10c960ab10309d22adee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11476: remove extra empty option from title pull-down in OPAC self-registration
Owen Leonard [Fri, 10 Jan 2014 16:56:15 +0000 (11:56 -0500)]
Bug 11476: remove extra empty option from title pull-down in OPAC self-registration

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: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a8aa6e8f7efd1ea29fdbd99cf3e573e72b424eb5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11018: allow adding order from a reverted MARC batch
Jonathan Druart [Tue, 8 Oct 2013 15:17:45 +0000 (17:17 +0200)]
Bug 11018: allow adding order from a reverted MARC batch

Weird behavior:
When an import is undone into catalog, the status is set to "reverted".
But if you open the add orders from iso2709, the status is automatically
set to "imported" and does not appear in the list.
So it is not possible to import a reverted batch.

[RM note: since a reverted batch is nonetheless a staged batch, and
could be reused, allowing orders to be placed by taking bibs
from a reverted batch is not as odd as it might sound.  It *can* look
odd for a staged or reverted batch to contain records that are
imported, but that's a long-standing oddity.]

Test plan:
- verify you reproduce the weird behavior
- apply this patch
- import a file and the batch into the catalog
- verify (in the your mysql/MariaDB cli) the status is "imported"
- verify it does not appears in the add orders from iso2809 page
- undo the import
- verify (in the your mysql/MariaDB cli) the status is "reverted"
- verify it appears in the add orders from iso2809 page and the status
  is always "reverted"
- finish the order

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4bd730d4c24440c157801b68e248002b10ec0dd3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
10 years agoBug 9788: (follow-up) update the bootstrap theme
Galen Charlton [Fri, 17 Jan 2014 05:21:07 +0000 (05:21 +0000)]
Bug 9788: (follow-up) update the bootstrap theme

This patch applies the change made in the QA follow-up
to the Bootstrap theme.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a776c7764050290d20ad4e5200aaed11a3983bf7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: (follow-up) Unit tests for changed routine GetReservesFromItemnumber
Marcel de Rooy [Thu, 26 Sep 2013 10:22:51 +0000 (12:22 +0200)]
Bug 9788: (follow-up) Unit tests for changed routine GetReservesFromItemnumber

Adds three tests to Reserves.t for GetReservesFromItemnumber.
We test if this routine does not return a future next available hold,
a future item level hold. And if it does return a future wait (that is:
a confirmed future hold, using ConfirmFutureHolds).

Note that Holds.t does also contains some basic tests for this routine,
but the additional tests seem to better located in the direct context of
tests for bug 9761 for ConfirmFutureHolds.

Test plan:
Run both t/db_dependent/Holds.t and t/db_dependent/Reserves.t.
Verify if both tests do not fail.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d211fa50ede180ed511cdf7f55be6c084abc1ff5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: QA followup
Jonathan Druart [Mon, 4 Nov 2013 10:55:57 +0000 (11:55 +0100)]
Bug 9788: QA followup

1/ CURRENT_DATE() is a MySQLism and should be replaced with CAST(now() AS
DATE).
2/ The date formatting should be done in the template (using the TT
plugin).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 38edd714c598322e81a32a0dfc5f2ce0da46826d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: (follow-up) for expirationdate in Letter.pm
Marcel de Rooy [Fri, 21 Jun 2013 16:43:59 +0000 (18:43 +0200)]
Bug 9788: (follow-up) for expirationdate in Letter.pm

Pasting comment from the Bugzilla report:

Looking bit longer at this code, it is kind of strange to find it
there in the first place. Adding maxpickupdelay in Letters.pm should
not be there, but it is..

Also this date is not used normally in the default HOLD Available for
Pickup notice (that we are generating in this case). And if it would be
undef, the expiration date should imo be empty instead of today+0.
(before adding maxreservespickupdelay, you should test the allowexpire
pref first) So it is an (invisible) bug on its own.

Test plan:
See former patch. Kyle just discovered this bug, apparently by
deleting the maxpickupdelay pref..

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a23d4181b1e756a61a036059b8b909d4f0d30537)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber
Marcel de Rooy [Thu, 26 Sep 2013 08:33:46 +0000 (10:33 +0200)]
Bug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber

Before bug 9788 the alldates parameter of GetReservesFromItemnumber was
actually not used in the codebase.
The first patch of bug 9788 did change that and passed true by default.

But a closer look revealed that we do not really need it.

The parameter is removed by this patch; the SQL statement is slightly
adjusted: if reservedate<=now or a waitingdate is filled for the
requested itemnumber, GetReservesFromItemnumber will return the reserve.

This includes so-called future waits: a future hold that has been confirmed
ahead of time with pref ConfirmFutureHolds > 0 days.

Note that future item-level holds are not really interesting to return; this
just corresponds to original behavior. Future next-available holds are not
in view at all; they do not contain an item number.

Test plan:
Actually, the test plan of the first patch is valid. But for completeness I
repeat it here:

[1] Enable future holds and set ConfirmFutureHolds to 2 days.
[2] Place a future next-available hold for 2 days ahead.
[3] Check item status on catalogue detail. Available? That is fine.
[4] Confirm the future hold by checking it in. ('future wait')
[5] Look at item status again on catalogue detail. Must be Waiting now.
[6] Switch to OPAC and login as another opac user. Goto Place a hold.
[7] Check item status with item level hold info. Is it waiting?
[8] Try to place hold in staff, check item level status again. Waiting?
[9] Make a transfer for the item. Switch branch. Check hold status on
    Transfers to receive.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 92be11bbcf20628dd7db8b83fc0b902ba578a28a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: Improvements when calling GetReservesFromItemnumber
Marcel de Rooy [Mon, 11 Mar 2013 13:28:57 +0000 (14:28 +0100)]
Bug 9788: Improvements when calling GetReservesFromItemnumber

This patch makes GetReservesFromItemnumber also returns the waiting
date and removes some repeated code.

Improves item status display on catalogue detail, when placing a hold at
opac-reserve and in staff, and on transfers to receive form.

This patch builds on work from reports 9367 and 9761.

Test plan:

Place a future next-av. hold (enable future holds prefs), say 2 days ahead.
Check item status on catalogue detail. Nothing to see.
Enable ConfirmFutureHolds by inserting a number of days, say 2.
Confirm earlier hold by checking it in. Look at item status again on detail.
Switch to other opac user. Try to place a hold again. Check item status with
item level hold info. Try to place hold in staff, check item level status.
Make a transfer for that item. Switch branch. Look at transfers to receive.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1a9737be768aa1e585addc596e2fcb5a77482c38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7143: add another name to the about page
Galen Charlton [Thu, 16 Jan 2014 15:30:43 +0000 (15:30 +0000)]
Bug 7143: add another name to the about page

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4e4a33ef5deecc32711092d78d87f2eefe3fbcf5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7143: Updating about page and history
Chris Cormack [Sun, 12 Jan 2014 07:11:40 +0000 (20:11 +1300)]
Bug 7143: Updating about page and history

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ef7480f362a0286b13e1ba1b99e58c6d2ca7ba72)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11522: improve formating of self-registration form
Francesca Moore [Tue, 14 Jan 2014 22:43:00 +0000 (11:43 +1300)]
Bug 11522: improve formating of self-registration form

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: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 42ec10670efb6e33fa23537c1037ff9087f55e30)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
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>
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>
10 years agoBug 11381: improve styling of IDreamBooks content in bootstrap theme
Owen Leonard [Fri, 10 Jan 2014 17:45:30 +0000 (12:45 -0500)]
Bug 11381: improve styling of IDreamBooks content in bootstrap theme

Styling of IDreamBooks elements is not correct in the bootstrap theme
because the relevant CSS was not transferred from the prog theme. This
patch adds it back.

To test, switch to the bootstrap theme and enable IDreamBooks system
preferences in the OPAC, particularly IDreamBooksReadometer. Find a book
in the OPAC which shows IDreamBooks review data and confirm that
everything looks correct.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described. Tested with "The help".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f2c61429944140abfd0a097bdb50b03e08ef569b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11509: (trivial rmaint followup) wrong parameter count
Tomas Cohen Arazi [Mon, 10 Feb 2014 14:55:06 +0000 (11:55 -0300)]
Bug 11509: (trivial rmaint followup) wrong parameter count

While adding the --help and -h switches I forgot to change to arguments
count validation so that one can actually use those parameters (i.e.
koha-create should accept being invoked with only one parameter).

This patch just changes the minimum parateres required from 2 to 1.

To reproduce:
- Run 'koha-create --help' from master
=> Usage information is printed BUT ALSO an "Error: wrong parameters"
   message
- Apply the patch and
- Run 'koha-create --help'
=> Usage informatio it printed and no error message.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 692c4f03b5adebec754c1a8db16e2db97c63f554)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11503: [Follow-up] fix another typo
Owen Leonard [Tue, 14 Jan 2014 13:50:09 +0000 (08:50 -0500)]
Bug 11503: [Follow-up] fix another typo

There is still a typo left to fix which I didn't catch because I was
doing a spell-check and didn't double-check the bug report:

Van der Griten -> Van der Grinten

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 5c67d182ea718a37032edabbe000933776baa251)

10 years agoBug 11503: fix several typos
Owen Leonard [Fri, 10 Jan 2014 16:00:22 +0000 (11:00 -0500)]
Bug 11503: fix several typos

This patch corrects several typos: Some reported in Bug 11503, others
found during a systematic spell check of the help files.

To test, examine the changes and confirm that the spelling changes are
correct.

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 a5c762d491465bcc7ad8d8f5e94ff5c36c172091)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoIncrement version for 3.14.4 release v3.14.04
Fridolin Somers [Wed, 26 Feb 2014 11:48:17 +0000 (12:48 +0100)]
Increment version for 3.14.4 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoMerge remote-tracking branch 'translator/3.14.04-release' into 3.14.x
Fridolyn SOMERS [Wed, 26 Feb 2014 11:44:47 +0000 (12:44 +0100)]
Merge remote-tracking branch 'translator/3.14.04-release' into 3.14.x

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoUpdate release notes for 3.14.4 release
Fridolyn SOMERS [Wed, 26 Feb 2014 11:42:45 +0000 (12:42 +0100)]
Update release notes for 3.14.4 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoTranslation updates for 3.14.04 release
Bernardo Gonzalez Kriegel [Tue, 25 Feb 2014 13:19:56 +0000 (10:19 -0300)]
Translation updates for 3.14.04 release

10 years agoBug 10952: (follow-up) remove mention of KohaOpacRecentSearches cookie
Galen Charlton [Fri, 10 Jan 2014 16:55:37 +0000 (16:55 +0000)]
Bug 10952: (follow-up) remove mention of KohaOpacRecentSearches cookie

Now that this cookie no longer exists, remove mention of it
from a test case.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit da853bf74eefbd935734177722aaa763ce71d170)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10952: (follow-up) clear seach history from session after saving it to DB
Galen Charlton [Fri, 10 Jan 2014 16:49:01 +0000 (16:49 +0000)]
Bug 10952: (follow-up) clear seach history from session after saving it to DB

This patch makes sure that the search history from an
anonymous session is cleared from the session after a user
logs in (and the session history is saved to that user's
record in the database).  This fixes a problem where the
search history from the session got repeatedly added to the
database each time the user did something while logged
into the OPAC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 914515202df0612c1cdb64bf408120a1364316a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10952: (follow-up) Always flush session after deletion
Julian Maurice [Mon, 6 Jan 2014 09:00:41 +0000 (10:00 +0100)]
Bug 10952: (follow-up) Always flush session after deletion

This is recommended in CGI::Session documentation.

Signed-off-by: Charlene Criton <charlene.criton@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 939d68ea7b0fb7c0649531b324ad4938a5360c0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10952: (follow-up) comments fixes and unit tests
Julian Maurice [Wed, 18 Dec 2013 09:58:36 +0000 (10:58 +0100)]
Bug 10952: (follow-up) comments fixes and unit tests

- Remove unit tests for ParseSearchHistoryCookie, which doesn't exist
  anymore
- Add unit tests for ParseSearchHistorySession and
  SetSearchHistorySession
- Remove/Modify comments about search history cookie

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Tests fixed and moved, and comments tidied up

Signed-off-by: Charlene Criton <charlene.criton@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bbf7cd6876e94865492e3fd19e59c31b6b95b588)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10952: Store anonymous search history in session
Julian Maurice [Thu, 26 Sep 2013 09:22:26 +0000 (11:22 +0200)]
Bug 10952: Store anonymous search history in session

Storing search history into cookie can cause problems, due to the size
limitation of 4KB.

The solution here is to store search history into the CGI::Session
object, so there is no size limitation (but anonymous search history
still remember up to 15 requests max.)

Test plan:
- Go to OPAC in anonymous mode.
- Check that the "Search history" link is *not* shown in the top right
  corner of the page
- Make some searches on /cgi-bin/koha/opac-search.pl
- The "Search history" link should appear. Click.
- Your search history should be displayed.
- Try to log in with invalid username/password
- Go back to search history, it's still there
- Now log in with valid username/password
- Your anonymous search history should be saved into your own search
  history.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Restoring original sign offs and comments below

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

Well, search history saving is similar before and after patch.
i.e. anonmymous search is saved when user logs in, but cookie
KohaOpacRecentSearches is empty.
Shows current an previous session searches

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
All tests and QA script pass, works as described.

Signed-off-by: Charlene Criton <charlene.criton@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d07df7d51250bb5a40bb556aab48afb18a67a396)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11475: fix return link after editing/deleting items in batch
Jonathan Druart [Tue, 7 Jan 2014 14:14:01 +0000 (15:14 +0100)]
Bug 11475: fix return link after editing/deleting items in batch

Bug introduced by bug 9044.

Test plan:
1- First we search for records with multiple items (books or serials,
does not matter)
2- We open this record we found with multiple items for editing
3- We chose "Edit items in batch" option from the "Edit" menu
4- We make corrections on the fields under the "Edit item"  (For example
we change the collection code as "fiction")
5- We save this using "Save button" at the bottom, after we are done.
6- Just after we save, there will be a button named "Done" available
just under the page, and when we click on "Done" we encounter the Error
screen.

Before the patch, the "Done" link points to
/cgi-bin/koha/tools/CATALOGUING.
After applying the patch, the "Done" link points to the biblio detail
page.

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

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 15953702bce6dcba94d351655fb42c29edd5789d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10646 - warn if mod_rewrite is not enabled
Robin Sheat [Tue, 19 Nov 2013 03:19:12 +0000 (16:19 +1300)]
Bug 10646 - warn if mod_rewrite is not enabled

Koha requires mod_rewrite. If it's not enabled in Apache, then
koha-create will now abort with a helpful error message. Also adds a
warning when not run as root to avoid confusing errors.

Test plan:
 * apply the patch
 * a2dismod rewrite
 * run koha-create without sudo, note the error about being root
 * run koha-create with sudo, note the error about rewrite
 * a2enmod rewrute
 * repeat test above, note that it works

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e4387c1de9738cf19eb4d78b620b92a03fe1b131)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11499: UT: Make zebra_setup.pl correctly set indexing mode
Tomas Cohen Arazi [Wed, 8 Jan 2014 15:21:42 +0000 (12:21 -0300)]
Bug 11499: UT: Make zebra_setup.pl correctly set indexing mode

By adding the relevant environment variables to the script the generated
koha-conf.xml file for the unit tests is correct now.

Test plan:
- Verify that tests pass now:
  $ prove -v t/db_dependent/Search.t 2> /dev/null | grep 11499

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes unit test, koha-qa.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5666ed77a34d48aa10e1ad2b1f06d99c0553644f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11499: (regression tests) indexing modes not properly set on generated koha-conf.xml
Tomas Cohen Arazi [Wed, 8 Jan 2014 15:17:26 +0000 (12:17 -0300)]
Bug 11499: (regression tests) indexing modes not properly set on generated koha-conf.xml

t/db_dependent/Search.t creates its own temporary koha-conf.xml and
related files, and it fails to properly set indexing modes for
bibliographic and authority records.

This patch adds regression tests for that.

To test:

 $ prove -v t/db_dependent/Search.t 2> /dev/null | grep 11499

The test should fail unless the main page is applied.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7b1d49f84b17ef779fac8ab6874bf2d34037aaba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7965: Silence warns in staff log
Chris Cormack [Fri, 27 Dec 2013 06:06:34 +0000 (19:06 +1300)]
Bug 7965: Silence warns in staff log

Silence warns in C4::Bookseller::GetBooksellersWithLateOrders()

to test
1/ run prove t/db_dependent/Bookseller.t
   Notice lots of Use of uninitialized value $delay in numeric lt (<) at /var/lib/jenkins/jobs/Koha_master/workspace/C4/Bookseller.pm line 134 type lines
2/ apply patch
3/ run prove t/db_dependent/Bookseller.t
   Notice warns are gone

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tiny change, positive consequences.
Passes QA script and all tests.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit febd0312f8623c9861bd70dd61aa3fd47afb1b51)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11457: avoid spurious test failure in t/db_dependent/Bookseller.t
Chris Cormack [Thu, 2 Jan 2014 04:15:56 +0000 (17:15 +1300)]
Bug 11457: avoid spurious test failure in t/db_dependent/Bookseller.t

This patch clears the subscription table so tests pass correctly if
there happens to have been a subscription with an end date before
2013-08-01.

To test
1/ Add a subscription in the serials module, with an end date before
2013-08-01
2/ run prove -v t/db_dependent/Bookseller.t
   Notice tests 22 and 23 fail
3/ Apply patch
4/ run test again
5/ Notice tests succeed

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests now clean the subscription table before running
the tests, so that the will always pass.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8209bf10269c36c1bb8d4b2da23fe356ab7a3568)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11483: (follow-up) fix typos
Galen Charlton [Wed, 8 Jan 2014 15:14:43 +0000 (15:14 +0000)]
Bug 11483: (follow-up) fix typos

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 00279b84802346db13f5df52c779f0c924b4b29c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11483: Add missing serial help files
Nicole C. Engard [Mon, 6 Jan 2014 18:15:36 +0000 (12:15 -0600)]
Bug 11483: Add missing serial help files

The help files for the Serial Numbering Patterns and Frequencies pages
were missing.  This patch adds them.

To test:

* Visit the two new serial pages
* Click Help
* Confirm text and links are right

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 1b160802bc17ad42309e40215d9303fca2fc07b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11260: (follow-up) repair German sample_z3950_servers.sql
Galen Charlton [Wed, 8 Jan 2014 01:10:32 +0000 (01:10 +0000)]
Bug 11260: (follow-up) repair German sample_z3950_servers.sql

Without this patch, the sample Z39.50 servers for de-DE
would fail to load.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3c81c7b6f3edc109d47e7b83bcd51a85ae469aad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11260: (follow-up) remove inadvertant change to English sample_z3950_servers.sql
Galen Charlton [Wed, 8 Jan 2014 01:01:37 +0000 (01:01 +0000)]
Bug 11260: (follow-up) remove inadvertant change to English sample_z3950_servers.sql

Part of the patch for bug 11260 had the effect of undoing
commit 5aae737, thereby adding back two undesirable things:

- use of backticks in the SQL
- setting z3950servers.id explicitly

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a39b728364efaae688d508c7b253a0ab9c9c8d2e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11260: Follow up - normalizing frequencies in English sample file a bit
Katrin Fischer [Sun, 17 Nov 2013 21:58:52 +0000 (22:58 +0100)]
Bug 11260: Follow up - normalizing frequencies in English sample file a bit

After some discussion in IRC I am throwing in some changes for the
English sample frequencies:

- Change Vol to Vol.
- Change No to No.

We had both forms in the file, now it should be consistent.

To test:
- Run English web installer installing all sample files, especially
  frequencies
- Check installed frequencies
- Check available options creating a subscription

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 66bf3abf78a7537201fd54be7b58fbab4c716b40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11260: Update German web installer - frequencies and numberpatterns
Katrin Fischer [Sun, 17 Nov 2013 21:56:45 +0000 (22:56 +0100)]
Bug 11260: Update German web installer - frequencies and numberpatterns

Translates the new files for frequencies and numberpatterns

To test:
- Run the German web installer with all sample files
- Check all files import without errors, especially frequencies and
  numbering patterns
- Check frequencies in serials
- Check numbering patterns in serials
- Create a subscription, check possible choices

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fff04e59e785ce26f52da94730818c541476f7bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11260: Update German web installer for 3.14
Katrin Fischer [Sun, 17 Nov 2013 20:05:45 +0000 (21:05 +0100)]
Bug 11260: Update German web installer for 3.14

Mandatory:
- adds auth_values.sql and .txt with YES_NO referenced in patron_attributes.sql
- updates sample notices with redone slip templates (ISSUESLIP, ISSUEQSLIP,
  RESERVSLIP, TRANSFERSLIP)
- adds German translations to subtag_registry.sql and copies updated file
  from en to de-DE
- adds translation for new course_reserves permission to userflags.sql
- adds translations for new permissions in userpermissions.sql
- Fixes typo IndependantBranches in English userpermissions.sql

Optional:
- adds csv_profiles.sql and translation of the serial claims profile
- adds z39.50 servers for authorities to sample_z3950_servers.sql

To test:
- Run web installer in English
  - check all sample files, make sure they all install without SQL errors
  - check language list on advanced search displays correctly still
  - check area/language list on tools > news displays correctly still
  - check permissions for correct spelling of IndependentBranches

- Run web installer in German
  - repeat checks from above
  - also check: authorised values, especially existence of YES_NO
  - all permissions are translated now
  - slip notices are all there and look right
  - new z39.50 servers for authorities are available
  - csv profile for serial claims is available and works as expected

... and anything else you can think of.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bbe64974b02d78fc916f76408a995ac1bf7f6228)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 6886: (follow-up) remove redundant test for singleBranchMode
Galen Charlton [Mon, 6 Jan 2014 16:27:17 +0000 (16:27 +0000)]
Bug 6886: (follow-up) remove redundant test for singleBranchMode

This patch removes an unnecessary check of the singleBranchMode
preference that occurred in an <xsl:otherwise> clause where
we already know that singleBranchMode != 1.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9d2cd6771e616b46eda936ccdf76823e6f520617)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 6886: (follow-up) replace needless <xsl:choose> with <xsl:if>
Kyle M Hall [Wed, 4 Dec 2013 17:24:38 +0000 (12:24 -0500)]
Bug 6886: (follow-up) replace needless <xsl:choose> with <xsl:if>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Switching SingleBranchMode:

Tested with MARC21 and UNIMARC:
- "Don't allow" - branch is not shown in result list
- "Allow" - branch is shown for available items in result list

Changes are consistent over all 3 MARC flavours.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5b855c76d07d41eff2873f6e2ba9dc3a43f98d11)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 6886: ensure that singleBranchMode does not display library name for reference...
Kyle M Hall [Fri, 4 Jan 2013 18:40:33 +0000 (13:40 -0500)]
Bug 6886: ensure that singleBranchMode does not display library name for reference copies

Test plan: Enable singleBranchMode and  OPACXSLTResultsDisplay. Perform
a search in the OPAC which returns results containing not-for-loan
items. Before the patch these items will show their library in search
results loan items. After the patch there will be not be a library
listed, matching other items in results.

Signed-off-by jmbroust <jean-manuel.broust@univ-lyon2.fr>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a8428e141eb533ac5fafe80d38931a36d927a329)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10429: improve display of library and library filter on serials claim page
Fridolyn SOMERS [Fri, 7 Jun 2013 12:55:18 +0000 (14:55 +0200)]
Bug 10429: improve display of library and library filter on serials claim page

In serial claims page, the library code is displayed in table instead
of library name and library filter does not work.

This patch adds the display of library name by using libraries template
plugin.  It changes the Javascript library filter to make it work.

Also sets "all" filter in template (like status filter) to allow
translation and sets "all" as selected by default. The staff user's
library was selected by default, but the table was not filtered
with it.

Test plan :
- Go to serials claim of a vendor with serials of multiple libraries
=> You see branch filter with "(All)" and table shows library's names
- Check that library  filter does its work

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Table now shows the branch name instead of the branchcode.
First option was named (All), matching the status pull down.
When opening the claims page, (All) is preselected and the
result list matches with the selection. Before the patch
the library was preselected, but the result list did show
late issues from all branches.

This patch is an improvement, but there is still more work to do.

- Filters are not cumulative, but when another filter is selected
  the first filter is not reset.
- It's not possible to combine
  2 or more filters.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 42eb8b2286e8af9894ec41d3f193416ffe81815b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11342: fix error in OPAC self registration form if BorrowersTitles is empty
Kyle M Hall [Thu, 5 Dec 2013 14:13:35 +0000 (09:13 -0500)]
Bug 11342: fix error in OPAC self registration form if BorrowersTitles is empty

If BorrowersTitles is empty, it causes the library pulldown on the self
registration page to be empty, and to have the "Saluation" field have
the option "branches".

This patch also fixes a minor string capitalization issue.

Test Plan:
1) Enable OPAC self registration
2) Set the system preference BorrowersTitles to be empty
3) View the self registration page
4) Note the lack of branches in the home library pulldown
5) Apply this patch
6) Note the branches now display in the pulldown

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested in bootstrap and prog OPAC, with BorrowersTitle configured
and emptied.
Passes all tests and QA script.

Note: The titles pull down has 2 empty entries in master with
and without the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9a5f737dcbb1c695130a3acafd46a63a44f2e4cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11316 - plugin icon missing tooltip in addbiblio.pl
Mark Tompsett [Wed, 27 Nov 2013 18:16:56 +0000 (13:16 -0500)]
Bug 11316 - plugin icon missing tooltip in addbiblio.pl

By adding:
    title=\"Tag editor\"
into the HTML generated in addbiblio, a tooltip displaying
'Tag editor' appears when the mouse is hovered over the
plugin icon.

Test Plan:
1) Log into Staff client
2) Click the 'Search the catalog' tab
3) Type something which will generate results
4) Click the title of a result
5) Click the 'Edit' button
6) Scroll down and click the 'Edit Record'
7) Look through the various tabs and notice that all the plugin
   icons have no tooltip.
8) Apply the patch
9) Refresh the page
10) All the plugin icons should have the tooltip text of
    'Tag editor'.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds a title attribute. Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e45edca42a44d094eabbd3347cc83b43cd2166f4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11470: fix occassional spurious test failure in Circulation_transfers.t
Galen Charlton [Thu, 2 Jan 2014 18:02:17 +0000 (18:02 +0000)]
Bug 11470: fix occassional spurious test failure in Circulation_transfers.t

This patch makes Circulation_transfers.t no longer be sensitive to
the exact time it runs, avoiding spurious test failures due
to datesent being a second off between the creation of the test
transfer and the comparison.

To test:

[1] To simulate the failure, add a "sleep(2);" after the
    "#Test GetTransfers" comment and run
    prove -v t/db_dependent/Circulation_transfers.t
[2] Remove the sleep and apply the patch.
[3] Verify that prove -v t/db_dependent/Circulation_transfers.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7c518bd250cd2283a055d4547085cd6db6488cf7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11336: (follow-up) fix typo in previous follow-up
Galen Charlton [Mon, 6 Jan 2014 16:16:22 +0000 (16:16 +0000)]
Bug 11336: (follow-up) fix typo in previous follow-up

This patch corrects a typo that broken ModReserveFill().  This
patch also adds a unit test that (via two levels of indirection)
exercises ModReserveFill().

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7af64ff7bd26eaa0d8cdb688f0db1526e438f087)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11336: (follow-up) improve POD for _FixPriority()
Galen Charlton [Sat, 4 Jan 2014 23:25:25 +0000 (23:25 +0000)]
Bug 11336: (follow-up) improve POD for _FixPriority()

This patch improves the POD for C4::Reserves::_FixPriority()
to (hopefully) describe its function thoroughly.  It also
adjusts the call of _FixPriority() by CancelReserve() to
omit passing reserve_id, since by that point no row in
the reserves table for that request still exists.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 543e1dc6731d4a26b777223920bfe4037e7546dd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11336: (follow-up) correct change to POD for GetReserve()
Galen Charlton [Sat, 4 Jan 2014 22:45:29 +0000 (22:45 +0000)]
Bug 11336: (follow-up) correct change to POD for GetReserve()

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 80fc94f86aab31e8b241cf713e6b10572a364693)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11336: (follow-up) fixing capitalization in templates
Katrin Fischer [Sun, 29 Dec 2013 12:57:33 +0000 (13:57 +0100)]
Bug 11336: (follow-up) fixing capitalization in templates

Fixes capitalization on the holds and check in page.

Changes are easy to spot using:
git diff HEAD^ --color-words=.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5cfa865aad2caabd76e361fcbbe8f6429941bad4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11336: update hold queue priorities correctly when deleting holds
Jonathan Druart [Fri, 13 Dec 2013 16:42:55 +0000 (17:42 +0100)]
Bug 11336: update hold queue priorities correctly when deleting holds

In various places, deleting a hold request did not trigger recalculating
the priority of the other holds on the bib:

To reproduce the bug:
- select or create 2 users U1 and U2
- select or create an holdable item
- place on hold for both U1 and U2. U1 has priority 1 and U2 has
  priority 2.
- delete the hold for U1
- go on circ/circulation.pl?borrowernumber=XXXX for U2 (or in the DB
  directly) and verify the priority has not been set to 1

The issue is repeatable (at least) on these 2 pages:
 * circ/circulation.pl?borrowernumber=XXXX (tab 'Holds', select "yes"
  in the dropdown list and submit the form)
 * reserve/request.pl?biblionumber=XXXX (click on the red cross)

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Reran my tests:

Preparations:
- Create holds for different patrons on a record:
  * 1st - title level hold
  * 2nd - item level hold
  * 3rd - title level hold
  * 4th - title level hold
- AllowOnShelfHolds = On/Allow (items were not checked out)

Tests:
Deleted holds from various pages, confirming bugs first,
then testing with applied patches. Reloading database
after each test.

1) Cancel holds from OPAC patron account
  /cgi-bin/koha/opac-user.pl#opac-user-holds
- Cancel 4th - ok, before and after applying the patch
- Cancel 2nd - ok, after applying the patch

2) Cancel hold from holds tab on staff detail page
  /cgi-bin/koha/reserve/request.pl?biblionumber=7

  a) Setting priority to 'del', submitting with 'Update holds'
  - Cancel first (1st) - ok, before and after
  - Cancel hold in the middle (was 3rd) - ok, before and after
  - Cancel last (was 4th) -ok, before and after

  b) Using red X
  - Repeating tests from a) - before the patch is applied holds
    get totally 'out of order' - after applying the patch, it works
    correctly

Additional tests done on this page:
- Change priority using up, down, to top, to bottom icons
- Change priority with 'toggle to lowest'

3) Cancel hold from the patron's account

  a) Check out tab - Delete? Yes, 'Cancel marked holds'
    /cgi-bin/koha/circ/circulation.pl?borrowernumber=X
  - Cancel first (1st) - ok, after applying the patch
  - Cancel hold in the middle (was 3rd) - ok, after applying the patch
  - Cancel last (was 4th) - ok, after applying the patch

  b) Details tab - Delete? yes, 'Cancel marked holds'
    /cgi-bin/koha/members/moremember.pl?borrowernumber=X
  - Cancel first (1st) - ok, after applying the patch
  - Cancel hold in the middle (was 3rd) - ok, after applying the patch
  - Cancel last (was 4th) - ok, after applying the patch

  Without the patch, holds priorities get out of order.

Additional tests done:
- Check in one item to trigger first hold
- Check in one item to trigger second hold
- Check out first item
Priorities are kept while the item is waiting, when it's
checked out, priorities of remaining holds get reset correctly.

Conclusion:
Big improvement, no regressions found.

Passes all tests in t, xt and QA script.
Also: t/db_dependent/Holds.t
      t/db_dependent/HoldsQueue.t
      t/db_dependent/Reserves.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 78037c5573f70939077dd00f296c735b198e6124)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11192: (follow-up) fix a little typo
Chris Cormack [Fri, 27 Dec 2013 20:07:13 +0000 (09:07 +1300)]
Bug 11192: (follow-up) fix a little typo

Test plan the same as the original patch

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan. Searches tested were:
fic=e
fiction=e

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 211acdd30b000af33f1bb70b33356b8ac945f451)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11192: Fix lf and ff07-02 definition in ccl.properties
Mathieu Saby [Sun, 3 Nov 2013 18:04:44 +0000 (19:04 +0100)]
Bug 11192: Fix lf and ff07-02 definition in ccl.properties

ff7-02 1=87020 (position 2 of field 007 in MARC21) should be
ff7-02 1=8702

lf 1=8833
lf fiction
fic fiction

should be

lf 1=8833
fiction lf
fic lf

To test :
1. apply the patch
2. copy the modified ccl.properties into your active Zebra config
   directory
3. reindex zebra (rebuild_zebra.pl -b -x -r -v)
4. make some searches using the fixed indexes

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a032b0a5cd73c9a67bab130c183751309fa95c6e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoRevert "Bug 11208: regression test for failing SMS messages"
Fridolin Somers [Sat, 8 Feb 2014 09:25:57 +0000 (10:25 +0100)]
Revert "Bug 11208: regression test for failing SMS messages"

This reverts commit c4f6a2777d7f068d3c072352832c48461689431c.

Bug 11208 depends on Bug 9016 which is for 3.16

10 years agoRevert "Bug 11208: If no smsalertnumber is defined, the message is marked as failed"
Fridolin Somers [Sat, 8 Feb 2014 09:25:15 +0000 (10:25 +0100)]
Revert "Bug 11208: If no smsalertnumber is defined, the message is marked as failed"

This reverts commit 932ad64f3503d43f696d0b3e534aaf3a48082b5a.

Bug 11208 depends on Bug 9016 which is for 3.16

10 years agoBug 11208: If no smsalertnumber is defined, the message is marked as failed
Jonathan Druart [Wed, 6 Nov 2013 13:54:36 +0000 (14:54 +0100)]
Bug 11208: If no smsalertnumber is defined, the message is marked as failed

For DUE message (and PREDUE, etc.) there are no check before sending the
message to the message_queue table.

This check avoids to try to send again and again the same message. Now
it is marked as "failed".

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Without the patch a sms notice will remain as 'pending' forever.
With the patch applied, the status is set to 'failed'.

Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 87564a834b885188ee0e6fde800775b403d2e1c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11208: regression test for failing SMS messages
Galen Charlton [Mon, 30 Dec 2013 16:45:45 +0000 (16:45 +0000)]
Bug 11208: regression test for failing SMS messages

This patch adds a regression test for verifying that queued
SMS messages meant for patrons who have no SMS alert number
set are marked as failed after the first attempt to send them.

To test:

[1] Run prove -v t/db_dependent/Letters.t.  The fourth
    test should.
[2] Apply the main patch and run t/db_dependent/Letters.t
    again.  This time, all tests should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b753678c3dff4e0fd2fde008b3c43f0796fcfb05)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
10 years agoBug 11509: (follow-up) fix a couple typos
Galen Charlton [Mon, 13 Jan 2014 20:54:37 +0000 (20:54 +0000)]
Bug 11509: (follow-up) fix a couple typos

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b7b1db5c81eb67e51851efc5bc2d1fb2a0cb7d04)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11509: improve usage information printed by koha-create
Tomas Cohen Arazi [Thu, 9 Jan 2014 13:56:56 +0000 (10:56 -0300)]
Bug 11509: improve usage information printed by koha-create

This patch makes koha-create print better and more descriptive usage
information. Also adds the --help and -h switches.

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>
Removed trailing " from:
  $scriptname [db usage mode] [options] instancename"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0d28ab498885a44ee2c20c411ae16b904c12663a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11384: (follow-up) test if table exists in update database
Fridolin Somers [Sat, 8 Feb 2014 08:52:07 +0000 (09:52 +0100)]
Bug 11384: (follow-up) test if table exists in update database

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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: Fridolin Somers <fridolin.somers@biblibre.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>
10 years agoIncrement version for 3.14.3 release v3.14.03
Fridolin Somers [Thu, 6 Feb 2014 19:21:19 +0000 (20:21 +0100)]
Increment version for 3.14.3 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoUpdate release notes for 3.14.03 release
Fridolyn SOMERS [Thu, 6 Feb 2014 19:19:43 +0000 (20:19 +0100)]
Update release notes for 3.14.03 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11666: remove SQL as an option for MARC framework exports and imports
Galen Charlton [Tue, 4 Feb 2014 23:03:08 +0000 (23:03 +0000)]
Bug 11666: remove SQL as an option for MARC framework exports and imports

The SQL option for MARC framework imports was subject to a bug whereby
somebody could use it to gain access to arbitrary information in the
database by uploading an SQL file containing unexpected statements.

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

To test:

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 94e349ff6ce4a1abb313102decc12429d02dfb4b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11666: add permission check for MARC framework import/export
Galen Charlton [Tue, 4 Feb 2014 15:54:33 +0000 (15:54 +0000)]
Bug 11666: add permission check for MARC framework import/export

This patch makes the MARC framework import/export script require
that the staff user be logged in with appropriate permissions for
managing the MARC frameworks.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I can confirm the bug and the solution. After applying the patch
downloading the file without logging in first is no longer possible.
Also passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 03d4ed2468bb9ab97b1f7b7d9e29507dc815a8b3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11662: remove disused member-picupload.pl
Galen Charlton [Sat, 1 Feb 2014 02:11:38 +0000 (02:11 +0000)]
Bug 11662: remove disused member-picupload.pl

This script is no longer used, and in addition has problematic
handling of its parameters that could lead to writing to
arbitrary files on the server.

To test:

[1] Verify that member-picupload.pl is no longer referred
    to in the codebase after applying this patch.
[2] Verify that there are no regressions in patron
    photo management.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Found no regressions in removing this script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 939079de756fdda1ca8f62c48efe0e2e3034ae32)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11661: sanitize file names supplied to edithelp.pl
Chris Cormack [Sat, 1 Feb 2014 02:06:58 +0000 (15:06 +1300)]
Bug 11661: sanitize file names supplied to edithelp.pl

This patch corrects an issue whereby edithelp.pl could
be used to create or modify arbitrary files on the server
with the permissions of the Apache user.

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 7baf02c263a627b1454577b3141a0af4b8f963d1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11660: remove disused tools/pdfViewer.pl
Chris Cormack [Sat, 1 Feb 2014 01:18:23 +0000 (14:18 +1300)]
Bug 11660: remove disused tools/pdfViewer.pl

tools/pdfViewer.pl can be used to read artibrary files on the system.

It is actually an unused file, so leaving it around serves no purpose
and is dangerous.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d1b6e0646fd6a70f6724189554e80aaa68aec64b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
10 years agoBug 11131: display authority summary correctly when searching by all authority types
Jonathan Druart [Thu, 24 Oct 2013 13:28:42 +0000 (15:28 +0200)]
Bug 11131: display authority summary correctly when searching by all authority types

The summary is built using the authtypecode selected from the interface.
So when a search is launch on all auth types, the summary is not
correctly built by the BuildSummary routine.

It should get the authtypecode from the authority (call to
GetAuthTypeCode).

To test:
1/ go to authorities/authorities-home.pl
2/ search <something> by authtype personal name
3/ results are displayed with summary
4/ now select the default entry and search again the
results display but without the summary
5/ apply the patch
6/ search default again, now summary shows

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with a UNIMARC database, works as described.
All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e5cec32d078eac98b603d637b7d713a780be3e66)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
10 years agoBug 11075: 'select all' for export no longer clears renew checkboxes
Jonathan Druart [Thu, 21 Nov 2013 16:55:57 +0000 (17:55 +0100)]
Bug 11075: 'select all' for export no longer clears renew checkboxes

If circulation exports are enabled (by turning on ExportWithCsvProfile),
the table on the checkout page includes three columns of checkboxes --
'renew', 'checkin', and 'export'.

For each loan, the renew and checkout links should behave like radio
buttons, but the state of the export checkbox is meant to be independent
of the renew and checkin checkboxes.

However, if the 'select all' link in the export column is clicked,
active renew checkboxes are toggled off.

The desired behavior is that clicking the select all link in the export
column should only affect checkboxes in that column.  This patch
implements this behavior.

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 - one line JavaScript change.
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4a0f630f7f8c7f3c402defa5837bc470510ebb07)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
10 years agoBug 11445: avoid sending duplicate hold waiting notifications
Galen Charlton [Wed, 25 Dec 2013 17:44:19 +0000 (17:44 +0000)]
Bug 11445: avoid sending duplicate hold waiting notifications

This patch fixes a problem where a patron could receive duplicate
hold waiting notifications.  For example, this could happen if a
circ operator checked in an item more than once and confirmed the
same hold each time.

To test:

[1] Set up a test patron that received hold waiting notifications.
[2] Put an item on hold for the patron, then check the item in
    and confirm the hold.  Verify that a hold notification is
    sent (or inspect the message_queue table).
[3] Check the item in again and confirm the hold again.  A duplicate
    hold notification will be generated.
[4] Apply the patch.
[5] Repeat steps 2 and 3.  This time, only one notification should be
    generated.
[6] Verify that prove -v t/db_dependent/Reserves.t passes.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fe08a0ef97ad2fbab72b857d61bec364fd93d9e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11445: regression test for duplicate hold notifications
Galen Charlton [Wed, 25 Dec 2013 17:38:39 +0000 (17:38 +0000)]
Bug 11445: regression test for duplicate hold notifications

This patch implements a regression test for verifying that
duplicate hold notifications aren't sent if ModReserveAffect() is
called repeatedly (as might happen if a circ operator accidentally
checks in an item and confirms its hold more than once).

Note that the test depends on the fact that _koha_notify_reserve()
defaults to sending a HOLD_PRINT letter if the borrower has not
specified an email or SMS hold notification.

To test:

[1] Run prove -v t/db_dependent/Reserves.t
[2] The 'patron not notified a second time (bug 11445)' test
    should fail.
[3] Apply the main patch and run prove -v t/db_dependent/Reserves.t
    again.  This time all tests should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2b6a20c509801b9eeb562aa6fd404546d6ba84df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11403: Add missing help file to new Renew page
Nicole C. Engard [Mon, 16 Dec 2013 15:53:10 +0000 (09:53 -0600)]
Bug 11403: Add missing help file to new Renew page

This patch adds a help file to the Renew page found under
Circulation.

To test:

* Go to Circulation > Renew
* Click the help link
* Confirm text and manual link are correct.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
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 e8808dfd527b2b461485507fe508928bb84b7f82)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 8921: make koha-common*.deb depend on cron-daemon
Tomas Cohen Arazi [Wed, 4 Dec 2013 17:34:05 +0000 (14:34 -0300)]
Bug 8921: make koha-common*.deb depend on cron-daemon

Trivial patch to add 'cron-daemon' as dependency for the koha-common
package. 'cron' is usually pulled in any minimal Ubuntu/Debian
install, but in some circumstances (using debootstrap) it might be
absent.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No entry in debian/control yet, but
according to comments in the file this file is generated
from control.in - so this should be ok.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e52b493611766b61a0018350adc590ab07e9c94b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11179: (follow-up) add comment to item-status.inc
Galen Charlton [Thu, 19 Dec 2013 17:02:19 +0000 (17:02 +0000)]
Bug 11179: (follow-up) add comment to item-status.inc

This patch adds a comment to item-status.inc to describe
the parameters it can accept.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ec7fff647d547c9ff5adadcb4c1cb35bc4ea7baf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11179: (follow-up) apply fix to Boostrap theme
Owen Leonard [Thu, 14 Nov 2013 20:41:02 +0000 (15:41 -0500)]
Bug 11179: (follow-up) apply fix to Boostrap theme

This follow-up applies the same fix to the Bootstrap theme. This patch
also includes the changes to item-status.inc in the Bootstrap theme
which were made to the prog theme in Bug 10820: display item status as
lost if item is both lost and on loan.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Bootstrap theme looking so nice. Also the patch works.

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 78b73c3fffc6f5125a688e91582da92287fbbef2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc

10 years agoBug 11179: make OPAC course details page display status of checked out items correctly
Kyle M Hall [Thu, 31 Oct 2013 18:27:30 +0000 (14:27 -0400)]
Bug 11179: make OPAC course details page display status of checked out items correctly

If an item is listed for a course and is checked out, the item will
still show as being available from the course details page which lists
all the items that are part of a course. This is due to the way the
course reserves system handles items and issues separately, while
item-status.inc assumes the due date has been embedded in items.datedue

Test Plan:
1) Create a course
2) Add an item to that course
3) Check the item out to a patron
4) View the course details from the opac
5) Note the status says "Available"
6) Apply this patch
7) Repeat step 4
8) Note the status no longer says "Available"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dc5e4e5b631116ce7ce16143ba56c5eb0385d986)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11228: Improve hint on patron notification when adding/editing subscriptions
Katrin Fischer [Thu, 5 Dec 2013 20:47:25 +0000 (21:47 +0100)]
Bug 11228: Improve hint on patron notification when adding/editing subscriptions

The hint was not quite correct, as it said patrons on the routing list
would be informed, but it's only the patrons that have subscribed to
email notifications in the OPAC who will receive the email when a
new serial issue is received.

To test:
- Add a new subscription, find the hint about patron notification on the form
- Apply patch
- Refresh page
- Verify the new hint text makes sense and is correct

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 53495aab241cef4202eac372e85e6f3d09aa873d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>