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

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

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

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

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

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9e01b7c1d6c32dfd9ae0af4e708ca598303fbcf1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e741435e351b7298ee79d51df32203efa135a582)

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

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

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

- Normal
- MARC
- Labeled MARC
- ISBD
- Items

Test these Edit menu items:

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

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works nicely.

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

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

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

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

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

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

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

9 years agoBug 11675: check allocated total correctly when editing a fund that has a parent...
Jonathan Druart [Tue, 4 Feb 2014 11:15:42 +0000 (12:15 +0100)]
Bug 11675: check allocated total correctly when editing a fund that has a parent fund

The sth was created before the query.
The query was modified after the sth creation and an error was raised.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

- edit_items
- edit_catalogue
- items_batchmod
- items_batchdel

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Test plan:
Modify an item and save it.

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

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

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

With this patch, the currency is correctly displayed.

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

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

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

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

This routine is no longer used.

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

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

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

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

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

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

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

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

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0b989fe0b2097d747da1fd6d04aa8aecc5652d06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 996060aa92aa091a991ebe25cd2cd255b0d9d694)

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

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

To test:

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

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

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

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

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

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

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

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

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

To test, apply the patch and go to Tools -> Upload local cover image.
Try to submit the form without selecting a file to upload. You should be
prevented from doing so. Choose a file and confirm that the upload
completes correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7faff33c8b9bd670cf7813f4cefb7aee38709ebb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc50362c231ceb9a410dcbcbce94b8124db1aa13)

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

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

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

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6a323ce4ce914e757d5c1c999237ad2c0efc15e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7d40a4c9081d50b15652f80a0d65d8a60f7a57b5)

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit daa98e73f8baf178f2b0f32b4988d2414519ea4b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3ef4918dc7afcc58ea180d40768344a558799931)

9 years agoBug 11644: fix occasional failure to update fund amount due to floating-point math
Kyle M Hall [Thu, 30 Jan 2014 17:39:19 +0000 (12:39 -0500)]
Bug 11644: fix occasional failure to update fund amount due to floating-point math

When attempting to update a fund, if the amount unalloccated for the
fund is equal to the total, you can be prevented from saving. This is
due to imprecise floating point number comparison in
check_parent_total.pl

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

Signed-off-by: Sean McGarvey <smcgarvey@pascocountyfl.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ba689152e431217c8dd02d6ce0b8d14ae8d9f5da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 984758cd3c76276366be05149324df6a17916cad)

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

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

This patch also adds test cases.

To test:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b9d2a832db6d2a75d6466a349b769e8285d1f0c8)

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

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

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

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

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

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

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

Test plan:

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1db56c834b297eb7fd968691f66ef3517771cba5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0e0b39deafed3376bc65af9bf9ee7ec678c60d35)

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

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

To test:

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

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

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

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

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

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

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

It can be removed.

Test plan:
  git grep statecollection
returns no occurrence.

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

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

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

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

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

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

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

Benchmarks:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This reverts commit c9905750e53e2e1615842ac696d5eeb0a8ac07fc.

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

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

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

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

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

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

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

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

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

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

To test:

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

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

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

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

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

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

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

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

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

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

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

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

To test:

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

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

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

Just going to the patron categories page triggered errors.
Running through all the plain options also triggered other
warnings. This fix silences them.

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

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Followed test plan, saw no errors in the log after applying the patch.

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

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

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

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

To test:

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

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

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

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

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

Bonus points: makes some strings translatable.

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

Regards
To+

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

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

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

Bonus points: makes some strings translatable.

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

Regards
To+

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

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

Works as described.

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

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

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

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

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

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

Test in both prog and bootstrap.

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

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

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

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

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.

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

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

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

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

Batch patron deletion/anonymization tool has some issues:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

_TEST PLAN_

Before applying:

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

Apply the patch.

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e96d73aa9f462fb653b8b67d7d5bff81dab94be7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8a0e92c718e7c180a44b98fbe380c26667deacd)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
10 years agoBug 11505: fix untranslatable table headers in Label batch manager
Owen Leonard [Fri, 10 Jan 2014 20:46:29 +0000 (15:46 -0500)]
Bug 11505: fix untranslatable table headers in Label batch manager

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

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

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

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

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

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

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

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

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

The docs are updated accordingly.

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

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

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

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

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

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

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

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

