]> git.koha-community.org Git - koha.git/log
koha.git
10 years agoIncrement version for 3.14.10 release v3.14.10
Fridolin Somers [Wed, 3 Sep 2014 15:33:45 +0000 (17:33 +0200)]
Increment version for 3.14.10 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoMerge remote-tracking branch 'translator/3.14.10-translate' into 3.14.x
Fridolin Somers [Wed, 3 Sep 2014 15:29:54 +0000 (17:29 +0200)]
Merge remote-tracking branch 'translator/3.14.10-translate' into 3.14.x

10 years agoUpdate release notes for 3.14.10 release
Fridolin Somers [Wed, 3 Sep 2014 15:24:27 +0000 (17:24 +0200)]
Update release notes for 3.14.10 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoTranslation updates for 3.14.10 release
Bernardo Gonzalez Kriegel [Mon, 1 Sep 2014 16:36:20 +0000 (13:36 -0300)]
Translation updates for 3.14.10 release

10 years agoBug 11552: (follow-up) fix a typo in a comment
Galen Charlton [Mon, 21 Apr 2014 03:34:31 +0000 (03:34 +0000)]
Bug 11552: (follow-up) fix a typo in a comment

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 123f07cc8ac756c4d3bdeb4f38fa36a9bb6581bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11552: allow searching on original order number after a transfer
Jonathan Druart [Tue, 14 Jan 2014 12:33:58 +0000 (13:33 +0100)]
Bug 11552: allow searching on original order number after a transfer

If an order is transferred from one basket to another, it should be
possible to retrieve it with the original order number (AKA order
line).  This patch makes it so.

Test plan:
- transfer an order
- note the original order number and the new one
- receive the order and, on the parcel page, try to find your order with
  the original order number and the new one.

Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
RM note: this works only for the most recent transfer, so if an order
gets transferred multiple times, earlier order numbers won't retrieve
it.

(cherry picked from commit 6eb69ed3ec7650b6298968c4a79e2cb4204ebb6f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9288: (follow-up) more tweaks
Galen Charlton [Sun, 20 Apr 2014 20:20:15 +0000 (20:20 +0000)]
Bug 9288: (follow-up) more tweaks

- add license and copyright statement
- tidy up help text

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

10 years agoBug 9288: (follow-up) remove function prototype
Kyle M Hall [Mon, 30 Dec 2013 13:22:33 +0000 (08:22 -0500)]
Bug 9288: (follow-up) remove function prototype

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 90f1814b9e83d37a29fdef011912741230a5cdfe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9288: (follow-up) minor code tweaks
Kyle M Hall [Tue, 22 Oct 2013 16:32:44 +0000 (12:32 -0400)]
Bug 9288: (follow-up) minor code tweaks

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 887829613fd12c04694d80975c7a6c8244c2574e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9288: (follow-up) use specified terminator for both input and output
Kyle M Hall [Fri, 20 Sep 2013 14:04:41 +0000 (10:04 -0400)]
Bug 9288: (follow-up) use specified terminator for both input and output

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8af35f89badacaf025226811c233f2cf44554910)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9288: (follow-up) add --terminator option; use Modern::Perl
Kyle M Hall [Mon, 8 Jul 2013 13:21:25 +0000 (09:21 -0400)]
Bug 9288: (follow-up) add --terminator option; use Modern::Perl

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0f521663cf73b1c1122712d08094c65f1d59df6a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9288 - Add a script to test SIP from the command line
Kyle M Hall [Fri, 14 Dec 2012 16:56:36 +0000 (11:56 -0500)]
Bug 9288 - Add a script to test SIP from the command line

This is a very basic start to a sip server testing script.
I imagine we will want to make it interactive in end,
essentially replicating what a SIP based self-checkout machine does.

Signed-off-by: Adrien Saurat <adrien.saurat@biblibre.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b2e8dfe816ad2f0b130a0b5fab07514c1464cee7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9972: (follow-up) enable Lexile searches to work using QueryParser
Galen Charlton [Sun, 20 Apr 2014 16:54:16 +0000 (16:54 +0000)]
Bug 9972: (follow-up) enable Lexile searches to work using QueryParser

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit eb139e4a8b2a517099a19d77708fa5ef40131274)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9972: (follow-up) add new indexes to the QueryParser config
Galen Charlton [Sun, 20 Apr 2014 16:47:28 +0000 (16:47 +0000)]
Bug 9972: (follow-up) add new indexes to the QueryParser config

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 26e2224409ef90d2ba334906d2729c4416a3b5b8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9972: Add/change some zebra indexes (MARC21)
Mirko Tietgen [Tue, 2 Apr 2013 13:03:53 +0000 (15:03 +0200)]
Bug 9972: Add/change some zebra indexes (MARC21)

This patch adds :w and :p versions to the index for »Lexile number«
(it has only :n so far) and adds indexes for 653 (Index term
uncontrolled), 655 (Index term Genre/Form), 041 (language-audio) and
041 (language-subtitle). It also adds the »curriculum«-index to
Search.pm.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 84bdb555491af52331ece7420e797e838c814229)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11248: (follow-up) fix template for translated list emails in staff
Katrin Fischer [Sun, 17 Nov 2013 17:37:59 +0000 (18:37 +0100)]
Bug 11248: (follow-up) fix template for translated list emails in staff

- Fixes some capitalization problems
- Adds an URL filter

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 5b8494dcc9256358865eb1b8a49a91d96cddb2bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11248: fix encoding issue on emailing a list (OPAC)
Jonathan Druart [Thu, 14 Nov 2013 13:05:53 +0000 (14:05 +0100)]
Bug 11248: fix encoding issue on emailing a list (OPAC)

Test plan:
- send a list via email with the english version.
- translate templates and retry with another language.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely. Links to the OPAC are correct.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 394ece2e1012aebdc5543f739c5438f91c66d477)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11248: fix encoding issue on emailing a list (INTRANET)
Jonathan Druart [Thu, 14 Nov 2013 13:00:46 +0000 (14:00 +0100)]
Bug 11248: fix encoding issue on emailing a list (INTRANET)

Test plan:
- send a list via email with the english version.
- translate templates and retry with another language.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Sending an intranet list from translated templates requires
a new list template for the intranet. I have added the needed
changes in a follow-up.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9181636874a03cf43e7c26a89364279bfe2aa2ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 8258: Use patron's library's notice for DUEDGST and PREDUEDGST
Jonathan Druart [Wed, 5 Mar 2014 14:08:13 +0000 (15:08 +0100)]
Bug 8258: Use patron's library's notice for DUEDGST and PREDUEDGST

If a notice is defined for the library of the patron, it should be
used.

Without this patch, the notice used is the one defined for all
libraries.

Test plan:
1/ Set the advanced notice for a patron using digest.
2/ Check one item out to this patron (backdate the return date according
the days in advance value).
3/ launch advance_notices.pl -c
4/ Verify the notice used is the default one.
5/ Define a notice for the library of the patron for PREDUEDGST
6/ launch advance_notices.pl -c
7/ Verify the notice used is the one previously defined.
8/ Check one item out to this patron (date due = today)
9/ launch advance_notices.pl -c
10/ Verify the notice used is the default one.
11/ Define a notice for the library of the patron for DUEDGST
12/ launch advance_notices.pl -c
13/ Verify the notice used is the one previously defined.

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.
Test case: User from Library A, checked out books
- in library A from A and B
- in library B from B
Verified, that the 'all libraries' notice is still used,
when no specific notice is defined.
Verified, that the patron's home library noticed is used,
when defined.

Note: Before and after the patch we print the branch information
from the patron's home library, so also using the template from
this branch, seems logical. All items over all branches are
processed into one single reminder email, before and after the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 836f3ce992ef2c3bffbcf80c73bcacbbe479ea85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11243: UT: unit tests for GetBasketsInfosByBookseller
Jonathan Druart [Wed, 20 Nov 2013 09:12:56 +0000 (10:12 +0100)]
Bug 11243: UT: unit tests for GetBasketsInfosByBookseller

Verify prove t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t
returns green.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 734846e4cb371cf45c5025e9d61e66bd4144936d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11243: update vendor list to also display canceled bib counts
Jonathan Druart [Wed, 20 Nov 2013 09:12:00 +0000 (10:12 +0100)]
Bug 11243: update vendor list to also display canceled bib counts

Same as previous patch but for the biblios count.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7ca91683854127be5f15d083d7c7e55a44325b74)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11243: make vendor list distinguish between active and canceled items
Jonathan Druart [Wed, 13 Nov 2013 13:57:55 +0000 (14:57 +0100)]
Bug 11243: make vendor list distinguish between active and canceled items

