]> git.koha-community.org Git - koha.git/log
koha.git
11 years agoBug 10457: fix SQL error when using 'export select items data' in serials claims...
David Cook [Thu, 13 Jun 2013 06:46:46 +0000 (16:46 +1000)]
Bug 10457: fix SQL error when using 'export select items data' in serials claims page

Currently, if you use the "check all" checkbox next to the "Vendor"
table header, and try to "Export selected items data", you'll
see the following SQL error in the Apache error log:

DBD::mysql::st execute failed: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for
the right syntax to use near 'on ORDER BY title' at line 12 at
/.../lib/C4/Serials.pm line 1828.

This is because the Javascript that produces the re-direct URL is
including the value of the checkall checkbox, which is "on",
as a "serialid".

We need to only take checkboxes with a name of "serialid" when
crafting the re-direct link.

This patch adds the [name=serialid] attribute selector to the Jquery
that creates the URL to lateissues-excel.pl from claims.pl.

Test Plan:

Before applying the patch:

1) Go to Serials > Claims (found on the left navigation bar of Serials)
2) Choose a vendor that has serials to claim (or create some late
serials for a vendor so that they will show up)
3) Click on the checkbox to the left of the "Vendor" table heading.
4) Click "Export selected items data" at the bottom of the page
5) Check the Apache error log.  Notice that you'll get a SQL error
   like the one in the message above.

Apply the patch.

Repeat Steps 1-4.

Note that you should now have a CSV file downloading rather than
getting a SQL error.

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 3834d1f2b4494d465c6d1ab72aa334100898a756)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit fdb1d099c5489f200b7b36125ed4ccddd00e3d4c)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit fdb1d099c5489f200b7b36125ed4ccddd00e3d4c)

11 years agoBug 10553: make public lists available on OPAC login page
Owen Leonard [Mon, 8 Jul 2013 18:37:03 +0000 (14:37 -0400)]
Bug 10553: make public lists available on OPAC login page

If you are not logged in to the OPAC, looking at the login page, and you
click the Lists button to see public lists it says there are none. This
patch corrects Auth.pm so that it loads the list of public lists in this
situation.

To test you must have at least one public list. Make sure you are logged
out of the OPAC and visit the login page (/cgi-bin/koha/opac-user.pl).
Clicking the "Lists" button should show you a list of public shelves.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
works as described, and list button is not shown when opacpublic is disabled.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 651f810f68f82f4aac254c4a78bb6a4517dcb558)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit c7e19ee643730b06dc0f0ab2665c31f65b8e86e4)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit c7e19ee643730b06dc0f0ab2665c31f65b8e86e4)

11 years agobug 10559: remove spurious "statement handle still active" warnings
Galen Charlton [Tue, 9 Jul 2013 17:53:16 +0000 (17:53 +0000)]
bug 10559: remove spurious "statement handle still active" warnings

Generating (e.g.) overdue notices can result in spurious warnings in
the cronjob logs:

$ ./misc/cronjobs/overdue_notices.pl -t -library CPL
prepare_cached(SELECT * FROM issues WHERE     itemnumber = ?) statement handle DBI::st=HASH(0x54a7828) still Active at C4/Letters.pm line 589

This patch removes the warning by making sure that the relevant statement
handle is finished after fetching its first row of results.

To test:

[1] Set up an overdue loan such that running overdue_notices.pl will
    trigger the generation of a notice.
[2] Run overdue_notices.pl -t and note the warning message.
[3] Apply the patch.
[4] Run overdue_notices.pl -t again and note that the warning message
    is no longer displayed.
[5] Check the message_queue table and verify that the overdue
    notices generated in steps 2 and 4 have the same text.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2bab95cac5f43b034adec36ec62a8c8f7f520627)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 5e7452758949e037fcf286cead721b559dd7d0e3)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 5e7452758949e037fcf286cead721b559dd7d0e3)

11 years agoBug 10595: don't display OpacTopissue page when system preference is turned off
Mirko Tietgen [Tue, 16 Jul 2013 19:51:01 +0000 (21:51 +0200)]
Bug 10595: don't display OpacTopissue page when system preference is turned off

When the syspref is turned off, the link is hidden but the page is still
accessible. This patch checks the syspref and redirects to 404 if it is disabled.

Test plan:

Before applying the patch

Enable OpacTopissue
  Observe there is a link to opac-topissues.pl next to Advanced search etc.
  Follow that link, observe that opac-topissues.pl is loading
Disable OpacTopissue
  Observe the link is gone
  Manually open /koha/opac-topissues.pl and check that it is loading even though the feature is disabled

Apply patch

(OpacTopissue still diabled)
Manually open /koha/opac-topissues.pl and observe that you are being redirected to the 404 page.
Enable OpacTopissue
  Follow the link or manuall open opac-topissues.pl and check that it is working

Signoff the patch.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 04ca81bc358f1bc6425e1cef431d9e4abfc744d8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected
(cherry picked from commit 094bfd0d17689c92a4e9366af63ffb7fcbe99399)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 094bfd0d17689c92a4e9366af63ffb7fcbe99399)

11 years agoBug 10549: (follow-up) make sure ILS-DI GetAvailability response is emitted as UTF-8
Galen Charlton [Wed, 17 Jul 2013 19:12:34 +0000 (19:12 +0000)]
Bug 10549: (follow-up) make sure ILS-DI GetAvailability response is emitted as UTF-8

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit da6f2f7a7ddf1126d6e3b02825f0d45948f484fa)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1ebaaa8c4b3c27afa9fd2ef67a9430fafb82b544)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 1ebaaa8c4b3c27afa9fd2ef67a9430fafb82b544)

11 years agobug 10549: make the ILS-DI services advertise that they return UTF-8
Mirko Tietgen [Sat, 6 Jul 2013 21:48:54 +0000 (23:48 +0200)]
bug 10549: make the ILS-DI services advertise that they return UTF-8

This patch changes a few occurences of ISO-8859-1 to UTF-8
within the XML generation of the ILS-DI module.

To test:
- Activate ILS-DI system preference
- Go to [youropac]/cgi-bin/koha/ilsdi.pl
- Check all examples in the documentation for the correct
  encoding
- Check GetAvailability gives you the correct encoding and
  check the source for the correct encoding

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2a1d0fc6d2d2674d4182ed1c6be557b568778834)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 795c8e9bd0fd2d6669582f12fdcaf3fe28acf553)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 795c8e9bd0fd2d6669582f12fdcaf3fe28acf553)

11 years agoBug 10541: enable cross-browser AJAX in additem.js
David Cook [Fri, 5 Jul 2013 02:00:36 +0000 (12:00 +1000)]
Bug 10541: enable cross-browser AJAX in additem.js

Currently, the additem.js is using "indexOf" to search
for a value in an array. While this works in Chrome, Firefox,
and IE > 9, it fails miserably in IE 8 and 7 (which don't have
the indexOf method). This means that users aren't able to add
items using the acquisitions module!

Instead of using "indexOf", we should be using the jQuery function
$.inArray. It was added in jQuery v1.2 (3.8.0 uses v1.3.2 so even
our oldest supported release can use this method). It's perfectly
cross-browser compatible...works in Chrome, Firefox, and every
version of IE that I've tried (i.e. 7, 8, 9).

Test Plan:

Before applying patch:

0) Switch to Internet Explorer 7, or 8, or 9, or 10.

If you're using IE 9 or 10, you'll need to change the Document Mode to
IE7 standards or IE8 standards.

You can do this by opening Internet Explorer 9 or 10, pressing F12 (or
clicking on the gear in the top right corner and choosing
F12 Developer Tools), and then clicking on "Document Mode" on the
top toolbar. There, you can change to IE7 or IE8 standards.

N.B. This is not always a perfect emulation in every case, but this
time it does show you the bug.

1) Set the system preference AcqCreateItem to "receiving an order"
2) Go to Acquisitions
3) Either:
    a) Receive a shipment for a basket with items
    b) Create a new basket, create an order, close the basket, and
       then do 3a)
4) In the "Item" fieldset, fill out some fields such as barcode,
   Date acquiried, Public note, etc.
5) Click "Add" at the bottom of the fieldset
6) Note that while the item may have been added, the "Item" fieldset
is not being shown again. You may also notice a Javascript error
appearing in a pop-up window or you might see a yellow warning flag
on the bottom status bar.

