]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 16358: Do not redirect to the editor when deleting records
Jonathan Druart [Tue, 13 Sep 2016 14:03:55 +0000 (15:03 +0100)]
Bug 16358: Do not redirect to the editor when deleting records

The "Delete record" button goes to addbiblio.pl?op=delete, which
incorrectly redirects to Rancor when selected.

Test plan:
0/ Enable EnableAdvancedCatalogingEditor
1/ Edit a record
2/ Switch to the Advanced editor
3/ click on "View the record"
4/ Delete the record
=> Without this patch you are redirected to the editor
=> With this patch you are redirected to the advanced search

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ba8ee98e1bb3b18f579c0b122b14d43e88cda2c8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 537d7d9fa4650aa35b8e20cbaf0cad7f7a4d2ba4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17446: Typo seleted
Marcel de Rooy [Fri, 14 Oct 2016 09:29:44 +0000 (11:29 +0200)]
Bug 17446: Typo seleted

Built on top of bug 17441

Test plan:
Just have a look at the changes. Trivial.
Git grep seleted. No results.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f75afef59175933f7e93b04bdcbdcf5180b0b024)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 28eb0a880e2bf249da464f7da75ad409f9ffc919)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17441: [QA Follow-up] Return value of SendAlerts
Marcel de Rooy [Fri, 14 Oct 2016 09:07:49 +0000 (11:07 +0200)]
Bug 17441: [QA Follow-up] Return value of SendAlerts

This patch makes the return value of SendAlerts more consistent.
It returns 1 on success, or undef || { error => 'msg' } on failure.
Needed to adjust one test in Letters.t too.
Adjusted one typo along the way (seleted).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by running Letters.t.
Also tested SendAlerts from the interface with AutoEmailOpacUser and
memberentry (adding new patron).

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 17e2e6c994655aaa927b2579524022a4f24a8d1d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 18a472e627e8f8b7cec45ffe90f896374d90fb9d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17441 - t/db_dependent/Letters.t fails on Jenkins
Katrin Fischer [Thu, 13 Oct 2016 17:05:48 +0000 (19:05 +0200)]
Bug 17441 - t/db_dependent/Letters.t fails on Jenkins

Run prove t/db_dependent/Letters.t

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
To improve consistency, adding a follow-up.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ff495c5fa8c58a7762b3494e97d90618d649f7a8)
(cherry picked from commit 4ee9399028fda3f5b8cfbfd9c43eb50349569e91)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 11217: The # in accountlines descriptions makes them un-writeoffable
Marc [Fri, 7 Oct 2016 09:03:45 +0000 (11:03 +0200)]
Bug 11217: The # in accountlines descriptions makes them un-writeoffable

This patch adds escaping to url params in mambers/pay.pl

To test:
- Apply patch
- Go to Home > Patrons > Manual invoice and create an invoice with a
  description containing a #
- Go to tab "Pay fines"
- Write off the fine
Expected result: Fine is written off and does no longer display in pay tab.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 692014c817b58876042ab03d71bde0c2cce7e571)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ff2b5116e9edb5ce62212a8f25518bc1647b19b9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17365: Fix XSS in moremember.pl and memberentry.pl
Jonathan Druart [Thu, 29 Sep 2016 07:46:49 +0000 (08:46 +0100)]
Bug 17365: Fix XSS in moremember.pl and memberentry.pl

There are certainly hundred of places where they are not escaped...

Test plan:
Create a patron with "Arun <script>alert('code injection');</script>" in
some of the fields.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 1d0d5f1398687ead3a17cd40f74f879e8ddf9a9d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a61c072f1acb77906843a5be319412f959374bda)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17389: Clear logs
Jonathan Druart [Mon, 3 Oct 2016 14:23:39 +0000 (15:23 +0100)]
Bug 17389: Clear logs

Logs are full of:
Use of uninitialized value in substitution (s///) at
C4/ImportExportFramework.pm line 282.
Use of uninitialized value in concatenation (.) or string at
C4/ImportExportFramework.pm line 283.

Some field are NULL in DB, we need to init the value to an empty string
to avoid these warnings.

Note: This fix is not related to the original bug
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Warnings avoided

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a1dcd2f2e67f2dc998d2eae0fc6097eb9edbb874)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4592382e388d7f0ee0467180b50b5630a19c674a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17389: (bug 16035 follow-up) Fix export non-default frameworks
Jonathan Druart [Mon, 3 Oct 2016 14:15:40 +0000 (15:15 +0100)]
Bug 17389: (bug 16035 follow-up) Fix export non-default frameworks

Trivial patch, no need to explain anything :)

Test plan:
Export default framework
Export other frameworks
=> The frameworkcode column should contain the framework code

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a1eeffd8385e5b95ca1d06a8300e5bd42403486a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5cf95dc6db4356dd5fbb1d9c46c50652d508a19b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17392 - opac/svc/overdrive_proxy is not plack safe
Nick Clemens [Wed, 5 Oct 2016 13:26:09 +0000 (13:26 +0000)]
Bug 17392 - opac/svc/overdrive_proxy is not plack safe

This patch simply replaces the ';'  in the param passed to OverDrive
with '&'

To test:
1 - Enable overdrive (requires an account)
2 - Perform an opac search
3 - Note the number of overdrive results reported
4 - Click the link to view the actual overdrive results
5 - Note the result numbers don't match
6 - Apply patch
7 - Repeat 1-4 and note results numbers match and results are relevant
8 - Test a search with a ';' to ensure this patch isn't breaking
searches

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Verified by reading code - couldn't verify using Overdrive.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f28460bdb7cbb6a1261d8c50af6b10ffacf54ef3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 80de7080ef5f3694378c4a909b96ee62866d0b41)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17357: Update DB rev (3.22.11.003)
Julian Maurice [Mon, 24 Oct 2016 09:52:46 +0000 (11:52 +0200)]
Bug 17357: Update DB rev (3.22.11.003)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17357: Replace WTHDRAWN with WITHDRAWN in installer files
Jonathan Druart [Tue, 27 Sep 2016 09:52:17 +0000 (10:52 +0100)]
Bug 17357: Replace WTHDRAWN with WITHDRAWN in installer files

Some installer files still use WTHDRAWN instead of WITHDRAWN as an AV
category.

Test plan:
  git grep WTHDRAWN installer
should not return any results

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ce076e0e757ff812eba21ee6102e6c44076e5595)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 78ce2bcb9f2217d5142a3257ff02ca647dd0ecac)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17358: Rename COU with COUNTRY and LAN with LANG
Jonathan Druart [Tue, 27 Sep 2016 12:38:34 +0000 (13:38 +0100)]
Bug 17358: Rename COU with COUNTRY and LAN with LANG

Some installer files use COU and LAN instead of COUNTRY and LANG.

To uniformise these AVs, it would be good to use the same code.

Note that I do not think we should update existing installations

Carefully compared code.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 75a900d55365dc6a8d1396b68329a0679d9dc430)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit aa231539854fe9aa0ef75daca342c8cced0b8150)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17403: Internal Server Error while deleting patron
Marc [Wed, 5 Oct 2016 13:43:29 +0000 (15:43 +0200)]
Bug 17403: Internal Server Error while deleting patron

This patch fixes a Internal Server Error while deleting patrons.

To reproduce:

- Go to a patron's detail page
- Toolbar : More : Delete
- Confirm "Are you sure you want to delete..."

Result: Internal Server Error
Plack error log:
exited nonzero: 1 at /home/marc/koha/members/deletemem.pl
Note: Patron is deleted

Additional tests: Try to delete yourself, to delete a staff member
without having superlibrarian permission etc.

To test:

- Apply patch
- Re-start plack
- Try to reproduce steps above (with other patron)
Expected result:
No Internal Server Error, Redirect to Home > Patrons

Amended to include all occurences of 'exit 1'

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Good catch Marc

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit b588babdb23bfdc1163864a26c36a61bf8a39ae5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0e953489908f8fb44bd6173620050054e0a66e71)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17310: Broken URLs in 'Item renewed' / 'Cannot renew' messages
Andreas Roussos [Sat, 17 Sep 2016 10:44:47 +0000 (13:44 +0300)]
Bug 17310: Broken URLs in 'Item renewed' / 'Cannot renew' messages

In the Staff client, under Circulation > Renew, the message shown after
successful renewal of an item contains broken URLs. This is also true for
the message shown when you try to renew an item that is not checked out.

This patch fixes that.

Test plan:
1) Go to Circulation > Renew, and search for the barcode of a checked-out
   item. In the 'Item renewed:' confirmation message, notice how the URLs
   for the title and the barcode are broken.