On the vendor result list, the "Item count" columns contain the sum of
all items ordered for a basket. But if an order is canceled, the item
count is not really meaningful.

This patch just adds, in parenthesis, the number of items canceled.

Test plan:
- create a basket and 3 orders with different number of items
- cancel 1 order
- verify on the supplier list that the number of items is correct and
  the number of canceled items is correct too.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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.

Note: In case the biblio was deleted when the order was cancelled,
the number of biblios will be off.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b62a793580292455e78dc21ca27df17e2748e95e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11254: make reservoir search normalize ISBNs
Fridolyn SOMERS [Fri, 15 Nov 2013 09:43:21 +0000 (10:43 +0100)]
Bug 11254: make reservoir search normalize ISBNs

When importing records, the ISBN is normalized and stored
into database (see C4::ImportBatch::_add_biblio_fields).  But when
searching with ISBN into reservoir, it is not normalized
(see C4::Breeding::BreedingSearch).  So search does not match.

This patch adds the normalisation to reservoir search.  Also, it
replaces call private method _isbn_cleanup by GetNormalizedISBN,
the correct public method.  Also allows the reservoir search
on ISBN with hyphens.

This is intended to fix only reservoir searches.

Revised Test plan
-----------------
 1) Back up DB
 2) Save copy of attached example somewhere findable
 2) Home -> Tools -> Stage MARC records for import
 3) Click Browse and select the example MARC file
 4) Click Upload file
 5) Tweak as desired then click Stage for import
 6) Click Manage staged records
 7) Click Import this batch into the catalog
 8) Home -> Cataloging
 9) In the Cataloging search text box type 978-0-691-14289-0 and
     click Submit
    -- ISBN13 with hypens not found in reservoir
10) In the Cataloging search text box type 9780691142890 and
     click Submit
    -- ISBN13 without hypens not found in reservoir
11) In the Cataloging search text box type 0-691-14289-0 and
     click Submit
    -- ISBN10 with hypens not found in reservoir
12) In the Cataloging search text box type 0691142890 and
     click Submit
    -- ISBN10 without hypens found in reservoir
13) Apply patch
14) Repeat steps 9-12, this time it is always found! :)

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 cac06afeb1f03200cfc7ab48162c184be8d1526b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11912: (follow-up) Use the common way to mock syspref
Jonathan Druart [Thu, 20 Mar 2014 10:14:58 +0000 (11:14 +0100)]
Bug 11912: (follow-up) Use the common way to mock syspref

t::lib::Mocks::mock_preference provides a simple way to mock syspref.

Test plan:
Verify that t/db_dependent/Biblio.t returns green.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c5f8bf244b9db2e3279774435ae75f7c4b4ab68a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11912: (refactoring followup) make GetMarcISBN implement its advertised API
Tomas Cohen Arazi [Mon, 10 Mar 2014 14:52:19 +0000 (11:52 -0300)]
Bug 11912: (refactoring followup) make GetMarcISBN implement its advertised API

The current implementation of GetMarcISBN contradicts the documented API.
It currently returns an array of hashes with only one key (marcisbn)
which doesn't add any value to it.

I chose to fix GetMarcISBN to honour the API instead of changing thex
 docs, because it seems a really silly change.

To test:
- Run:
  prove t/db_dependent/Biblio.t
=> SUCCESS
- catalogue/detail.pl should correctly show ISBNs.
- opac/opac-detail.pl should correctly show ISBNs in both prog and bootstrap.
- opac-opac-sendshelf.pl should correctly show ISBNs in the email.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 774483772b2a7ff8ebdb8a9aeac82881e7c858cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11912: fix problem where GetMarcISBN wrongly prepends a space to ISBNs
Tomas Cohen Arazi [Sun, 9 Mar 2014 21:39:11 +0000 (18:39 -0300)]
Bug 11912: fix problem where GetMarcISBN wrongly prepends a space to ISBNs

This patch makes the logic inside GetMarcISBN simpler and
fixes the issue.

To test:
- Run the regression tests:
  prove -v t/db_dependent/Biblio.t
=> FAIL
- Apply the patch
- Run:
  prove -v t/db_dependent/Biblio.t
=> SUCCESS
- Verify that opac-detail.pl and catalogue/detail.pl look as usual regarding ISBN
- Sign off

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c4900dc448aa029749ab27f98b59d1be6eb8bb14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11912: (regression tests) GetMarcISBN wrongly prepends a space to ISBNs
Tomas Cohen Arazi [Sun, 9 Mar 2014 20:21:48 +0000 (17:21 -0300)]
Bug 11912: (regression tests) GetMarcISBN wrongly prepends a space to ISBNs

This patch makes the tests run in both MARC21 and UNIMARC contexts.
It previously run only for MARC21. It mocks what needs to be mocked.

To test, run
 - prove t/db_dependent/Biblio.t
=> Notice the first ISBN has a space in front of it and those tests fails.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit da7dd4ed8c2462597712a11b0a018db87b1fef87)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11489: (follow-up) fix tab
Galen Charlton [Sat, 19 Apr 2014 16:14:34 +0000 (16:14 +0000)]
Bug 11489: (follow-up) fix tab

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6c6d21a8d040482b88b5b6752b32ed749089fbc9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11489: (OPAC prog theme) show facets only if there is a result to display
Jonathan Druart [Thu, 9 Jan 2014 16:53:04 +0000 (17:53 +0100)]
Bug 11489: (OPAC prog theme) show facets only if there is a result to display

If all results are hidden, the facets are displayed.
With this patch, the facets are hidden too.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Michot <nmichot@voila.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Tested:

- Record with 1 lost item, result list = 1
  - Verified without both patches 404 error page is shown
  - Verified with 1st patch, no results page is shown
  - Verified with 2nd patch, the still showing facets are gone
- Record with 1 lost item, result list > 1
  - Record is hidden from result list, but
    - result count is wrong
    - result numbering is wrong
    > This is an old problem, just noting
- Record with 1 lost and 1 available item, result list = 1
  - Detail page is shown, only lost item is hidden
- Record with 1 lost and 1 available item, result list > 1
  - Only available item is shown in result list

Also checked that the lost item shows up with hidelostitems off.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 65fb03c0f439fdc8bef7ce0359afa75598c39147)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11489: in OPAC search, display "no results" when the only search result is suppressed
Kyle M Hall [Tue, 7 Jan 2014 17:19:37 +0000 (10:19 -0700)]
Bug 11489: in OPAC search, display "no results" when the only search result is suppressed

If hidelostitems is enabled, and the result of an opac search is a single
lost item, then the OPAC will display a 404 error, rather than a
"no results" screen.

Test Plan:
1) Catalog a record/item such that it is the only result for some search
   e.g. Give it the title 'zxcvb'
2) Enable hidelostitems
3) Mark this item as lost
4) Perform an OPAC search that should result in a redirect to this record
5) Notice you a redirected to a 404 error
6) Apply this patch
7) Repeat step 4
8) Note you new get a "No results found!" page instead

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Michot <nmichot@voila.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2277a42c565e18475c49fde031268b8038575e1a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10138: (follow-up) FIX sql errors
Jonathan Druart [Tue, 24 Dec 2013 08:58:38 +0000 (09:58 +0100)]
Bug 10138: (follow-up) FIX sql errors

There were 2 INSERT in error.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I have gone ahead and fixed the typo pointed out by Mathieu:
Endommadgé-> Endommagé

Sample files install without problems, tests look good.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e81513199cba41a254820347442719a6fd50ec0b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10138: Add some authorized values in French installer; small fixes in frameworks
Mathieu Saby [Sun, 28 Apr 2013 17:06:11 +0000 (19:06 +0200)]
Bug 10138: Add some authorized values in French installer; small fixes in frameworks

This patch adds some categories of values in French installer :

- SUGGEST
- OPAC_SUG
- REPORT_GROUP
- LOST
- DAMAGED

SUGGEST and OPAC_SUG are used by Suggestions module.
REPORT_GROUP is used by Reports module.

It also adds a new status for "ETAT" (en commande)

It creates a 995$2 subfield in french frameworks when it did not exist.
It links existing 995$2 subfield with LOST category.

It cleans up the list of authorised values installed with "Lecture
publique" framework :

- some codes are moved in general 1-Obligatoire/authorised_values.sql
  (SUGGEST, REPORT_GROUP)
- some are suppressed, because they are also defined in
  1-Obligatoire/authorised_values.sql (langue, COUNTRY, statut)
- the code for inserting the ones left is changed (I suppress the `id`
  column)