APPLY THE PATCH

7) Do a full refresh of the page (hold down shift and press the refresh
button on the browser next to the address bar), and try adding items
again.
8) Note that you receive no warnings and that items are added correctly
as they would be in Firefox or Chrome.

OPTIONALLY

9) To be sure that I haven't broken anything, go through the same steps
in IE9 (with IE9 standards) or Chrome or Firefox. Everything should be
working.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested in IE10 in IE7 mode and IE9 mode. Also tested in Firefox.

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 53f82b1d7d9b7f06da1032faf0800d624eb4c1d3)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit afbe6a0f2c9b0d37327a57cf72eabfb7eebe156d)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit afbe6a0f2c9b0d37327a57cf72eabfb7eebe156d)

11 years agoBug 9362: fix query that finds upcoming due loans
Fridolyn SOMERS [Tue, 9 Jul 2013 15:38:04 +0000 (17:38 +0200)]
Bug 9362: fix query that finds upcoming due loans

C4:Circulation:GetUpcomingDueIssues is used in the advance_notices.pl
script.  This patch corrects an error in its handling of the maxdays
parameter that resulted in it picking up *all* upcoming due loans and
recently overdue loans.

Test plan :
- Create an issue with a date due in the paste
- Create an issue with a date due in two days
- Launch advance notices with due date in max 2 days : perl misc/cronjobs/advance_notices.pl -c -n -v -m=2
=> You get a warn "found 0 issues"
- Launch advance notices with due date in max 3 days : perl misc/cronjobs/advance_notices.pl -c -n -v -m=3
=> You get a warn "found 1 issues"

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
I did the following test :

- 1 book to check in 2 days
- 2 books to check in in the past

before applying the patch :

$perl ../misc/cronjobs/advance_notices.pl -c -n -v -m=2
getting upcoming due issues at ../misc/cronjobs/advance_notices.pl line 203.
found 1 issues at ../misc/cronjobs/advance_notices.pl line 205.

I changed the value of "-m" : 0, 1, 2, 3, 4
=> always 1 issue found (the book to check in in 2 days)

after applying the patch :

$perl ../misc/cronjobs/advance_notices.pl -c -n -v -m=2
found 0 issues
for m = 0, 1, 2 => 0 issues

$perl ../misc/cronjobs/advance_notices.pl -c -n -v -m=3
found 1 issues
for m = 3,4,5 => 1 issues (the book to check in in 2 days)

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 ff7f37202949bb6d60cdf30de4e237e6b1de93eb)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f40924b317e37757f1e552ab466dc840304c6182)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit f40924b317e37757f1e552ab466dc840304c6182)

11 years agoDatabase update for 3.10.10 release v3.10.10
Bernardo Gonzalez Kriegel [Sat, 24 Aug 2013 13:47:08 +0000 (10:47 -0300)]
Database update for 3.10.10 release

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
11 years agoRelease notes for 3.10.10 release
Bernardo Gonzalez Kriegel [Sat, 24 Aug 2013 13:40:54 +0000 (10:40 -0300)]
Release notes for 3.10.10 release

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
11 years agoTranslation updates for 3.10.10
Bernardo Gonzalez Kriegel [Fri, 23 Aug 2013 22:27:04 +0000 (19:27 -0300)]
Translation updates for 3.10.10

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
11 years agobug10246 adding OPAC details items table classes
Chris Hall [Fri, 10 May 2013 00:29:57 +0000 (12:29 +1200)]
bug10246 adding OPAC details items table classes

for 3.10 (3.12 version is bug10245)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This patch applies cleanly to the 3.10.x codebase.
It's adding additional classes to the <th> elements.
Template only CSS related change.

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

11 years agoBug 10563: Fix broken 'Edit' link on check expiration page
Katrin Fischer [Wed, 10 Jul 2013 20:43:41 +0000 (22:43 +0200)]
Bug 10563: Fix broken 'Edit' link on check expiration page

This fixes the broken 'Edit' (subscription) link on the
check expiration page in serials.

To test:
- Add a subscription
- Go to the check expiration page
- Search for your subscription, use an expiration date in the
  far future
- Verify the edit link on the result list doesn't work right
  before applying the patch, but works after

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 81431fdc8654e95e9fea37c4de880e9cf6126b26)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 61cbdb6ac7996d8d2f8045d12ec36c5f3676b694)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 61cbdb6ac7996d8d2f8045d12ec36c5f3676b694)

11 years agoBug 10127 : Printoverdues.sh should tar only pdf files
Sophie Meynieux [Fri, 26 Apr 2013 13:06:40 +0000 (15:06 +0200)]
Bug 10127 : Printoverdues.sh should tar only pdf files

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
From the bug report:
At the end of printoverdues.sh, an archive is generated
containing all files present in  directory given as parameter.
As archives are generated in this given directory, they
contain previously generated tar files, creating oversized files.
Only .pdf files should be archived

All tests and QA script pass.
Worked ok in my tests, only packign PDF in the given directory.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 261c6f39fa234f8795e62eff48db85c9366d4268)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 261c6f39fa234f8795e62eff48db85c9366d4268)

11 years agoBug 10170: expose more managed staged MARC strings to translation
Galen Charlton [Mon, 20 May 2013 15:38:46 +0000 (08:38 -0700)]
Bug 10170: expose more managed staged MARC strings to translation

This commit makes it possible to translated the 'staged'
and 'error' record statuses as well as the 'auto_match'
overlay status.

Also takes out a bit of HTML cruft in one string that is
not needed for translation.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass. New strings are parsed into the po files:
"%s Always add items %s Add items only if matching bib was found %s Add items only if no matching bib was found %s Ignore items %s %s %s %s "
"%s No match %s Match applied %s Match found %s %s %s "
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7d990042e9dcc86e6f60b923763720d5c9ed6b2c)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit e2fac72763cd541eef32d7278dea33dadc1aa6cc)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit e2fac72763cd541eef32d7278dea33dadc1aa6cc)

11 years agoBug 10170: strings in MARC import made translatable
Adrien Saurat [Thu, 2 May 2013 14:56:54 +0000 (16:56 +0200)]
Bug 10170: strings in MARC import made translatable

Following bug 9215: non translatable strings are now
present in the template and translatable

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Not only does this make the strings translatable it makes the template
a lot easier to read
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 24e561f4da56e442dc1a9d25afa63e8ab74d9236)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f67769bc637c2acb7eb4593374f4d1db06d06266)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit f67769bc637c2acb7eb4593374f4d1db06d06266)

11 years agoBug 10556: The delivery time is not inserted on adding a supplier.
Jonathan Druart [Tue, 9 Jul 2013 09:52:31 +0000 (11:52 +0200)]
Bug 10556: The delivery time is not inserted on adding a supplier.

Test plan:
Add/edit a supplier and check that the delivery time is set in DB.

Note: This patch cleans the code (sql query) in order to see easily if a
problem occurred.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b95c3134a8a38ba430f7d70173f91e055b4fa30e)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 4251c1f8185bb91df17949b903391ad29d58f6f0)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 4251c1f8185bb91df17949b903391ad29d58f6f0)

11 years agoBug 10504: Remove the unused C4::Acq::ModOrderItem routine
Jonathan Druart [Tue, 25 Jun 2013 07:09:38 +0000 (09:09 +0200)]
Bug 10504: Remove the unused C4::Acq::ModOrderItem routine

This routine has been introduced by commit 2d90fb22d43db986547bbaa945873d6dd78aab71.
The only call has been removed by commit 9eba7dc594fc0d4698da5e791d5f6f8682b2712a.

So now, this routine is useless.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9f4f1ceafe218afcbc55d6dfb9ac1e32fc11803a)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 3b6abb0ea18720eef688241aa2c2e6399d922fa0)

Conflicts:

C4/Acquisition.pm

Solved

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 3b6abb0ea18720eef688241aa2c2e6399d922fa0)

11 years agoBug 10527: remove disused routine C4::Branch::get_branch_code_from_name
Jonathan Druart [Tue, 2 Jul 2013 10:56:21 +0000 (12:56 +0200)]
Bug 10527: remove disused routine C4::Branch::get_branch_code_from_name