2) Now search for the barcode of an item that is not checked out. In the
   'Cannot renew:' message, notice how the URLs are broken here too.
3) Apply the patch.
4) Repeat steps 1) and 2). This time the URLs work fine.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 884e28fab5e4db86dd9f50f2908519a0cd6650d5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2f70fde91a53b5a8e05c99fa51c77ba263e9d38c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17088: Add tests to cover the changes
Jonathan Druart [Tue, 4 Oct 2016 13:49:19 +0000 (14:49 +0100)]
Bug 17088: Add tests to cover the changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit bc1e23e1f11e146e282d0e2efa7fd77e2c26d631)
(cherry picked from commit 1c35b86c2e7b7dd00bf677f51d8a141e3c281072)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17088: [Follow-up] Use Logger for failed exports
Marcel de Rooy [Fri, 16 Sep 2016 09:27:05 +0000 (11:27 +0200)]
Bug 17088: [Follow-up] Use Logger for failed exports

Fixes a TODO for logging unsupported record_type in _get_record_for_export.
Also logs a warning when the record_type parameter is not supplied at all in sub export.
Replaces a warn by a log message about an invalid record for format iso2709.
Also adds a log message about an invalid record for format xml.
Adds a trivial unit test for passing no record_type to export.

Test plan:
See also first patch.
Run t/db_dependent/Exporter/Record.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Also tested the log messages for iso2709 and xml by manipulating
the record_type parameter with:
    $params->{record_type}='xx';
before calling _get_record_for_export in Record.pm.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0eec191ed3ab1ae1bd24972a559d12627b70f681)
(cherry picked from commit 40a2b8c12150d6fe193ba10c808b47069494157a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17088: [Follow-up] Adjust POD in Logger.pm
Marcel de Rooy [Fri, 16 Sep 2016 08:44:47 +0000 (10:44 +0200)]
Bug 17088: [Follow-up] Adjust POD in Logger.pm

Not important enough to go on its own.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 44b51ed80224d0361796c1a70cb66bb5096a427c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 051661024ca92a343ad74e2664627c070bb5c66e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17088 - Bad MARC XML can halt export_records.pl
Kyle M Hall [Tue, 9 Aug 2016 13:08:17 +0000 (13:08 +0000)]
Bug 17088 - Bad MARC XML can halt export_records.pl

If export_records.pl encounters a record that fails to load correctly as
a MARC::Record the export process will fail and only the records
encountered up to that point will be exported.

Test Plan:
1) Pick a record in your database, and replace the biblioitems.marcxml field with some random characters
2) Export your records using the command:
   misc/export_records.pl  --format xml --record-type bibs --filename /tmp/biblios.xml
3) Note you get an error and the script ends prematurely
4) Apply this patch
5) Repeat step 2
6) Note the full record set is exported ( except for your bad record )
7) Note an error is still generated for your bad record ( useful for
    tracking down bad records ).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e72a8ab260abed11b02266d77bc17d831884ed40)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit cb1ee8e3ccbc8bbce47b9db502a90c09e2a6ec3f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17035 - Koha allows system-wide 'read' access to all Koha zebra databases, by...
Mason James [Wed, 3 Aug 2016 04:32:00 +0000 (16:32 +1200)]
Bug 17035 - Koha allows system-wide 'read' access to all Koha zebra databases, by default

to test bug...
 1/ make a random user
 2/ change to random user
 3/ access any zebra database with random user and no authentication
 4/ read zebra database

here is a transcript of the bug...
---------------------------
root@xen1:~# adduser bob
root@xen1:~# su -l bob

bob@xen1:~$ cd /var/lib/koha
bob@xen1:/var/lib/koha$ ls
topsecret

bob@xen1:/var/lib/koha$ yaz-client  unix:/var/run/koha/topsecret/bibliosocket
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID     : 81
Name   : Zebra Information Server/GFS/YAZ
Version: 4.2.30 98864b44c654645bc16b2c54f822dc2e45a93031
Options: search present delSet triggerResourceCtrl scan sort extendedServices namedResultSets
Elapsed: 0.001002

Z> base biblios;

Z> find the
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1130, setno 2
SearchResult-1: term=the cnt=1130
records returned: 0
Elapsed: 0.005518

Z> show
Sent presentRequest (1+1).
Records: 1
[biblios]Record type: USmarc
01824cam a2200397 a 4500
001 000045782309
003 AuCNLKIN
005 20111013213222.0
008 100707s2011    maua          001 0 e
...
---------------------------

5/ apply changes to a Koha instance's config files, that you plan to test

6/ restart zebra for instance
 # sudo koha-restart-zebra topsecret

7/ repeat steps 2 and 3, but receive a 'bad user/passwd ' error from zebra

bob@xen1:~$ yaz-client unix:/var/run/koha/topsecret/bibliosocket
Connecting...OK.
Sent initrequest.
Connection rejected by v3 target.
    1: code=1011 (Init/AC: Bad Userid and/or Password),

NOTE: this patch currently will only fixes newly created instances, it wont fix existing instances
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Good catch Mason

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f2196a2e4f21a9a294c970a1ad067f5c3d1cb4eb)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f3917fc8cb8c49bc85e7d371043cae8bd276063d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17324: Deal with branchcode NULL issue
Mark Tompsett [Tue, 20 Sep 2016 23:29:28 +0000 (19:29 -0400)]
Bug 17324: Deal with branchcode NULL issue

In a database update we alter the letter table, making a column
(branchcode) not be able to contain NULL values.
However if it already does, this SQL fails. So before changing the
column we change the NULL values

[Tue Sep 20 19:08:10 2016] updatedatabase.pl: DBD::mysql::db do failed:
Invalid use of NULL value [for Statement "
[Tue Sep 20 19:08:10 2016] updatedatabase.pl: ALTER TABLE letter MODIFY
COLUMN branchcode varchar(10) NOT NULL DEFAULT ''
[Tue Sep 20 19:08:10 2016] updatedatabase.pl: "] at
/home/mtompset/kohaclone/installer/data/mysql/updatedatabase.pl line
12638.

Reproduce:
on an ubuntu 16.04 LTS machine with MySQL 5.7 install git koha
development environment.
...
git checkout -b my_3.18.x origin/3.18.x
drop database koha_library;
create database koha_library;
quit;
web install all sample data
(ignore some issues with sample data, and one with mandatory)

git checkout -b bug_17234 origin/master
git bz apply 17292
git bz apply 17320
git bz apply 17260
git bz apply 17234
web install
Two warning messages are expected output from upgrade process, but
the above message is not.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Did not follow the test plan, but the changes make sense

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0599ab00768e7d2ee487c6d02a0230d4a2a96d9e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3c2bd4ef3b1cc45d955940c1323c2b2c9b05cc4a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17352 - Patron search type is hard coded to 'contain' in circ/circulation.pl
Kyle M Hall [Sat, 24 Sep 2016 19:25:33 +0000 (19:25 +0000)]
Bug 17352 - Patron search type is hard coded to 'contain' in circ/circulation.pl

The patron search type is hard coded to 'contain' in
circ/circulation.pl.

This causes problems because a mis-scanned cardnumber can bring up the
wrong patron.

The example that our partner gave us involved scanning '1733', which
doesn't match any borrowers when we do a 'start_with' search, but
matches the cardnumber 'p291733'.

If we follow the usage in members/member.pl, we can set searchtype in
HTTP params, which is amenable to fixes in intranetuserjs

Test Plan:
1) Apply this patch
2) Use the checkout search, not changes should be noted

Extra credit:
1) Add javascript to intranetuserjs to add a hidden input named
'searchtype' with the value 'start_with'
2) Checkout searches should now give only results where a searched
   field starts with the given string(s)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 56da7be50ada38bab6ec866f5915d55507c7d821)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 26efec07d7344ecf3c29981e735246dec6416bd1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 7045: Update DB rev (3.22.11.02)
Frédéric Demians [Sat, 22 Oct 2016 07:16:44 +0000 (09:16 +0200)]
Bug 7045: Update DB rev (3.22.11.02)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 7045: Update default value placeholders for existing installs
Jonathan Druart [Tue, 16 Aug 2016 08:18:19 +0000 (09:18 +0100)]
Bug 7045: Update default value placeholders for existing installs

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 547b5f95f62a00e360c5cac4e416d30365429fcb)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 517e4eb553e31dad4d7d49a6c2b2222884423d75)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 7045: Use <<tag>> for default value placeholders
Jonathan Druart [Tue, 16 Aug 2016 08:09:53 +0000 (09:09 +0100)]
Bug 7045: Use <<tag>> for default value placeholders