To test :
1. Take a fresh new Koha
2. Install Koha choosing French installer and UNIMARC Lecture publique
3. Check the authorised values are imported
4. Check the cataloguing frameworks are usable :
   especially 995 $2 field, which must be mapped with LOST values :
   Perdu, Long retard, Perdu et remboursé, Introuvable
   you can also check 101$a (language codes), 102$a (country codes)
5. In OPAC, make a suggestion. See if you can select a cause for your
   suggestion ("Bestseller" or "'L'exemplaire en rayon est endommagé")
6. In staff interface, manage some suggestions. See if you can select a
   cause for rejection or acceptation ("Bestseller", "Budget
   insuffisant" etc)
7. In reports, see if you can sort reports according to values of
   REPORT_GROUP ("Circulation", "Catalogue", "Adhérents" etc)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e5fe771cc9ebab7980cac27216d553952cb60277)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12098: (follow-up) put can_show_subscription() into use
Galen Charlton [Fri, 18 Apr 2014 20:47:48 +0000 (20:47 +0000)]
Bug 12098: (follow-up) put can_show_subscription() into use

This patch puts C4::Serials::can_show_subscription() into use.

Note that there is user-visible change: if a subscription has a
blank library, all users with serials permissions will be able
to view and/or edit it.  It remains to be determined whether
we *want* such subscriptions to exist, or if they should only
be tied to specific libraries.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dc6d8a2199f79e36839a2769994883e04b61cb67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12098: (follow-up) deal with FIXMEs in t/db_dependent/Serials_2.t
Galen Charlton [Fri, 18 Apr 2014 20:17:27 +0000 (20:17 +0000)]
Bug 12098: (follow-up) deal with FIXMEs in t/db_dependent/Serials_2.t

This patch nails down the number of tests to be run.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit be3ce1e7a2477b02d4c071543405898c21380926)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12098: Refactor can_*_subscription in C4::Serials
Jonathan Druart [Wed, 16 Apr 2014 14:58:36 +0000 (16:58 +0200)]
Bug 12098: Refactor can_*_subscription in C4::Serials

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested on top of patches for 12048 and 12080.

Subscription search
- superlibrarian, IndyBranches on/off - always sees all subscriptions
- superserials, IndyBranches on/off - always sees all subscriptions
- no superserials, IndyBranches on - only sees own subscriptions
Note: Subscriptions without branches will only show, when all subscriptions
      are visible. In a future enh it might be good to enforce setting a
      branch, when IndyBranches is used.
- no superserials, IndyBranches off - always sees all subscriptions

Subscription editing
- superlibrarian, IndyBranches on/off - can edit all subscriptions
- superserials, IndyBranches on/off - can edit all subscriptions
- no superserials, IndyBranches on - can only edit own subscriptons and
  subscriptions without branch
  NOTE: it would make sense to also allow Edit > Edit as new (duplicate)
  here, so one can copy the subscription from another branch to modify
  it for the own branch.

Passes tests in t, xt and QA script, also newly provided unit tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4d78b9588a9f5fc68142b9d1556686072e7b5dba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12098: Fix C4::Serials::can_edit_subscription
Jonathan Druart [Wed, 16 Apr 2014 14:50:23 +0000 (16:50 +0200)]
Bug 12098: Fix C4::Serials::can_edit_subscription

This patch fixes a problem whereby staff users could
edit subscriptions they are not permitted to by going directly
to the subscription details page.

It also adds some unit tests for the can_edit_subscription routine
and add a new can_show_subscription routines.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Notes on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4f7803e469a41cafb993c6d41e6481499e6cca93)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12080: (follow-up) fix test failure and warnings in Bookseller.t
Kyle M Hall [Fri, 18 Apr 2014 12:27:35 +0000 (08:27 -0400)]
Bug 12080: (follow-up) fix test failure and warnings in Bookseller.t

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes the tests as promised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b772969cddce53d72bfd27bfda0ee094b1332e9d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12080: restore effect of superserials permission
Frédéric Demians [Tue, 15 Apr 2014 08:10:07 +0000 (10:10 +0200)]
Bug 12080: restore effect of superserials permission

The superserials permission is meant to allow an operator
to see all subscriptions regardless of branch when IndependentBranches
is on without having to have full superlibrarian permissions.  This
patch restores this behavior.

TEST PLAN
---------
1) Apply the patch for bug 12048 (as needed -- it may be pushed)
2) Ensure you have two users: superlibrarian, non-superlibrarian
   with all access to the staff client except superserials.
3) Ensure you have serials belonging to a different branch than
   the non-superlibrarian.
3) Log into staff client as superlibrarian
4) Click 'Serials'
5) Click the 'Submit' button in the search area.
   -- note the number of results.
6) Log into staff client as non-superlibrarian
7) Click 'Serials'
8) Click the 'Submit' button in the search area.
   -- note the number should be less, note the number.
9) Give the non-superlibrarian superserials access.
10) Home -> Serials
11) Click the 'Submit' button in the search area.
   -- the number will still be the same at the one in step #8.
12) Apply the patch
13) Refresh the page
   -- the number should now match the one in step #5.

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 f0e574be4a834b28b0e19f2964f5de989f0e6665)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12048: restore ability of superlibrarian to see other libraries' subscriptions
Frédéric Demians [Tue, 8 Apr 2014 15:26:18 +0000 (17:26 +0200)]
Bug 12048: restore ability of superlibrarian to see other libraries' subscriptions

This patch fixes a regression in master and 3.14. When a user has
superlibrian permissions, a search on serials subscriptions should
display other libraries' subscriptions even when IndependentBranches
syspref is enabled.

To reproduce/test the bug/patch:

1. Enable IndependentBranches (i.e. 'Prevent' staff...)
2. Login as a user not having superlibrarian permission
3. Search for a serial subscription on:
   /cgi-bin/koha/serials/serials-search.pl
4. Search a title which has at least 2 subscriptions: one in the user
   branch, and one in another branch
5. On the result page, just 1 subscription is displayed: the one
   attached to the userbranch
   => this is normal
6. Login as a user having superlibrarian permission
7. Repeat step 3-5.
8. You get the same result as 5. You should have seen all subscriptions.
   That's what you get after applying this patch.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: I tested a variation. My superlibrarian was a branch that
      was not the same as the non-superlibrarian. The serial was
      the same branch as the non-superlibrarian. Without the
      patch, the superlibrarian saw nothing, with the patch it
      saw the serial as expected.
      Also, remember the superserials permission can affect the
      results. I successfully changed the branch of the
      subscription, and then it ceased to show up with
      superserials not granted to the non-superlibrarian.
      I corrected the system preference name in the text here.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Superlibrarian permission now allows to see all subscriptions
independent from the branch.
Passes all tests and QA script.

But the superserials permission appears broken to me before
and after this patch. If I have superserials - the search
doesn't show all subscriptions. If I don't have superserials
I can still edit any subscription accessing the subscription
detail page through the serial collection page or accessing
the detail page directly by manipulating the URL.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 214d6b8d13c553027c868a00a2dd6b313f56608b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12048: add regression test
Galen Charlton [Fri, 18 Apr 2014 19:56:51 +0000 (19:56 +0000)]
Bug 12048: add regression test

This patch adds a regression test for verifying that superlibrarians
can see all subscription when IndependentBranches is on.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9af0aa288c23a6722333adebba7b8b3e12ed78e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11587: get rid of warnings generated by IsSuperLibrarian with anonymous sessions
Mark Tompsett [Tue, 21 Jan 2014 05:41:00 +0000 (00:41 -0500)]
Bug 11587: get rid of warnings generated by IsSuperLibrarian with anonymous sessions

This corrects line 1250 of C4/Context.pm to be:
    return ($userenv->{flags}//0) % 2;
And thus avoids an uninitialized value used in the modulus.

TEST PLAN
---------
1) Apply the first patch (to update t/Context.t)
2) prove -v t/Context.t
-- This should fail tests 7 and 8
3) Apply this patch (to fix C4/Context.pm)
4) prove -v t/Context.t
-- All tests should succeed

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 bf3b1aac7b7bc422bea26bb2c045be69d93ef0bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11587 - Add UT for IsSuperLibrarian if flags == 0
Jonathan Druart [Fri, 24 Jan 2014 12:00:37 +0000 (13:00 +0100)]
Bug 11587 - Add UT for IsSuperLibrarian if flags == 0

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 850e7e58352fd1fcb2772308cbfc6375b6a45735)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/Context.t

10 years agoBug 11587 - IsSuperLibrarian generates warnings (UT)
Mark Tompsett [Tue, 21 Jan 2014 05:34:43 +0000 (00:34 -0500)]
Bug 11587 - IsSuperLibrarian generates warnings (UT)

