]> git.koha-community.org Git - koha.git/log
koha.git
9 years agoBug 13523 - AddBiblio fails on mysql with STRICT_TRANS_TABLES
Benjamin Rokseth [Thu, 22 Jan 2015 11:21:47 +0000 (12:21 +0100)]
Bug 13523 - AddBiblio fails on mysql with STRICT_TRANS_TABLES

This patch removes the NOT NULL restriction on biblioitems.marcxml and
deletedbiblioitems.marcxml due to STRICT_TRANS_TABLES default in
Mysql 5.6.22 and onwards.

Test:

1. check mysql global settings:
   mysql > SELECT @@GLOBAL.sql_mode;
   verify that STRICT_TRANS_TABLES is not set
2. set STRICT_TRANS_TABLES (or upgrade mysql to > 5.6.21)
   mysql > SET @@GLOBAL.sql_mode = 'STRICT_TRANS_TABLES';
3. try to add biblio in Cataloguing module
   verify that it fails with a "software error"
4. apply patch
5. repeat 3 and verify that there is no "software error" any more

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I confirm with the problem with mariadb and STRICT_TRANS_TABLES enabled.
On adding a biblio (C4::Biblio::AddBiblio), biblioitems is populate in
_koha_add_biblioitem but marxcml is not generated yet. It's in
ModBiblioMarc, few lines later.
The NOT NULL condition is not valid here.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 4b59bc4e2b591b32ff28eccda0baf8d131544736)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13729 - Give news in Opac a unique anchor
Viktor Sarge [Wed, 18 Feb 2015 21:02:09 +0000 (21:02 +0000)]
Bug 13729 - Give news in Opac a unique anchor

This patch introduces the use of the idnew-value from the opac_news table as a base for a unique anchor on each newsitem in Opac.

The anchor can be used for linking to specific newsitems and also for improving bug 7843 (RSS stream for news) with a unique link to each item in the RSS stream.

Test plan:
* Make shure you have a few news in the opac. Best is if it's enough to hide a few beneath the bottom of the window.
* Install the patch.
* Verify that you can access newitems with links like mykoha/cgi-bin/koha/opac-main.pl#newsitem4
* Experiment with removing newsitems and verify that that the newsitem-id stay unique to each newsitem.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised. Nice enhancement!

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 13a16343fa21e87b9c4723fdf4d02ae6eb46d495)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13645: dependencies for libdbix-connector-perl
Robin Sheat [Tue, 24 Feb 2015 05:32:30 +0000 (18:32 +1300)]
Bug 13645: dependencies for libdbix-connector-perl

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 0a91c48edbd4eb8d4080fbca6fb2bc3af9ca9f92)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13645 [QA Followup] - Add DBIx::Connector to the list of dependancies
Kyle M Hall [Fri, 20 Feb 2015 14:54:35 +0000 (09:54 -0500)]
Bug 13645 [QA Followup] - Add DBIx::Connector to the list of dependancies

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Nice catch Kyle, I changed it to require Ubuntu 12.04's

(cherry picked from commit 00f27cb0b9fb200a06da461371e04be1501ca107)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13645: Use DBIx::Connector
Jonathan Druart [Tue, 10 Feb 2015 09:47:05 +0000 (10:47 +0100)]
Bug 13645: Use DBIx::Connector

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4883835816ebce164ec336f9adcd4c925f9244b4)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Conflicts:
C4/Context.pm

9 years agoBug 13645: Cache the DBIx connection
Jonathan Druart [Fri, 30 Jan 2015 16:10:54 +0000 (17:10 +0100)]
Bug 13645: Cache the DBIx connection

We don't want to recreate a new connection to the DB every time we want
a new schema.

This patch creates a $database package level variable on the same way
it's done in C4::Context for $dbh.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 354ee6d427e3ec8fc926d7fb793141a127733258)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13593: (follow-up) 'stock number' should be 'inventory number'
Jonathan Druart [Thu, 19 Feb 2015 14:50:37 +0000 (15:50 +0100)]
Bug 13593: (follow-up) 'stock number' should be 'inventory number'

Add one more.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 8770d37de70ea935702139ca955b4dd9d4ff38fa)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13593: 'stock number' should be 'inventory number'
Katrin Fischer [Sun, 18 Jan 2015 19:04:15 +0000 (20:04 +0100)]
Bug 13593: 'stock number' should be 'inventory number'

To make Koha easier to use, we should use terms consistently.
This patch fixes some occurrences of 'stock number' to be
'inventory number' as this is also the term used in the frameworks.

Item search, accessible via the link from staff's advanced search
1) Do a search for items, but choose CSV as output
2) Verify that the header row says 'inventory number'

Acquisition
3) Set AcqCreateItem to 'order'
4) Create a new order, check the labels on the item table in the order

5) Receive the order, check the labels on the item table on receive

6) Set AcqCreateItem to 'receive'
7) Check the item table on receiving an order

Followed test plan (including item search with JavaScipt disabled). Headers / labels display as expected.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9cc7ac68e1c2993b7780a6fe1c361ddd434a595b)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13682 - Capitalization: Holds Queue
Marc Véron [Tue, 10 Feb 2015 17:16:45 +0000 (18:16 +0100)]
Bug 13682 - Capitalization: Holds Queue

This patch changes capitalization of Holds Queue to Holds queue in koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueu$

To test:
Apply patch
Go to Circulation > Holds queue page
Verify that the capitalization is correct

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 8804598f3dcff3ccacc34723939cf072d8451fac)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13700: Fix item search templates for translation
Julian Maurice [Fri, 13 Feb 2015 12:30:56 +0000 (13:30 +0100)]
Bug 13700: Fix item search templates for translation

Since translator rebuild HTML tags with double quotes for attributes
values, use double quotes in english template too and escape them with
backslash.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
It works well!!

Test:
1) Intall translation  (de-DE, es-ES)
2) to Go to item search, in english, do a search that gives results
3) Switch language, repeat search, result's table does not render
4) Apply patch
5) Install translation again
6) Repeat 3, now results are displayed

No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 39c22b1a6a744d6b4c50c3a4b62295ab3a601636)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoAdding release notes v3.18.04
Chris Cormack [Sun, 22 Feb 2015 23:42:26 +0000 (12:42 +1300)]
Adding release notes

9 years agoBumping version number for release
Chris Cormack [Sun, 22 Feb 2015 23:21:17 +0000 (12:21 +1300)]
Bumping version number for release

9 years agoBug 12948: Use word indexing for language (MARC21)
Zeno Tajoli [Sun, 15 Feb 2015 16:40:06 +0000 (17:40 +0100)]
Bug 12948: Use word indexing for language (MARC21)

 This patch is for MARC21. To test:
1)Setup a site with
 MARC21
2)Insert 2 record, one lang A in 041 and 008 pos
 35-37 an other with lang A in 041 and lang B in 008 pos
 35-37
3)Index them
4)Search in advanced search with filter
 'languare' for lan A. You will see 2 records
5)Search in
 advanced search with filter 'languare' for lan B. You will
 see 0 records
6)Apply the patch
7)Full reindex
8)Search in advanced search
 with filter 'languare' for lan B. You will see 1 records

http://bugs.koha-community.org/show_bug.cgi?id=12948

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
I have *not* actually tested this, but the changes are identical to the ones
done for NORMARC, which I have tested, so I think it is safe to sign off. If
anyone disagrees, please reset the bug to "Needs signoff".

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit c29a53ea20d668f135c62abbc7dda1bf282be8f0)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12948: Use word indexing for language (NORMARC)
Zeno Tajoli [Sun, 15 Feb 2015 16:54:48 +0000 (17:54 +0100)]
Bug 12948: Use word indexing for language (NORMARC)

This patch is for Normarc
Same test plan as patch for MARC21, except you need a setup with Normarc.

http://bugs.koha-community.org/show_bug.cgi?id=12948
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
- Added a record with "bul" in 008pos35-37
- Verified that this did not turn up in an advanced search with language =
  Bulgarian
- Applied the patch
- I was testing on a gitified install, so I had to copy the patched index file
  to the right location with this command:

sudo cp etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl \
/etc/koha/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl

- Did a full reindex
- Verified that the record *did* turn up in an advanced search with language =
  Bulgarian
- Signing off! Thanks Zeno!

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit bf89e306a86c440a3296fc89436ad5e854ea4f34)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13690: use Koha::Schema only when it's needed
Jonathan Druart [Tue, 10 Feb 2015 10:34:10 +0000 (11:34 +0100)]
Bug 13690: use Koha::Schema only when it's needed