This routine is not in used and does not make sense. It should not be
used later.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, not references to get_branch_code_from_name found.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit aa15f7031bc7d9c0f2c9901db491dada53f21c65)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit aa15f7031bc7d9c0f2c9901db491dada53f21c65)

11 years agoBug 10422 - Remove references to unused and non-existent wizard.css
Owen Leonard [Tue, 2 Jul 2013 13:59:21 +0000 (09:59 -0400)]
Bug 10422 - Remove references to unused and non-existent wizard.css

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

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 986f7a24e8abe566d57a3488a8df87488ab3aeb6)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d359b05cb8958cd4d2a2681a86d7813a48748670)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d359b05cb8958cd4d2a2681a86d7813a48748670)

11 years agoBug 6898: fix DB update that assigns the circulate/overdues_report permission
Fridolyn SOMERS [Wed, 5 Jun 2013 12:16:14 +0000 (14:16 +0200)]
Bug 6898: fix DB update that assigns the circulate/overdues_report permission

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

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c6bf2670502afbd12981aa5e913779c38c19bdc4)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 18c86575ff8d31ea9afbee7d0d21c19405e530c4)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 18c86575ff8d31ea9afbee7d0d21c19405e530c4)

11 years agoBug 10189: Translate values in UNIMARC 128b/c cataloguing plugins to English
Mathieu Saby [Fri, 3 May 2013 21:07:37 +0000 (23:07 +0200)]
Bug 10189: Translate values in UNIMARC 128b/c cataloguing plugins to English

Cataloguing plugins for UNIMARC 128b and 128c fields are only in Ffrench.

This patch translates them.
Source : http://blue.lins.fju.edu.tw/mao/marc/unicon.htm
Note : 128b and 128c are deprecated in last version of UNIMARC Manual (field 145 used instread).
But they are still used in French Sudoc network.

To test : in a UNIMARC english Koha, edit a record and use 128b and 128c
cataloguing plugins. Check everything is in english.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thx for translating those!
Verified new strings get parsed into the po files.
Templates still contain lots of tabs, those can be fixed separately.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 80ea8bf821ba83fd4506f5298f5a582051b44e06)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit df765f82b3b96e9bf4e883450d1e3260cce01dfd)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit df765f82b3b96e9bf4e883450d1e3260cce01dfd)

11 years agoBug 10258: offer to create basket group only when staff user has correct permission
Galen Charlton [Mon, 17 Jun 2013 01:05:31 +0000 (18:05 -0700)]
Bug 10258: offer to create basket group only when staff user has correct permission

If the staff user does not have the group_manage acquisition permission,
do not offer to create a new basket group when closing an order basket.

This avoids a situation where if a staff member without that permission tries
to close a basket and chose the option to create a bakset group, they would
be redirected to the login page.

To test:

[1] Log in as a staff user that does not have
    the acquisition/group_manage permission.
[2] Create a new order basket, attach at least one
    order line to it, then close it.
[3] Verify that the confirmation page does not
    offer to create a basket group with the
    same name as the order basket.
[4] Log in as a staff user that has the
    acquisition/group_manage permission.
[5] Create and close an order basket.
[6] Verify that this time, the confirmation page
    *does* offer to create a basket group.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 14a1bd0e420fd895f989ba88e0cad927697b6173)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit fdf6c3790a8e942be8a3615252b6c214064dd21e)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit fdf6c3790a8e942be8a3615252b6c214064dd21e)

11 years agoBug 10258: fix permissions check for setting basket group for order basket
Galen Charlton [Thu, 13 Jun 2013 15:53:49 +0000 (08:53 -0700)]
Bug 10258: fix permissions check for setting basket group for order basket

Improve the code that displays and allows staff to
set the basket group from the basket details page
for a closed basket.

Prior to this patch, a staff member who did not
have the group_manage acquisition permission would
still see a control to change the group that the
basket belongs to; attempting to change the group
would present with with a login page.

This patch also does some tidying of how basket group
details are passed to the template.

To test:

[1] Create an order basket and close it.  Do
    not assign it to a basket group.
[2] View the basket details while logged in as
    a staff user who has the order_manage acquisitions
    permission but not the group_manage.  The
    displayed basket group should be "No group".
[3] Switch to a staff user who also has the
    group_manage permission, then view the basket
    details again.  The basket group field should
    now be a select input that allows you to change
    the basket group.
[4] Change the basket group.  Verify that the basket group
    you selected is now displayed as the current group
    for that order basket.  The basket group delivery and
    billing place fields should also now be displayed.
[5] Close the basket group set in the previous step, then
    view the basket details again.  This time, the basket
    group name should be displayed with a suffix of " (closed)",
    and no input to change the group should be displayed.
[6] Swith to a staff user who does not have the group_manage
    permission, view the basket details, and verify that
    the basket name is displayed with a suffix of " (closed)".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 44364db8d53bf5e3135ae2de6270a920e5c053c1)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit dfbb9890d970f3f70cb6eb02275679d65101489a)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit dfbb9890d970f3f70cb6eb02275679d65101489a)

11 years agoBug 9770: fix sorting of Dewey call numbers that contain prefixes
Jason Etheridge [Fri, 8 Mar 2013 15:41:06 +0000 (10:41 -0500)]
Bug 9770: fix sorting of Dewey call numbers that contain prefixes

C4::ClassSortRoutine::Dewey can pad the wrong part of a call number internally.

The subroutine get_class_sort_key tokenizes a call number string (splitting on
periods and whitespace) and counts the number of tokens that solely contain
digits.  If there is only one such digit group, a comment in the code states
that it will pad said digit group.  However, the bug is that the code assumes
said digit group is the first token, when this may not be the case.

In practice, this can cause poor sorting when used a call number is in the form
of PREFIX _space_ 3DIGITS.

To test:

[1] Create two item records whose class scheme is set to
    'ddc' (Dewey) and whose call numbers contain prefixes, e.g.,
    J DVD 700.1 ABC and J DVD 850 DEF.
[2] Use the inventory tool to produce a list of item items that include
    the two created in step 1.  Obsere that that items are sorted
    in the incorrect order, with "J DVD 850 DEF" coming before
    "J DVD 700.1 ABC".  Alternatively, run the following SQL
    to see the incorrect sort order:

    SELECT cn_sort, itemcallnumber
    FROM items
    WHERE itemcallnumber LIKE 'J DVD%'
    ORDER BY cn_sort;

[4] Apply this patch.
[5] Run misc/maintenance/touch_all_items.pl to force cn_sort to be
    recalculated.
[6] Repeat step 2 and verify that the call numbers are now sorted
    corrected.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dba36a7a1216238a260ea5fbe2218627487e9f19)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f05642589d94c25ef1b1f01b4a2606fe455400b8)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit f05642589d94c25ef1b1f01b4a2606fe455400b8)

11 years agoBug 9770: test case for sorting of Dewey call numbers that contain prefixes
Jason Etheridge [Fri, 21 Jun 2013 19:31:32 +0000 (15:31 -0400)]
Bug 9770: test case for sorting of Dewey call numbers that contain prefixes

This adds a test for C4::ClassSortRoutine::Dewey to check that the
call number "JR DVD 800.1" sorts before "JR DVD 900"

To test:

[1] Apply just this patch.
[1] Run prove -v t/ClassSortRoutine_Dewey.t
[2] Test #7 should fail.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes test plan and QA script.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bce45b4bf55e82345efed2850d9cb5fd77f3c483)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 926e455f19852c1c7b69aa00bd587caff8bccd14)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 926e455f19852c1c7b69aa00bd587caff8bccd14)

11 years agoBug 10448: can now change framework after duplicating bib record
David Cook [Wed, 12 Jun 2013 01:24:09 +0000 (11:24 +1000)]
Bug 10448: can now change framework after duplicating bib record

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

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

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

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

--

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

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

--

Test Plan:

A) Before Applying Patch:

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

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

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

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

B) Apply the Patch

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

C) After Applying the Patch

Repeat Steps 1-3 and 5-8.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ca33b7fc635d93b3029831da7496372fb34c798f)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected.
(cherry picked from commit 98e397d9a5c5cbd3d2aa88cd0044c24a7d75ff72)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 98e397d9a5c5cbd3d2aa88cd0044c24a7d75ff72)