Simply viewing OPAC detail triggers a modulus warning entry.
This first patch adds two test cases to t/Context.t to test for
this situation.

TEST PLAN
---------
1) Apply this patch (to upgrade t/Context.t)
2) prove -v t/Context.t
-- Tests 7 and 8 will fail
3) Apply main patch (to amend C4/Context.pm)
4) prove -v t/Context.t
-- All tests will succeed

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 8ee0bc049a183e795fc37608a4b3790d4aef2267)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/Context.t

10 years agoBug 7002: fix some invalid superlibrarian permission checks
Galen Charlton [Mon, 30 Dec 2013 16:05:51 +0000 (16:05 +0000)]
Bug 7002: fix some invalid superlibrarian permission checks

This patch fixes a problem where if a staff user has superlibrarian
permissions, but also has module-specific permissions, they are
prevent from editing item records that they should be allowed to.

To test:

[1] Turn on IndependentBranches.
[2] Register a superlibrarian staff user at branch A.
[3] Give that new account at least one other module-level
    permission.  This cannot be done through the user interface,
    however, but can be done via SQL:

    UPDATE borrowers SET flags = 3 WHERE userid = 'XXX';

[4] Log in as that new superlibrarian.
[5] Bring up the item details (catalogue/moredetail.pl) page for
    an item at branch B.  Note that there is no 'Edit Item' link.
[6] Similarly, try editing that item (cataloging/additem.pl).  Note
    that the edit form forbids you from touching the item.
[7] Finally, try editing that item using the Tools | Batch item
    modification utility.  Note that it doesn't allow you to do so.
[8] Apply the patch.
[9] Repeat steps 5 through 7.  This time, the item actions should
    be allowed.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bb750253644e0ba6ea04e36c80088626e8163bf2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10277: (follow-up) if no userenv is set, act like a superlibrarian
Galen Charlton [Mon, 30 Dec 2013 18:50:04 +0000 (18:50 +0000)]
Bug 10277: (follow-up) if no userenv is set, act like a superlibrarian

This patch fixes an error caught by t/db_dependent/Acquisition.t, and
adjusts C4::Context::IsSuperLibrarian() to return true if no
userenv is set. This is done on the basis that if no userenv is set,
calls to C4::Context routines are being made from a command-line script,
and if you have access to the command line of a running Koha instance,
you implicitly already have better than superlibrarian access.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 71b7d5629878bd5616dbb1db263a8fd943d3f7b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10277: Add UT for C4::Context::IsSuperLibrarian
Jonathan Druart [Wed, 18 Dec 2013 15:12:00 +0000 (16:12 +0100)]
Bug 10277: Add UT for C4::Context::IsSuperLibrarian

Note that I modify the return value. Before this patch, it returned an
empty string or 1. Now it returns 0 or 1.

Test plan:
- same as the original patch
- verify that unit tests pass:
    prove t/Context.t

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, including new tests.
Checked the code and tested superlibrarian behaviour in some places:

moremember.pl:
With IndyBranches only superlibrarian can delete borrowers from
other branches. Accessing the borrower with a direct link.
OK

C4/Members.pm
With IndyBranches only superlibrarian can search for borrowres
from other branches.
OK

tools/holidays.pl
With IndyBranches only superlibrarian can edit holidays for other
branches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3e866d216db008e1ed8c8614f6758ad5118321df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10277 - Add C4::Context->IsSuperLibrarian()
Kyle M Hall [Wed, 15 May 2013 15:04:07 +0000 (11:04 -0400)]
Bug 10277 - Add C4::Context->IsSuperLibrarian()

The method of checking the logged in user for superlibrarian privileges
is obtuse ( $userenv && $userenv->{flags} % 2 != 1 ) to say the least.
The codebase is littered with these lines, with no explanation given. It
would be much better if we had one subroutine that returned a boolean
value to tell us if the logged in user is a superlibrarian or not.

Test Plan:
1) Apply this patch
2) Verify superlibrarian behavior remains unchanged

Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fb4025b67b45e60154f67b9acca3d56e4f5eb7c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11699: (follow-up) update one more test that uses ModReceiveOrder
Galen Charlton [Sat, 19 Apr 2014 15:39:52 +0000 (15:39 +0000)]
Bug 11699: (follow-up) update one more test that uses ModReceiveOrder

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

10 years agoBug 11699: (follow-up) fix errors in the POD for ModReceiveOrder
Galen Charlton [Sat, 19 Apr 2014 15:12:08 +0000 (15:12 +0000)]
Bug 11699: (follow-up) fix errors in the POD for ModReceiveOrder

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5629f4bc252698a102a1b581c3db0be124a4474a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11699: change ModReceiveOrder to used named parameters
Jonathan Druart [Wed, 5 Mar 2014 12:23:07 +0000 (13:23 +0100)]
Bug 11699: change ModReceiveOrder to used named parameters

Test plan:
prove t/db_dependent/Acquisition.t
prove t/db_dependent/Acquisition/Invoices.t
prove t/db_dependent/Acquisition/OrderFromSubscription.t

all should return green.

NOTE: Any error messages are the same between master and this
      patch, and are unrelated to the added/revised tests.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 36fc9a3e641b82cb9ef044c54872f68d5a7ebbf3)

Conflicts:
t/db_dependent/Acquisition.t

10 years agoBug 11699: fixed saving notes entered when receiving orders
Jonathan Druart [Wed, 5 Mar 2014 12:07:53 +0000 (13:07 +0100)]
Bug 11699: fixed saving notes entered when receiving orders

Revised test plan:
1/ Create an order with 2 items
2/ Receive 1 item and enter a note for the order
3/ Verify the note is not saved
    The note should be visible on the Mod Order Details screen,
    but it isn't there.
4/ Apply patch
5/ Receive the second item and enter a note for the order
6/ Verify the note is correctly saved
    The note is visible on the Mod Order Details screen.

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. The note now saves correctly and also remains when
you undo a receipt.

Note: it would be nice to show the note on the receive page as well.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ab1a74897efb82b99ed3931dff719bb64b930bc4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/db_dependent/Acquisition.t

10 years agoBug 11069: increase title ranking in relevance when using QueryWeightFields
Fridolyn SOMERS [Thu, 17 Oct 2013 14:20:49 +0000 (16:20 +0200)]
Bug 11069: increase title ranking in relevance when using QueryWeightFields

When using QueryWeightFields to add ranking on a search without index,
the search actually uses:

 - rank 1 : Title-cover,ext :  exact title-cover
 - rank 2 : ti,ext : exact title
 - rank 3 : Title-cover,phr : phrase title-cover
 - rank >7 : queries without index

This relevance sets title as phrase in priority and then any index.

This patch adds title as words list before search on any index, so
that records with all searched terms in title, even not well ordered,
are more relevant.

Test plan :
- Enable QueryWeightFields syspref
- Perform a search, with sort by relevance, with two words ofen
  contained in title, but never one near the other.
  For example: 'History France'
=> Records with both words in title are first. For example:
   "Histoire de France" and "La France : 100 ans d'histoire"

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Relevance ranking and field weighting are hard to test,
as many MARC fields are indexed into the used indexes.
If we had an index that only indexed 245$a/200$a the
effect might be more visible.
I found no regressions by this patch, change reads
logical.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2c658d882a5ca43c107c26396b09f11ad6e69f9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11508: fix untranslatable pull-down in auth_subfields_structure.pl
Bernardo Gonzalez Kriegel [Fri, 4 Apr 2014 23:37:54 +0000 (20:37 -0300)]
Bug 11508: fix untranslatable pull-down in auth_subfields_structure.pl

This patch replaces occurrences of CGI::scrolling_list with
untranslatable labels. It also fixes capitalization.

To test
1. Go to Administration > Authority types,
click 'MARC structure' of any auth type,
click 'subfields' for any Tag >= 010,
clic 'Edit subfields'

Check pulldowns 'Managed in tab' and 'Select to display or not'

2. Apply the patch

3. Reload and verify functionality of both pulldowns

4. Check that strings are not present on staff PO file
egrep "^msgid \"(Show all|Hide all|ignore)" misc/translator/po/fi-FI-i-staff-t-prog-v-3006000.po

5. Update language file
(cd misc/translator/; perl translate update fi-FI)

6. Check that strings are now present, repeat 4.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: drop-downs work identically. Show all, Hide all, and
      ignore were added to the po files too.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described and improves the page to manage authority
subfields.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4a32a188ae0a1bf189d3e1a4865051400c39b31e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9216: (follow-up) Make description in columns.def more specific
Katrin Fischer [Sat, 19 Apr 2014 10:52:24 +0000 (12:52 +0200)]
Bug 9216: (follow-up) Make description in columns.def more specific