This patch makes Koha::Database lazy-load the whole Koha::Schema libraries.
It doesn't seem to have negative effects, and makes scripts not using
DBIx::Class notably faster [1].

Regards

[1] If you read the DBIx::Class::Schema docs, it explains that it it uses
Module::Find to load all schema files...
http://search.cpan.org/~ribasushi/DBIx-Class-0.082810/lib/DBIx/Class/Schema.pm#load_namespaces

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Happy to sign this one. The only extra comment would be that DBIx::Class
performance issues remain after this patch, but is being handled in a
different bug.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c52bc9756a5fa1e4f6bba7ce5c58124f150c5efc)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12858 [QA Followup] - Don't call webservice if we have no data
Kyle M Hall [Fri, 20 Feb 2015 12:23:15 +0000 (07:23 -0500)]
Bug 12858 [QA Followup] - Don't call webservice if we have no data

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 79e1008cef66345106328487c712ef6dde7f3507)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12858: Add error handling to Syndetics Index
Martin Renvoize [Tue, 2 Sep 2014 09:14:03 +0000 (09:14 +0000)]
Bug 12858: Add error handling to Syndetics Index

* Syndetics routines include a statement to check that the returned
  content from Syndetics is xml. The get_syndetics_index routine was
  missing this check and so when a 'not found' html page was returned
  the opac-detail page would take a long time to load whilst xml::simple
  attempted to parse the large html document.

  Test Plan
  1. Enable Syndetics indexes on opac.
  2. Head over to an opac-detail page on the opac.
  3. Remove the ISBN from the same item in the staff client.
  4. Reload the opac-detail page for the item noticeing a much slower
  page load.
  5. Apply the patch
  6. Reload the opac-detail page for the item and note that it now laods
  in a reasonable timescale again.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit acc7da6a5f93e12704acdfd7981481c9ef07904b)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12669: Centralize the timezone handle into Koha::DateUtils
Jonathan Druart [Tue, 16 Sep 2014 11:15:57 +0000 (13:15 +0200)]
Bug 12669: Centralize the timezone handle into Koha::DateUtils

This patch adds unit tests for the previous changes and centralize the
timezone handle into the Koha::DateUtils module.
Like that the behavior will affect all date manipulations using this
module (should be all dates in Koha).

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f82064286d3bc97031ad784901716a7a327839bc)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12669: Use floating timezone when handling dates without hours, minutes and seconds.
Rolando Isidoro [Fri, 1 Aug 2014 08:42:30 +0000 (09:42 +0100)]
Bug 12669: Use floating timezone when handling dates without hours, minutes and seconds.

Test plan:

1. Create a new serial record or pick an existing one;
2. Add a "New subscription" and set the "First issue publication date"
   and "Frequency" values so that the "Planned date" for a given issue
   hits a day where a transition to Daylight Saving Time (DST) occurs

   ex:. 1979-04-01 in Europe/Lisbon (http://www.timeanddate.com/time/change/portugal/lisbon?year=1979)
   ... use this website page as a source http://www.timeanddate.com/time/dst/2014.html
   to find a suitable transition to DST in your timezone in the current year.

3. From the "Subscription detail" page in Koha for the given record click
   the "Serial collection" link on the left side context menu.

Expected result:
Prior to applying the patch the error described in this bug report should occur.
After the patch is applied the "Serial collection" page should load correctly.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit e8f9000fcca4fd542f7f82e2288d3a627053dd77)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13679 : Bug in listing overdues
Chris Cormack [Sat, 7 Feb 2015 04:04:40 +0000 (17:04 +1300)]
Bug 13679 : Bug in listing overdues

To test
1/ Create some overdues and some issues due in the future
2/ Run the overdues script
3/ Notice item due in the future is in the list
4/ Apply patch
5/ Run script again
6/ Notice in the future not in the list

Signed-off-by: Nick <Nick@quechelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 07f9dd9f8c2abb43a031c91449661a779ff53746)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13728: koha-translate -l -a shows po files instead of language codes
Tomas Cohen Arazi [Wed, 18 Feb 2015 15:27:20 +0000 (12:27 -0300)]
Bug 13728: koha-translate -l -a shows po files instead of language codes

This patch corrects the call to 'basename' inside the script so it correctly
shows the language code when asked to list the available languages.

To test:
- On a packages install, run:
  $ koha-translate --list --available
=> FAIL: It shows:
am-Ethi-opac-bootstrap.po
ar-Arab-opac-bootstrap.po
az-AZ-opac-bootstrap.po
be-BY-opac-bootstrap.po
ben-opac-bootstrap.po
...

- Apply the patch
- Copy the patched debian/scripts/koha-translate script to your packages setup.
- Run:
  $ koha-translate --list --available
=> SUCCESS: It shows:
am-Ethi
ar-Arab
az-AZ
be-BY
ben
...

- Sign off :-D

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6b26f8858e5069a2fae21fb28692a8eeb37fa0a8)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13568 OAI Server doesn't handle properly resumption token
Frédéric Demians [Mon, 12 Jan 2015 11:18:19 +0000 (12:18 +0100)]
Bug 13568 OAI Server doesn't handle properly resumption token

When responding to ListRecords and ListIdentifiers verbs, OAI server doesn't
return proper resumption token. At the end of a result set, OAI server
generates a resumption token even if there isn't anymore records. Consequently,
OAI harverster will send a new request, based on this invalid resumption,
token. OAI Server responds with an empty resultset, which is considered as an
invalid response by most of the harvesters.

TO TEST:

- Find in your DB, a day where a few biblio records have been created. The
  number of created biblios must inferior to OAI-PMH:MaxCount.

- Let say this day is 2014-01-09. Send an OAI-PMH request to Koha OAI Server:

  /cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml&from=2014-01-09&until=2014-01-09

- At the end of the result, you will see a resumption token which looks like that:

  <resumptionToken cursor="47">marcxml/47/2014-01-09/2014-01-09/</resumptionToken>

  This is wrong. No resumptiion token should be sent since there isn't anymore
  records to harvest.

- Apply the patch.

- Resend the OAI-PMH request. There is no resumption token at the end of the
  result.

- You could test also with ListIdenfiers verb in place of ListRecord.

Signed-off-by: Christophe Brocquet <christophe.brocquet@obspm.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f1ea9624bd197b04f78750bcc4d8f07ef2f9675d)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoTranslation updates for Koha 3.18.04 release
Bernardo Gonzalez Kriegel [Sun, 22 Feb 2015 22:13:10 +0000 (19:13 -0300)]
Translation updates for Koha 3.18.04 release

9 years agoBug 13352: QA Follow-up: Remove Price filter from "Warning at (%)"
Katrin Fischer [Sun, 8 Feb 2015 15:23:41 +0000 (16:23 +0100)]
Bug 13352: QA Follow-up: Remove Price filter from "Warning at (%)"

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13352: On editing, prices should not be formatted
Jonathan Druart [Mon, 26 Jan 2015 09:28:27 +0000 (10:28 +0100)]
Bug 13352: On editing, prices should not be formatted

Bug 12979 refactored the way to display prices.
The price format configuration was duplicated everywhere it was used.

All calls looks good except the one in admin/aqbudgetperiods.pl
In this one, the prices are formatted for an edition field (input).
This means the input is incorrectly filled even if the user does not
update the field.

At the end, maybe should we manage formatted prices everywhere, even in
inputs, but it's not in the scope of this bug.

Technically, a new subroutine format_for_editing is added to the
Koha::Number::Price module.
It should be called everywhere a price is displayed in an input field.
At the moment, it only does a sprintf("%.2f"), but it is a first step to
let the number of decimals to display configurable.

To test:
1/ Verify the issue described is fixed (editing a budget with a total
amount > 1000 (With CurrencyFormat is US or FR).
2/ Verify you can edit a fund with a total amount > 1000

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13603 - autoBarcode setting hbyymmincr not taking month into account when looking...
Kyle M Hall [Tue, 20 Jan 2015 15:11:24 +0000 (10:11 -0500)]
Bug 13603 - autoBarcode setting hbyymmincr not taking month into account when looking up next increment

The hbyymmincr autoBarcode builder looks up all barcodes that begin with
any number of letters ( the branchcode ) and a two-digit year directly
afterward ( e.g. MPL15 ), then grabs the last four digits as the
increment counter. The problem is, this does not take months into
account, so unlike the description that says the system is limited to
10,000 items a month, it is limited to 10,000 items per *year*.

This situation can easily be corrected my adding the month into the
lookup ( e.g. MPL1501 ).

Test Plan:
1) Enable autoBarcode, set to hbyymmincr
2) Catalog an item, let the barcode.pl plugin generate
   the next barcode.