This patch makes sure all scenarios are covered for SetUTF8Flag.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, includes new unit tests.

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

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

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

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

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

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

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

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

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

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

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

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

This patch improves the selection of a new quote.

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

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

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

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f874eec0793f83c3c0f1461fecb878ca57ed701b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 252051df7378d1d23e726a8757efb4e6af22d1fa)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 7518: certain searches with quotation marks don't work
Fridolyn SOMERS [Thu, 7 Mar 2013 15:02:55 +0000 (16:02 +0100)]
Bug 7518: certain searches with quotation marks don't work

Under certain circumstance, a search term without quotation marks
returns the expected results while the same search with a
double quote embedded in it would fail.

Koha should ignore the quotation marks and return results anyway.

This appears when  QueryWeightFields syspref is activated (and
QueryAutoTruncate is off), as field weighting builds a complex CCL
query using double quotes around search words.  This patch simply
replaces double quotes in search words by a space.

Test plan :
- Set QueryAutoTruncate off (you may also need to set QueryFuzzy to off)
- Set QueryWeightFields off
- Perform a serch on two words where you have results, like : centre "ville
=> you get results
- Set QueryWeightFields on
- Perform same serch
=> you get the same results

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 868855df4b674b495966c022392068c2fdd3a35f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f1bb46172bdc90db00a08c2c78e169952fd22feb)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 7518: regression test double-quote in search operand
Galen Charlton [Tue, 17 Dec 2013 16:32:09 +0000 (16:32 +0000)]
Bug 7518: regression test double-quote in search operand

Under certain circumstances, namely where QueryParser is off,
QueryWeightFields is on, and QueryFuzzy and QueryAutoTruncate are
off, a search with a double-quote embedded in it can fail: for
example

    web application

would return results where

    web "application

does not.

This patch adds an automated regression test.

To test:

[1] Apply this patch and run prove -v t/db_dependent/Search.t;
    two tests should fail.
[2] After applying the main patch that fixes the bug, the
    prove -v  t/db_dependent/Search.t should succeed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 437f06624759c464d667107d9f73ec05283f6892)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 895f989dcaad44830bc85d855d71b654170dbb1d)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Fixed some conflicts, the tests are they same overall.

10 years agoDBRev 3.12.10.001
Tomas Cohen Arazi [Fri, 7 Feb 2014 14:50:48 +0000 (11:50 -0300)]
DBRev 3.12.10.001

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 8018: (follow-up) fixing some wrong capitalization
Katrin Fischer [Mon, 23 Dec 2013 18:49:14 +0000 (19:49 +0100)]
Bug 8018: (follow-up) fixing some wrong capitalization

Fixes capitalization in 2 places:

- Delete a subfield - Yes/No options
- Edit a subfield - Edit subfield

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3b9d8074b85b7d06c555491a75a48ac751560ec2)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit bbc101bb1cb6705ea518b5f4fbd786393c643c22)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 8018: (followup) make the default more explicit
Tomas Cohen Arazi [Thu, 12 Dec 2013 15:24:11 +0000 (12:24 -0300)]
Bug 8018: (followup) make the default more explicit

This patch:
- Makes the new subfield tab show maxlength=9999 as default (instead of
  empty-then-zero).
- Updates the help to make exlpicit that 0 or empty defaults to 9999.
- Assumes all the subfields created with maxlength=0 inadvertedly are
  meant to mean "no limit" and hence update the database to reflect
  that.

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

Edit: small typo

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b5eab7c20bb8c2d07966bf1f68eaf0a7f953222e)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Conflicts:
installer/data/mysql/updatedatabase.pl

(cherry picked from commit 828d9b9f20fa4f01b6fb6bd4d9ff20d674f3ceac)

10 years agoBug 8018: MARC framework max subfield length should default to 9999
Pablo Bianchi [Wed, 11 Dec 2013 18:54:54 +0000 (15:54 -0300)]
Bug 8018: MARC framework max subfield length should default to 9999

The default value for the marc_subfield_structure.maxlenght is 9999
in the DB. Currently the template passes an empty value which is casted to
0 by the CGI.

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

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

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

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1ebbf40ecc07b9474e81e20ec1598659ab027d7a)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit a3f0eb97697213a267de0f8191e2acbc4197f6ab)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11419: display Z39.50 search errors more completely
Kyle M Hall [Wed, 18 Dec 2013 19:44:53 +0000 (14:44 -0500)]
Bug 11419: display Z39.50 search errors more completely