Changed "Category" to "Patron category" to ease correct
translation.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 35caf5070d2bad3d5ecaad47f1da715e5c040c36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9216: make columns.def file translatable
Jonathan Druart [Tue, 29 Oct 2013 14:03:41 +0000 (15:03 +0100)]
Bug 9216: make columns.def file translatable

The SQL column headers is stored into the columns.def file.
This file is not managed by the translation script.

This patch makes possible the headers translation.
Note: The translation xml tags were added to avoid all lines being put
on a single line.

Test plan:
1/ update your po file
cd misc/translate;
perl translate -f columns update LANG # Replace by another language here
2/ translate header columns (search "columns.def" in your po file).
3/ install the translated columns.def
perl translate -f columns install LANG # Replace by another language here
4/ go on the report module > create a new report > next > next
5/ change the language
on the 3rd step, you should see the column header translated.

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

[on es-ES about a third of the strings translated!! :-) ]

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and fixes a long standing translation
problem.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bece83f8ed59208e058dc87830cbab2aa19bb2f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11231: remove reference to ambiguous notes column from two hold request reports
Francesca Moore [Tue, 14 Jan 2014 23:03:51 +0000 (12:03 +1300)]
Bug 11231: remove reference to ambiguous notes column from two hold request reports

The 'notes' column has been removed from the pending holds and hold
ratios reports as they were not displaying in the first place.

1.apply patch
2.verify that both reports work

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cc34a816a10ca76004e079032f1a46aec1ccb1c4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9578: avoid a search crash when attempting to sort results of invalid query
Fridolyn SOMERS [Fri, 22 Nov 2013 10:00:21 +0000 (11:00 +0100)]
Bug 9578: avoid a search crash when attempting to sort results of invalid query

When searching with a sort (means not by relevance) and there is an error
in Zebra connexion (server is down or query is wrong), you get the message :

  Error : Can't call method "sort" on an undefined value at /home/kohaadmin/src/C4/Search.pm line 405.

This patch corrects by not performing sort if there are no no results.

Steps to reproduce the error without patch:

In OPAC go to Advanced Search
Choose "Title" in first "Search for:" end enter "ccl=( and )"
Display "More options"
Set "Sort by" to "Title (A-Z)"
Click "Search" at bootom of page

Result:
Error:
Can't call method "sort" on an undefined value at /usr/share/kohaclone/C4/Search.pm line 430.

After applying the patch, try that search again.  This time,
it should report not results found with out the error message.

Alternative Test plan :
- Set OPACdefaultSortField on something else than relevance
- Perform a simple search with a wrong CCL query. For example : ccl=( and )
=> You get the messge : No results found ...

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds another check to prevent a bad Zebra error message.
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3b402d04e1a321afac02da84bae12f0342b776ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9578: add regression test
Galen Charlton [Fri, 18 Apr 2014 22:33:11 +0000 (22:33 +0000)]
Bug 9578: add regression test

This patch adds a regression test for the condition noted
in bug 9578, where attempting a sort of a Zebra search that
fails because of an invalid query crashes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 70499239ba1780e872499d93fa624574d13fe7ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/db_dependent/Search.t

10 years agoBug 11680: (follow-up) fix unexpected tax rate changes on edit
Jacek Ablewicz [Mon, 10 Feb 2014 09:09:21 +0000 (10:09 +0100)]
Bug 11680: (follow-up) fix unexpected tax rate changes on edit

Follow-up to fix similar issue on vendor edit.

If the tax rates in Acquisitions -> gist system preference
are entered with trailing zeroes, given vendor tax rate value
may not be correctly handled on vendor edit.

Test plan for this follow-up:

1) insert some tax rates with trailing zeroes in gist
system preference (e.g: '0|0.080|0.12|0.20|0.23')
2) add some vendors, choosing 8.0% 12.0% 20.0% 23.0%
as gst rate
3) try to modify them
4) note that vendors with 12.0% and 23.0% tax rates are
preserving previously choosen rates on edit, while
the ones with 8.0% and 20.0% do not (they are defaulting
to the first defined tax rate)
5) apply the patch
6) repeat 2) and 3)
7) all tax rates configured in system prefrence shall now
behave properly while editing vendors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f3cb186de5d60395d5d681dc5e83971d0717592a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11680: fix case where tax rate changes unexpectedly on editing an order
Jacek Ablewicz [Wed, 5 Feb 2014 10:16:14 +0000 (11:16 +0100)]
Bug 11680: fix case where tax rate changes unexpectedly on editing an order

If the tax rates in Acquisitions -> gist system preference are entered
with trailing zeroes, given order tax rate value may not be correctly
handled on order edit.

To test:

1) insert some tax rates with trailing zeroes in gist
system preference (e.g: '0|0.080|0.12|0.20|0.23')
2) place some new orders, choosing 8.0% 12.0% 20.0% 23.0%
as gst rate
3) try to modify them
4) note that orders with 12.0% and 23.0% tax rates are
preserving previously choosen rates on edit, while
the ones with 8.0% and 20.0% do not (they are defaulting
to the first defined tax rate)
5) apply the patch
6) repeat 2) and 3)
7) all tax rates configured in system prefrence shall now
behave properly while editing orders

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed the problem and that this patch fixes it.
Problem also exists for editing the default tax rate of a vendor.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 471215dc46e5a65360a3bde53666f62f809f0861)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10090: display item type description instead of code on acq ordered and spent...
Jonathan Druart [Thu, 4 Apr 2013 10:09:37 +0000 (12:09 +0200)]
Bug 10090: display item type description instead of code on acq ordered and spent pages

On ordered.pl and spent.pl, the itemtype codes are displayed, instead of
descriptions.

Links for the ordernumber should be changed. In ordered.pl, we are
redirected to the receive page. In spent.pl, the links are deleted.

Signed-off-by: Broust <jean-manuel.broust@gmail.com>
Revisited patch: The link to orderreceive was broken, so I undo the
changes.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works alright, itemtype descriptions are shown.
The removed link was potentially 'dangerous' as you shouldn't
get to the receive page for an order, without providing an invoicenumber
first.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 378bffa0ddbe793dff75a828e2bf5b03ad666b57)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11914: fix two issues when creating an order from a suggestion
Jacek Ablewicz [Mon, 10 Mar 2014 09:53:52 +0000 (10:53 +0100)]
Bug 11914: fix two issues when creating an order from a suggestion

When order is being created from purchase suggestion:
- Budget/fund stored in suggestion record (if any) is not retained
on order page, system always defaults to 'Select a fund' even if some
fund was already chosen for a suggestion on the earlier stage.
- If there was a price given to, and stored within suggestion record,
initial prices calculations on order page are not working properly
('Replacement cost', 'Budgeted cost' and 'Total' show as 0.00 or blank).
As a workaround - to force correct price recalculation - user needs
to manually alter and then re-alter some price-related fields (e.g.,
quantity or vendor price).

This patch fixes both issues.

Test plan:
1) create a suggestion: choose some buget, enter something in 'Price'
and 'Quantity' fields,
2) try to make an order from this suggestion, to confirm/replicate
aforementioned problems,
3) apply patch,
4) make an order from previously created suggestion again, observe
that both issues are now resolved.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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 1b0c02376e772a6ad9d45e01bcbac106ee534c92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11148: (follow-up) add more test cases
Galen Charlton [Fri, 18 Apr 2014 21:51:09 +0000 (21:51 +0000)]
Bug 11148: (follow-up) add more test cases

Add test cases to exercise output_pref's as_due_date option
when the time in question is not one minute before midnight.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9ccc602b7d5c41f27b09ff3aee437556eed680b1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11148: (follow-up) restore useful test removed by previous patch
Jonathan Druart [Mon, 13 Jan 2014 09:17:47 +0000 (10:17 +0100)]
Bug 11148: (follow-up) restore useful test removed by previous patch

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8b76bec3db8a4d8051a8d506e1fba024a5f76e59)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11148: Add a as_due_date parameter to the output_pref routine
Jonathan Druart [Mon, 2 Dec 2013 16:21:13 +0000 (17:21 +0100)]
Bug 11148: Add a as_due_date parameter to the output_pref routine

This parameter is a boolean, if true, the hours won't be displayed if
the time is 23:59 (24hr format) or 11:59 PM (12hr format).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4ea09932ddbfbcc0e9201f7cc6b2a5e08a4efabf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11148: remove two superflous routines from Koha::DateUtils
Jonathan Druart [Mon, 28 Oct 2013 14:10:26 +0000 (15:10 +0100)]
Bug 11148: remove two superflous routines from Koha::DateUtils