3) Catalog an item with the barcode MPL15009999
4) Catalog another item, use the barcode.pl plugin to
   generate the next barcode.
5) Note the barcode is generated ends with '0001' instead of the
   correct increment
6) Apply this patch
7) Repeat step 4
8) Note the barcode now ends with the correct increment

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jeanne Heicher <nppublib@pa.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Problem confirmed - the continuing number bit was not reset
to start counting from 1 again on the beginning of a new month.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b280b4890c813b5535b6e98b27c390d9af10551a)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13142 - Change "mobile phone" label back to "other phone"
Owen Leonard [Wed, 12 Nov 2014 19:42:37 +0000 (14:42 -0500)]
Bug 13142 - Change "mobile phone" label back to "other phone"

Labeling a phone number field "mobile phone" eliminates the usefulness
of having the labels "primary" and "secondary." Generic labels let the
user populate the fields according to their importance rather than their
type.

To test I recommend editing a patron record so that the values in the
patron record contain a label matching the table column:

borrowers.phone : 555-555-1234 (primary - phone)
borrowers.phonepro : 555-555-5678 (secondary - phonepro)
borrowers.mobile : 555-555-9012 (other - mobile)

View this patron's information in the various affected templates and
verify that the labels correctly match the data:

 - OPAC "your personal details" (opac-memberentry.pl)
 - Submit changes to primary, secondary, and other phone via the OPAC.
   In the staff client, view the confirmation for those changes.
 - Patron details in the staff client (moremember.pl)
 - Patron entry/edit in the staff client (memberentrygen.pl)
 - Patron duplicate confirmation in the staff client
   (you can navigate directly to
   /members/moremember.pl?borrowernumber=XXXX&print=brief)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a7da45099f49093cc950a1392d6488543af5ddd3)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13343: Embed items when send a basket/shelf
Jonathan Druart [Wed, 26 Nov 2014 14:14:59 +0000 (15:14 +0100)]
Bug 13343: Embed items when send a basket/shelf

When a basket/shelf is downloaded, items are embedded, but not when
sending it by email.

We would expect to get the same file.

Test plan:
On Opac and intranet:
1/ Add records with items to your basket and send it by email.
Verify the file contains items.
2/ Add records with items to a list and send it by email.
Verify the file contains items.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a0e5d77a719443c6616194a898795f70d34d6ebc)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13335 - Holds and priority display via OPACShowHoldQueueDetails confusing
Kyle M Hall [Tue, 25 Nov 2014 15:16:47 +0000 (10:16 -0500)]
Bug 13335 - Holds and priority display via OPACShowHoldQueueDetails confusing

No matter what the selection of OPACShowHoldQueueDetails is, if it is
enabled it displays a line "Holds and priority:" even if you've opted to
hide one of those!

Test Plan:
1) Apply this patch
2) Test each setting of OPACShowHoldQueueDetails
3) Ensure each setting displays the correct fields ( or lack thereof )

Signed-off-by: Christopher Brannon <cbrannon@debian.localdomain>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 295fb70f62069c0b1fbed2d9bbdf2650f58e488c)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13636 - Staff search results item status incorrect for holds
Kyle M Hall [Wed, 28 Jan 2015 13:31:30 +0000 (08:31 -0500)]
Bug 13636 - Staff search results item status incorrect for holds

Imagine this scenario: we have one record with four items. Two of those
items are checked out, one of those items is a waiting hold, and one of
those items is available. We would expect to see this on the search
results page. Instead, we will see both non-checked out items as
unavailable due to waiting holds.

This is due to a semantic issue GetReserveStatus.
C4::Search::searchResults uses GetReserveStatus to get the reserve
status of each item, but unlike all other calls to the sub, this one
passes in not only itemnumber, but biblionumber.

When no reserve is found for the available item, the subroutine uses the
biblionumber to grab what is essentially an arbitrary reserve to use for
the status. This makes no sense and this functionality should be
entirely removed from the subroutine so regressions like this will be
prevented in the future.

Test Plan:
1) Create one record with 4 items
   a) check two of the items out to patrons
   b) set one of the items as a waiting hold
   c) leave the fourth item as available
2) Run a search where this record will be in the results list
3) Note that the results list 2 items on loan, two unavailable
4) Apply this patch, reload the search results
5) Note that the results list 1 available, 2 on loan, 1 unavailable

Signed-off-by: John Andrews <jandrews@washoecounty.us>
Signed-off-by: Sheila Kearns <sheila.kearns@state.vt.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Note: This is for the staff search result list!

Works as expected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit fcaa6f35c080c079ba422a70dec49ca327346c82)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13431 [QA Follow-up]: Shared FastMmap file causes issues
Jacek Ablewicz [Tue, 30 Dec 2014 09:30:30 +0000 (10:30 +0100)]
Bug 13431 [QA Follow-up]: Shared FastMmap file causes issues

1) Removed 'use C4::Context;' because it can lead to introduction
of circular reference in the near future
2) Put fastmmap initialization code into an eval {} block, to catch
various kinds of errors which can still occur during it's init in
some [less usual] Koha setups and/or more unusual circumstances
3) Do not include UID in the sharefile name (it will be constructed
using namespace + database name + database host instead).

Test plan addendum:

   s/and UID//

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit dbf0b358b9362fdf634b47569b1777d7034b17a9)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13431 - Shared FastMmap file causes issues
Jacek Ablewicz [Tue, 16 Dec 2014 11:48:09 +0000 (12:48 +0100)]
Bug 13431 - Shared FastMmap file causes issues

Koha::Cache package does not take into account that, when using
fastmmap caching variant, mmaped cache file created in /tmp
(typically: /tmp/sharefile-koha-koha), would only be further
accessible to the one given OS user - the one which created it.
In many Koha setups, in the circumstances when various system scripts
are executed by 2+ users with diffrent UIDs (like multi-tenant servers,
for example) this may cause many kinds of issues. Observable symptom
is usually the appearance of the below error when searching, or looking
at MARC Framework pages and a few other places:

Open of share file /tmp/sharefile-koha-koha failed: Permission denied
at /usr/lib/perl5/Cache/FastMmap.pm line 640.

This patch:
- disables initialisation of fastmmap caching subsystem unless it is
explicitly requested by the user (CACHING_SYSTEM=fastmmap)
- disables fastmmap cache usage for command line scripts
(i.e. when GATEWAY_INTERFACE environment variable is not defined)
- adds the database name, host name and an ID of the OS user to the
mmaped file name created in /tmp, to prevent various kinds of
unintentional conflicts and/or permission problems from happening

To test:

1) remove the /tmp/sharefile-koha-* file[s] (if any)
2) do something which would lead to its re-creation (e.g., performing
any search in OPAC should be sufficient to cause that)
3) observe that /tmp/sharefile-koha-koha got created
4) remove it
5) apply patch
6) redo step 2)
7) observe that aforementioned file is no longer created in /tmp
8) set CACHING_SYSTEM environment variable to 'fastmmap'
9) redo step 2), observe that /tmp/sharefile-koha-* file got created
and that it's name now contains hostname, database name and UID
10) ensure that everything still works like it should and that there
are no regressions of any kinds anywhere in the system ;)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9e701294dd6ccf4fa5d8b24d1a7da15be353992e)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13670 - Patron holds table not loading when holds tab anchor is used
Kyle M Hall [Thu, 5 Feb 2015 14:21:12 +0000 (09:21 -0500)]
Bug 13670 - Patron holds table not loading when holds tab anchor is used

If a link to a patron record ends with #reserves, the holds tab is selected
on page load, but the holds table does not load.

Test Plan:
1) Build your holds queue
2) From the holds queue report, open any patron link
3) Note the patron's reserves do not load
4) Apply this patch
5) Clear your browser cache
6) Repeat step 2
7) Note the holds table now loads

Signed-off-by: Sean McGarvey <seanm@pascolibraries.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 87bcc8b303e506514318814f63c430a3a54f1181)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13319: Fix Koha::Acq::Order should set parent_ordernumber
Jonathan Druart [Fri, 14 Nov 2014 15:18:09 +0000 (16:18 +0100)]
Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber

The tests highligh the problem: if the parent_ordernumber attribute is
not set on inserting an order, the object returned by the method does
not contain the value (undef).

Test plan:
Verify the tests are consistent and
    prove t/db_dependent/Acquisition/CancelReceipt.t
should return green.