11 years agoBug 7143: Updating history and about page
Chris Cormack [Sun, 7 Jul 2013 08:38:55 +0000 (20:38 +1200)]
Bug 7143: Updating history and about page

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d647090a4ab9b53577c1959dcdb0642a29fcbe6d)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9886445eb8e82788167ec2440dfeddf0a6b3b58d)

Conflicts:

docs/history.txt

Solved minor conflicts

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 9886445eb8e82788167ec2440dfeddf0a6b3b58d)

11 years agoBug 10514: improve visibility of Add item link on new order form
Owen Leonard [Thu, 11 Jul 2013 14:28:55 +0000 (10:28 -0400)]
Bug 10514: improve visibility of Add item link on new order form

This patch converts the "Add" and "Clear" links
to the standard "submit/cancel" format inside a fieldset. This gives
them a little more visual weight.

Based on the changes made by Liz Rea and Jonathan Druart.

To test:

- create a basket
- add a record to it
- scroll down - the link to add item and cancel should both be more
  prominent now.
- Click "Add item" - it should add an item.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
I still feel weird about the button, but as two people have said they'd rather have the button, I'm alright with it I guess.
Really what I want is people to notice it's there and click it at the appropriate time. I hope this will help that issue.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Leaves the translation problems, but that needs more work and is
out of the scope of this bug.
Tested Add and Update functionality works correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 275f405c8b3920634907e5e1f2ef8ccecf497868)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 606a25bc41047291e4b11390b97caf5d9f01ae65)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 606a25bc41047291e4b11390b97caf5d9f01ae65)

11 years agoBug 8911: make sure history.txt gets installed where history.txt can see it
Tomas Cohen Arazi [Tue, 2 Jul 2013 21:35:58 +0000 (18:35 -0300)]
Bug 8911: make sure history.txt gets installed where history.txt can see it

This patch makes Makefile.PL put the history.txt file in the right places
depending on the chosen setup layout, adds a reference to that place in
koha-conf.xml (and debian template version), and finally tweaks about.pl to
use it.

To test, apply the patch and verify that perl Makefile.PL runs fine, and
installing in
 - dev
 - single
 - standard
layouts works as expected. Then go to the about.pl page and see if Koha's
history shows there.

Then, build your packages and test on your newly created instances.

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 0fe3d053ffe0adc4fda4fdb660ed93203ecc02d8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Fixed a trivial conflict in Makefile.PL (course reserves are not in 3.12)
(cherry picked from commit 2803bab669162aebf0c8f6360328842d2dfa2dc7)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 2803bab669162aebf0c8f6360328842d2dfa2dc7)

11 years agoBug 10411: add cache control headers for static resources (Debian package)
Robin Sheat [Wed, 5 Jun 2013 05:50:29 +0000 (17:50 +1200)]
Bug 10411: add cache control headers for static resources (Debian package)

This adds caching directives to the static resources so that the browser
doesn't ask about them all the time.

By default, Debian apache doesn't have the required module (mod_expires)
enabled, and so this patch will have no effect. In order to enable this
function, run:

a2enmod expires

and restart apache.

Test Plan:
* Using firebug or equivalent, load a page.
* Note that none of the images, css, or js files have a Cache-Control or
  Expires header set.
* Add this patch, redeploy the package with it (or overwrite the
  apache-share.conf file) enable the 'expires' module, restart apache.
* Force-reload the page
* Note that the images, css, js now have Cache-Control and Expires set
  for 12 hours into the future.

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 be905428722522f1ace4e99d13ffcb5d11f65657)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6b94a9a3406f7c1b58a88b54c598ad617b84ee52)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 6b94a9a3406f7c1b58a88b54c598ad617b84ee52)

11 years agoBug 10507: improve warning about duplicate patron attribute value
Colin Campbell [Tue, 9 Jul 2013 10:18:49 +0000 (11:18 +0100)]
Bug 10507: improve warning about duplicate patron attribute value

If a warning about a duplicated patron attribute is returned,
the value was being passed back for display in the warning
message with the same name as the variable in errors

As the message is displayed in the context of errors
the error value 1 was being displayed not the value
duplicated as intended.

Pass the value to the template with a unique name.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I fixed another tiny typo while signing off: "is already in use" instead
of "is already is use."

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 2614e07e1e2e6386b5f91e65f127940072e54d4d)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b3bf4592a534a5c9824bdd54c6c0b354c3d34f61)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit b3bf4592a534a5c9824bdd54c6c0b354c3d34f61)

11 years agoBug 10475 - Item form in acquisition not hiding subfields properly
Owen Leonard [Tue, 25 Jun 2013 16:46:04 +0000 (12:46 -0400)]
Bug 10475 - Item form in acquisition not hiding subfields properly

Subfields hidden in your ACQ framework leave a gap where they used to
be in the item entry form when adding an item to an order. This patch
makes the same change made by 7116 to services/itemrecorddisplay.tt to
correct the problem.

To test:

- Edit your ACQ framework and set some item subfields to hidden in the
  editor.
- Set your  AcqCreateItem system preference to "when placing an order."
- Add a title to an existing basket from an existing record.

The item entry form should display correctly with your hidden subfields
hidden. No whitespace should be left behind where the subfields were
hidden.

Also changed: Invalid "size" attributes on hidden form fields in
neworderempty.tt, stray </li>.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, passes all tests and QA script.
Thx Owen!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5e1f8caf609aa58eabf6f353d12ec25e0e8e23a0)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit db3ae2c96dade62540cf66f066fc5faca73fa69b)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit db3ae2c96dade62540cf66f066fc5faca73fa69b)

11 years agoBug 10490: DBRev 3.10.09.003
Bernardo Gonzalez Kriegel [Sun, 4 Aug 2013 15:07:55 +0000 (12:07 -0300)]
Bug 10490: DBRev 3.10.09.003

Uppdate database number

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
11 years agoBug 10490: Overdue fines cap can't store decimal values
Katrin Fischer [Mon, 1 Jul 2013 19:58:57 +0000 (21:58 +0200)]
Bug 10490: Overdue fines cap can't store decimal values

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

To test:

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

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

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

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

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 16c57940441aac62c1c90538f3c7b7cd386e6d92)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 47df7c9641321b70cd132790d4cfeab500bc34be)

Conflicts:

installer/data/mysql/updatedatabase.pl

Solved

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 47df7c9641321b70cd132790d4cfeab500bc34be)

11 years agoBug 10560: add regression test
Galen Charlton [Fri, 12 Jul 2013 14:57:11 +0000 (14:57 +0000)]
Bug 10560: add regression test

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e2bb7af21666ca61f65fb3163d8449823f5cab4b)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a8ed0e52c65f3fed53108fc1cbe9b860e63f98b5)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit a8ed0e52c65f3fed53108fc1cbe9b860e63f98b5)

11 years agoBug 10560: make it possible for default interface language to not be English
Robin Sheat [Fri, 30 Nov 2012 02:48:50 +0000 (15:48 +1300)]
Bug 10560: make it possible for default interface language to not be English

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

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

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

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

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

Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 38f596d48e19c8f7890caea7a6eb59b6174cf5fa)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as advertised.
(cherry picked from commit 8f0ce3c1a0e43e6fb8b7bae56e4d658bfc315631)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 8f0ce3c1a0e43e6fb8b7bae56e4d658bfc315631)

11 years agoBug 10535: by default sort funds by name
Fridolyn SOMERS [Wed, 3 Jul 2013 12:24:23 +0000 (14:24 +0200)]
Bug 10535: by default sort funds by name

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

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit aa6cdb60a9ab2581ffef08796a349242d3d2ff66)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f56768adba9fb1d39861e04796fac2be8cfdf914)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit f56768adba9fb1d39861e04796fac2be8cfdf914)

11 years agobug 10548: fix count of missing required dependencies by koha_perl_deps.pl
Mark Tompsett [Sat, 6 Jul 2013 19:50:54 +0000 (15:50 -0400)]
bug 10548: fix count of missing required dependencies by koha_perl_deps.pl

To test:

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

If you have nothing missing, uninstall an optional component.

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

You should get a number missing of at least 1.

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

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

[4] Apply patch

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

Same results as in step 2.

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