When a z39.50 server isn't able to be searched successfully, the yellow
error box came up empty.  This patch fixes the problem.

Test Plan:
1) Go to Administration/z39.50 servers
2) Create a fake z39.50 server with a made up address
3) Go to cataloging, search only that server
4) Note the empty yellow alert box
5) Apply this patch
6) Re-run the search, not the alert box has a message in it now

Signed-off-by: Nora Blake <nblake@masslibsystem.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works according to test plan.
When one of the selected servers gives result no dialog
box is shown before and after applying the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0fc114eee3f649abea88a62502211c595c2867b8)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit 0c4e9a01544d898db10e704aea15633d689311be)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11412: fix potential bulkmarcimport crash when searching for duplicates in author...
Matthias Meusburger [Wed, 18 Dec 2013 10:20:05 +0000 (11:20 +0100)]
Bug 11412: fix potential bulkmarcimport crash when searching for duplicates in authorities

bulkmarcimport.pl can crash when searching for duplicates if the 005
field from the incoming or local record is not defined. This patch
fixes it.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Test plan
1/ Create a record with no 005 field
2/ Try to import it checking for duplicates, notice it crashes
3/ Try with a record with a 005 field, but the one in Koha missing
one, still crashes
4/ Apply patch
5/ No more crash

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Patch fixes the problem described for importing authorities
with the bulkmarcimport.pl when trying to match with existing
records.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 28d97e322805a42680527232b151754b4778aed8)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit 16df6d75044a6b1d64bb0ab4f0bded4b4699d5d6)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 10453: fix unintended password reset when updating child to adult
Jonathan Druart [Tue, 24 Dec 2013 13:35:36 +0000 (14:35 +0100)]
Bug 10453: fix unintended password reset when updating child to adult

ModMember supposes the password given in parameter is the
password string, so if it receives the encrypted password,
it will encrypt it again! By simply deleting the password key
from the hash, ModMember leaves the password unchanged.

Test plan:
1/ Create or choose a child patron
2/ Update it to an adult category using the
   "Update child to adult patron" link
3/ Try to log in at the OPAC with this patron: It is not
   possible, the password has changed
4/ Apply the patch and try again previous steps

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed the problem and tested the patch fixes it.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3c5b4712717d082b66376915c47b6b5880695d31)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit 810168643d02ebb69c2d56a5fa17b811b06d68a8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 9948: fix creation/updating of items when partially receiving an order
Jacek Ablewicz [Sat, 14 Dec 2013 11:07:11 +0000 (12:07 +0100)]
Bug 9948: fix creation/updating of items when partially receiving an order

Problem summary: when doing partial receives for the given order -
1) if AcqCreateItem is set to 'ordering', various item data (price,
dateaccessioned, replacementprice, replacementpricedate) are getting
erroneously updated on the wrong (yet to be received == not the ones
being currently received) item records
2) if AcqCreateItem is set to 'receiving', newly received
item records are being created without the aforementioned fields
set to the proper values

This (trivial) patch should deal with both cases, hopefully without
breaking enything else.

To test:
- apply the patch,
- create some orders with 2+ quantity
- test partial & non-partial receives for those orders
- ensure the received item records are getting modified
(for AcqCreateItem set to 'ordering') and/or created (for AcqCreateItem
set to 'receiving') correctly for both partial and non-partial receives
- receiving orders with quantity = 1 / receiving orders in non-partial
mode should be still working fine for 1) & 2) scenarios (i.e.,
AcqCreateItem set to 'ordering' / AcqCreateItem set to 'receiving')

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Works as I'd expect now! Awesome patch.

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.
Also: t/db_dependent/Acquisition/
      t/db_dependent/Acquisition.t

Created 2 orders with 3 items each for both settings
of AcqCreateItem (on receive, on order) with the patches
applied. No regressions found.

Closed baskets and received shipments for each, with
AcqCreateItem set according to how the order was created.

First recreated the problem without the patches, reloaded
database and confirmed that the patch fixes it.