You can also verify that receive partially an order and cancel the
receipt work as expected.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f19a1777a0847ce2dc10b7f259bf76fc2d382d19)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 12323 [SIGNED OFF] - Acquisitions search results fixed in order of biblionumber
Kyle M Hall [Wed, 21 May 2014 18:09:04 +0000 (11:09 -0700)]
Bug 12323 [SIGNED OFF] - Acquisitions search results fixed in order of biblionumber

The acquisitions search is exhibiting the same behavior as bug 11410.
Results are always fixed in order of biblionumber, among other possible
issues ( including the ampersand issue ).

Test Plan:
1) From an open basket, choose "Add to basket"
2) Run a search for "From an existing record"
3) Note the "View MARC" URLs are fixed in order of biblionumber
4) Apply this patch
5) Refresh the page
6) Note the results are no longer fixed in order of biblionumber

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

I think the code could be a bit tidier, but I think it makes sense to
use buildQuery here. It'll detect CCL, CQL, and PQF queries, as well
as parsing a regular keyword search as one would expect when searching
the catalogue.

It also has the added bonus of performing relevance searching,
so long as QueryAutoTruncation is off, and so long as library staff
avoid using the "*" truncation wildcard (see bug 12430).

While there are simpler ways to fix this acq bug, I think this was
probably the best move, as it adds a bit to the consistency of what
librarians can expect from their search results.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Same result with and without the patch but I agree with the changes.
BuildQuery should be called before SimpleSearch if QP is not used.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit dc5b94486304fc5353640c0341cdfa11d3367fb2)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBumping db version to 3.18.03.002
Chris Cormack [Sat, 14 Feb 2015 07:11:00 +0000 (20:11 +1300)]
Bumping db version to 3.18.03.002

9 years agoBug - 5511 [Followup]: QA Fixes
Katrin Fischer [Tue, 30 Dec 2014 09:14:15 +0000 (09:14 +0000)]
Bug - 5511 [Followup]: QA Fixes

- Move database update entry to correct spot
- Fix version number in database update
- Fix capitalization in sys pref description
- Fix sequence in sysprefs.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 57d411dcd6a60fa36033a92e6cd1901b0ec7c78d)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug - 5511 [Followup]: Missed Instance
Martin Renvoize [Thu, 11 Dec 2014 13:39:24 +0000 (13:39 +0000)]
Bug - 5511 [Followup]: Missed Instance

There was an instance of the pragma missed which meant the the original
patch set didn't actually solve the problem in a large number of cases

This patch adds in the relevant statement.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d556f6a9f2ead235b9daf9df7217ebf2cd2b2b5c)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug - 5511 [Followup]: Switched defults
Martin Renvoize [Tue, 9 Dec 2014 13:48:29 +0000 (13:48 +0000)]
Bug - 5511 [Followup]: Switched defults

Agree with Chris that the defualt should maintain the higher security
and not reduce it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 129fb1fbe211b136ccad4d214ee26b94e988e5e5)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug - 5511: Added new system preference: SessionRestrictionByIP
Amit Gupta [Tue, 8 Oct 2013 04:06:59 +0000 (09:36 +0530)]
Bug - 5511: Added new system preference: SessionRestrictionByIP

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 2d4d65d526e6f54a40ddec87a6d3207722234fd3)

Conflicts:
installer/data/mysql/updatedatabase.pl

9 years agoBug - 5511: Check for Change in Remote IP address for Session Security. Disable when...
Amit Gupta [Tue, 8 Oct 2013 04:03:54 +0000 (09:33 +0530)]
Bug - 5511: Check for Change in Remote IP address for Session Security. Disable when remote ip address changes frequently.

To Test:
1) Enable the system preference SessionRestrictionByIP
2) Change your system IP. It will not checkout your system IP or signout.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit e3bb1390807578e2b9898723e2816a58f2c01e57)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 11954 - Clean up currency default files
Mark Tompsett [Wed, 19 Nov 2014 18:28:12 +0000 (13:28 -0500)]
Bug 11954 - Clean up currency default files

It makes no sense to have TRUNCATE or foreign key checks.

TEST PLAN
---------
1) Back up your database
2) in an mysql client:
     use kohadata;
     SET FOREIGN_KEY_CHECKS=0;
     TRUNCATE currency;
     source /home/mtompset/kohaclone/installer/data/mysql/ru-RU/optional/sample_currency.sql
     SET FOREIGN_KEY_CHECKS=0;
     TRUNCATE currency;
     source /home/mtompset/kohaclone/installer/data/mysql/uk-UA/optional/sample_currency.sql
     SET FOREIGN_KEY_CHECKS=0;
     TRUNCATE currency;
     source /home/mtompset/kohaclone/installer/data/mysql/it-IT/necessari/parameters.sql
     SET FOREIGN_KEY_CHECKS=1;
     QUIT
   -- These should all work without problem.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 3cf719433597ad6bf558950270cd564a62164ab4)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13298 - Holds ratios report ignores ordered items
Kyle M Hall [Wed, 19 Nov 2014 13:16:17 +0000 (08:16 -0500)]
Bug 13298 - Holds ratios report ignores ordered items

The holds ratio report ignores ordered items. This could cause a library
to inadvertently order more copies of a title than they actually need.
An option should be added to count ordered items ( i.e. any negative
notforloan value ).

Test Plan:
1) Apply this patch
2) Create a record with two items, one regular, one ordered.
3) Place 3 holds on the item
4) Run the reserve ratios report, by default you should see this record
5) Check the new 'include ordered' checkbox, rerun the report
6) Note that record is no longer displayed

Signed-off-by: Heather Braum <hbraum@nekls.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d8e5f0cd9d5926fb3b72e47852eac6b6c4f59be9)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoRevert "Bug 13352: QA Follow-up: Remove Price filter from "Warning at (%)""
Chris Cormack [Fri, 13 Feb 2015 01:19:58 +0000 (14:19 +1300)]
Revert "Bug 13352: QA Follow-up: Remove Price filter from "Warning at (%)""

This reverts commit 1120246a818e16af04cf155984fec7c44b5ed47c.

9 years agoRevert "Bug 13352: On editing, prices should not be formatted"
Chris Cormack [Fri, 13 Feb 2015 01:19:54 +0000 (14:19 +1300)]
Revert "Bug 13352: On editing, prices should not be formatted"

This reverts commit abc46657e5039ba9d40637624390c0a28a664c8e.

9 years agoBug 13201: GetSuggestion takes suggestionid
Jonathan Druart [Wed, 5 Nov 2014 11:41:13 +0000 (12:41 +0100)]
Bug 13201: GetSuggestion takes suggestionid

Having $ordernumber as the parameter in a function which is
handling suggestions and it is used as a suggestion id is
confusing to the coder and person trying to read the code.
This patch corrects the confusion.

REVISED TEST PLAN
-----------------
1) perldoc C4::Suggestions
   -- notice it says ordernumber for the GetSuggestions example.
2) Ensure you have CPL in your branches table.
3) prove -v t/db_dependent/Suggestions.t
   -- if you have more than 8 itemtypes in your database, two
      tests at the end will fail, but that is not relevant to
      the modified GetSuggestions code.
4) apply patch
5) perldoc C4::Suggestions
   -- notice it is corrected now.
6) prove -v t/db_dependent/Suggestions.t
   -- it should run with the same results as in step 3.
      That is, if you have 8 itemtypes, all pass, otherwise
      those two tests fail.
7) run koha qa test tool

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit ddf909ae24df5a3185370f5c4916135bb94b67ae)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13404: [QA Follow-up] Minor rewording of some warnings
Marcel de Rooy [Mon, 9 Feb 2015 08:26:04 +0000 (09:26 +0100)]
Bug 13404: [QA Follow-up] Minor rewording of some warnings

Changes are confirmed with author (Mirko Tietgen). See Bugzilla.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 09edfe8d53f91d150c39be9ec41bc24c82ce93dd)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13404 [QA Followup]
Kyle M Hall [Fri, 2 Jan 2015 02:06:58 +0000 (21:06 -0500)]
Bug 13404 [QA Followup]

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 983f49d7b28e3bf65c799f7ff00d64bdb10429d0)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13404 - More System information about GRS1 vs DOM settings
Mirko Tietgen [Sun, 7 Dec 2014 17:39:51 +0000 (18:39 +0100)]
Bug 13404 - More System information about GRS1 vs DOM settings

System information indicates missing <zebra_bib_index_mode> and <zebra_auth_index_mode> entries in koha-conf.xml.

This patch

- adds warnings about a possible mismatch between these settings and the actual setup
- adds info about the actual setup/what values to use for <zebra_bib_index_mode> and <zebra_auth_index_mode> if they are not set.