The number should differ from the results in step 3.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0134341d9a9883013b7eee3bdc84aa339e618bcc)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 3fcf60e3e2e68f73e9a6292576b6dbc35e450145)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 3fcf60e3e2e68f73e9a6292576b6dbc35e450145)

11 years agoBug 4907: make 'Organize by' filter in suggestions reflect selected option
Katrin Fischer [Mon, 1 Jul 2013 21:44:39 +0000 (23:44 +0200)]
Bug 4907: make 'Organize by' filter in suggestions reflect selected option

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

This patch fixes that.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 60a4dffbb197fe92e7483b9e0dfcc19bc9b51664)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 5207c513c36fb0e66ed5a8390fc30119e194fad1)

11 years agoBug 5858: Followup for INSERT IGNOREs in marc21_framework_DEFAULT.sql
Marcel de Rooy [Sun, 7 Jul 2013 12:40:19 +0000 (14:40 +0200)]
Bug 5858: Followup for INSERT IGNOREs in marc21_framework_DEFAULT.sql

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bf9eccfeb8069c1b258916c1916138b6317122da)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit bfd82695b19ce20cd638e8c285e7e1aeed89a255)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit bfd82695b19ce20cd638e8c285e7e1aeed89a255)

11 years agoBug 5858: update default MARC21 framework to April 2013 revision
Bernardo Gonzalez Kriegel [Wed, 20 Mar 2013 00:25:20 +0000 (21:25 -0300)]
Bug 5858: update default MARC21 framework to April 2013 revision

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 45669b2566c889c7a73251cdb132c81cf5127117)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 689080867eb810279a912f2d9bf7a78655ffc9dd)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 689080867eb810279a912f2d9bf7a78655ffc9dd)

11 years agoBug 9353: DBRev 3.10.09.002
Bernardo Gonzalez Kriegel [Sun, 4 Aug 2013 03:02:34 +0000 (00:02 -0300)]
Bug 9353: DBRev 3.10.09.002

Update database number

11 years agoFollowup Bug 9353: Missing subfields on MARC21 frameworks
Bernardo Gonzalez Kriegel [Thu, 10 Jan 2013 22:01:07 +0000 (19:01 -0300)]
Followup Bug 9353: Missing subfields on MARC21 frameworks

This followup changes updatedatabase.pl.
Only touch frameworks that have the missing subfields.

If both patches are applied, the test plan changes.

To test:
1) dev master system with default and example MARC21 frameworks
2) Go to Home > Administration > MARC frameworks
3) Click on 'MARC structure' of any framework
4) Search for tag 029 (or 863/4/5)
5) Click 'Subfields', there are none.
6) Apply both patches
7) run 'perl installer/data/mysql/updatedatabase.pl'
8) Repeat steps 2-4
9) Click 'Subfields', now they are.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Update works nicely. Checked various frameworks and
results were ok. Also new fields are hidden.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit da4bc6a6315a7f5aca1bb3105549758b8acd7592)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit da4bc6a6315a7f5aca1bb3105549758b8acd7592)
Solved conflict in updatedatabase.pl
This two are necessary for Bug 5858

11 years agoBug 9353 - Missing subfields on MARC21 frameworks
Bernardo Gonzalez Kriegel [Sat, 5 Jan 2013 20:46:34 +0000 (17:46 -0300)]
Bug 9353 - Missing subfields on MARC21 frameworks

This patch adds missing subfields on MARC fields

029abct
(http://www.oclc.org/bibformats/en/0xx/029.shtm)

863abcdefghijklmnopqstvwxz68 (same for 864/5)
(http://www.loc.gov/marc/holdings/hd863865.html)

To test:
1) dev master system with default and example MARC21 frameworks
2) Go to Home > Administration > MARC frameworks
3) Click on 'MARC structure' of any framework
4) Search for tag 029 (or 863/4/5)
5) Click 'Subfields', there are none.
6) Apply the patch
7) Replace old frameworks, easiest by command line:
mysql -uuser -ppass kohadb -e 'delete from biblio_framework; delete from marc_tag_structure; delete from marc_subfield_structure'
mysql -uuser -ppass kohadb < installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
mysql -uuser -ppass kohadb < installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
8) Repeat steps 2-4
9) Click 'Subfields', now they are.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Updated frameworks are ok.
Note: Only en frameworks are updated, so if other languages need
those fields too, we need some followups.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit d0f3a49d9672cd018a51168b05db7a9d1f17f250)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d0f3a49d9672cd018a51168b05db7a9d1f17f250)

11 years agoBug 10289: (follow-up) don't set cardnumber for test patron
Galen Charlton [Mon, 8 Jul 2013 14:29:32 +0000 (14:29 +0000)]
Bug 10289: (follow-up) don't set cardnumber for test patron

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7957dd2a06cd20997f50f49aa1b77e24589ae71c)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9c90b651f2a1a4420a0b5b7865c0796c1d6b8764)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 9c90b651f2a1a4420a0b5b7865c0796c1d6b8764)

11 years agoBug 10289: (follow-up) wrap tests in transaction
Galen Charlton [Mon, 8 Jul 2013 14:27:14 +0000 (14:27 +0000)]
Bug 10289: (follow-up) wrap tests in transaction

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 47cf3ec24ded468ca4b7b79c8b000b1bdb13d1a8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f5a8bec0f7ae7a1118fd003c36c6651906f970af)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit f5a8bec0f7ae7a1118fd003c36c6651906f970af)

11 years agoBug 10289: UT: Reserves.t needs to create its own data
Jonathan Druart [Mon, 20 May 2013 14:37:10 +0000 (16:37 +0200)]
Bug 10289: UT: Reserves.t needs to create its own data

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6e6c7608b7d9b13d3af8d2115659ef142adb1b01)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b606e3afd2ad0a64f663bf086b1d792046a5570f)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit b606e3afd2ad0a64f663bf086b1d792046a5570f)

11 years agoBug 9519: DBRev 3.10.09.001
Bernardo Gonzalez Kriegel [Sat, 3 Aug 2013 19:24:18 +0000 (16:24 -0300)]
Bug 9519: DBRev 3.10.09.001

Update database number

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
11 years agoBug 9519: fix code for Italian language search limiter
Sonia LEMAIRE [Wed, 3 Jul 2013 13:53:49 +0000 (15:53 +0200)]
Bug 9519: fix code for Italian language search limiter

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

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

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

Conflicts:

installer/data/mysql/updatedatabase.pl

Trivial merge conflict in the usual suspect, updatedatabase.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 645e80d58783aed46f368e36156ea69e2a34779e)

Conflicts:

installer/data/mysql/updatedatabase.pl

Solved merge conflict

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 645e80d58783aed46f368e36156ea69e2a34779e)

11 years agoBug 10384: fall back to normal authentication if LDAP server is not available
Fridolyn SOMERS [Fri, 31 May 2013 08:17:08 +0000 (10:17 +0200)]
Bug 10384: fall back to normal authentication if LDAP server is not available

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

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

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

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 96ac578960cb4f2c5a964b3ac7fa4f9ba676b95d)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 85130dafc515363eba8f44973291a7af893a8b52)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 85130dafc515363eba8f44973291a7af893a8b52)

11 years agoBug 10088: FIX adding an order from a staged file.
Jonathan Druart [Thu, 25 Apr 2013 07:47:53 +0000 (09:47 +0200)]
Bug 10088: FIX adding an order from a staged file.

Bug 9902 introduced an issue in the C4::Items::PrepareItemrecordDisplay
routine. The existence of $defaulvalue hashref should be tested before
getting to the branchcode key.

Test plan:
Before applying the patch, an error occurred when you try to create an
order from a staged file.
After applying the patch, the error does not appear anymore.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit f2e44716f60578b9663862d7b2ba3b16f7067143)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit a8ee942442d42e7ae4f42567eba22f33725188a5)

11 years agoBug 9902 - item subfields not populating
Kyle M Hall [Wed, 27 Mar 2013 13:18:24 +0000 (09:18 -0400)]
Bug 9902 - item subfields not populating

Test Plan:
1) Create a new serial with a default location, call number, and library
   ( the library will need to be any but the one you are logged in as )