No problems found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 95e2754af6a2dbd5f042a1c3504488f5de8c8d23)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit 7f57015aa99c9a99cf5d0715f9c55222941c1c27)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoIncrement version for 3.12.10 release v3.12.10
Tomas Cohen Arazi [Thu, 6 Feb 2014 14:46:23 +0000 (11:46 -0300)]
Increment version for 3.12.10 release

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoUpdate release notes for 3.12.10 release
Tomas Cohen Arazi [Thu, 6 Feb 2014 14:44:59 +0000 (11:44 -0300)]
Update release notes for 3.12.10 release

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

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

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

To test:

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 94e349ff6ce4a1abb313102decc12429d02dfb4b)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
There were conflicts on the template. The modified strings wont get translated
but in as it is an administrative feature that not everyone uses on a daily basis
I think it wont hurt. And will get fixed in a couple of weeks anyway.

10 years agoBug 11666: add permission check for MARC framework import/export
Galen Charlton [Tue, 4 Feb 2014 15:54:33 +0000 (15:54 +0000)]
Bug 11666: add permission check for MARC framework import/export

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

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

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

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

To test:

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

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7baf02c263a627b1454577b3141a0af4b8f963d1)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11660: remove disused tools/pdfViewer.pl
Chris Cormack [Sat, 1 Feb 2014 01:18:23 +0000 (14:18 +1300)]
Bug 11660: remove disused tools/pdfViewer.pl

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d1b6e0646fd6a70f6724189554e80aaa68aec64b)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoIncrement version for 3.12.9 release v3.12.09
Tomas Cohen Arazi [Thu, 23 Jan 2014 19:08:32 +0000 (16:08 -0300)]
Increment version for 3.12.9 release

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoTranslation updates for 3.12.09 release
Bernardo Gonzalez Kriegel [Wed, 22 Jan 2014 15:32:32 +0000 (12:32 -0300)]
Translation updates for 3.12.09 release

(cherry picked from commit eff238e560d0a3b4446530d6fe6632fad7fd4142)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoUpdate release notes for 3.12.9 release
Tomas Cohen Arazi [Thu, 23 Jan 2014 17:36:48 +0000 (14:36 -0300)]
Update release notes for 3.12.9 release

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 10735: prevent koha-dump from aborting if backupdir undefined
Robin Sheat [Tue, 19 Nov 2013 02:26:02 +0000 (15:26 +1300)]
Bug 10735: prevent koha-dump from aborting if backupdir undefined

Older versions of Koha didn't have <backupdir>...</backupdir> defined in
koha-conf.xml. The koha-dump script is aware of this, and checks to see
if it's there. However, if it's not, xmlstarlet returns a non-0 error
code which causes the script to abort due to running under set -e.

Test plan:
 * Remove backupdir from koha-conf.xml
 * Run koha-dump, notice that it doesn't do backups
 * Apply patch
 * Run koha-dump again, notice that it does do backups

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The fallback method works as described. It might be made more robust
like checking for dir existence (thinking of older instances upgrades).
But it certainly belongs to another bug report.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
As Tomas said, it would be better to alert the user if the backupdir tag
does not exist (or contains a nonexistent directory) in the config file.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 266f2a3a9f3d67fed0e0b35d267419a901345b92)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit de1344c2759631e1a8d505151630f160ebdab768)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11410: ensure cataloging search finds results for searches with ampersands
Kyle M Hall [Tue, 17 Dec 2013 21:04:10 +0000 (16:04 -0500)]
Bug 11410: ensure cataloging search finds results for searches with ampersands

When QueryParser is off, the cataloging search is passing the incorrect
variable to SimpleSearch.  I'm sure this is causing other issues, but
the one I have identified is that any searches with an "&" in them
return no results.  This patch corrects the bug.

Test Plan:
1) Catalog a new record titled "Cats & Dogs"
2) Rebuild your zebra index so this record is indexed
3) Browse to cataloguing/addbooks.pl
4) Search for "Cats & Dogs"
5) Notice you get no results
6) Apply this patch
7) Repeat the search
8) Notice your result now shows up!