The assumption is that a path including 'zebra-*-dom.cfg' in the respective section indicates a DOM setup.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6a68ac3e5ded2e56d9b9de8f6e1a6a9ed49ac327)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13401 - sort branches alphabetically in admin/authorised_values.pl
Fridolin Somers [Fri, 5 Dec 2014 14:50:05 +0000 (15:50 +0100)]
Bug 13401 - sort branches alphabetically in admin/authorised_values.pl

This patch adds a sort of branches alphabetically by name in authorised values administration, like in many other pages.

Also replaces var $branch (too ambigus) by $branchcode.

Test plan :
- Create 2 branches : code=AAA,name=Zbranch and code=ZZZ,name=Abranch
- Create a new authorized value : admin/authorised_values.pl
- Look at "Libraries limitation" :
=> Without patch branches are sorted by code : Zbranch then Abranch
=> Without patch branches are sorted by name : Abranch then Zbranch
- Select a branch and save
- Re-edit
=> Check the same branch is selected

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b6aae39c263eee482aaeb574c206fa0c2c69f120)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13352: QA Follow-up: Remove Price filter from "Warning at (%)"
Katrin Fischer [Sun, 8 Feb 2015 15:23:41 +0000 (16:23 +0100)]
Bug 13352: QA Follow-up: Remove Price filter from "Warning at (%)"

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit bc355fef2455b7b22c29a061db72d07046169738)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13352: On editing, prices should not be formatted
Jonathan Druart [Mon, 26 Jan 2015 09:28:27 +0000 (10:28 +0100)]
Bug 13352: On editing, prices should not be formatted

Bug 12979 refactored the way to display prices.
The price format configuration was duplicated everywhere it was used.

All calls looks good except the one in admin/aqbudgetperiods.pl
In this one, the prices are formatted for an edition field (input).
This means the input is incorrectly filled even if the user does not
update the field.

At the end, maybe should we manage formatted prices everywhere, even in
inputs, but it's not in the scope of this bug.

Technically, a new subroutine format_for_editing is added to the
Koha::Number::Price module.
It should be called everywhere a price is displayed in an input field.
At the moment, it only does a sprintf("%.2f"), but it is a first step to
let the number of decimals to display configurable.

To test:
1/ Verify the issue described is fixed (editing a budget with a total
amount > 1000 (With CurrencyFormat is US or FR).
2/ Verify you can edit a fund with a total amount > 1000

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 945a0f09e73606907d6df72b873e478cc6763c14)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Conflicts:
admin/aqbudgetperiods.pl
t/Prices.t

9 years agoBug 13562: Fix item search on item MARC subfields
Julian Maurice [Wed, 14 Jan 2015 16:00:17 +0000 (17:00 +0100)]
Bug 13562: Fix item search on item MARC subfields

Test plan:
1. Add 4 item search fields (in Administration › Items search fields):
   a. 1 biblio field linked to a DB field
   b. 1 biblio field not linked to a DB field
   c. 1 item field linked to a DB field
   d. 1 item field not linked to a DB field
2. Make sure you have some data in those fields to search on.
3. Go to item search page and do a search using these new fields, make
   sure the result is correct.

Signed-off-by: Nick <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f70ad43f8fd49ad7fb43697c6953767e534f7368)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13602: (QA followup) take advantage of the defined-or operator
Tomas Cohen Arazi [Mon, 9 Feb 2015 16:32:50 +0000 (13:32 -0300)]
Bug 13602: (QA followup) take advantage of the defined-or operator

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 381de54ed1f56f61f22a682147b67d3902f43604)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13602 - Username/password already exists when editing borrower attributes and...
Olli-Antti Kivilahti [Tue, 20 Jan 2015 14:48:13 +0000 (16:48 +0200)]
Bug 13602 - Username/password already exists when editing borrower attributes and messaging preferences

When editing a Patron's messaging preferences or borrower attributes, one cannot
save changes because 'userid' is not given as a parameter.

It shouldn't, but the
Check_Userid($newdata{'userid'},$borrowernumber) -check must have it.

REPLICATE THE ISSUE:
1. Find a Borrower.
2. Go to the details-tab.
3. Under "Patron messaging preferences" click edit to edit just the messaging
   preferences.
4. Just save, no need to make any modifications.
5. Observe the error "Username/password already exists"
   This happens to all/most of the sub-forms in the Borrower's Details-view.

AFTER THIS PATCH:
Check_Userid() get the $userid from the new parameters, or if not present, from
the koha.borrowers-table.

TEST FOR REGRESSION:
1. Edit a borrower normally. Notice no errors.
2. Edit a sub-form (Alternate address/Patron messaging preferences). Notice no
   errors.

DISCLAIMER: You are free to steal/rip/modify/hack this patch to your soul's
extent without my permission. As long as it makes to Koha I am happy.

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 58f7f56b8664810335f60f3fe5e43faa079f33bc)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13638 - Batch patron modification tool missing option to switch language
Owen Leonard [Wed, 28 Jan 2015 17:24:45 +0000 (12:24 -0500)]
Bug 13638 - Batch patron modification tool missing option to switch language

The batch patron modification tool's template was created without the
footer include at the bottom. Without the footer include the language
toolbar will not be displayed.

All page templates should include the global footer include:

[% INCLUDE 'intranet-bottom.inc' %]

To test:
 - Install at least a second language
 - Enable at least 2 languages (language system preference)
 - Go to tools > Batch patron modification
 - Verify that at the bottom of the page the language chooser is shown

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 28af6c4d01e0b1a31dece34031b6379fb9befebc)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13450 [QA Followup] - Remove tab character from start of line
Kyle M Hall [Fri, 30 Jan 2015 12:10:29 +0000 (07:10 -0500)]
Bug 13450 [QA Followup] - Remove tab character from start of line

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit fe66114e210885324eb37773e2bd09e7e2190f59)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13450 - Title and breadcrumb of Patron form can look weird in translations
Marc Véron [Mon, 29 Dec 2014 23:04:53 +0000 (00:04 +0100)]
Bug 13450 - Title and breadcrumb of Patron form can look weird in translations

This patch moves the patron category name or category type at the end of title and breadcrumb for better translatability.

Note: It does not change anything in functionallity, it only changes display of strings.

To test:
Apply patch
Search a patron and edit it in all possible ways: 'Edit' button on top of details page, 'Edit' links in details page, 'Edit' links in search result table if multiple patrons are found)
Duplicate a patron
Create a new patron
Make sure that title and breadcrumb appear in a meaningful way with pattern similar to the following:
Modify patron Hansli Meier (Juvenile)

(Missing </div> added)

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit e2bbdc0b145fba30bd60110ad2d4fd8262107947)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBumping version number to 3.18.03.001
Chris Cormack [Tue, 10 Feb 2015 22:15:02 +0000 (11:15 +1300)]
Bumping version number to 3.18.03.001

9 years agoBug 12860: the export tools explodes if a field is not exported
Jonathan Druart [Thu, 29 Jan 2015 15:18:19 +0000 (16:18 +0100)]
Bug 12860: the export tools explodes if a field is not exported

To reproduce:
1/ Go on tools/export.pl
2/ Export some records and specify you don't want the fields 245 (the
whole field, do not specify a subfield).
3/ Export, BOOM
Software error:
Arguments must be MARC::Field object at /home/koha/src/tools/export.pl line 400.

Test plan:
Apply the patch and confirm the fields 245 are not exported and the
export works as expected.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Export fails to asplode with this patch

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit e2968fe0812898d92ce8c63e9c7f0dedd244acc9)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13270: Don't display "vendor note" label if nothing to display
Jonathan Druart [Mon, 17 Nov 2014 16:17:49 +0000 (17:17 +0100)]
Bug 13270: Don't display "vendor note" label if nothing to display

Bug 12111 removes the vendor note edition on receiving.
The label should not be displayed when it's empty.

Test plan:
1/ Receive an order without a vendor note and verify that the label is not
displayed.
2/ Receive an order with a vendor note and verify that the note is
displayed.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, small template change.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1c62f1a9783bb8a171352e0b66d910056ccfe0d4)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13441 - Branchcodes should not be allowed to have spaces in them
Kyle M Hall [Thu, 1 Jan 2015 21:38:34 +0000 (16:38 -0500)]
Bug 13441 - Branchcodes should not be allowed to have spaces in them

In multiple cases I've seen issues arise in Koha where a librarian
accidentally puts a space at the end of a new branchcode. This of course
causes endless confusion because the branchcode looks perfectly fine in
every case unless you wrap the code with some characters to reveal the
hidden space!

Test Plan:
1) Try creating a new branch with one or more spaces in the branchcode
2) Note you are able to
3) Apply this patch
4) Repeat step 1
5) Note you are no longer able to