There are 2 useless routines in the Koha::DateUtils
module:output_pref_due and format_sqlduedatetime. We can call
output_pref and format_datetime with dateonly = 0.

format_sqlduedatetime is only used in one place: opac-reserve.pl

Test plan:
1/ Verify on the opac-reserve.pl page that the date is correctly
displayed for for onloan items (you should use the "specific copy"
feature).
2/ Launch prove t/DateUtils.t UT file and verify all UT pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Due date on opac-reserve shown correctly. Unit tests pass.
Did a grep on both function names.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
No references to subs found. Passes koha-qa.pl, t and xt

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b9492e73f59439e218e7f657bdfcf67026834311)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11468: Remove given/when from Koha::Dateutils
Colin Campbell [Thu, 2 Jan 2014 14:42:16 +0000 (14:42 +0000)]
Bug 11468: Remove given/when from Koha::Dateutils

given and when give warnings due to their experimental
status as of perl 5.18. Replace the construct with
an if/elsif to avoid the keywords

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, especially t/DateUtils.t.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b529ca00e0cac093fc32a1d123cdbcc84582c155)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11416: fix case where serials item editor was incorrectly hiding fields
Kyle M Hall [Wed, 18 Dec 2013 13:37:40 +0000 (08:37 -0500)]
Bug 11416: fix case where serials item editor was incorrectly hiding fields

In serials/serials-edit.pl, if an item field is hidden from the OPAC,
it will not display in the editor, even if the field is marked as
visible in the staff intranet and editor. However, the field is still
displayed correctly in the items editor ( additem.pl ).:

Test Plan:
1) Select an item-level field ( e.g. non-public note )
2) Create a serial using the default framework ( or one of your choice )
3) For that framework, mark the chosen field as visible from the
intranet and editor, but not the opac.
4) Receive an item for this serial, note your field does not display
5) Use the biblio item editor to add an item ( additem.pl ), not the
field displayes
6) Apply this patch
7) Repeat step 4, not the field displayes

Signed-off-by: Kim Schwant <kim.schwant@courts.in.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
PrepareItemrecordDisplay is only used for editor (-4 < hidden < 4)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f14020780836c5fbc65331b3918b843761481c36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11752: display the correct frequency for serial subscriptions in OPAC details
Blou [Wed, 12 Feb 2014 17:03:08 +0000 (12:03 -0500)]
Bug 11752: display the correct frequency for serial subscriptions in OPAC details

This fixes bootstrap and prog by modifying the description displayed
in the OPAC's detail of serials.

RM NOTE: this patch does not cover the case where custom serial
frequencies have been defined.

TESTING to reproduce
- create/find a serial with a 1/week periodicity (4 in the database)
- Find it in the opac-detail.pl, click "more details" at the bottom
- validate the string.  Before the patch, it will say:
"The current subscription began on 2013-12-06 and is issued every 3
 weeks for 26 issues"

The "every 3 weeks" is clearly wrong.
In fact any periodicity chosen would display a wrong description, not
matching the staff interface.

After the patch, the display is corrected.

As a bonus, the "every 2 years" now has a description, where it had
none before.

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 7f1e949ea0e8d05b641ddbcb4582a3e1bc913ecd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12003: Do not calculate next pubdate for irregular subscriptions
Julian Maurice [Fri, 28 Mar 2014 13:38:25 +0000 (14:38 +0100)]
Bug 12003: Do not calculate next pubdate for irregular subscriptions

Show 'Unknown' when planneddate and publisheddate cannot be calculated

Also fixes SQL query in misc/cronjobs/serialsUpdate.pl that was still
using "periodicity != 32" to exclude irregular subscriptions from
results

Test plan:

1) Create a subscription in the serials module. Make sure to choose:
   Frequency = Irregular
2) Test the prediction pattern, first publication date is set to
   "First issue publication date" field, others will show as
   'unknown'
3) Save the subscription
4) Check the created issue - it will show a published date and a
   planned date (same as "First issue publication date" field)
5) Receive the issue and check the next generated issue, planned
   date and published date should show as 'Unknown'
6) Generate a next issue, planned date and published date should
   also show as 'Unknown'

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Also tested:
- multi receiving generates mulitple issues without dates - 'unknown'
- staff detail page shows the dates empty, which is fine
- OPAC detail page shows the dates empty, which is fine
- serial collection page shows 'unknown' and those issues appear
  on the 'manage' tab, as they did in the past
- Editing the issue from the serial collection page leaves the
  date fields empty.
- Receving the issue, setting the status to 'Arrived' the Expected on
  date is set to 'today' automatically. Date published has to be
  entered manually (maybe something we could improve later
- subscription detail > issues tab shows Uknown.
- t/db_dependent/Serials/GetNextDate.t pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 47a9afcb7ecedc805550f46e6373b9a8c8615bdc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10533: move JavaScript functions for basket groups to a separate file
Jonathan Druart [Wed, 3 Jul 2013 08:52:21 +0000 (10:52 +0200)]
Bug 10533: move JavaScript functions for basket groups to a separate file

This patch moves JavaScript functions used for managing basket groups
to a file.  This has the effect of putting the last (active) use of
the YUI JavaScript library by the staff interface in one file:

  koha-tmpl/intranet-tmpl/prog/en/js/basketgroup.js

Test plan:
- Try all actions for basketgroup ( drag/drop, add, delete, close, print,
reopen, edit, export as csv).
- Check that there is no regression on others acquisition pages:
  * acqui/neworderempty.tt
  * acqui/uncertainprice.tt
  * acqui/addorderiso2709.tt
  * acqui/basketheader.tt
  * admin/aqbudgets.tt
  * admin/aqcontract.tt
  * admin/aqbudgetperiods.tt
  * admin/aqplan.tt
  * suggestion/suggestion.tt

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b8f1b43966d178174583c7a3e0c36e58f988b161)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11955: Remove spaces in empty indicators when linking an authority to a biblio...
Frédérick [Tue, 18 Mar 2014 20:11:44 +0000 (16:11 -0400)]
Bug 11955: Remove spaces in empty indicators when linking an authority to a biblio record.

This patch removes spaces in indicators which are imported when we link an
authority to a biblio record. The spaces made the indicators harder to edit
after the linking, because we had to delete the superfluous space character
before a new value could be entered.

To test:
1. Open some authority on editor, save with empty indicators.
   They are saved as ind1=" " ind2=" " on auth_header tables, with spaces
2. Edit some record, link some tag with previous auth,
   indicators now have a space on it (or ind1 at last)
3. Apply the patch
4. repeat 2, space is gone

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit afc9549a6f58ddf36cf6d9a5399239385c377c90)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11258: fix another case where holds queue made transfer requests that contradict...
Kyle M Hall [Fri, 15 Nov 2013 16:29:23 +0000 (08:29 -0800)]
Bug 11258: fix another case where holds queue made transfer requests that contradict the library holds policy

This patch fixes a problem where the holds queue generator
was making requests where the pickup library is the
same as the item's library but not the patron's branch,
even if there is a "Default holds policy by item type" rule that states
this item can only fill holds for patrons of the same library as the
item.

Test Plan:
1) Create a test record with 2 items with different itemtypes
2) Set the Default holds policy by item type for the first
   item to "From any library"
3) Set the Default holds policy by item type for the second
   item to "From home library"
4) Place a record level hold for a patron from another library,
   but for pickup at the same library as the item is from
5) Rebuild the holds queue
6) View the holds queue, note the item is listed, though this
   patron cannot place a hold on this item
7) Apply this patch
8) Repeat step 5, note the hold is no longer in the queue

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
automated tests pass, functional tests pass. Bug replicated, eradicated by patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I finally managed to reproduce this, patch works as described.
Passes tests and QA script, provided tests fail without patch, but
succeed with the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 79660377470e8d6ba9057eb59645886410852c92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12058: make OverDrive search results page show cart, lists, and login links
Owen Leonard [Wed, 9 Apr 2014 16:15:56 +0000 (12:15 -0400)]
Bug 12058: make OverDrive search results page show cart, lists, and login links

The template for OverDrive search results in the Bootstrap OPAC doesn't
show the cart, lists, or login links because the template's checks of
related system preferences relies on [% USE Koha %], which is not
present. This patch adds it.