2) Click the "Recieve" button for this serial
3) Click "Click to add item"
4) Note those values are not populated
5) Apply the patch
6) Reload the page
7) Click "Click to add item"
8) Note those values are now populated

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

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This seems to restore the former behaviour.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
signing for 3.10.x - restores former behaviour.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely. Before applying the patch callnumber,
location and branches are not carried over correctly.
After applying the patch, this works as expected.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Pushed to 3.10.x

11 years agoBug 9533: batch item modification form now shows default field values only by request
Kyle M Hall [Wed, 17 Apr 2013 13:33:55 +0000 (09:33 -0400)]
Bug 9533: batch item modification form now shows default field values only by request

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

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2d32ab38148f7d75412a36e928dea799717bc5fb)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 3865b14a57c4e0d4547980acf67060eac181161f)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 3865b14a57c4e0d4547980acf67060eac181161f)

11 years agoBug 9113: fix handling of certain characters by item batch modification tool
Fridolyn SOMERS [Wed, 26 Jun 2013 15:52:40 +0000 (17:52 +0200)]
Bug 9113: fix handling of certain characters by item batch modification tool

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

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

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

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

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0397e7ea64c208c140d7178ed34c3bd4b266fcfb)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit dbd52acf2958bca6b126a35a47d03b6d4d4d541d)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit dbd52acf2958bca6b126a35a47d03b6d4d4d541d)

11 years agoBug 5894: Display all titles when confirming copy of items from cart to list
Marc Veron [Fri, 14 Jun 2013 14:37:23 +0000 (16:37 +0200)]
Bug 5894: Display all titles when confirming copy of items from cart to list

Adds missing code that splits biblios before calling template.

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bed99a851646fd0c7a4c906dd9dfe60c485b40c6)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 7c92496cf7f7ee1016b934a8e01e995b680f9761)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 7c92496cf7f7ee1016b934a8e01e995b680f9761)

11 years agoBug 10346 - "Add multiple copies" should be labelled "Add multiple items"
Owen Leonard [Wed, 5 Jun 2013 18:03:51 +0000 (14:03 -0400)]
Bug 10346 - "Add multiple copies" should be labelled "Add multiple items"

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

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

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 79df5211d6faff8ab31b46c815ed50c70093a057)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 7000aa561c7fb33c422f9b60c4f7590a6071ee08)

Solved Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 7000aa561c7fb33c422f9b60c4f7590a6071ee08)

11 years agoBug 10428: undefined check in add additem.pl
Fridolyn SOMERS [Fri, 7 Jun 2013 08:17:54 +0000 (10:17 +0200)]
Bug 10428: undefined check in add additem.pl

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

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passed-QA-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e31b158245f4eff36decebf30c8a87c8cfebe472)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 54d414ee2d16a2969c91e5a83cb8c66858fed03c)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 54d414ee2d16a2969c91e5a83cb8c66858fed03c)

11 years agoBug 10029 - CAS authentication fails in OPAC reserve
Fridolyn SOMERS [Thu, 11 Apr 2013 14:46:23 +0000 (16:46 +0200)]
Bug 10029 - CAS authentication fails in OPAC reserve

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

This patch adds query parameters to URI sent to CAS.

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 974ab561ef00e76e7329f61b016b5d6b3103dde7)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 2dff5177f2d7c542175b28adf1832e201c0ae864)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 2dff5177f2d7c542175b28adf1832e201c0ae864)

11 years agoBug 10510 - OPAC's renew selected link has glitchy icon
Owen Leonard [Wed, 26 Jun 2013 16:54:15 +0000 (12:54 -0400)]
Bug 10510 - OPAC's renew selected link has glitchy icon

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

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

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

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1a1658f020e482abdd35fc8afc04cfcbce91e046)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d3636aee9fe920106b8b9ea84d058c357e1e2fcc)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d3636aee9fe920106b8b9ea84d058c357e1e2fcc)

11 years agoBug 10497 - star ratings not showing right in ccsr detail
Owen Leonard [Fri, 28 Jun 2013 18:21:03 +0000 (14:21 -0400)]
Bug 10497 - star ratings not showing right in ccsr detail

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

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

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

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2fccb14a806e9aad18cc9f75df39e09bd64830dd)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 2898cf57e5c3b9c6fd8f4fe8f0d5c180ab28fc06)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 2898cf57e5c3b9c6fd8f4fe8f0d5c180ab28fc06)

11 years agoBug 6553 - Parentheses in Corporate author break tracings
Liz Rea [Thu, 9 May 2013 21:32:17 +0000 (09:32 +1200)]
Bug 6553 - Parentheses in Corporate author break tracings

To test:

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 41409f500edf495db114b2277f4916e5a737a0aa)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 45c883c3e509eacf2a1e3737db6bb6e7c4a9d2d8)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 45c883c3e509eacf2a1e3737db6bb6e7c4a9d2d8)

11 years agoBug 10484: serials-edit.pl not checking for barcode field before checking for barcode...
Kyle M Hall [Mon, 17 Jun 2013 16:28:13 +0000 (12:28 -0400)]
Bug 10484: serials-edit.pl not checking for barcode field before checking for barcode subfield

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9af08e4e2d2091de489633b3f1c4fb03fcf323cd)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1d9ac2b10a96800d301524978f00ee393b5bb75e)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 1d9ac2b10a96800d301524978f00ee393b5bb75e)

11 years agoBug 10494: remove spurious warnings from the KohaBranchName plugin
Galen Charlton [Wed, 19 Jun 2013 15:52:56 +0000 (08:52 -0700)]
Bug 10494: remove spurious warnings from the KohaBranchName plugin

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

To test:

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

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

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ad2c1b3b8f20b3060c9a3a35c21a0757c685cbec)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 42d93d1e342d0f450fcbe80767be91a3bbba20ac)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 42d93d1e342d0f450fcbe80767be91a3bbba20ac)

11 years agoBug 10494: test cases for the KohaBranchName plugin
Galen Charlton [Wed, 19 Jun 2013 15:47:34 +0000 (08:47 -0700)]
Bug 10494: test cases for the KohaBranchName plugin

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

prove -v t/db_dependent/Koha_template_plugin_KohaBranchName.t

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 96320a786bac92418b08b5af4d2b68746627482b)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 059732c23c23be77da1c18fac3290aa9c0ba2d67)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 059732c23c23be77da1c18fac3290aa9c0ba2d67)

11 years agoDatabase update for 3.10.9 release v3.10.09
Bernardo Gonzalez Kriegel [Sun, 28 Jul 2013 22:00:53 +0000 (19:00 -0300)]
Database update for 3.10.9 release

11 years agoUpdate release notes for 3.10.9 release
Bernardo Gonzalez Kriegel [Sun, 28 Jul 2013 21:57:50 +0000 (18:57 -0300)]
Update release notes for 3.10.9 release

11 years agomove Auth_ParseSearchHistoryCookie.t to db_dependent directory
Galen Charlton [Sun, 28 Jul 2013 19:42:51 +0000 (19:42 +0000)]
move Auth_ParseSearchHistoryCookie.t to db_dependent directory

The actual tests in this script are not dependent on the database,
but simply loading C4::Auth requires a valid(ish) koha-conf.xml
and database.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3a5e64cd916d415a4ffde2be921419d4cfaab33f)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 3a5e64cd916d415a4ffde2be921419d4cfaab33f)

11 years agodo some validation of the KohaOpacRecentSearches cookie
Galen Charlton [Sun, 28 Jul 2013 02:48:44 +0000 (02:48 +0000)]
do some validation of the KohaOpacRecentSearches cookie

Add validation of the value of the KohaOpacRecentSearches.  In
particular, this patch avoids the generation of an internal server
error when the OPAC is presented with an old cookie that uses the
old Storable-based serialization.

This patch also moves parsing of the cookie value into a
new routine in C4::Auth, ParseSearchHistoryCookie, and adds
a test case.

To test (in conjunction with the previous patch):

Exercise the OPAC search history functionality, after
turning on the EnableOpacSearchHistory syspref:

- As an anonymous user, conduct a variety of searches,
  including ones that include non-ASCII characters
- Check the search history and verify that all searches
  are listed
- Apply this patch and the previous one.
- Do *not* clear the KohaOpacRecentSearches cookie
- Check the search history and verify that no searches
  are listed any more