Followed test plan with cache cleared. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a7c41e6073a2719e21f86909a37daab6410b2b96)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12905: funds with children could not be deleted
Jonathan Druart [Mon, 10 Nov 2014 09:45:25 +0000 (10:45 +0100)]
Bug 12905: funds with children could not be deleted

The interface should prevent to delete funds with children.
Otherwise the relationship is broken and problems occur:
1/ You don't see the orphan fund in the fund list
2/ You cannot edit the orphan fund amount ('Fund amount exceeds parent
allocation').

This patch:
- adds a JS check, template side
- adds a check in the perl script (should never be true)
- adds an updatedatabase check, in order to alert users with inconsistent data.

Test plan:
Verify you are not allow to delete a fund with children.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 522e9c5861854fad7c9b292f75ebd19968f5b11c)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13333: Fix Display basket group for already received orders
Jonathan Druart [Tue, 25 Nov 2014 11:23:45 +0000 (12:23 +0100)]
Bug 13333: Fix Display basket group for already received orders

Bug 11111 adds a basket group column on the parcel page.
But it seems that the already received orders never contain the value
(always 'no basket group').

Test plan:
Receive an order which is in a basket group and verify the basket group
column is correctly filled.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 74640683f0d7f4b9734a69763424b33977f66cfd)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13457 - Followup for CPL and S codes
Mark Tompsett [Fri, 19 Dec 2014 17:28:19 +0000 (12:28 -0500)]
Bug 13457 - Followup for CPL and S codes

Based on comment #3, this corrects CPL and S issues if they do
not exist in the DB.

TEST PLAN
---------
0) Backup your DB.
1) Clear CPL and S from your DB.
   - delete from borrowers where categorycode='S';
   - delete from categories where categorycode='S';
   - delete from borrowers where branchcode='CPL';
   - delete from branch where branchcode='CPL';
2) prove t/db_dependent/Suggestions.t
   -- This should fail.
3) Apply patch
4) prove t/db_dependent/Suggestions.t
   -- This should work.
5) Intentionally add categorycode 'S' and branchcode 'CPL' back
   into the database.
6) prove t/db_dependent/Suggestions.t
   -- This should work.
7) run koha qa test tools.
8) Restore your DB :)

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 01c7c2a12904fae5076914d839c5e829c54deb6f)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13457: Suggestions.t expects sample itemtypes
Mark Tompsett [Fri, 12 Dec 2014 22:03:17 +0000 (17:03 -0500)]
Bug 13457: Suggestions.t expects sample itemtypes

TEST PLAN
---------
1) Make sure you have more than 8 item types, and preferably
   something with a non-sample default code for itemtypes.
2) prove t/db_dependent/Suggestions.t
   -- this will fail
3) Apply patch
4) prove t/db_dependent/Suggestions.t
   -- this will succeed
5) run koha qa test tools

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit bfb035511e8afd6716ea8d1b2de966f8950b74e6)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 10241 - Easy analyticals creates two 773 fields. Search/link from host to childre...
Thomas [Thu, 15 Jan 2015 01:43:28 +0000 (01:43 +0000)]
Bug 10241 - Easy analyticals creates two 773 fields. Search/link from host to children is broken

Hidden 'New child record' if 'EasyAnalytics' is set to display.

Testing plan:

-Turn on 'EasyAnalytics'. Check the drop down menu from the records page
*The drop down menu should include 'Analyze items' and not include 'New child record'

-Turn off 'EasyAnalytics'. Again check the drop down menu from the records page
*The drop down menu should include 'New child record' and not inlucde 'Analyze items'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6f57a2e09b7e9a87270eba1b04f75ae22fbbc999)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13268: the size should not be emptied in pl script
Jonathan Druart [Thu, 11 Dec 2014 08:50:38 +0000 (09:50 +0100)]
Bug 13268: the size should not be emptied in pl script

It duplicates what the first patch does.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 42e9044f1195a512870d4e1dc01679a64d47f4d9)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13268 - biblioitems.size value not correctly displayed (more)
Fridolin Somers [Mon, 17 Nov 2014 15:32:20 +0000 (16:32 +0100)]
Bug 13268 - biblioitems.size value not correctly displayed (more)

Bug partially corrected by Bug 11357.

The size column in biblioitems is a bit problematic when used in TT, because instead of the size value from the biblio column it will give you the size of the variable or current loop.

It's currently used in the templates like opac-topissues.tt :
[% IF results_loo.size %][% results_loo.size %][% END %]

This patch corrects by using item() TT method.
See http://stackoverflow.com/questions/2311303/how-can-i-handle-hash-keys-containing-illegal-identifier-characters-in-template.

Test plan :
- Be sure there is a mapping between a MARC field and biblioitems.size
- Create a record A with biblioitems.size defined : like "10x12"
- Create a record B with no value in biblioitems.size
- Check each modified page :
=> Without this patch : you see a number (loop size) for both records
=> With this patch : you only see the correct value for A and nothing for B

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f27d454048bca9d9ebdc1f781a688c2311952786)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13339 - Cart button doesn't open the cart
Owen Leonard [Thu, 22 Jan 2015 19:25:29 +0000 (14:25 -0500)]
Bug 13339 - Cart button doesn't open the cart

The link to open the cart no longer triggers the cart popup. Instead, in
order to make it more usable with mobile devices, it triggers a menu
which displays the count of items in the cart -- something which
previously was done with a hover action (something touch-screen devices
don't have). Clicking/tapping this menu item is what opens the cart
window.

Since the cart link is really now a menu trigger rather than just a
link, it seems logical to add the small arrow which the lists link
has indicating that the link triggers a menu.

To test, apply the patch and view any page in a Cart-enabled OPAC.
Confirm that the "caret" icon displays correctly when the cart is both
empty and when it has contents.

Followed test plan. Icon displays as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, good idea.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 724f77ec43449144a2cccac048a57ffb19799fed)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13432 - SIP Server does not respect timeout setting
Kyle M Hall [Wed, 10 Dec 2014 17:27:59 +0000 (12:27 -0500)]
Bug 13432 - SIP Server does not respect timeout setting

Koha's SIP server accepts timeout parameters, but those parameters
are only used for the login portion of a telnet transport session.
Other than that, they are ignored, and as long as whatever opened
the connection keeps it open, it will stay open indefinitely.

Test Plan:
1) Set the timeout setting on your SIP server to 10 seconds
2) Modify misc/sip_cli_emulator.pl, add "sleep 100;" directly after line 91
3) Start your SIP server
4) Run the modified sip script with valid parameters
5) Watch the SIP server stderr
6) Note that even though the script waits far too long before continuing,
   the SIP server never kills the connection, and the requests the cli
   script makes come back with valid data.
7) Apply this patch
8) Restart your SIP server
9) Repeat step 4
10) Note that this time you see "SIP Timed Out!" in the SIP server
    stderr and when the script finally makes it's request, it doesn't
    come back with valid data.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 03335ab401576355dfc5bcee1aa45714fd9fc411)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13599 - Add patron cardnumber to self registration confirmation
Kyle M Hall [Tue, 20 Jan 2015 12:18:11 +0000 (07:18 -0500)]
Bug 13599 - Add patron cardnumber to self registration confirmation

Some libraries wish to display the patron's cardnumber on the
confirmation screen for patron self registration, rather than make the
patron locate it his or her cardnumber by logging in and browsing to the
personal details page. We should also add ids to these fields for easy
css styling/hiding.

Test Plan:
1) Apply this patch
2) Ensure that autoMemberNum is enabled
3) Self-register a new patron
4) Note confirmation screen now displays the patron cardnumber

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 06f4950aa21ff889cff81f27b2f4e79788db193f)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13544: Make it explicit that getauthtypes returns a hash ref
Jonathan Druart [Fri, 9 Jan 2015 15:01:35 +0000 (16:01 +0100)]
Bug 13544: Make it explicit that getauthtypes returns a hash ref

Prior to perl 5.12 keys can only operate on a hash.

Test plan:
With perl 5.10, access to admin/auth_subfields_structure.pl.
Without this patch, you get:
Type of arg 1 to keys must be hash (not subroutine entry) at
/home/koha/src/admin/auth_subfields_structure.pl line 102, near
"getauthtypes)"

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed problem and tested patch on a sandbox, signed off locally.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit c9af47b86c653946916349ea021171b99f6bb44d)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13373 - [QA Followup] - Update Polish web installer sample data files
Rafal Kopaczka [Tue, 20 Jan 2015 09:49:34 +0000 (10:49 +0100)]
Bug 13373 - [QA Followup] - Update Polish web installer sample data files