When adding a biblio, the default value of a MARC subfield defined in
the frameworks can be used as placeholders to set the current date or
the surname of the logged in user (use cases?).
The different placeholders are 'YYYY', 'MM', 'DD', 'user'.
When adding an item, same behavior except that 'user' is not replaced.

This patch makes behaviors consistent between the 2 editors and
surrounds placeholders with << >>
We will now have: <<YYYY>>, <<MM>>, <<DD>> and <<USER>>

Test plan:
Define default values for biblio and item subfields.
Create a bibliographic record and attach it an item.
The default values should be used and replaced if you used placeholders.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 50abf24ff04aae0c9010411fa6e98561c2ccc66f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 60ab0769530c190dcd849f15909eed4961aa8a83)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16035: MARC default bibliographic framework Export fix
Julian Maurice [Mon, 24 Oct 2016 09:04:39 +0000 (11:04 +0200)]
Bug 16035: MARC default bibliographic framework Export fix

This patch makes sure that, if there is no framework code,
     $frameworkcode is set to 'default'. This fixes the format issue.
     Then, if $frameworkcode = default, an empty string (rather than
     null) is passed to the ExportFramework method, as the framework
     code in the DB for default codes is "".

To test:
1) Go to Admin -> MARC Bibliographic framework
2) Try to export default framework in all formats, notice the file is
only exported as .ods and is an empty file. Notice warns in intranet
error log.
3) Apply patch and refresh page
4) Confirm exporting default framework works in all formats and
spreadsheet has data
5) Notice warns in error log are gone
6) Confirm export still works for other frameworks

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 705097f938ba9334c21b3e6f006bd7c9ba38763c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1de610bb63f70b9f4a1e3a8a5683de5d3bb7bb12)
Signed-off-by: Julian Maurice <koha@matrix-jessie>
8 years agoBug 17342: (bug 17262 follow-up) fix the way to retrieve memcached config from apache
Andreas Jonsson [Mon, 3 Oct 2016 08:08:03 +0000 (09:08 +0100)]
Bug 17342: (bug 17262 follow-up) fix the way to retrieve memcached config from apache

The problem is that the memcached configuration variables are extracted
from the apache configuration file incorrectly so you get
'"127.0.0.1:11211"' including double quotes as the servers parameter to
memcached.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Note this only applies on 3.22.x but it does fix the problem
Definitely needed for 3.22.12

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0fc92ab72d1bab7e84df9fc78e3cbd3f2abb3d97)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14707: Update DB rev (3.22.11.001)
Frédéric Demians [Sun, 25 Sep 2016 14:02:13 +0000 (14:02 +0000)]
Bug 14707: Update DB rev (3.22.11.001)

(cherry picked from commit c73b60d7168f7f00226d01b09c604f253f35c36c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14707: Update existing installations and correct wrong values
Jonathan Druart [Wed, 14 Sep 2016 10:07:58 +0000 (11:07 +0100)]
Bug 14707: Update existing installations and correct wrong values

See http://hea.koha-community.org/, the countries are filled is wrong
values.
If we decide to update the free text with a dropdown list, we need to
handle these wrong data.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 66d669d0735f244cb30e9cfdf53f91c77953b30f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e09f10a882d15118bd22789462b2d66f4b1a4dfb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14707 : Replace UsageStatsCountry syspref from free text to a dropdown list.
Julian FIOL [Tue, 18 Aug 2015 15:16:53 +0000 (17:16 +0200)]
Bug 14707 : Replace UsageStatsCountry syspref from free text to a dropdown list.

This will avoid syntax problems with Hea when a user will fill this 2 sysprefs

The default choice for UsageStatsLibraryType and UsageStatsCountry is 'empty'

Test Plan
---------

1. Create a new Koha install
2. Go to the 'Administration' page
3. Go to 'Global system preferences'
4. Go to 'Administration'
5. At the end of this page you should see a dropdown menu for
- UsageStatsCountry with all countries
- UsageStatsLibraryType with all type of library
They both should be empty by default.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Not a complete list but is a start
Lots of new strings to translate :)
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 233dfb8c74ce85bdb70bd1eb17231a234387d3c9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 20db7d6ee679f519a2076614635af831f3164c26)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13405 - System information has misleading information about indexing mode
Zeno Tajoli [Mon, 19 Sep 2016 15:03:20 +0000 (17:03 +0200)]
Bug 13405 - System information has misleading information about indexing mode

With this patch when <zebra_bib_index_mode> or <zebra_auth_index_mode> are set to 'grs1'
it appears a link to https://wiki.koha-community.org/wiki/Switching_to_dom_indexing
instead of a misleading information.

To test:
a)Insert 'grs1' in <zebra_bib_index_mode> or <zebra_auth_index_mode> (file koha-conf.xml)
b)It appers a  misleading warning
c)Apply the patch
d)It appears a link to https://wiki.koha-community.org/wiki/Switching_to_dom_indexing.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cdac530034a6b478b95e2d99ddc171529ee1a6c7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4e8209d595137168667d81875d024e6954fea102)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17289: Holds awaiting pickup shows date unformatted
Andreas Roussos [Sat, 10 Sep 2016 08:54:06 +0000 (11:54 +0300)]
Bug 17289: Holds awaiting pickup shows date unformatted

In the Staff client, under Circulation -> Circulation reports,
the date shown in the heading of the 'Holds awaiting pickup'
report is not formatted according to the 'dateformat' system
preference.

This (trivial) patch fixes that.

Test plan:
1) In the Staff client, go to Circulation and under 'Circulation
   reports' click on 'Holds awaiting pickup'
   (cgi-bin/koha/circ/waitingreserves.pl).
2) Observe that the date shown in the heading is always formatted as
   yyyy-mm-dd regardless of the value of the 'dateformat' syspref.
3) Apply the patch.
4) Re-visit the 'Holds awaiting pickup' report. Confirm that the patch
   worked, i.e. the date shown in the heading is formatted according
   to the 'dateformat' system preference.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f9e3639da7ef02a6ca08014179d216e1d938a401)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b0949e921427decf879e8e20d26bf42fefce992d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17245: Untranslatable abbreviated names of seasons.
Rafal Kopaczka [Sat, 3 Sep 2016 16:06:47 +0000 (18:06 +0200)]
Bug 17245: Untranslatable abbreviated names of seasons.

Because seasons strings are not available through DateTime module,
names of them where added in code, and templates. Bug 16289 adds new
abbreviated form to the code, but not to the templates. This patch
should fix the problem.

To test:
1. Apply patch.
2. Run "misc/translator/translate update" for you language.
3. Check if names are in po/ file for language.
4. Check if generating next issue for serial and prediction patterns
works correct.

NOTE: or "create {language code}" instead of update.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4da3bf5e48fa3462d2f3eca0f3c45f64dc9bb5b2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c81350b6200ce62c180f6fd301ed3406db893835)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 10768 - Improve the interface related to itemBarcodeFallbackSearch
Andreas Roussos [Thu, 15 Sep 2016 08:37:19 +0000 (11:37 +0300)]
Bug 10768 - Improve the interface related to itemBarcodeFallbackSearch

When the itemBarcodeFallbackSearch syspref is on, the wording in the
interface should reflect that you can enter a barcode OR a keyword.
Additionally, in the results of a keyword search the "Fast cataloging"
link should be more descriptive. This patch fixes these issues.

Test plan:

0) [PREREQUISITES] Ensure you have a Fast Add ('FA') framework defined,
   and that your itemBarcodeFallbackSearch syspref is set to 'Enable'.
1) Go to Circulation -> Check out, search for a patron, then select a
   patron to Check out. Notice how the text above the textbox reads
   "Enter item barcode:".
2) Type something generic (not a barcode) in the textbox so that you'll
   get at least one item as a result. Notice how the text in the yellow
   warning box reads "The barcode was not found: <terms> Fast cataloging".
3) Apply the patch.
4) Repeat step 1), now the text above the textbox should read
   "Enter item barcode or keyword:".
5) Repeat step 2), now the text in the yellow warning box should read
   "The barcode was not found: <terms> Add record using fast cataloging".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6fc03f1968f9e405d745b854577c953106fdbdfe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 68c21aabe99fb12ef3987a142f5cc0389422a7bd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16816: Do not copy parameters used when duplicating a report
Jonathan Druart [Tue, 13 Sep 2016 13:41:51 +0000 (14:41 +0100)]
Bug 16816: Do not copy parameters used when duplicating a report