- As an anonymous user, conduct a variety of searches,
  including ones that include non-ASCII characters
- Check the search history and verify that all searches
  are listed
- Log into the OPAC
- Verify that current and past searches are listed in
  search history.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 89792b97cacb01fc6f7d2380a4c8f21703d79e72)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 89792b97cacb01fc6f7d2380a4c8f21703d79e72)

11 years agouse JSON rather than Storable for the OPAC search history cookie
Galen Charlton [Thu, 25 Jul 2013 16:50:30 +0000 (16:50 +0000)]
use JSON rather than Storable for the OPAC search history cookie

To test:

Exercise the OPAC search history functionality, after
turning on the EnableOpacSearchHistory syspref:

- Clear the KohaOpacRecentSearches cookie
- As an anonymous user, conduct a variety of searches,
  including ones that include non-ASCII characters
- Check the search history and verified that all searches
  are listed
- Log into the OPAC
- Verify that current and past searches are listed in
  search history.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c6c001b8ff94f60c60de428053b107105fb589de)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit c6c001b8ff94f60c60de428053b107105fb589de)

11 years agoDatabase update for 3.10.8 release
Bernardo Gonzalez Kriegel [Tue, 23 Jul 2013 21:23:40 +0000 (18:23 -0300)]
Database update for 3.10.8 release

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
11 years agoUpdate release notes for 3.10.8 release
Bernardo Gonzalez Kriegel [Tue, 23 Jul 2013 21:17:28 +0000 (18:17 -0300)]
Update release notes for 3.10.8 release

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
11 years agoTranslation updates for 3.10.8
Bernardo Gonzalez Kriegel [Tue, 23 Jul 2013 10:43:15 +0000 (07:43 -0300)]
Translation updates for 3.10.8

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
11 years agoBug 8884: opacheader is not in the header on CCSR
Jared Camins-Esakov [Mon, 20 May 2013 16:55:17 +0000 (12:55 -0400)]
Bug 8884: opacheader is not in the header on CCSR

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 905292b6328bbc847b1b932fc15dfef9e9845295)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b31e993b74a81d2b8c063410218a40374f2d8cdd)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit b31e993b74a81d2b8c063410218a40374f2d8cdd)

11 years agoBug 10386: improvements to VirtualShelves.t
Marcel de Rooy [Mon, 3 Jun 2013 13:27:50 +0000 (15:27 +0200)]
Bug 10386: improvements to VirtualShelves.t

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

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 93e87ca0b61611fc35238bf13eb226f477cf9c4e)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a97b62379f82a94157916959109c7c1a75582d8a)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit a97b62379f82a94157916959109c7c1a75582d8a)

11 years agoBug 10290: Followup for Virtualshelves.t
Marcel de Rooy [Mon, 3 Jun 2013 12:25:43 +0000 (14:25 +0200)]
Bug 10290: Followup for Virtualshelves.t

Put the 10 biblionumbers in a list
Add a FIXME for deleting shelves
Do temporary repair on duplicate name test (Followup via report 10386)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1ef99ace2043d75889830c4c0af8af3e9e36104e)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit e26655fe03c2f5181d6a820f40e38a7cebb46e05)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Missed this one from previous release
(cherry picked from commit e26655fe03c2f5181d6a820f40e38a7cebb46e05)

11 years agoBug 10290: UT: VirtualShelves.t needs to create its own data
Jonathan Druart [Mon, 20 May 2013 14:56:38 +0000 (16:56 +0200)]
Bug 10290: UT: VirtualShelves.t needs to create its own data

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

And after, it should produce:
  t/db_dependent/VirtualShelves.t .. ok
  All tests successful.
  Files=1, Tests=82,  6 wallclock secs ( 0.03 usr  0.00 sys +  0.46 cusr  0.03 csys =  0.52 CPU)
  Result: PASS

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 44905ac99cee8ddca6c63752d948a74afae20194)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Tests are good :-D. They look fine and work as expected.
(cherry picked from commit e918450e6ad6e661474479f8890f6b141fe4e15a)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Missed this one from previous release
(cherry picked from commit e918450e6ad6e661474479f8890f6b141fe4e15a)

11 years agoBug 10336: HoldsQueue.t needs to create its own data
Jonathan Druart [Fri, 24 May 2013 14:18:59 +0000 (16:18 +0200)]
Bug 10336: HoldsQueue.t needs to create its own data

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bfbc646fdd9ca4b90a0bc2751d0faa95d9e93ba1)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 509972e3858d3b3c9f915d09a1e10f77cbe105fd)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 509972e3858d3b3c9f915d09a1e10f77cbe105fd)

11 years agobug 10495: set precondition for HoldsQueue test
Galen Charlton [Wed, 19 Jun 2013 17:30:58 +0000 (10:30 -0700)]
bug 10495: set precondition for HoldsQueue test

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

To test:

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

prove -v t/db_dependent/HoldsQueue.t

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4e51ec5aae50c878bbdca6994361b12d7ba20d0a)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 20d43f6c02e2bc3fbc1a79b00b995c128a4b41ef)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 20d43f6c02e2bc3fbc1a79b00b995c128a4b41ef)

11 years agoBug 7110: Renewal messages no longer displays in OPAC if OpacRenewalAllowed is disabled
Owen Leonard [Tue, 27 Nov 2012 16:16:14 +0000 (11:16 -0500)]
Bug 7110: Renewal messages no longer displays in OPAC if OpacRenewalAllowed is disabled

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

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

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

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

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

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

- OpacRenewalAllowed OFF and OPACFineNoRenewals ON: No warning appears.

- OpacRenewalAllowed OFF and OPACFineNoRenewals OFF: No warning appears.

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 29edd3797a7c950664ebc3be272ad4dca2575a80)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit dceefcfac1e54dbfa3e13174cc8a5d73acbf07fe)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit dceefcfac1e54dbfa3e13174cc8a5d73acbf07fe)

11 years agoBug 10590 - parameterise the limit option
Robin Sheat [Mon, 15 Jul 2013 14:06:40 +0000 (02:06 +1200)]
Bug 10590 - parameterise the limit option

The limit option was previously substituted directly into the query. The
previous patch on bug 10590 filters it on input, but there's no reason
not to have it made to work properly in the query for added safety.

To test:

[1] Go to the top checkouts report (http://OPAC/cgi-bin/koha/opac-topissues.pl)
[2] Run the report several times, varying the filters on
    number of results and item type.
[3] Verify the the list of top checkouts appears to be correct.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 89cf013a6fadcb1347151798f3fdab0d8c75cd15)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 2e77edf8dfa0350a6e20805e7fa39b97608c804e)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 2e77edf8dfa0350a6e20805e7fa39b97608c804e)

11 years agoBug 10590 - in opac-topissues limit param is not protected
Fridolyn SOMERS [Mon, 15 Jul 2013 11:00:18 +0000 (13:00 +0200)]
Bug 10590 - in opac-topissues limit param is not protected

In opac-topissues page, the limit URL argument is directly added to SQL query.

This patch adds protections : limit must only contain digits and must be lower than 100.

Test plan :
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=10&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=9999&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 100 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=WHERE&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 57866d6b67c3f8b29290150f21c71395315a73fe)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 5867909f8866b4e68340b88817bfb95f51bc3c9e)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 5867909f8866b4e68340b88817bfb95f51bc3c9e)

11 years agoBug 10524 - dependency updates
Robin Sheat [Mon, 1 Jul 2013 15:06:09 +0000 (03:06 +1200)]
Bug 10524 - dependency updates

Include liblibrary-callnumber-lc-perl

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a9d967bb546f6c11ef0a46696a2aa3136772e4c6)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit a9d967bb546f6c11ef0a46696a2aa3136772e4c6)

11 years agoBug 9458 - Add sorting to lists - QA Followup 4
Kyle M Hall [Thu, 7 Mar 2013 18:30:27 +0000 (13:30 -0500)]
Bug 9458 - Add sorting to lists - QA Followup 4

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit f0c58df12e7bb7e9a42abf52cc113dcb85c8002f)

Solved Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked form commit f0c58df12e7bb7e9a42abf52cc113dcb85c8002f)