Signed-off-by: Heather Braum <hbraum@nekls.org>
Signed-off-by: Suzanne Fayle <sfayle@roseman.edu>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as described, passes all tests and QA script.
Note: Because $query = $builtquery when the QueryParser is used,
this problem is only visible when UseQueryParser is set to "Don't try".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2a4e193c242372f488892591a72752dfd4ffb138)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit 0c500f463001db06c8c1f72f8b81c8edde6487d7)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11166: make library filter in funds administration page more precise
Fridolyn SOMERS [Wed, 30 Oct 2013 09:28:49 +0000 (10:28 +0100)]
Bug 11166: make library filter in funds administration page more precise

In funds administration, admin/aqbudgets.pl, there is a combobox for
filtering by library code.

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

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 484d1490925d736f99a430a6933c96e42ea4e768)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit 64c79561bbabf6476fb72c27435789f4dd19180a)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11255: allow "relevance ascending" as a sort option
Jonathan Druart [Fri, 15 Nov 2013 10:10:04 +0000 (11:10 +0100)]
Bug 11255: allow "relevance ascending" as a sort option

This patch fixes a problem where if a staff member sets the
*defaultSortField/*defaultSortOrder system preferences to relevance
ascending while QueryParser is enabled, default keyword search
would break -- the query parser config did not declare relevance asc
as a possible "modifier".

Note that setting the sort order to relevance ascending does not
actually make catalog search return results with the least relevant
records showing up first; Zebra does not support such a mode.  In other
words, relevance ascending acts exactly the same as relevance descending.

Test plan:

0/ Create some biblio with "history" in the title and
   ensure that the QueryParser system preference is enabled.
1/ Define prefs defaultSortField = relevance and defaultSortOrder = asc
2/ Search "history" on the staff interface
3/ Note that no result is returned.
4/ Apply the patch
5/ Verify the queryparser config file in use takes the modification into
account (see the queryparser_config value in your $KOHA_CONF file).
6/ Relaunch the search and verify results are returned

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 54937c5eb34c511e00de8d0831141516422885c7)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit 96599cc238393ff3f70445c512ff8ffc87bc13ce)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as described. Had to copy the queryparser.yaml file to my koha-dev/etc/searchengine dir.

10 years agoBug 9224: Make acqui/finishreceive.pl Plack-compatible
Jacek Ablewicz [Wed, 16 Oct 2013 15:31:04 +0000 (17:31 +0200)]
Bug 9224: Make acqui/finishreceive.pl Plack-compatible

Under Plack/mod_perl wrapping, sub update_item() will become a closure,
so after the 1st run it will retain its own private instances of the
following variables: $booksellerid, $datereceived, $unitprice, $rrp,
$biblionumber.

I.e., in case update_item() gets invoked 2nd+ time (inside
the same process, but for different-subsequent receives) it may
incorrectly flag the (old, wrong) biblionumber for Zebra reindexing,
and erronously modify the current item[s] with the previously
used (wrong) values.

This simple patch should make acqui/finishreceive.pl Plack-compatible.

Test plan:
Test patched acqui/finishreceive.pl script (create and receive some
orders w/ items, etc.). Ensure items are gettting added and/or modified
correctly during receiving process.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised, no regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6dcc34c1b44f72a8602c4ee95540836e6cd1e7bd)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit 2a38ac7259bbe88d1d531bfd9d93d9edee64a4c4)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
10 years agoBug 11174: fix OPAC search links built from authority 5xx fields
Zeno Tajoli [Wed, 30 Oct 2013 18:36:41 +0000 (19:36 +0100)]
Bug 11174: fix OPAC search links built from authority 5xx fields

In the templates opac-authoritiessearchresultlist of prog and
bootstrap the incorrect parameter 'valuec' is changed to 'value'

To test:

1) Insert an authority record with a 5xx field  (on MARC21 or UNIMARC)
2) Index the record
3) Search for the record in using OPAC authorities search.
4) Click one of the "see also" links built from the 5xx field, the link
   doesn't work
5) Apply the patch
6) Close the browser
7) Open the opac and select the english interface
8) Redo the search
9) Now the link works
10) To use the patch in others languages you need to regenerate the
    templates.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with bootstrap.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Following commit remove the use to valuec:
 commit 31f41e2c1db9d8dca82e0249050acb8f906c8164
    Bug 8206: Specify index in OPAC authority search

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 09fcd6980301bae3daad68f8cc27a2d5e7d488e4)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
(cherry picked from commit 27596b0c6a808fda6a08abb4cd46a98025e3a38f)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Removed the Bootstrap bits.