Fixed "Duplicate entry CF-952-i" error in marc21_simple_bib_frameworks.sql

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 72ca839518488eb98bd4bac3d770e893c7cababc)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13373 [2/2] - Update Polish web installer sample data files.
Rafal Kopaczka [Tue, 2 Dec 2014 14:24:01 +0000 (15:24 +0100)]
Bug 13373 [2/2] - Update Polish web installer sample data files.

Part 2/2 - optional files.

Changes:
- Deleted unnecessary files
- Translated description files and some values in sql files

To test:
- Aplly patch
- Run webinstaller on empty database (drop database and create new if necessary)
- Verify everything works, especially verify you have permission
to all modules, eg. Tools, Catalouging etc.
- Check spelling and grammar if you can :)

Signed-off-by: Chris <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit af148f92b492aeea01119a9e7db15ebffcbb4517)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13373 [1/2] - Update Polish web installer sample data files.
Rafal Kopaczka [Tue, 2 Dec 2014 13:14:23 +0000 (14:14 +0100)]
Bug 13373 [1/2] - Update Polish web installer sample data files.

Part 1/2 - mandatory files.

Changes:
- Translated user permission and user flags.
- Changed untranslated different files from en version
- Deleted unnecessary files

To test:
- Aplly patch
- Run webinstaller on empty database (drop database if necessary)
- Verify everything works, especially verify you have permission to all
modules, eg. Tools, Catalouging etc.
- Check spelling and grammar if you can :)

Signed-off-by: Chris <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit de08845edc543c449698e01c5ea1eec509c8b271)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12954: Failed login should retain anonymous session
Martin Renvoize [Tue, 30 Dec 2014 13:54:50 +0000 (13:54 +0000)]
Bug 12954: Failed login should retain anonymous session

A failed login should not leave the user in a half logged authenticated
state, but rather return them to an anonymouse session as per the
pre-login attempt state.

To replicate error:
1. Try to log in with some nonexisting user id or wrong password in the
   OPAC
2. Go directly to /opac-user.pl (e.g., enter it in the browser address
   bar, or just click on the "Log in" link)
3. Observe a DBI error displayed on the screen
4. You are now in the "deadloop" of sorts (opac/opac-user.pl refuses to
   display the login screen, no matter how many times you try to reload
   it); to break the deadloop, one needs to:
   - remove session cookie from the browser (or cause the session to
     expire in some other way - closing browser window would be probably
     enough for that)
   - remove offending session on the server (from mysql sessions table,
    ..)
   - log in with proper credentials using some other page (like
     opac/opac-main.pl right-side panel), which does not involve
     opac/opac-user.pl being called without "userid" CGI parameter.

To test:
1. Test as above, the DBI error should no longer be present
2. Check that search history works across failed and sucessful login
   attempts

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 229a3b329c9fbe1567a9cd0796dce7ddf1aca781)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13521: Add missing semicolon
Martin Renvoize [Tue, 6 Jan 2015 06:54:00 +0000 (06:54 +0000)]
Bug 13521: Add missing semicolon

Add a missing semicolon to the end of a template variable assignment
line. This patch should not affect operation.

Note: With Bug 13499 we did a non-destructive perltidy, as such we only
affected indenting and whitespace to maintain blame history. However, a
number of minor code issues were also highlighted, in this series of
patches I hope to correct other minor style issues.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f73dc51a88e63a7ef7cf30d3d88c09b30bb2c177)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13521: Removed superflous semicolon
Martin Renvoize [Tue, 6 Jan 2015 06:48:29 +0000 (06:48 +0000)]
Bug 13521: Removed superflous semicolon

Removed an uneeded semicolon from the end of an 'if' block. This should
not affect operation of the script.

Note: With Bug 13499 we did a non-destructive perltidy, as such we only
affected indenting and whitespace to maintain blame history. However, a
number of minor code issues were also highlighted, in this series of
patches I hope to correct other minor style issues.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a36c7435f23b7d69e8286370774fbb8554e7f98f)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13499: Tidy of Auth.pm
Martin Renvoize [Mon, 5 Jan 2015 22:45:44 +0000 (22:45 +0000)]
Bug 13499: Tidy of Auth.pm

This tidy should only change whitespace and not line breaks, thus
retaining history.

There are no code changes, and thus there should be no regressions to
test for koha wise.

To test the non-destrcutive nature of the patch, run a 'git blame -w' on
the file before and after the patch. The resulting blame should include
a comparabile history of the file, with only some additional blank
lines being attributed to this commit.

A 'git blame -wM' may also be useful for comparison purposes.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1926bf9d0180315f6e51431e3d514a8d53ce3b9c)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13525 - Date sorting on accounts (fines) tab doesn't work correctly
Owen Leonard [Wed, 7 Jan 2015 13:26:57 +0000 (08:26 -0500)]
Bug 13525 - Date sorting on accounts (fines) tab doesn't work correctly

Date sorting of charges under Patron -> Fines -> Account is done based
on formatted dates, so sorting is broken depending on your dateformat
system preference. This patch implements the standard "title-string"
date sorting method.

To test, apply the patch and view the Account tab. Test sorting of
charges under various settings of the dateformat system preference. Date
sorting should work correctly in all cases.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 229cb65629c93d30191bc6c797d06021942239b2)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Conflicts:
members/boraccount.pl

9 years agoBug - 11345 - Self registration captcha
Justin [Wed, 14 Jan 2015 23:16:29 +0000 (23:16 +0000)]
Bug - 11345 - Self registration captcha

Test Plan
 - Open the opac site
 - Navigate to the self registration page (Home -> Register here)
 - Notice that there is no note stating that the verification box is case-sensitive
 - Apply patch
 - Refresh page
 - Notice that there is now an extra note stating that the verification box is case-sensitive.

Followed test plan. Hint displays as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 580ed6360ddf0eac902fe807bc76abddec86529a)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13025 - Software error: Undefined subroutine &C4::Circulation::HasOverdues called...
Olli-Antti Kivilahti [Thu, 8 Jan 2015 12:50:52 +0000 (14:50 +0200)]
Bug 13025 - Software error: Undefined subroutine &C4::Circulation::HasOverdues called at /home/koha/kohaclone/C4/Circulation.pm line 1925

This error only appears when using the SIPServer, it doesn't manifest when using the SIP unit tests
or when using the staff client.

--------------------
 ------------------
  PREPARE THE TEST
 ------------------
--------------------

0a. Find a borrower.
0b. Find an Item (cardnumber 'debar123') and check-out to the borrower
0c. Find a borrower and add a manual debarrment to it, indefinetely in effect.
    This is the default behaviour.
0d. Configure and start a SIP-server which you can access with telnet.
    See http://wiki.koha-community.org/wiki/Koha_SIP2_server_setup
    In this example, the Borrower defined as the Check-out/in machine has the following credentials:
    username: herkules password: palautathan branchcode: JOE_JOE
    but you are free to use your own, it doesn't affect this test plan.
0e. access your server with telnet

-----------------------
 ---------------------
  REPLICATE THE ISSUE
 ---------------------
-----------------------
1. Paste the following SIP-command to login:
9300CNherkules|COpalautathan|CPJOE_JOE|
2. Paste the following SIP-command to check-in the Item of the debarred Borrower:
09N20140721    07501620140721    075016AP|AO|ABdebar123|AC|BIN|
3. The connection should die and in the SIP Server's error log you can find the following error:
Software error: Undefined subroutine &C4::Circulation::HasOverdues called at /home/koha/kohaclone/C4/Circulation.pm line 1925

--------------------
 ------------------
  AFTER THIS PATCH
 ------------------
--------------------

Redo steps 1-2.
3. No error is given and the connection doesn't die.

No unit tests included and never will, because setting up the test environment would be very tedious.
It is entirely possible but the scaffolding required is beyond the scope of this patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note: I did not test this patch with SIP, but I did not find any
regression on checking or renewing an item.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 84064ae4e4b07d1fa07e9be01546e104e4e70a01)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13587: Fix Authorised Values Toolbar
Abby [Thu, 15 Jan 2015 20:28:54 +0000 (20:28 +0000)]
Bug 13587: Fix Authorised Values Toolbar

To test:
1. Go to Home > Administration > Authorised Values
2. Notice no plus icons are appearing infront "New Authorised Value..." and "New Category" in the toolbar.
3. Apply the patch.
4. Check that the plus icons infront of "New Authorised Value..." and "New Category" in the toolbar are appearing as they should.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Nice addition! I added spaces to match the formatting on the other pages a bit more closely.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 752d627266455d787ba5ce1d88ed0f98d1282b4a)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 12861: (follow-up) Noisy warn in error logs
Jonathan Druart [Thu, 15 Jan 2015 14:20:02 +0000 (15:20 +0100)]
Bug 12861: (follow-up) Noisy warn in error logs