To test, enable the bootstrap theme and OverDrive integration
(OverDriveClientKey, etc.). Perform a search in the OPAC and click to
view results from your OverDrive library. Confirm that cart, lists, and
login links appear in the header.

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Bug confirmed, and this patch fixes it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b1e09cb0fa900964200f224cad771d95062bc48d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11484: (follow-up) standardize capitalization of "Z39.50"
Galen Charlton [Thu, 17 Apr 2014 15:31:33 +0000 (15:31 +0000)]
Bug 11484: (follow-up) standardize capitalization of "Z39.50"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5492d82bc2aa9c884fe67810ddb3cd08c83910fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11484: Add option to cleanup_database.pl to purge Z39.50 search records from...
Kyle M Hall [Mon, 6 Jan 2014 18:46:02 +0000 (13:46 -0500)]
Bug 11484: Add option to cleanup_database.pl to purge Z39.50 search records from reservoir

It would be good to be able to specifically target import records from
Z39.50 for cleanup.

Test Plan:
1) Apply this patch
2) Import one or more batch record sets into Koha
3) Perform some Z39.50 searches
4) Run this command: misc/cronjobs/cleanup_database.pl -v --z3950
5) Verify that only Z39.50 records were deleted

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f796d1002a39cd714433a219b35eefbce31b02d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12081: make tmpl_process3.pl delete ts temp files
Bernardo Gonzalez Kriegel [Mon, 14 Apr 2014 22:35:35 +0000 (19:35 -0300)]
Bug 12081: make tmpl_process3.pl delete ts temp files

This patch enable deletion of temp files used by
tmpl_process3.pl.
Just removed coments on existing code

To test:
1. Do a count of files on /tmp ( ls /tmp | wc -l )
2. Update preferred language
3. Count again, new files on /tmp
4. Apply the patch
5. Update again, check, no new files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: I watched what temp files were actually in /tmp to make
      sure other processes didn't magically increase/decrease
      the number.
          $ perl translate update {lang code}
      generated 10 temporary files for me (2x5 po files). After
      removing those ten files, and applying the patch, no
      other files were generated.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
These lines has been commented by commit
a399dcefad193fc21ef2dc1fe31d07686ab2da46 without any apparent good
reason.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit de81d7abe43f3c2eed327b52e212bc790b406961)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12052: DBrev 3.14.09.001
Fridolin Somers [Wed, 6 Aug 2014 09:39:42 +0000 (11:39 +0200)]
Bug 12052: DBrev 3.14.09.001

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12052: New syspref to display message on the OPAC patron summary page
Jonathan Druart [Wed, 9 Apr 2014 08:24:24 +0000 (10:24 +0200)]
Bug 12052: New syspref to display message on the OPAC patron summary page

Test plan:

Fill the OPACMySummaryNote with HTML code or just text.
The content should be displayed at the OPAC on the summary page for
patrons.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Rephrased the pref text a little bit, using 'logged in' instead of
'connected', also added " so the description appears correctly in the
pref editor.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f82d22b0df63e2924e9c8b35d2a4eb02edc2650e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10825: don't display enum/chron twice for items received via the serials module
Mason James [Mon, 16 Sep 2013 03:12:16 +0000 (15:12 +1200)]
Bug 10825: don't display enum/chron twice for items received via the serials module

TEST PLAN
---------
1) In the staff interface, display a bib that has one or more items
   that were received in the serials module.  The following query
   can identify them:
   -- in MySQL:
      SELECT items.biblionumber,items.enumchron,serial.serialseq
      FROM items,serial,serialitems
      WHERE items.itemnumber=serialitems.itemnumber
        AND serialitems.serialid=serial.serialid;
2) Note that in the holdings tab, the serial enumeration/chronology
   is displayed twice.
3) Apply the patch
4) Refresh the screen
4) Now, the enum/chron should be displayed only once per item.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Template change only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3f5636cac39ca1109a73b40be08d9dbef096a17c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11797: (follow-up) fix MARC21 branch of bug more idiomatically
Galen Charlton [Tue, 15 Apr 2014 15:16:42 +0000 (15:16 +0000)]
Bug 11797: (follow-up) fix MARC21 branch of bug more idiomatically

This patch puts the MARC21 variant of the bugfix in alignment
with the UNIMARC variant, removing the use of unnecessary
temporary variables.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cc7a99ba7f23c7f77bb28c23613fbd9b4ab61cd5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11797: fix odd number of elements in hash (UNIMARC)
Jonathan Druart [Tue, 15 Apr 2014 09:08:54 +0000 (11:08 +0200)]
Bug 11797: fix odd number of elements in hash (UNIMARC)

I got the same warning for my UNIMARC DB.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fa989631f6b6f2d4a6dc86e8b9535bd9ce786c1e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11797: fix odd number of elements in hash warning (MARC21)
Mark Tompsett [Thu, 6 Mar 2014 06:29:39 +0000 (01:29 -0500)]
Bug 11797: fix odd number of elements in hash warning (MARC21)

This was discovered when someone triggered an authority search
on an authority record that was missing what is assumed the
default subfield for a given field.

It, however, also can be triggered in an OPAC authority search
by looking at the record that lacks the default subfield for a
given field.

TEST PLAN
---------
1) Create an authority record with 180$x and NOT 180$v.
   See C4::AuthoritiesMarc::BuildSummary in the 1.. foreach loop
   for known tags and default values. The default subfields are
   the first letter of the $subfields_to_report string.
2) Trigger the bug:
   Method 1: /cgi-bin/koha/opac-authoritiesdetail.pl?authid=#
             Where # is the authority id of your tweaked record.
             The error occurs in Normal view.
   Method 2: Home -> Cataloging -> + New record
                  -> Click the 'Tag Editor' on 100$a
                  Editing of $a to $b and back may be required.
3) Notice there is an error log entry.
4) Apply the patch
5) Attempt to trigger the bug again
6) That specific error log entry is not generated.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Could generate the warning with a missing 151$a with both methods.
No warning anymore after applying this patch.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 129bc3281180d892659d3ad1ef253fbc7ec6f316)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11797: add regression test
Galen Charlton [Tue, 15 Apr 2014 15:38:49 +0000 (15:38 +0000)]
Bug 11797: add regression test

This patch adds unit tests for C4::AuthoritiesMarc::BuildSummary
for both UNIMARC and MARC21 and a regression test for the "Odd
number of elements in anonymous hash" warning.

To test:

[1] Run prove -v t/db_dependent/AuthoritiesMarc.t.  It should
    report one failure.
[2] Apply the main patch.
[3] Run t/db_dependent/AuthoritiesMarc.t again; it should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f2b655dfabc4a4464099e7d9bc219b6714ef7de1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 5052: make it possible to pick a language if all choices are sublanguage
Bernardo Gonzalez Kriegel [Fri, 4 Apr 2014 01:37:09 +0000 (22:37 -0300)]
Bug 5052: make it possible to pick a language if all choices are sublanguage

This was tricky to catch. In current implementation, Bug 6755
introduced in C4/Templates.pm as condition to send the array of
hashrefs of languages that (@$languages_loop<2), but with one
language group that condition is false, there is only one
element in that array.

This patch changes that condition to have more than one language
selected, grouped or not.

Also send $bidi value always, that was only sent if there is
more than one group language.

To test:
1. Translate to en-GB and en-NZ, or simply do mkdirs
on intranet-tmpl/prog and opac-tmpl/bootstrap

2. Go to Administration > System preferences > I18N
enable those languages on staff/opac

3. Check that language chooser is nowhere to be found

4. Apply the patch

5. Reload staff/opac, now you can see language chooser

NOTE: I made little changes on staff, but can't replicate
bootstrap colors for selected/unselected language. Someone
need to touch css files to make it happen. But that is
current behavior.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Good catch!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c212b9328edd69a8e8f5082674a9f29741d159ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12075: fix keyboard shortcuts broken by jQueryUI upgrade
Owen Leonard [Fri, 11 Apr 2014 16:40:20 +0000 (12:40 -0400)]
Bug 12075: fix keyboard shortcuts broken by jQueryUI upgrade

The recent jQueryUI upgrade broke keyboard shortcuts in the staff client
because of changes to the jQueryUI API. This patch fixes the problem.

To test, apply the patch and clear your browser cache if necessary.

- View any page in the staff which includes header search tabs for check
  out, check in, or catalog search (staff client home page or
  circulation page for instance).
- Test the keyboard shortcuts: Alt-q for catalog search, Alt-u for check
  out, Alt-r for check in.
- Each keyboard shortcut should select the correct tab.

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>
Passes all tests and QA script.
Confirmed that the shortcuts were broken before the patch
and now work again after applying it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dcca71f0befa92d2212855aecfc0f473b6304832)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7143: Updating history with new developers
Chris Cormack [Thu, 13 Mar 2014 20:20:34 +0000 (09:20 +1300)]
Bug 7143: Updating history with new developers

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c52b086d38cde98504457aa9f40f65ba20bbfbe1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12073: don't show link URLs when printing Bootstrap OPAC detail page
Frédéric Demians [Fri, 11 Apr 2014 15:23:50 +0000 (17:23 +0200)]
Bug 12073: don't show link URLs when printing Bootstrap OPAC detail page