If a report is duplicated from the report list, the new report will
contain the tag (<<YEAR>> for instance), but from the reports results
page it copies the values used for the results.

Test plan:
Create a new sql report with tags
Duplicate it from the report list: no expected changes
Run it and duplicate it: the tags must not have been replaced

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Ran and duplicated a report, the tags remained intact.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 50a37fbf5bc22bed843447be6a6603e7705fd28d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit fefd457550597e2bbcfda1317760c99852829ed2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17296: Display warning if AnonymousPatron is not correctly set
Jonathan Druart [Wed, 14 Sep 2016 12:39:34 +0000 (13:39 +0100)]
Bug 17296: Display warning if AnonymousPatron is not correctly set

Bug 14655 added a warning to the about page ("System information" tab)
if the AnonymousPatron feature is not correctly configured.
But actually there is one case when it's not displayed.

Test plan:
Set AnonymousPatron to a non existing patron
Set at least 1 borrowers.privacy == 2
go on the about page.
Without this patch you do not get the warning
With this patch you will see "Some patrons have requested a privacy on
returning item but the AnonymousPatron pref is not set correctly. Set it
to a valid borrower number if you want that this feature works
correctly."

Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1a2d804a8094ea05199803593698b4294f029913)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 92d648f579fb03e1e5bed45e28c8604a2ea7aab0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17294: Make reserves_stats.pl plack safe
Jonathan Druart [Tue, 13 Sep 2016 08:44:41 +0000 (09:44 +0100)]
Bug 17294: Make reserves_stats.pl plack safe

Lot of errors are raised by this script under plack because of var scope
issues:

Variable "$ccodes" is not available at
/home/koha/src/reports/reserves_stats.pl line 337.
Variable "$locations" is not available at
/home/koha/src/reports/reserves_stats.pl line 338.
Variable "$itemtypes" is not available at
/home/koha/src/reports/reserves_stats.pl line 339.
Variable "$Bsort1" is not available at
/home/koha/src/reports/reserves_stats.pl line 344.
Variable "$Bsort2" is not available at
/home/koha/src/reports/reserves_stats.pl line 350.
Variable "@patron_categories" is not available at
/home/koha/src/reports/reserves_stats.pl line 356.

The lazy way to fix that is that reinit them from the subroutines they
are used.

Test plan:
Execute the report, after this patch applied you won't see the error in
the log.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f66cc4dfcca243e6210c3323586efbfbd6cfe0cd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1ade46e5a4928ffd8ae4080b0f0f09c0b564ed13)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17085 - Specify libmojolicious-perl min version
Mirko Tietgen [Tue, 9 Aug 2016 10:58:47 +0000 (12:58 +0200)]
Bug 17085 - Specify libmojolicious-perl min version

Set min version for libmojolicious-perl to 6.0 and regenerate debian/control

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 53f8916fe70f9401923872b7fcd05f63a1e5fdf1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3b038239a56abc645eaa4787268b71a7b6603a5a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17316: Do not display the list's name if the user does not have permission -...
Jonathan Druart [Tue, 20 Sep 2016 09:03:42 +0000 (10:03 +0100)]
Bug 17316: Do not display the list's name if the user does not have permission - Staff

Same as previous patch but for the staff interface

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d26cda6f9e7e52bb899717ffe5f84c31b46feefc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4e06090d8b0594d99da04824d239bcfa343f5e9c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17316: Do not display the list's name if the user does not have permission -...
Jonathan Druart [Tue, 20 Sep 2016 08:55:25 +0000 (09:55 +0100)]
Bug 17316: Do not display the list's name if the user does not have permission - OPAC

At the OPAC, if a user manipulate the URL to show a list (s)he is not
allowed to view, the list's name will be displayed anyway.