Completely get rid of warns.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit acff2645584043c8f34515e3326973f149dcf913)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 12861 : Noisy warn in the error logs
Chris Cormack [Tue, 2 Sep 2014 21:49:41 +0000 (09:49 +1200)]
Bug 12861 : Noisy warn in the error logs

To test
Hit a url like
cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operatorc=contains&marclistc=mainentry&and_orc=and&orderby=HeadingAsc&value=FIRECLAY

Notice the warns in the error log
Apply patch
Reload the url
Still works but no warns

(cherry picked from commit c98d805e490a82b2ea9f3d4e0f7278640942ba6d)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Reformatted to fix error M Tompsett spotted

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Instead of 10 warnings, I now have only 4 warnings.
We're going in the right direction.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b2ce6347e55c92c9974f64d272dedffda41e3b44)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoUpdating release notes
Chris Cormack [Thu, 22 Jan 2015 20:36:50 +0000 (09:36 +1300)]
Updating release notes

9 years agoMerge remote-tracking branch 'bernardo/3.18.03-translate' into 3.18.x v3.18.03
Chris Cormack [Thu, 22 Jan 2015 20:01:05 +0000 (09:01 +1300)]
Merge remote-tracking branch 'bernardo/3.18.03-translate' into 3.18.x

9 years agoBug 13609: Cross Site Scripting problem in authority search result list paging
Katrin Fischer [Thu, 22 Jan 2015 13:41:09 +0000 (14:41 +0100)]
Bug 13609: Cross Site Scripting problem in authority search result list paging

To test:
- Use an installation a reasonable amount of authorities, so that you can
  have a search result list with more than one page
- Activate OpacAuthorities
- Create an OPAC link like shown below, verify that an alert is shown
- Apply patch
- Refresh the page and no alert should appear
- Verify the paging still works correctly for 'numbers' and 'arrows'

URL:
.../cgi-bin/koha/opac-authorities-home.pl?and_or=and&marclist=match&op=do_search&operator=contains&orderby=HeadingAsc2"><script>prompt(987898)</script>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoTranslation updates for 3.18.03 release
Bernardo Gonzalez Kriegel [Thu, 22 Jan 2015 12:01:51 +0000 (09:01 -0300)]
Translation updates for 3.18.03 release

9 years agoRelease notes
Chris Cormack [Thu, 22 Jan 2015 07:13:51 +0000 (20:13 +1300)]
Release notes

9 years agoBumping version number for 3.18.3 release
Chris Cormack [Thu, 22 Jan 2015 07:07:08 +0000 (20:07 +1300)]
Bumping version number for 3.18.3 release

9 years agoBug 13510 : Fixing the third XSS issue
Chris [Mon, 5 Jan 2015 06:37:51 +0000 (06:37 +0000)]
Bug 13510 : Fixing the third XSS issue

To test

1/ Make sure you have some items in your database, that have values in items.issue
If nessecary do something like

UPDATE items SET issues = 10 WHERE itemnumber=somenumber

2/ Hit a url like http://localhost:8080/cgi-bin/koha/opac-topissues.pl?do_it=1&timeLimit=3%3Cscript%3Eprompt%28924513%29%3C/script%3E

3/ Notice you will get a prompt
4/ Apply patch
5/ Test again

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13510 - Cross site scripting bug in opac-downloadshelf and opac-shelves
Liz [Mon, 5 Jan 2015 02:32:32 +0000 (02:32 +0000)]
Bug 13510 - Cross site scripting bug in opac-downloadshelf and opac-shelves

A specially crafted url causes XSS in Koha

To test:

cgi-bin/koha/opac-shelves.pl?viewshelf=2%22%3E%3Cscript%3Eprompt(987898)%3C/script%3E

cgi-bin/koha/opac-downloadshelf.pl?shelfid=2%22%3Cscript%3Eprompt(1)%3C/script%3E&showprivateshelves

These should cause a popup without the patch. With the patch, no popup.

You may need to create these lists, the xss will not be triggered if the list doesn't exist or you don't
have permission to view them.

Signed-off-by: Chris <chris@bigballofwax.co.nz>
Fixes the two listed problems

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Confirmed patch fixes the problem.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13526 - Mandatory fields should not be able to be hidden in borrower self-registr...
David Cook [Wed, 7 Jan 2015 06:32:06 +0000 (17:32 +1100)]
Bug 13526 - Mandatory fields should not be able to be hidden in borrower self-registration

Currently, mandatory fields in the borrower self-registration can be hidden.
This causes problems since the validator rejects the registration,
even though all required fields on the screen have been filled out.

This is especially a problem when using the system preference
"PatronSelfRegistrationVerifyByEmail", since it automatically makes
"email" a mandatory field.

This patch makes it so that a mandatory field cannot be hidden on
the self-registration page.

_TEST PLAN_

Before applying
1) Hide the "email" and the "emailpro" fields using the
"PatronSelfRegistrationBorrowerUnwantedField" system preference.

2) Make the "email" and the "emailpro" fields mandatory using the
"PatronSelfRegistrationBorrowerMandatoryField" system preference.

3) Note that you cannot see "Primary email" or "Secondary email"
on the self registration page.
(The registration page which can be found by turning
on "PatronSelfRegistration" and filling in
"PatronSelfRegistrationDefaultCategory". The link will be on
opac-main.pl on the right side of the screen under the login box.)

4) Note that you cannot submit a self-registration request as
the system tells you that you have not filled in all the mandatory
fields.

5) Apply the patch && refresh the self registration page

6) Note that you can now see "Primary email" and "Secondary email"
on the self-registration screen".

Signed-off-by: Abby <abbyrobnz@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit fd6176d0a58e5e5016d5db002578b7a7dee9531c)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 12702 - Suggestions still accessible in OPAC when deactivated
Thomas [Tue, 13 Jan 2015 23:25:49 +0000 (23:25 +0000)]
Bug 12702 - Suggestions still accessible in OPAC when deactivated

Added check for suggestions turned off. If off user is redirected to 404 error. If patron suggestions are off guest sugestions will also redirect to 404

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit bcbcad897a3f383b38851f8d0fb27017170d181f)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 8096 - card number twice on patron search
Marc Véron [Sun, 16 Nov 2014 21:52:31 +0000 (22:52 +0100)]
Bug 8096 - card number twice on patron search

This patch removes double patron card numbers from patron search results.

To test:

Search patrons
See card number 12345 in first column and in second column like Testman, John (12345)
Apply patch
Patron card number no longer dispays in second colum

Further testing:
Search for other places in intranet where patron-title.inc is used (git grep 'patron-title.inc')
The card number still should display at the other places.

Signed-off-by: Chris <chris@bigballofwax.co.nz>
http://bugs.koha-community.org/show_bug.cgi?id=8096
Signed-off-by: Chris <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b8989510ec8b6b58249707bf2ddc6cf80fbfef4d)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13571: followup to remove some now-unused options
Robin Sheat [Thu, 15 Jan 2015 01:42:00 +0000 (14:42 +1300)]
Bug 13571: followup to remove some now-unused options

The memcache parameters aren't used by anything (except C4::SQLHelper,
but that's a cancer on the face of the earth) anymore, so they can go.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9db34fe8758e6303246a3347d19f05edc2653a42)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13571: Koha-conf.xml.in has fallen out of sync with koha-conf.xml
Rochelle [Wed, 14 Jan 2015 22:49:59 +0000 (22:49 +0000)]
Bug 13571: Koha-conf.xml.in has fallen out of sync with koha-conf.xml

To test:
1- Build new koha packages
2- Check that the conflist file contains the changes we have made

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 0a1914963985ad5bb6a0aacb21348ec892f3e590)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13570 - koha-conf.xml mentions win32
Morag Hills [Tue, 13 Jan 2015 21:16:53 +0000 (21:16 +0000)]
Bug 13570 - koha-conf.xml mentions win32

Issue existed in koha-conf.xml of /etc.

The following lines were removed from the file:

<!-- uncomment these lines and comment out the above if running on MSWin32 -->
<!--
<listen id="biblioserver" >tcp:localhost:9998/bibliosocket</listen>
<listen id="authorityserver" >tcp:localhost:9999/authoritysocket</listen>
-->

This section was located on lines 9, 10, 11, 12 and 13 of the koha-conf.xml file.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 752b6dce2ff27bcac57e927b5431f69b4061a1c8)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>