11 years agoBug 9458 - Add sorting to lists - QA Followup 3
Kyle M Hall [Tue, 5 Mar 2013 17:46:45 +0000 (12:46 -0500)]
Bug 9458 - Add sorting to lists - QA Followup 3

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit 1ac83c05949582846171089f77eff220d61915d2)

Solved Conflicts:
C4/VirtualShelves/Page.pm

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 1ac83c05949582846171089f77eff220d61915d2)

11 years agoBug 9458 - Add sorting to lists - QA Followup 2
Kyle M Hall [Tue, 26 Feb 2013 15:34:20 +0000 (10:34 -0500)]
Bug 9458 - Add sorting to lists - QA Followup 2

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit be48d34b4f1407178e7f3cddf45721a96025f833)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit be48d34b4f1407178e7f3cddf45721a96025f833)

11 years agoBug 9458 - Add sorting to lists - QA Followup
Kyle M Hall [Tue, 19 Feb 2013 13:42:11 +0000 (08:42 -0500)]
Bug 9458 - Add sorting to lists - QA Followup

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit bc9f606ca7025417f3f2fddd393983cc0beec0ba)

Solved Conflicts:
C4/VirtualShelves/Page.pm
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit bc9f606ca7025417f3f2fddd393983cc0beec0ba)

11 years agoBug 9458 - Add sorting to lists
Kyle M Hall [Wed, 23 Jan 2013 14:05:20 +0000 (09:05 -0500)]
Bug 9458 - Add sorting to lists

Test Plan:
1) Apply patch
2) View list in staff interface, try sorting by title, then author
3) Repeat 2 with same list in OPAC

Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit 4b95ee62394d1e31dfda3fdb2d027fc67482c349)

Solved Conflicts:
C4/VirtualShelves/Page.pm
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 4b95ee62394d1e31dfda3fdb2d027fc67482c349)

11 years agoBug 10317: improve display when order receiving page is given an invalid invoiceid
Jonathan Druart [Thu, 23 May 2013 14:42:38 +0000 (16:42 +0200)]
Bug 10317: improve display when order receiving page is given an invalid invoiceid

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

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

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

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

Passes QA script.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 3446a86f80313316c5f939e10b983c8703095030)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 3446a86f80313316c5f939e10b983c8703095030)

11 years agoBug 10474: Translate some English strings in German sample notices
Katrin Fischer [Sun, 16 Jun 2013 07:09:33 +0000 (09:09 +0200)]
Bug 10474: Translate some English strings in German sample notices

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

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

Check that the notices were added correctly, especially ISSUESLIP.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit aecb163f69b238314bbd67215ce2d8950aeab060)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 32de75b948944debe41380293c58cfe02bcbcc2d)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 32de75b948944debe41380293c58cfe02bcbcc2d)

11 years agoBug 10379 - Followup: add koha-rebuild-zebra -q to the man page
Magnus Enger [Tue, 25 Jun 2013 06:39:23 +0000 (08:39 +0200)]
Bug 10379 - Followup: add koha-rebuild-zebra -q to the man page

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

To test, run something like these commands:

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

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

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 114ad0015b209404b30289397646cb2f21d4aa54)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6643a41c97b3a9b4129f0dd7d1fa854f2f93fb14)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 6643a41c97b3a9b4129f0dd7d1fa854f2f93fb14)

11 years agoBug 10379: silence zebra rebuild cron when no instances are enabled
Robin Sheat [Thu, 30 May 2013 04:12:13 +0000 (16:12 +1200)]
Bug 10379: silence zebra rebuild cron when no instances are enabled

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

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

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
"sudo koha-rebuild-zebra -q" gives no output, as expected.
Followed the test plan, all looks good.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c31e553a72d40bf0b1c099284ecbb4b95833e186)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit cc9b3522b192b8510a4846cd7a4b3aca3e8a0a07)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit cc9b3522b192b8510a4846cd7a4b3aca3e8a0a07)

11 years agoBug 9826 - Missing fields in MARC21 authority framework
Bernardo Gonzalez Kriegel [Thu, 14 Mar 2013 21:37:05 +0000 (18:37 -0300)]
Bug 9826 - Missing fields in MARC21 authority framework

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

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

For present authtypes only missing subtags are added.

Also updates a few legends to match those from LOC.

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

Only to new installs.

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

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 12874c4cf71c199cc2d383cf26bdcca89220b6bf)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 518a0186f3622aa5a0e9714d3f8c71bc82dd3411)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 518a0186f3622aa5a0e9714d3f8c71bc82dd3411)

11 years agoBug 9541: make OPAC login page respect OPAC_CSS_OVERRIDE
Kyle M Hall [Tue, 19 Feb 2013 16:41:59 +0000 (11:41 -0500)]
Bug 9541: make OPAC login page respect OPAC_CSS_OVERRIDE

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 71b79d59908cd85130afd8600eff0f93fc79b8a9)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 69a8048eeecacff99b64fa722fa8850891476031)

Solved Conflicts in C4/Auth.pm

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 69a8048eeecacff99b64fa722fa8850891476031)

11 years agoBug 10396: remove unnecessary date-picker widgets from Catalog statistics form
Sophie Meynieux [Mon, 10 Jun 2013 13:32:57 +0000 (15:32 +0200)]
Bug 10396: remove unnecessary date-picker widgets from Catalog statistics form

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

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d7bfba8a106fbb00331e16dbc0943226bad24668)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected, simple patch
(cherry picked from commit d525d414538709ddf8feb4da6db3dee6c9ae9ff0)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d525d414538709ddf8feb4da6db3dee6c9ae9ff0)

11 years agoBug 10439: fix bug preventing the library for a notice from being changed
Jonathan Druart [Mon, 10 Jun 2013 12:05:32 +0000 (14:05 +0200)]
Bug 10439: fix bug preventing the library for a notice from being changed

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

Test plan:

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

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

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 77a5e3e365a50b02c9f224d731e05de90fc667c9)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Test plan works as advertised.
(cherry picked from commit a2e89edf43b2946da0986a5c83b04a60dea04061)

Solved Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit a2e89edf43b2946da0986a5c83b04a60dea04061)

11 years agoBug 10464: Patron search on placing a hold now supports autocomplete
Tomas Cohen Arazi [Thu, 13 Jun 2013 17:20:43 +0000 (14:20 -0300)]
Bug 10464: Patron search on placing a hold now supports autocomplete

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

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

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

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

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Adding a nice new autocomplete feature.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dc94a9bef79dc6d186fe93d82dac10cab0468d24)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit ab3163564e91921222c153897f786551fe59647e)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit ab3163564e91921222c153897f786551fe59647e)

11 years agoBug 766: remove CGI::scrolling_list from request.pl
Colin Campbell [Thu, 30 May 2013 17:23:55 +0000 (18:23 +0100)]
Bug 766: remove CGI::scrolling_list from request.pl

Let the template take care of generating the display.
Lets at least part of request.pl be more succinct.

To test, place a hold and search for the patron using a partial name.
You should get a dropdown select list of patrons and be able to select
the patron to hold for from there.

The functionality should remain unimpaired after this patch is applied.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7668e19c9593da570cffb5cd4640fe175d739328)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b88f16a4e99d533753e3d707239e94da019ce303)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit b88f16a4e99d533753e3d707239e94da019ce303)

11 years agoBug 10466: fix glitch in OPAC display of titles saved to list
David Cook [Fri, 14 Jun 2013 03:03:19 +0000 (13:03 +1000)]
Bug 10466: fix glitch in OPAC display of titles saved to list

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

Now for the technical details:

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

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

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

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

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

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

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

--

Test Plan:

Before applying the patch:

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

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

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

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

Apply the patch.

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ceada35e008e6a60b62f384ec386e80b03fe0130)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a7d116e2fe39a17dd076e1dc805239622b410418)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit a7d116e2fe39a17dd076e1dc805239622b410418)

11 years agoBug 10425: tweaks to text of help for local use system preference
Galen Charlton [Fri, 14 Jun 2013 15:30:35 +0000 (08:30 -0700)]
Bug 10425: tweaks to text of help for local use system preference

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c02b57bd5cacc3fbe981f5d8331c7cfe8aa178a7)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1133c328b31cf9e8138de85ef266a6557757bab4)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 1133c328b31cf9e8138de85ef266a6557757bab4)