Test plan:
- Create a private list with user A
- Copy the op=view URL and access it with user B logged in
=> Without this patch, you will see the rss icon, the list's name and
the "add list" button
=> Without this patch, only the "unauthorized" box will be displayed

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 31ca4849efd5539c6b287047ce2da560be7e1c53)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d46322c7cd30f6be6c6589de79577b720a408d3b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16800: Fix XSS in additem.pl
Jonathan Druart [Wed, 14 Sep 2016 08:20:01 +0000 (09:20 +0100)]
Bug 16800: Fix XSS in additem.pl

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9734726846f6fa652d88c8bc39c7b43595422465)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5a4a65cdbbf2f6cabd5b0979e4c5e969eb66e0fb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16800: Fix XSS in catalogue/*detail.tt - isbn
Jonathan Druart [Tue, 2 Aug 2016 15:05:09 +0000 (16:05 +0100)]
Bug 16800: Fix XSS in catalogue/*detail.tt - isbn

Test plan:
catalogue a bibliographic record with a isbn=
  </title><script>alert('XSS')</script>

Go on the detail pages.
=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 13705e51084f605a0e9fc686e7ee30350fb556e2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16800: Fix XSS in catalogue/*detail.tt - author
Jonathan Druart [Tue, 2 Aug 2016 15:03:37 +0000 (16:03 +0100)]
Bug 16800: Fix XSS in catalogue/*detail.tt - author

Test plan:
catalogue a bibliographic record with a author=
  </title><script>alert('XSS')</script>

Go on the detail pages.
=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3169434cfa7295025e4ff5fea58f7e9730a96650)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4ab091d3bfd2c6659320cbe80d35b805cff3aa4e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16800: Fix XSS in catalogue/*detail.tt - title
Jonathan Druart [Tue, 2 Aug 2016 15:02:07 +0000 (16:02 +0100)]
Bug 16800: Fix XSS in catalogue/*detail.tt - title

Test plan:
catalogue a bibliographic record with a title=
  </title><script>alert('XSS')</script>

Go on the detail pages.
=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This of course means that any html in the title will no longer be
evaluated. :

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 515208d5ec308ade967efe04388bbedbf5f2b057)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c27216cce84fe07c962a8878be51025c9fe0aace)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoIncrement version for 3.22.11 release v3.22.11
Julian Maurice [Fri, 23 Sep 2016 06:57:52 +0000 (08:57 +0200)]
Increment version for 3.22.11 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoUpdate release notes for 3.22.11 release
Julian Maurice [Fri, 23 Sep 2016 07:14:31 +0000 (09:14 +0200)]
Update release notes for 3.22.11 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoTranslation updates for Koha 3.22.11
Julian Maurice [Fri, 23 Sep 2016 10:40:34 +0000 (12:40 +0200)]
Translation updates for Koha 3.22.11

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17121 - debian/control.in update: change maintainer for 3.22.x
Mirko Tietgen [Sat, 13 Aug 2016 11:45:34 +0000 (13:45 +0200)]
Bug 17121 - debian/control.in update: change maintainer for 3.22.x

Changing the package maintainer and removing a whitespace in
debian/control.in.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17262: Inject MEMCACHED_* variables into Plack's env
Tomas Cohen Arazi [Tue, 6 Sep 2016 19:45:36 +0000 (16:45 -0300)]
Bug 17262: Inject MEMCACHED_* variables into Plack's env

This patch adds two functions to koha-functions.sh to read the
MEMCACHED_* variables from configured instances' apache files (the only
source for that info for now).

It then tweaks koha-plack's start_plack() function so it exports the
variables to env before launching starman.

The patch seems trivial, but it highlights a bigger problem with our
Plack integration as the starman server seems to hang if those
environment variables are defined!

Sponsored-by: ByWater Solutions
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 29df6161ef24e29984d5379640faad24d0e73161)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17010: Fix syntax error (RMaint followup)
Julian Maurice [Fri, 16 Sep 2016 12:07:28 +0000 (14:07 +0200)]
Bug 17010: Fix syntax error (RMaint followup)

8 years ago3.22.10 debian control fixes for debian package
Mirko Tietgen [Fri, 26 Aug 2016 08:50:18 +0000 (10:50 +0200)]
3.22.10 debian control fixes for debian package

This is what went into the 3.22.10 package, should go in 3.22.11

https://bugs.koha-community.org/show_bug.cgi?id=16788

8 years agoBug 17266 - Update man page for koha-remove with -p
Magnus Enger [Thu, 8 Sep 2016 13:10:33 +0000 (15:10 +0200)]
Bug 17266 - Update man page for koha-remove with -p

Bug 9754 added the -p|--purge-all option to koha-remove, but this
was not documented in the man page. This patch fixes that.

To test:
Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-remove.xml
$ man -l koha-remove.8

Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a5806c21d0ab58cf2879cb26b1fe52ba4e4c2139)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 78ab4814f040dccca2b6db7da2cab7164b49ff90)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12629 - Software error when trying to merge records from different frameworks
Kyle M Hall [Wed, 23 Jul 2014 16:43:54 +0000 (12:43 -0400)]
Bug 12629 - Software error when trying to merge records from different frameworks

Test Plan:
1) Choose a bib record that has the default framework.
2) Add a second record using that fast add framework.
3) Merge the records; switch to "Using framework: Default", and choose the original record (i.e. the one that had the default framework) as the merge reference. Clicking 'Next' will trigger the error.
4) Apply this patch
5) Repeat steps 1 - 3, no error should occur

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e8fcc651a3aa9af9d1a49a6cec64fc9bde737a86)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0b4d68f0601a494c00b19d14c5af970ff04a0122)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are...
Olli-Antti Kivilahti [Thu, 19 May 2016 14:12:06 +0000 (17:12 +0300)]
Bug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are removed.

REPLICATE ISSUE:

1. Map biblio.frameworkcode to 999$b
2. Map biblio.biblionumber to 999$c
3. Add a record with something in 999$b
4. 999$b is removed by C4::Biblio::AddBiblio()

After this patch, the field used by biblio.biblionumber or biblioitems.biblioitemnumber
is not removed and created anew, thus dropping all existing additions.

There is no point in dropping the field in any case, since we can just replace
the existing subfields in-place with no need to recreate the whole field.

UNIT TESTS INCLUDED

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a9eb4005811882da0eb5e20b52861a3c85556dff)
(cherry picked from commit 26ccb6a4809154368e02e5c147414fc7a19d31be)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17010 [Follow-up] Canceling a hold awaiting pickup no longer alerts librarian...
Owen Leonard [Tue, 9 Aug 2016 16:56:46 +0000 (12:56 -0400)]
Bug 17010 [Follow-up] Canceling a hold awaiting pickup no longer alerts librarian about next hold

This patch makes a minor change to the markup to make the button in the
confirmation dialog conform to the appearance of similar buttons.

To test, follow the original test plan for this bug and verify that the
"OK" button in the dialog looks correct.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2e79c211db318969b7c9d5ff538dfd54ba1aaed2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d9006fd602a8ac472bd9ce38422d82e2b65dd7ec)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17010 - Canceling a hold awaiting pickup no longer alerts librarian about next...
Kyle M Hall [Mon, 1 Aug 2016 14:17:04 +0000 (07:17 -0700)]
Bug 17010 - Canceling a hold awaiting pickup no longer alerts librarian about next hold

In previous versions of Koha, if a hold canceled from the "Holds over" tab had other holds on it,
the librarian would be alerted with the message "This item is on hold for pick-up at your library"
and directed to check it in to fill the next hold. This no longer happens.

Test Plan:
1) Apply this patch
2) Find a hold that has been waiting too long
3) Cancel that hold via waitingreserves.pl
4) Note you get the message "This item is on hold for pick-up at your library"
5) Confirm the ok button redirects you to the correct tab

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b80a18ee2f059309a78087e48b9464d2352d444f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 40e667cd210b57061ca771caa38a4f6a14c22268)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17114: Fix XSS in picture-upload.pl
Jonathan Druart [Fri, 12 Aug 2016 09:42:28 +0000 (10:42 +0100)]
Bug 17114: Fix XSS in picture-upload.pl

To reproduce:
1/ cp your_image.jpg 'test<svg onload=alert(1)>.jpg'
2/ Use the upload picture tool to upload this file
=> Without this patch, the alert is show
=> With this patch, the filename is correctly displayed and no alert

Note that the cardnumber var was not escaped neither, it's now.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit da03dbd458c59da0b9213efacd3425e89b453332)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0fba9c17c9154379430119646c3571f09d986948)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16554: rewrite mandatory and sample data - de-DE
Bernardo Gonzalez Kriegel [Wed, 25 May 2016 01:14:13 +0000 (22:14 -0300)]
Bug 16554: rewrite mandatory and sample data - de-DE

More changes to de-DE files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9261fb4f5bd6fd4b25ce97de7be9262b3719544a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f37cbb96f2a24cc90619089033e7ec4074856a3d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16554: rewrite mandatory and sample data - it-IT
Bernardo Gonzalez Kriegel [Wed, 25 May 2016 01:25:56 +0000 (22:25 -0300)]
Bug 16554: rewrite mandatory and sample data - it-IT

More changes to it-IT files

Checked marc21 and unimarc files
unimarc_relatorterms.sql had bad encoding, others minor
errors

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit be4cd79aea6908e0c3bb13b032edaf7a15d2e66e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 6e4dbd3f9bf5dde4e700909a258d372ed008cb78)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16554: More i18n changes - en, es, nb and pl files
Bernardo Gonzalez Kriegel [Sat, 28 May 2016 15:54:30 +0000 (12:54 -0300)]
Bug 16554: More i18n changes - en, es, nb and pl files

Mostly fixes bad values in auth files ( '' -> 0 )

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6dc2f1ae7c8e60534b4d6dec979c96034aa17f5d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 25e314bee58af8f0f3fdc4dcd2137378241545d2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16554: rewrite mandatory and sample data - pl-PL
Bernardo Gonzalez Kriegel [Wed, 25 May 2016 02:31:25 +0000 (23:31 -0300)]
Bug 16554: rewrite mandatory and sample data - pl-PL

More changes to pl-PL files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 28191a538b8f3bed698f1e67acca156c5b64ebea)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 9d11edefeabbe509e45d8fac7064f5e106533c50)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16554: rewrite mandatory and sample data - nb-NO
Bernardo Gonzalez Kriegel [Wed, 25 May 2016 02:30:14 +0000 (23:30 -0300)]
Bug 16554: rewrite mandatory and sample data - nb-NO

More changes to nb-NO files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4742f1035b9748dd869653f1c608fff1408353f9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a05c4d11de6cf8532ff926873ce84c94cba58019)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16554: rewrite mandatory and sample data - es-ES
Bernardo Gonzalez Kriegel [Wed, 25 May 2016 01:22:24 +0000 (22:22 -0300)]
Bug 16554: rewrite mandatory and sample data - es-ES

More changes to es-ES files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8cfa6f633a1be9a12a3a98524b05fae47fb4aa02)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit fd02ef7fc26945d0ffd3ed01ff3b716ebaa79270)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16554: Fix I18N sample files
Bernardo Gonzalez Kriegel [Thu, 19 May 2016 01:59:27 +0000 (22:59 -0300)]
Bug 16554: Fix I18N sample files

Needs Bug 13669

This patch fix web installer for
de-DE, es-ES, fr-CA, nb-NO and pl-PL

To test:
1) Apply patch
2) Try web installer for any/all listed languages.
a) de-DE, es-ES, fr-CA and pl-PL
There must be no problems for marc21 + all sample files
b) nb-NO
There must be no problems for normarc + all sample files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e38cad45e8ef2df88dc4a2c8345ac1d92f8dd8e8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 884e877be398cf684988f90ea9fb42639fadcc0e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16554: Fix fr-FR sample files
Bernardo Gonzalez Kriegel [Thu, 19 May 2016 02:55:41 +0000 (23:55 -0300)]
Bug 16554: Fix fr-FR sample files

Needs Bug 13669

Rewrite autorites_norme_unimarc.sql to
use only one INSERT IGNORE.

New load method complains about duplicate keys,
and both auth files are mandatory!

Also removed blank space from sample_labels.sql

Tested with unimarc_complet and all sample files.

To test
1) Apply the patch
2) Try fr-FR web installer, unimarc_complet + all sample files
There must be no errors

Don't know if fr-FR marc21 and unimarc_lecture_pub are used,
need a look from french users.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b5ae31e7fdcdd932d1475e30fa73fba15c2b2815)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ad9d0a3beb612cf69bf80d4ca5f1cbbd05641efd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17281 Warning when saving subfield structure
Frédéric Demians [Fri, 9 Sep 2016 06:06:19 +0000 (08:06 +0200)]
Bug 17281 Warning when saving subfield structure

TO TEST:

1. Home > MARC Framework > Default > Actions > MARC structure
2. On 073 field (for example), click Edit
3. Click on Edit subfield button
4. Click on Save changes
5. Take a look in intranet logs. You find:
   Use of uninitialized value in string eq at
   ../admin/marc_subfields_structure.pl
6. Apply the patch, and repeat steps 3-5
   => no more warning in log

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 259679e9dece15b69b216b8e39f8e4ebd0b58800)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit cdf0c5dc16de28d9b8df1858aa0d0139a425b86f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16311: Update DB rev (3.22.10.001)
Frédéric Demians [Mon, 12 Sep 2016 09:08:27 +0000 (09:08 +0000)]
Bug 16311: Update DB rev (3.22.10.001)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16311 - Advanced search language limit typo
Andreas Roussos [Fri, 9 Sep 2016 16:46:33 +0000 (19:46 +0300)]
Bug 16311 - Advanced search language limit typo

In the OPAC -> Advanced Search, the Language drop down menu incorrectly
lists Romanian as "Român (Romanian)" while the correct value (as reported
by Barry Cannon) is "Română (Romanian)".

This patch fixes that:
a) for _new_ installations by modifying
   installer/data/mysql/mandatory/subtag_registry.sql (loaded by the web
   installer when koha is installed), and also
b) for _existing_ installations by adding an atomicupdate file in
   installer/data/mysql/atomicupdate/

Test plan:
1) In the OPAC, go to Advanced search (cgi-bin/koha/opac-search.pl).
2) In the 'Language' drop down menu, observe that the value for Romanian
   is "Român (Romanian)".
3) Apply the patch, and run installer/data/mysql/updatedatabase.pl.
4) Refresh the Advanced search page in the OPAC. Confirm that the patch
   worked, i.e. the Language drop down menu lists Romanian as
   "Română (Romanian)" (notice the added 'ă').

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc9279774f69e8eb10e9d26202b43252fc777f28)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit eceb09a8a3a96d3481de62464e5f95c1aea8d548)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 6852 [QA Followup] - Tidy AddItem
Kyle M Hall [Mon, 12 Sep 2016 08:58:02 +0000 (08:58 +0000)]
Bug 6852 [QA Followup] - Tidy AddItem

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 989904c7ab0a24ddbe29264671fc8b5ebb175af2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 8f165d2357ff8c1b2c364cca1224c04eee324006)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 6852: Staged import reports wrong success for items
Marcel de Rooy [Thu, 8 Sep 2016 10:06:05 +0000 (12:06 +0200)]
Bug 6852: Staged import reports wrong success for items

If we import items that have a wrong branch code, the items will not
be imported but manage-marc-import reports them as imported. (A wrong
branch code probably occurs most, but other causes are possible too.)

The underlying cause is that AddItem does not look at the error
returned from _koha_new_item in Items.pm.

This patch deals with that omission in the most economical way. It adjusts
AddItem so that it returns undef if no item was added.
In ImportBatch.pm I check if an item was added and adjust the totals
accordingly instead of just always counting them.

Note: Several scripts like additem.pl use AddItemFromMarc to call
AddItem. They do not report an error, but fail silently. With this patch,
these scripts get undef and will still fail silently. (No change.)
Adding error checks around calls of AddItemFromMarc is outside the scope of
this report. Here we are taking care of correct imported item numbers.

Test plan:
[1] Verify that additem.pl still works by adding a new item.
[2] Run t/db_dependent/Items.t
[3] Add a new branchcode, say XXX.
[4] Pick a biblio record with a few items (n) and set one item to branch XXX.
[5] Export this biblio with items to a MARC file.
[6] Change the XXX item to the original branch and remove branch XXX.
[7] Import the MARC file. Verify that one item was not imported and that
    the number of imported items reflects that (equals n-1).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 48aba1533c7c55ed0f4b9e528ceccc9e0dd3d795)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 9aee97978e3edc949d1827d7aeaf75df58e4f9e9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16950: Serials subscriptions advanced search shows '0 found' pre-search
Aleisha [Wed, 20 Jul 2016 23:39:42 +0000 (23:39 +0000)]
Bug 16950: Serials subscriptions advanced search shows '0 found' pre-search

To test:
1) Go to Serials
2) Click Advanced Search in the toolbar at the top
3) Notice heading says Serials subscriptions (0 found) before a search has even happened
4) Apply patch and click Advanced Search again
5) Heading should now say Serials subscriptions search
6) Submit search
7) Heading should say how many subscriptions your search found (like before)

Sponsored-by: Catalyst IT
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 031219935c41643734de7836ed86b59ed6be5fd1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 65b9766a0a3f1a3e9cdb19ea3c4223ab1cac6828)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17220: Change hold confirmation string from 'Place hold' to 'Confirm hold'
Lee Jamison [Mon, 29 Aug 2016 20:24:49 +0000 (16:24 -0400)]
Bug 17220: Change hold confirmation string from 'Place hold' to 'Confirm hold'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 80981941256bab8ea5f921b7411d254c918e6b3a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b3dd22c09bcf68b3b2b7e1c7c3b9d63dffa4ab60)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16822: Make koha-common call koha-plack without --quiet
Tomas Cohen Arazi [Tue, 26 Jul 2016 13:23:43 +0000 (10:23 -0300)]
Bug 16822: Make koha-common call koha-plack without --quiet

This patch removes the --quiet option switch in koha-common.init so
problem information is not hidden for sysadmin users.

To test:

- Have plack enabled for a koha instance:
  $ sudo koha-plack --enable kohadev
  $ sudo koha-plack --start  kohadev
- Run:
  $ cd kohaclone
  $ debian/koha-common.init {start|stop|restart}
=> SUCCESS: No behaviour change
- Disable the 'cgi' apache module:
  $ sudo a2dismod cgi
- Run:
  $ debian/koha-common.init {start|stop|restart}
=> FAIL: No warning is shown
- Apply the patch
- Run:
  $ debian/koha-common.init {start|stop|restart}
=> SUCCESS: Warnings show up
- Sign off :-D

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Perfect thanks :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit eaa11da5624f308768c4eb2c7016b5cd32c35fb1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 14cec5d6b9e680b30743f78dca87251d31df3c93)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17267 - Document koha-create --adminuser
Magnus Enger [Thu, 8 Sep 2016 12:55:58 +0000 (14:55 +0200)]
Bug 17267 - Document koha-create --adminuser

A description of --adminuser was missing from debian/docs/koha-create.xml
This patch adds a description in the Options section, as well as under
DEFAULTSQL in the list of configuration variables.

To test:
Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-create.xml
$ man -l koha-create.8

Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Edited commit message to fix typo - koha-mysql -> koha-create as that's what we're testing. :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f31d3175b3f00dde49fced00e169cd2ea3cabcf5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit df2e2ff2235cb141b1d84a10b74796e715bcbef6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17152: Do not copy value when duplicating a subfield
Hector Castro [Wed, 31 Aug 2016 19:33:53 +0000 (13:33 -0600)]
Bug 17152: Do not copy value when duplicating a subfield

When cataloguing, if you want to duplicate a subfield that is not
empty, the new subfield is created with a copy of data in it.
This is not the case when you duplicate an whole field. The new one is
created with subfields but without data in it.

Test plan:
Add or edit a bibliographic record
Fill a subfield
Duplicate the subfield
=> Without this patch the value of the input will be copied
=> With this patch the new input will be emptied

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 451fd67dd15b967471983c7c8dc601e0d1f65228)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 71b81ae6d63089fc22a24157942426346d54c034)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17072: 006 not filling in with existing values
Jacek Ablewicz [Thu, 1 Sep 2016 16:13:50 +0000 (18:13 +0200)]
Bug 17072: 006 not filling in with existing values

When you use the 006 builder to view the existing values in the 006
tag, Koha is not pulling these existing values into the builder
window. Instead, Koha appears to be using defaults.

To reproduce:

1. Open a record in the editor
2. Switch from BKS to another material type.
3. Change as many settings as possible.
4. Close plugin.
5. Reopen plugin - notice your selections are not shown.

Trivial patch, heavilly inspired by Bug 9093.

To test:

1. Apply patch
2. Ensure that issue described above is no longer reproductible

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a1fd726157c5857ecde1b66e79284f48142be7e5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b473e0791f97f731c4639de76905b4a8f592c928)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17175: Typo in patron card images error message
Aleisha Amohia [Wed, 24 Aug 2016 00:16:43 +0000 (00:16 +0000)]
Bug 17175: Typo in patron card images error message

To test:
1) Go to Tools -> Patron Card Creator -> New Image
2) Click Upload without attaching anything
3) Notice typo
4) Apply patch and refresh page (resend information if prompted)
5) Notice typo fixed

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ea13ea00830a8061842fa13b6110e0a4e75aa444)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2279c2b64e1c26c5221d92727e3f4d7c0bfe1b9a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17185: Staff client shows "Lists that include this title:" even if item is not...
Andreas Roussos [Wed, 24 Aug 2016 14:10:29 +0000 (17:10 +0300)]
Bug 17185: Staff client shows "Lists that include this title:" even if item is not in a list

In the staff client, the text "Lists that include this title:"
is always shown, regardless of whether the item is in a list
or not. This patch fixes that.

Test plan:
1) Log in to staff client.
2) Go to biblio details view:
   /cgi-bin/koha/catalogue/detail.pl?biblionumber=X
   Confirm that "Lists that include this title:" is
   shown even if the item is not in a list.
3) Apply the patch.
4) Repeat step 2. Confirm that the patch works, i.e.
   "Lists that include this title:" is only shown
   for biblios that are actually in a list.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Only applies to non-XSLT view.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit add90157eb859143dc782fded4b00a47a39d8abe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 551067f89c251420c6704ec262e4915782105c47)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16809: Follow-up for scalarizing biblionumber
Marcel de Rooy [Wed, 17 Aug 2016 13:14:12 +0000 (15:14 +0200)]
Bug 16809: Follow-up for scalarizing biblionumber

Still resolves another multi_param warning.

Test plan:
Look at your logs before and after this patch when saving a biblio
record (you may have to start plack again).
If your biblionumber is mapped to 999c, you should no longer have a warn
about line 2563 (disclaimer: line numbers are subject to change).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 377feb9cdf5b4d490dee7640b50c374e28f4550f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b7b48eda3f973c9eee3b91d024c04c78c2ddb547)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16809: Silence authority warnings C4::Biblio::TransformHtmlToMarc
Mark Tompsett [Fri, 24 Jun 2016 15:29:19 +0000 (11:29 -0400)]
Bug 16809: Silence authority warnings C4::Biblio::TransformHtmlToMarc

Most of the floodiness is caused by accessing the cgi parameters
in a context which is hard to determine. By purposefully saving
the value to a scalar variable and using the variable, the issue
disappears, and it will likely be a tiny tad faster as variable
access is faster than multiple function calls.

TEST PLAN
---------
 1) Back up your intranet error log
    -- for example:
       cp ~/koha-dev/var/log/koha-error-log ~/koha-error-log.backup
 2) Blank your intranet error log
    -- for example:
       echo > ~/koha-dev/var/log/koha-error-log
 3) Log into your staff client
 4) Click 'Authorities'
 5) Click 'New from Z39.50'
 5) Type 'Seuss' into 'Name (any):' and press enter
 6) Click 'Import' beside the first link
 7) Click 'Save'
 8) Check your koha-error-log
    -- floody!
 9) Apply patch
10) repeat steps 2-8
    -- blank!
11) restore your intranet error log
   -- for example:
      mv ~/koha-error-log.backup ~/koha-dev/var/log/koha-error-log
12) run koha qa test tools

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with addbiblio.pl. I would have preferred the scalar option in terms
of simpler code, but this works too.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 28ad0ab51321955878082d363be2210589a8261f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4cabeda007ddb062f60a2c05f69f29a919acbcdf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Conflicts:
C4/Biblio.pm

8 years agoBug 14612 - Overdue notice triggers should show branchname instead of branchcode
Owen Leonard [Thu, 18 Aug 2016 17:08:33 +0000 (13:08 -0400)]
Bug 14612 - Overdue notice triggers should show branchname instead of branchcode

This patch adds the Branches template plugin to the overdue notice
triggers template so that the library name can be shown instead of the
branchcode.

Also changed: Updated page title to match the name used in tools menus.

To test, apply the patch and go to Tools -> Overdue notice/status
triggers.

- Select a library.
- When the page reloads, the 'Defining overdue actions for...' and
  'Rules for overdue actions: ' headings should show the library name
  instead of the branchcode.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ead7b938d8da426798eb7337aa1b623fa545da5c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b711695552e293ddf8f649b12122297c688ced73)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt

8 years agoBug 16464: Add FIXME
Jonathan Druart [Tue, 23 Aug 2016 13:17:53 +0000 (14:17 +0100)]
Bug 16464: Add FIXME

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 931ed0ec9bbad4baa18547d361e2bed52140b637)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 41f7626fe591a46d790b65c39aead7e28157dfad)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16464 - If a patron has been discharged, show a message in the OPAC
Owen Leonard [Tue, 9 Aug 2016 13:49:33 +0000 (09:49 -0400)]
Bug 16464 - If a patron has been discharged, show a message in the OPAC

This patch adds a message to the patron home page in the OPAC to be
shown if the user is restricted because of a discharge.

To test, apply the patch and log into the OPAC as a patron who has been
discharged.
 - You should see a message which says so, including a link to
   the discharge notice.
 - Log in to the OPAC as a patron with a manual restriction and confirm
   that the correct notice is displayed.

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e67fc1806cbcb9fbe038b67ad0862f3f163a4313)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit fa4171ce58fe7be54eb404d2e0d06edafb698954)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Conflicts:
opac/opac-user.pl

8 years agoBug 17228 - Make two versions of SIPconfig.xml identical
Magnus Enger [Wed, 31 Aug 2016 08:47:43 +0000 (10:47 +0200)]
Bug 17228 - Make two versions of SIPconfig.xml identical

Several bugs have made changes to etc/SIPconfig.xml but not
updated debian/templates/SIPconfig.xml. This means that an admin
using the Debian packages who enables SIP2 for a site and looks at
/etc/koha/sites/<instance>/SIPconfig.xml will not see an up-to-date
version of that file, with the risk of missing possible config
opportunities.

Since debian/templates/SIPconfig.xml contains no placeholders or
other magic stuff related to the Debian packaging, this patch simply
copies etc/SIPconfig.xml to debian/templates/SIPconfig.xml

To test: diff etc/SIPconfig.xml debian/templates/SIPconfig.xml
There should be no difference between the files

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d0d8bd18225483c3c28ba9e0bd368301c6835a66)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 35133dabed2d8f929617ed002bdf9d88eb295300)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17228 - Fix whitespace in etc/SIPconfig.xml
Magnus Enger [Wed, 31 Aug 2016 08:45:32 +0000 (10:45 +0200)]
Bug 17228 - Fix whitespace in etc/SIPconfig.xml

Remove trailing whitespace and replace tabs with 4 spaces.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cb72420b4672ec41ebaeb9a51b6387e6f8bb5313)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d5ac9eb197527114a0d980db3e691884aea21ea8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14434: Display "Not renewable (on hold)" in OPAC
Holger Meißner [Thu, 11 Aug 2016 09:22:00 +0000 (11:22 +0200)]
Bug 14434: Display "Not renewable (on hold)" in OPAC

This patch makes the OPAC display "Not renewable (on hold)" when
a hold is placed.

Test plan:
1) Do not apply patch.
2) Issue an item with automatic renewal.
3) Issue an item with manual renewal.
4) Place a hold on both items.
5) Log in as patron and note that the column "Renew" says "Automatic
   renewal (x of y renewals remaining)" for the auto renewed item
   and "(On hold) for the other item.
6) Apply patch.
7) Refresh OPAC and note that now "Not renewable (on hold)" is displayed
   for both items.
8) Cancel the holds, then log in as patron again and confirm that the
   correct renewal conditions are displayed.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 77b03f1e8b2afe0e9063b06785a0eb468fb029ed)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 930b32bc479628b9d8cb57ec73a5f1d22a4207e1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16990: Display branch names instead of code in patron mod requests
Jonathan Druart [Fri, 19 Aug 2016 11:43:24 +0000 (12:43 +0100)]
Bug 16990: Display branch names instead of code in patron mod requests

To test:
- change your homebranch in the OPAC, submit
- change patron modification request in the staff client
- Verify that it shows the old and new branch name instead of the
  code

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3f585d44e8f5f04b47a9f949dc6dcd8a1b3cbf7a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1147fe4c0faef00006bd6d1d2caf66c308001e99)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17128: Make summary-print.pl plack safe
Jonathan Druart [Mon, 15 Aug 2016 14:45:38 +0000 (15:45 +0100)]
Bug 17128: Make summary-print.pl plack safe

$borrowernumber is used in build_issue_data but not correctly defined
(Variable "$borrowernumber" is not available)

That may cause wrong charge displayed in the summary slip.

Test plan:
- Set rental charge for an item type
- Define a rental discount for that item type in the circ rules
- check in an item matching this rule
Without this patch the charge displayed in the summary slip won't be
calculated with the discount
With this patch applied, the warning in the logs will no longer appear
and the values will be correctly calculated.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2cf1e97e5cb6531f0d1d504dda35a836d86466c2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ade3ffb5ac38f675ea96a9119ff14ca15d48f9dc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16886: Make the 'Upload patron images' tool plack safe
Jonathan Druart [Sat, 9 Jul 2016 12:13:35 +0000 (13:13 +0100)]
Bug 16886: Make the 'Upload patron images' tool plack safe

Some vars are accessed from subroutine, but defined with my.
It causes at least the 2 followings errors:
Variable "$filetype" is not available at
/home/koha/src/tools/picture-upload.pl line 240.
Variable "$uploadfilename" is not available at
/home/koha/src/tools/picture-upload.pl line 241.

To avoid that, they are now declared with our.

Test plan:
Upload image for a patron and confirm that you get a "Result" table and
the errors do not longer appear in the logs.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 762415a2ff18e5a1b783f8eff2275e7d47216343)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4cf4751c08edb6830714cc6dd3408ccb089756cd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17200 - Badly formatted "hold for" patron name on catalog detail page
Owen Leonard [Thu, 25 Aug 2016 18:06:11 +0000 (14:06 -0400)]
Bug 17200 - Badly formatted "hold for" patron name on catalog detail page

This patch adds a space between first name and surname on the
bibliographic detail page when there is "hold for" information in the
status column of the holdings table.

To test, apply the patch locate a title in the staff client catalog
which has one or more confirmed holds on it. Verify that the patron's
name in the "status" column of the holdings table looks correct, with a
space between first and last name.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f17b491f357267aa037480593158b13c426051ab)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c364afd2aa9da8455853c7481c620e0cbef599c3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 11019 - Require some fields when adding authorized value category
Owen Leonard [Thu, 18 Aug 2016 15:58:42 +0000 (11:58 -0400)]
Bug 11019 - Require some fields when adding authorized value category

This patch modifies the form for adding an authorized value so that
the category is a required fields.
Previously a new authorized value category could be saved with no data.

To test, apply the patch and go to Administration -> Authorized values.

- Click the "New category" button.
- Click the save button without filling in the category.
  You should be prevented from submitting the form.
- Verify that filling in the required field allows the form to be
  submitted.
- Perform the same test when editing an existing authorized value.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Follow-up for QA: Allow a blank authorised value to be created.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Amended test plan.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a5b0aa20e553d7444778b2ca3d90c6e067d6fce1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5b1b87455760702428a1e53f832dd3b2f109707b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13921 - XSLT Literary Formats Not Showing
Owen Leonard [Fri, 19 Aug 2016 14:08:38 +0000 (10:08 -0400)]
Bug 13921 - XSLT Literary Formats Not Showing

This patch adds some missing literary formats to the staff client and
OPAC's search results XSLT display.

To test you must have DisplayOPACiconsXSLT and DisplayIconsXSLT system
preferences enabled.  XSLTResultsDisplay and OPACXSLTResultsDisplay
should be set to 'default.'

Perform searches in the staff client and the OPAC and confirm that the
following literary forms (defined in 008 position 33) display correctly:
Not fiction; Fiction; Dramas; Essays; Novels; Humor, satires, etc.;
Letters; Short stories; Mixed forms; Poetry; Speeches.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8850540deafc471b9b356e35ae67780a51829271)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit bb166e9b1af08e3834c4adb1f2e6175cf6003d5d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17157: Same for "More"
Jonathan Druart [Mon, 22 Aug 2016 12:48:59 +0000 (13:48 +0100)]
Bug 17157: Same for "More"

Here I decided to redirect to the mainpage.

Works as dexcribed.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bfc72c91849b75a7ab4349f5d6a6798f3c6d0814)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 659bdfa5ab03dcc3b4fad72b98962aae76b9abf6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17223 Follow-up: updated control file
Mirko Tietgen [Tue, 30 Aug 2016 18:20:17 +0000 (20:20 +0200)]
Bug 17223 Follow-up: updated control file

This is the control file change for the master branch triggered by
the first patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1133d318c422d7fdfa4b1b093988e373ebb71222)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b482539104dad7be4974fdad453015d32c9a7c1b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17223: Add Cache::Memcached to PerlDependencies
Marcel de Rooy [Tue, 30 Aug 2016 13:52:16 +0000 (15:52 +0200)]
Bug 17223: Add Cache::Memcached to PerlDependencies

Test plan:
Check about page, perl modules.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2be60d395fe2062b503c0ae0cf96f7b0428881b7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a4625d96a72075f9427789f81348fa857bdd88cd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 11144 [QA Followup] - Let each script run in sequence even if one fails
Kyle M Hall [Fri, 24 Jun 2016 15:18:04 +0000 (15:18 +0000)]
Bug 11144 [QA Followup] - Let each script run in sequence even if one fails

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested the A;B;C variant here. If A fails, B will run. Since we can safely
assume that A (or B) will not fail on a daily basis, this seems to be better
than running them in the wrong order every day.

As the comments on Bugzilla show, several people support this improved
(reordered) scheme and look forward to improved error handling on another
report (obviously not that simple).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 30a0df493dc35e3aa9186f3b3c4c212d3b396a65)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 980650583d49a730e49753c19f1c0acae8751251)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 11144: Fix sequence of cronjobs: automatic renewal - fines - overdue notices
Katrin Fischer [Tue, 9 Jun 2015 21:13:15 +0000 (23:13 +0200)]
Bug 11144: Fix sequence of cronjobs: automatic renewal - fines - overdue notices

The patch changes the sequence of cronjobs in the crontab example
file and in the cron.daily file of the packages.

This is why:
1) Renew automatically
   ... only when we can't renew, we want to
2) Calculate fines
   ... once the fine are calculated and charged
   we can print the amount into the
3) Overdue notices

Before the change it could happen that you'd charge for an item,
that would then be renewed. Or that you'd try to print fine
amounts into the overdue notices, when they would only be
charged moments later.

To test:
- configure your system so you have items that should
  - be charged with fines
  - renew automatically
- configure your crontabs according to the example file
  or switch the cron.daily in your package installation with
  the new one
- configure your overdue notices so that one should be generated
  <<items.fine>>
- Wait for the cronjobs or schedule them to run earlier
- Verify all is well and as it should be

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 596ddef3c33f675f9daad675512fb119f80a23fa)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 110dded2d1949851dc3e4314176cbf4c277f4711)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14390: [Follow-up] Only update FU record in UpdateFine
Marcel de Rooy [Tue, 23 Aug 2016 14:33:10 +0000 (16:33 +0200)]
Bug 14390: [Follow-up] Only update FU record in UpdateFine

Exclude O, F and M when outstanding == 0.
Check if the issue_id points to a FU record.

Note: We only warn now when we see a second FU record with this issue id.
That should be a rare exception. As before, we are just counting it in
our total. Added a FIXME.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested fine on overdue. Renewed and backdated for a second fine. The F
and FU can be seen on the Fines tab and are totaled on Check out.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fa48df281d68fe1d27cc6fb10b41e4504a70afb9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0894b24c3d6e7d915871bd56a22ff9a10741b7b9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Conflicts:
C4/Overdues.pm

8 years agoBug 14390 [QA Followup] - Fix warning
Kyle M Hall [Tue, 1 Dec 2015 17:59:25 +0000 (17:59 +0000)]
Bug 14390 [QA Followup] - Fix warning

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 59d2cd97573c2caa9142bdfdc2be328f9e865429)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a8e3c4a1a963fb16725eb9291d5ba8552662bb3c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14390 [QA Followup] - Unit Test
Kyle M Hall [Tue, 1 Dec 2015 16:53:03 +0000 (16:53 +0000)]
Bug 14390 [QA Followup] - Unit Test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 57e5c70ed4004fe501840db97cc4ffdd47687247)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 86830cf26309566350d06bff2bc52793a4e02fa6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14390 - Fine not updated from 'FU' to 'F' on renewal
Kyle M Hall [Fri, 6 Nov 2015 18:20:56 +0000 (13:20 -0500)]
Bug 14390 - Fine not updated from 'FU' to 'F' on renewal

Test Plan:
1) Find an overdue checkout with a fine
2) Renew item, note fine is not closed out (Account type F)
3) Apply this patch
4) Find another overdue checkout with a fine
5) Renew item, note fine is now correctly closed out
6) Backdate a checkout to be already overdue ( but not have a fine since
    fines.pl hasn't run yet )
7) Renew item, note a closed out fine is created

Signed-off-by: Sean Minkel <sminkel@rcplib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fe71eb0811a6271fff568ca6b599514a57ff3206)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 895bdb8b40a30a76dcccdfe5ed116e84f89ef227)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>