On OPAC Bootstrap detail page, by clicking Print link on the right the
page is printed. But the printed page contains HTML <a> anchors URL
attribute. It's useless, and unreadable. It isn't the case with prog
theme.

This patch hides all <a> href attributes when printing any OPAC page.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and improves the printed detail page's readability.
Currently there is no less file for the print.css.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fe8242fc0383f9bafe1ead9033926c405ee5dfbe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12069: redirect to staff login if you access members/mod_debarment.pl when logged out
Owen Leonard [Thu, 10 Apr 2014 19:50:40 +0000 (15:50 -0400)]
Bug 12069: redirect to staff login if you access members/mod_debarment.pl when logged out

members/mod_debarment.pl's call to checkauth should pass 'intranet' so
that if the user happens to be logged out they will be redirected to the
staff client login form, rather than the OPAC.

To test, apply the patch and log in to the staff client:

- Add a restriction to a patron's account.
- View the restrictions tab on the patron's account. You should see the
  restriction and a "Remove" link for that restriction.
- In another tab, log out of the staff client.
- In the first tab, click the "Remove" link. You should be redirected to
  the staff client login page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch! Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cbcfb847e0022f79b82f0601c955ae085917d377)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12076: better detect an untranslatable template construct
Galen Charlton [Fri, 11 Apr 2014 18:49:07 +0000 (18:49 +0000)]
Bug 12076: better detect an untranslatable template construct

Per bug 6458, template constructs of the form

<li [% IF (foo) %]selected="selected"[% END %]...

are forbidden as they can cause problems with translated templates.
However, the tt_valid.t test currently doesn't catch the variation
where '-' is used to suppress extra whitespace:

<li [%- IF (foo) -%]selected="selected"[%- END -%]...

This patch corrects the issue.

To test:

[1] Temporarily add the following line to a template file:

<li [%- IF a -%]a="a"[%- END -%] />

[2] Run prove -v xt/tt_valid.t.  Note that no error is reported.
[3] Apply the patch, and rerun the tt_valid.t test.  This time,
    an error should be reported.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well, detects the forbidden pattern
No koha-qa errors.

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 9a7eedce78af128772a36b5a16416fdad1a16fcc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11960: replace unnecessary call of GetMemberDetails by CanBookBeRenewed
Jonathan Druart [Wed, 19 Mar 2014 15:38:20 +0000 (16:38 +0100)]
Bug 11960: replace unnecessary call of GetMemberDetails by CanBookBeRenewed

C4::Circulation::CanBookBeRenewed called C4::Members::GetMemberDetails to
retrieve categorycode and branchcode.

- categorycode is used to retrieve the issuing rule
- the borrower information is passed to
  C4::Circulation::_GetCircControlBranch. Which only uses the branchcode
  parameter.

GetMemberDetails does a lot of calls/queries (patronflags,
account, etc.) that are not needed by CanBookBeRenewed.

This patch replaces it with a call to C4::Members::GetMember.

Note: I presented this small optimisation during a quick introduction to
NYTProf (hackfest 14 in Marseille).

Test plan:
- launch member unit tests
- check the code

Checking the code resulted in the following:
CanBookBeRenewed builds a hash reference from the borrowernumber
(2482). Note it is only used in this function and not passed in.

_GetCircControlBranch (2485) requires that hashreference to
have a branchcode key. As stated above.

The following line (2486) requires it have a categorycode key.

As such, C4::Members::GetMemberDetails is confirmed to be
overkill, and C4::Members::GetMember is sufficient.

Testing Done
------------
0) Back up DB
1) Make sure MPL is in the list of libraries.
2) Apply the patch.
3) run the koha qa test tool
4) prove -v t/db_dependent/Circulation.t

Patch applies cleanly. QA Test tool was all OK. All tests ran successfully.

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 9132f9befb36f32fc35a511c3829c224b42893bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11441: (follow-up) improve utility help text
Galen Charlton [Fri, 11 Apr 2014 15:25:41 +0000 (15:25 +0000)]
Bug 11441: (follow-up) improve utility help text

This patch expands and reformats the help text displayed
when running remove_unused_authorities.pl -h.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f4633cc5e51e8859f93be397eaee1370afc54099)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11441: enhance remove_unused_authorities.pl ability to select records
Juan Romay Sieira [Tue, 21 Jan 2014 11:46:09 +0000 (12:46 +0100)]
Bug 11441: enhance remove_unused_authorities.pl ability to select records

remove_unused_authorities.pl previously required that --aut be supplied
to specify one or more authority types to check for unlinked authority
records.  If --aut was omitted, it would default to search for
records of authority type NC, which is not present in many (or any?)
Koha databases.

Now, if --aut is omitted, unlinked authority records of any type
are removed.

To test it:
Parse only PERSO_NAME authorities:
misc/migration_tools/remove_unused_authorities.pl -aut PERSO_NAME

Parse all authorities:
misc/migration_tools/remove_unused_authorities.pl

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0f6652d62bd9053c87de5b94eb6a35f68a3af4bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11995: restore ability of serialsUpdate.pl to calculate next serial issue dates
Jonathan Druart [Mon, 24 Mar 2014 14:25:05 +0000 (15:25 +0100)]
Bug 11995: restore ability of serialsUpdate.pl to calculate next serial issue dates

Bug 7688 changed the prototype for GetNextDate, but the serialsUpdate.pl
cronjob script had not been updated.  This patch fixes the problem.

Test plan:
Before applying the patch:
1/ Check that the following SQL query returns something:
SELECT serial.*
FROM serial
LEFT JOIN subscription ON (subscription.subscriptionid = serial.subscriptionid)
WHERE serial.status = 1
AND DATE_ADD(planneddate, INTERVAL CAST(graceperiod AS SIGNED) DAY) < NOW()
AND subscription.closed = 0;
2/ Run misc/cronjobs/serialsUpdate.pl -v
   It should die with an error message like this:
   Can't use string ("2011-03-05") as a HASH ref while "strict refs" in use
3/ Apply the patch
4/ Run misc/cronjobs/serialsUpdate.pl -v
   It should exit normally and print messages like this:
   Serial issue with id=XX updated
5/ Run the Koha QA test tools.

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 f71283bad5517757ee6b670c0edb5257d0a1bedc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7267: Add account number to German PDF template
Katrin Fischer [Thu, 27 Feb 2014 09:16:21 +0000 (10:16 +0100)]
Bug 7267: Add account number to German PDF template

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pagesde
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
  vendor details

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 ae030272a4f30104adefe9d6164eb99a0f4d8f73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7267: Add account number to English PDF templates
Katrin Fischer [Thu, 27 Feb 2014 09:13:33 +0000 (10:13 +0100)]
Bug 7267: Add account number to English PDF templates

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pages
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
  vendor details
- Repeat with pdfformat::layout3pages

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 62151ced35329f94e4508b4973521464d48307c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7267: Add account number to French PDF template
Katrin Fischer [Thu, 27 Feb 2014 09:17:44 +0000 (10:17 +0100)]
Bug 7267: Add account number to French PDF template

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout3pagesfr
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
  vendor details

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 a4841aae08cf60b4fcf628eee991738e2232cc80)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11828: (follow-up) add new option to OrderPdfFormat
Katrin Fischer [Sat, 1 Mar 2014 08:33:27 +0000 (09:33 +0100)]
Bug 11828: (follow-up) add new option to OrderPdfFormat

To test:
- Check appearance of the OrderPdfFormat system preference
  It will offer a pull down with options, including
  "German 2-page"

Followed test plan. Patch behaves as expected.
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 6372689f5dc7f0e9d34ffef3ad0c2a1ab6d6fb58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11828: Add German translation of layout2pages PDF template
Katrin Fischer [Wed, 26 Feb 2014 16:50:10 +0000 (17:50 +0100)]
Bug 11828: Add German translation of layout2pages PDF template

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pagesde
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check everything is translated into German and the formatting/layout
  looks ok

Followed test plan and compared English with German printout.
German version is OK.

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 ffeb666994327b97e26bc372fd574d05a40e8336)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11885: (follow-up) add a CSS class to set subfield code bold
Jonathan Druart [Fri, 11 Apr 2014 08:32:37 +0000 (10:32 +0200)]
Bug 11885: (follow-up) add a CSS class to set subfield code bold

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit eab5480614edf9cc5895bc076d4e31dc77c1fe40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>