koha.git
7 years agoIncrement version for 3.22.7 release v3.22.07
Julian Maurice [Wed, 25 May 2016 10:31:06 +0000]
Increment version for 3.22.7 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoTranslation updates for Koha 3.22.7
Julian Maurice [Wed, 25 May 2016 11:40:42 +0000]
Translation updates for Koha 3.22.7

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoUpdate release notes for 3.22.7 release
Julian Maurice [Wed, 25 May 2016 10:48:55 +0000]
Update release notes for 3.22.7 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16499 [QA Followup] - Improve readability
Kyle M Hall [Mon, 23 May 2016 17:34:29 +0000]
Bug 16499 [QA Followup] - Improve readability

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 59c0d44792b0ce4f88c028be97a32a62fb4a8b36)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16499: Remove "Use of uninitialized value" warnings in circulation.pl
Jonathan Druart [Wed, 11 May 2016 14:05:59 +0000]
Bug 16499: Remove "Use of uninitialized value" warnings in circulation.pl

If you search for a patron in the circulation module, you get:

Use of uninitialized value $barcode in string eq at
/home/koha/src/circ/circulation.pl line 84.
Use of uninitialized value $restoreduedatespec in string eq at
/home/koha/src/circ/circulation.pl line 170.

Test plan:
- Search for a patron and confirm the warnings are not displayed anymore
- Make sure this patch does not introduce regression on bug 14015

Signed-off-by: Owen Leonard <oleonard@myacpl.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 208637165ee40b2fe7d103c787a1f4f93b55d49b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16550: Clean the tests
Jonathan Druart [Fri, 20 May 2016 16:32:30 +0000]
Bug 16550: Clean the tests

- replace ok with is
- remove diag
- replace $dbh->prepare->execute->fetchrow with $dbh->selectrow_array

And remove unecessary force to scalar context in pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 908fdb572ab90541ecf1700eb716eeb5c1399553)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16550: Add test to NewsChannels.t
Marc Véron [Fri, 20 May 2016 12:42:08 +0000]
Bug 16550: Add test to NewsChannels.t

To test: Run t/db_dependent/NewsChannels.t

Tests adding and retreiving a news item without expiration date.
This test should fail without patch for Bug 16550 and pass OK with patch.

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 521bfb082732c00e33843ee44cbb8ff2a2c1d56d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16550: Can't set opac news expiration date to NULL, it reverts to today
Marc Véron [Fri, 20 May 2016 10:19:36 +0000]
Bug 16550: Can't set opac news expiration date to NULL, it reverts to today

This patch fixes an issue with the expiration dates for news always reverting to today if empty.

To test:
- Apply patch
- Go to Home > Tools > News
- Create a news item, do not set expiration date
- Verify that expiration date stays empty
- Edit this news item
- Do not set expiration date
- Verify that expiration date stays empty
- Do the same with expiration dates
- Verify that they are saved properly

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 b5acde6513eeb9805a3f34a3dc6102038b3cf4cc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16516: Define the showListsUpdate JS function at the OPAC
Jonathan Druart [Fri, 13 May 2016 18:21:47 +0000]
Bug 16516: Define the showListsUpdate JS function at the OPAC

Bug 12233 removes the declaration of the showListsUpdate JS function for
the OPAC.
It results in a JS error (ReferenceError: showListsUpdate is not
defined) when a user tries to add selected titles to a list if no title
is selected.

Test plan:
Launch a catalogue search
Select a list in the "Select titles to" dropdown list
=> Without this patch you will get the JS error
=> With this patch you will get a JS alert "No item was selected"

Signed-off-by: Owen Leonard <oleonard@myacpl.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 c7ca98c8d9a2647f422f6446239ec67c91261aa1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16484 - Virtualshelves: Using no XSLTResultsDisplay breaks content display in...
Nick Clemens [Tue, 10 May 2016 00:33:15 +0000]
Bug 16484 - Virtualshelves: Using no XSLTResultsDisplay breaks content display in intranet

To test:
1 - Create a list in staff client
2 - Set XSLTResultsDisplay to blank
3 - View list, titles don't display
4 - Apply patch
5 - View list, titles display
6 - Set XSLTResultsDisplay to default
7 - View list, titles display as before patch

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6c0e8feb79513598c3837b1a8f6a35dba18a786f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16478: Fix checkout history tabs - intranet
Jonathan Druart [Mon, 9 May 2016 16:59:52 +0000]
Bug 16478: Fix checkout history tabs - intranet

Test plan:
Same as before for the intranet.
And please retest the OPAC => I have changed the filter's values to
match OPAC/intranet

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3c80b7c19e07ae2c19a45949d91b78ac339a30e9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16478: Translation breaks display of Checkout history in tab Checks / On-site...
Marc Véron [Mon, 9 May 2016 16:30:27 +0000]
Bug 16478: Translation breaks display of Checkout history in tab Checks / On-site-checkouts

To test:
- Make sure that syspref OnsiteCheckouts is enabled
- Log in to OPAC as a patron who has checkouts, online checkouts and checkout history enabled
- Go to 'your reading history' (in English)
- Display all three tabs
- Apply patch
- Reload page, display oll three tabs again, there should be no difference
- Examine source code changes to verify that the words 'checkout' and 'onsite' no longer
  will be exposed to translation.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 64c28e5c725ca3d7473abee71990a19fbd3a2a0d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15878 [QA Followup]
Kyle M Hall [Mon, 23 May 2016 17:49:02 +0000]
Bug 15878 [QA Followup]

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 12faa24f776c812a16174fd64a479484a0e53778)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15878 - C4::Barcodes::hbyymmincr inccorectly calculates max and should warn when...
Nick Clemens [Fri, 13 May 2016 18:03:37 +0000]
Bug 15878 - C4::Barcodes::hbyymmincr inccorectly calculates max and should warn when no branchcode present

Test plan:

1 - prove t/db_dependent/Barcodes.t
2 - All should pass
3 - Apply first patch (unit tests update)
    4 - Tests should fail on values and warnings
    5 - Apply second patch
    6 - All tests should now pass

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described
Removed tab on line 47 of C4/Barcodes/hbyymmincr.pm
No more qa 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 03f303ce534e3c1c04944010f8fc352eb32be2d2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15878 - Updated unit tests for hbyymmincr barcodes
Nick Clemens [Fri, 13 May 2016 18:02:33 +0000]
Bug 15878 - Updated unit tests for hbyymmincr barcodes

Test plan in second patch

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Bug 15878 - QA Followup

* Remove debug statment
* Move transcation start
* Remove unused testbuilder object

Rebased on top of 16561

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 48597577d63b6e4b35dcbf3c90b83179074ec44b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16517: Do not crash when creating a list with an existing name
Jonathan Druart [Fri, 13 May 2016 19:21:12 +0000]
Bug 16517: Do not crash when creating a list with an existing name

A typo has been made during a merge conflict when rebasing bug 16517.

it should be
  eval { Koha::Object->new->store; };
instead of
  eval { Koha::Object->new; }->store;

Test plan:
From the result list (intranet side), check some entries and add them to
a new list
Use an existing list's name
=> Without this patch you will get a server error (exception 'Duplicate shelf
object' raised by Koha::Virtualshelf->new->store)
=> With this patch you must get a friendly error message

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7dfc64022b8be63a10cb4c3f802d45a0b0f99973)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16505: <collection> is missing the marc namespace and updates fail if -x is passed
Tomas Cohen Arazi [Fri, 13 May 2016 14:51:54 +0000]
Bug 16505: <collection> is missing the marc namespace and updates fail if -x is passed

Using rebuild_zerba.pl with the -x option switch, produces an incorrect output in
terms of what our XSLTs expect for indexing. This patch introduces the right namespace information
on the exported records so indexing succeeds.

To test:
- On current master, have some records on your db
- Run:
  $ sudo koha-shell kohadev
  $ cd kohaclone
  $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x
=> you will get a message like this:

NOTHING cleaned : the export /tmp/NL5ufjUfpp has been kept.

- Run
  $ less /tmp/NL5ufjUfpp/biblio/exported_records
=> FAIL: The first line looks like this

<?xml version="1.0" encoding="UTF-8"?><collection><record

- Now run:
  $ xsltproc \
     /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
     /tmp/NL5ufjUfpp/biblio/exported_records
=> FAIL: No output
- Apply the patch
- Run:
  $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x
- Take a look at the result file:
  $ less /tmp/asdiouqwiue/biblio/exported_records
=> SUCCESS: The start of the file looks like this:
<?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim">

- Run:
  $ xsltproc \
     /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
     /tmp/asdiouqwiue/biblio/exported_records
=> SUCCESS: There is actually indexing data :-D
- Sign off :-D

Edit: I changed qq{} for q{} as suggested by Jonathan.

Sponsored-by: American Numismatic Society

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described following test plan
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 7a178fd262dfd88c11461247ec90f2e7ee676616)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16561 - Bug 15877 followup to fix tests
Nick Clemens [Sat, 21 May 2016 23:59:07 +0000]
Bug 16561 - Bug 15877 followup to fix tests

When I altered the tests to avoid accidental deletion of all items, I
didn't rollback the transaction, hence the tests now delete all items
from a db when run.

This patch rollsback the transaction so items are not deleted from your db

To test:
1 - Backup your db
2 - prove -v t/db_dependent/Barcodes.t
3 - Note that all items and issues are deleted from the DB
4 - Restore your DB
5 - Apply this patch
6 - prove -v t/db_dependent/Barcodes.t
7 - Your DB should eb unchanged

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ff898e88330d4572daac241d4a480f616fd0dcc7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15877 - Unit tests
Nick Clemens [Wed, 24 Feb 2016 17:56:23 +0000]
Bug 15877 - Unit tests

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit cbe3dedc4f91a91e40f9e648c9de2358c68379cb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15877 - C4::Barcodes does not correctly calculate db_max for 'annual' barcodes
Nick Clemens [Wed, 24 Feb 2016 17:10:02 +0000]
Bug 15877 - C4::Barcodes does not correctly calculate db_max for 'annual' barcodes

This patch alters the MySQL query to remove a max statement which
incorrectly groups full annual barcodes with numeric values.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit a3557fd0f25371246445ff2e327eaa5df5bf6e8f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16539: Add tests
Jonathan Druart [Wed, 18 May 2016 14:01:03 +0000]
Bug 16539: Add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3bf5a0569560f6a8f51b7d2d16fb788fa437a826)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16539 - Koha::Cache is incorrectly caching single holidays
Nick Clemens [Tue, 17 May 2016 18:39:49 +0000]
Bug 16539 - Koha::Cache is incorrectly caching single holidays

This makes the loop add holidays for each bracnh instead of the calling
branch

To test:
I used memcached-tools to view the cache, clear the cache, and wait for
holidays to regnerate

Have a branches with different holidays
Clear the cache
Do a checkout
View the cache - one libraries holidays are repeated for all branches
Apply patch
Clear the cache
Do a checkout
Library holidays are correctly cached

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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 d6c37a0994fd27e8fdbcc99a70100ea90495c582)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 13669: Catch the errors to have them to the logs
Jonathan Druart [Sat, 21 May 2016 08:04:27 +0000]
Bug 13669: Catch the errors to have them to the logs

This patch redirect STDERR to a variable to retrieve the errors raised
by the DBMS when loading a sql file, it could be useful to debug errors.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
It's better of course, trying to load a failed fiel
it outputs mysl errors
DBD::mysql::st execute failed: You have an error in your SQL syntax...
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 8da05cb2a8793b5866c50f796569ce3336807256)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 13669: Re-adds error handling to load_sql
Bernardo Gonzalez Kriegel [Fri, 20 May 2016 17:26:14 +0000]
Bug 13669: Re-adds error handling to load_sql

This patch prevents crashing in case an
error is detected when loading a file

To test:
1) Apply patch
2) Mangle kohastructure.sql or any sample
file adding and invalid SQL line
3) Run webinstaller and check that the error
is handled gracefully

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 080f5a6b8ed1c958983bd8f528bda4b32cc76ebf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 13669: (alternative) use DBIx::RunSQL
Bernardo Gonzalez Kriegel [Wed, 18 May 2016 19:25:25 +0000]
Bug 13669: (alternative) use DBIx::RunSQL

Alternative POC solution, on top of
previous patches, feel free to obsolte.

This patch use DBIx::RunSQL->run_sql_file
to procees each sql file.

To test:
1) Apply all patches
2) Same test plan of patch 1

Timing test running web installer, marc21,
all sample data, time in seconds

a) without patch
structure   data
59.7        66.5
58.6        66.0

b) SQL::SplitStatement (patch 1+2)
59.4        101
59.7        102

c) DBIx::RunSQL (patch 3)
60.7        66.8
59.4        66.2

Tomas' version is a bit slower loading sample data,
all give similar results processing kohastructure.

New dependency to package: DBIx::RunSQL

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 e64f01ce0d6b3ff127a23070aa82427b69d89263)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 13669: (followup) Fix kohastructure.sql so FK dependencies are sorted
Tomas Cohen Arazi [Wed, 18 May 2016 20:34:06 +0000]
Bug 13669: (followup) Fix kohastructure.sql so FK dependencies are sorted

The current table creation order is left to mysql's strategy, which is not
suitable for parsing the SQL files and passing one statement at a time in
the current order.

This patch just moves table creation statements around so FK constraints are
defined for previously created tables.

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 2358185379ed325eb388b717250e90978ffdea5a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 13669: Use perl to load SQL statements from sample data
Tomas Cohen Arazi [Wed, 18 May 2016 16:23:25 +0000]
Bug 13669: Use perl to load SQL statements from sample data

This patch changes C4::Installer::load_sql so it uses File::Slurp [1] to read
the SQL files, and SQL::SplitStatement to extract the statements from the full SQL
file so they can be passed to $dbh->do.

To test:
- On Mysql 5.5, run the webinstaller
=> SUCCESS: Everything works as expected
- Apply the patch
- Run
  $ mysql -uroot
  > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
- Run the webinstaller
=> SUCCESS: Everything works as expected
- On Mysql 5.6+ (5.7 is implied)
- Run
  $ mysql -uroot
  > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
- Run the webinstaller
=> FAIL: It cannot load the sql files due to a password-in-command-line error
- Apply the patch
- Make sure everything is clean (it should):
  $ mysql -uroot
  > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
- Run the webinstaller
=> SUCCESS: EVerything works as expected
- Sign off :-D

[1] Note: This is a POC patch, in the sense that it does the job, fixes a nasty problem
but using File::Slurp to load the SQL files in memory comes with a big runtime penalty.
You will notice the install procedure is now much slower, for instance.

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 5c151f35aac55c3b4c92fb11397d4ef3b8c9f9b8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16501: Remove some unneeded warns in Upload.t
Marcel de Rooy [Wed, 11 May 2016 14:17:47 +0000]
Bug 16501: Remove some unneeded warns in Upload.t

At some point I saw some gain in warning about a missing config line.
But these warns are actually not needed here.
Removing them here.

Test plan:
Run t/db_dependent/Upload.t while having upload_path in your koha-conf and
also without it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e8117033e4c41247f453a9fb2488dc9568ab642f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15086: Update DB rev (3.22.06.005)
Kyle M Hall [Mon, 16 May 2016 17:34:57 +0000]
Bug 15086: Update DB rev (3.22.06.005)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15086: Creators layout and template sql has warnings
Mark Tompsett [Thu, 29 Oct 2015 22:23:20 +0000]
Bug 15086: Creators layout and template sql has warnings

When doing a hacked install off the master branch:
use ... {koha database name}
truncate creator_layouts;
truncate creator_templates;
truncate printers_profiles;
source installer/data/mysql/... {name of a sample_labels type file}
Warnings are generated, which may not be visible in the UI.

Most of the warnings were triggered by:
-/*!40000 ALTER TABLE `creator_layouts` DISABLE KEYS */;
-/*!40000 ALTER TABLE `creator_layouts` ENABLE KEYS */;
http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_er_illegal_ha

In the Russian, the layout_name was truncated, because the layout_name was only 20. An atomic update sql and kohastructure.sql update were provided to widen it to 25.
http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_warn_data_truncated

Also fr-FR, ru-RU, and uk-UA were slightly different in structure, so the structure was made the same as the other files.

See comment #1 for the test plan.

NOTE: pl-PL is likely very out of date, but is not affected in this regard.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works, no more warnings
mysql> show warnings;
Empty set (0.01 sec)

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 d6ac9270b00ad5a8de6ee755a4ddc40ea4e4d2e3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16481 - Report menu has unexpected issues
Owen Leonard [Mon, 9 May 2016 18:23:34 +0000]
Bug 16481 - Report menu has unexpected issues

This patch corrects a problem with the reports toolbar include file
which can cause a problem with the "duplicate" button. The duplicate
button passes the entire report SQL as a URL parameter, but the template
variable was not escaped as a URL variable.

This patch also adds the "uri" filter to the report name and notes
fields just to be safe.

To reproduce the bug, create a new SQL report using the SQL in the bug
report. When you run the report you should see a broken "Duplicate"
button.

Apply the patch and run the report again. The duplicate button should
look correct and work correctly.

Signed-off-by: Aleisha <aleishaamohia@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 8aec387198ac589d4179064123a0f6e213efa5f1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 1859: Do not display <<>> if an entry without value is selected
Jonathan Druart [Fri, 13 May 2016 21:03:08 +0000]
Bug 1859: Do not display <<>> if an entry without value is selected

For instance there are ---TABLES--- to delimite fields' tables, if
selected we do not want to add "<<>>" to the letter.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2c332513ffd421af6b23ebf30474f5baeac8ba6f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 1859 - Notice fields: can't select multiple fields at once
Owen Leonard [Fri, 13 May 2016 00:35:01 +0000]
Bug 1859 - Notice fields: can't select multiple fields at once

When selecting database fields to appear in a notice, selecting multiple
fields at once doesn't work correctly. The selected fields are grouped
together between << and >> instead of each being bracketed separately.

This patch corrects this problem. Also changed: Removal of 'onclick';
Conversion of 'insert' button to a Bootstrap buttons styled with a Font
Awesome icon; HTML validation error fixes.

To test, apply the patch and go to Tools -> Notices & Slips.

- Edit any notice.
- Select a notice version to edit (Email, Print, etc.).
- Confirm that the "Insert" button looks correct.
- Using ctrl+click, select multiple database fields to add to the
  notice. Confirm that clicking the "Insert" button adds the fields
  correctly.
- Confirm that there are no HTML validation errors.

Signed-off-by: Nicole C Engard <nengard@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 9b99d7810176726fe28c65d17c7f93dcd95cdd09)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16259: Replace CGI->param with CGI->multi_param in list context - part 2
Jonathan Druart [Fri, 15 Apr 2016 08:00:28 +0000]
Bug 16259: Replace CGI->param with CGI->multi_param in list context - part 2

This patch is a follow-up of bug 16154.

It removes the warning "CGI::param called in list context" in the
following scripts:
admin/branches.pl
admin/categories.pl
admin/patron-attr-types.pl
admin/preferences.pl
catalogue/image.pl
circ/circulation.pl
patroncards/add_user_search.pl
serials/add_user_search.pl
tools/marc_modification_templates.pl
virtualshelves/shelves.pl

Note that the warning from catalogue/itemsearch.pl still exists (the
call to CGI->param is done from the template).

Test plan:
- Add/modify a library, patron category, patron attr type
- Update a syspref
- Set localcoverimage and call catalogue/image.pl?biblionumber=XXX
- Search for patrons in the patron cards or serials module
- Add a marc modification templates
- Add a list (shelves)

You should not get the warning in the log after all these actions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7f3feacfe3897affbf76531eb3abd8cbc88a81e9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16402: Update DB rev (3.22.06.004)
Kyle M Hall [Mon, 16 May 2016 17:09:53 +0000]
Bug 16402: Update DB rev (3.22.06.004)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16402: (QA followup)
Tomas Cohen Arazi [Mon, 16 May 2016 15:36:56 +0000]
Bug 16402: (QA followup)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4e1b0e024297ecfe9b9ca91ea43e730db74a528a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16402: Fix fox existing installations
Jonathan Druart [Mon, 9 May 2016 14:08:56 +0000]
Bug 16402: Fix fox existing installations

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 74937f9c891b9a17c06cbb8100ef535c7da56285)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16402: Make kohastructure.sql valid for MySQL v5.7
Jonathan Druart [Thu, 5 May 2016 14:14:51 +0000]
Bug 16402: Make kohastructure.sql valid for MySQL v5.7

A primary key should not contain null value, and MySQL v5.7 is now more
strict and won't accept our errors in the DB structure.

Test plan:
  mysql < installer/data/mysql/kohastructure.sql
should work using MySQL v5.7

QA:
- letter.branchcode should not be NULL, the default (all) is an empty
string
- permissions.code should not be NULL, it's always a string

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Clean install of Ubuntu 16.05, MySQL 5.7.11
kohastructure.sql loads ok, just one warning
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1960ba7e5b108ecc81ec7ac2f6303ee45f0f2c2c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16476: Do not call CGI->param in list context, some more
Jonathan Druart [Mon, 9 May 2016 14:03:12 +0000]
Bug 16476: Do not call CGI->param in list context, some more

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 70498b1566118bfdf6c23f827845ad994fd1dc89)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 13871: [QA Follow-up] Fix small regression on AF with branchcode in Patron Info...
Marcel de Rooy [Wed, 11 May 2016 12:42:33 +0000]
Bug 13871: [QA Follow-up] Fix small regression on AF with branchcode in Patron Info request

If you enable send_patron_home_library_in_af in your sip account, you
want a separate AF field for the home branch.

Test plan:
Send a 63 (Patron Info) and verify that you have an extra AF.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested Patron Status and Patron Info.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c2ddc19600c70bcdc87cd64983c80073e19ac794)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16154: Fix some other occurrences
Jonathan Druart [Wed, 13 Apr 2016 16:22:18 +0000]
Bug 16154: Fix some other occurrences

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c133bedf54d34b5f7f4deec6bfe2f375ccc9b713)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16154: CGI->multi_param - Assign a list
Jonathan Druart [Tue, 29 Mar 2016 08:52:25 +0000]
Bug 16154: CGI->multi_param - Assign a list

This patch replaces the occurrences of
  @foo = $cgi->param('foo');
with
  @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a159d2b067c62bbfd524709813071951bc600ae4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16154: CGI->multi_param - Force scalar context
Jonathan Druart [Tue, 29 Mar 2016 08:51:07 +0000]
Bug 16154: CGI->multi_param - Force scalar context

This patch replaces the occurrences of
  $template->param( foo => $cgi->param('foo') );
with
  $template->param( foo => scalar $cgi->param('foo') );

perl -p -i -e 's/(\s*=>\s*)\$(cgi|input|query)\->param\(/$1scalar
\$$2\->param\(/xms' **/*.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f3e4b5bbb6b02d7bb6e89d84c0379666eb1e704f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16154: CGI->multi_param - Manual changes
Jonathan Druart [Tue, 29 Mar 2016 08:41:58 +0000]
Bug 16154: CGI->multi_param - Manual changes

This patch does the same as the previous one, but affects lines which
have not been caught by the regex.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ac5a1bfececb5400a77f0ebad90181f5215d5a85)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16154: CGI->multi_param - Declare a list
Jonathan Druart [Tue, 29 Mar 2016 08:15:43 +0000]
Bug 16154: CGI->multi_param - Declare a list

This patch replaces the occurrences of
  my @foo = $cgi->param('foo');
with
  my @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*my\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 66aacace086f16d2eca860cc6c2aa164866d0488)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16480: Unclosed tag <span> in shelves line 332 on intranet
Hector Castro [Mon, 9 May 2016 17:31:29 +0000]
Bug 16480: Unclosed tag <span> in shelves line 332 on intranet

Unclosed tag <span> in shelves line 332 on intranet when translating
<span>An error occurred when creating this list./span>
This error was introduced by bug 15403

To test: Verify the template in line 332 to see the unclosed tag fixed
or follow test plan for bug 15403

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
(cherry picked from commit 9f5163cfcd1eb8becf48ae0861d8096720965c61)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15403 [QA Follow] - Minor language tweak
Kyle M Hall [Fri, 15 Jan 2016 15:30:07 +0000]
Bug 15403 [QA Follow] - Minor language tweak

The phrase "Please check it's not" sees incorrect gramatically, changing
the wording to "Please verify it is not"

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 132ef99cf0a69668b318b38d4090152ff2880ca2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15403: Tidy up error messages in Staff lists
Aleisha [Wed, 13 Jan 2016 23:44:58 +0000]
Bug 15403: Tidy up error messages in Staff lists

To test:
1) Create a list on the intranet, observe the message
2) Create another list with the same name, observe the message
3) Delete a list, observe the message
4) Check the patch itself for typos

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f6c1b30d6f23b87bc082c55fb7fb3ecb6dd3da78)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16439: Allow styling to button for upload local cover images (Font Awesome Icons)
Hector Castro [Wed, 4 May 2016 18:10:41 +0000]
Bug 16439: Allow styling to button for upload local cover images (Font Awesome Icons)

Improve button for upload local cover image with Font Awesome Icon

To test:
-Set syspref LocalCoverImages and OPACLocalCoverImages to Allow
-A new tab 'Images' appear in bib record detail on Intranet.
-Notice about the button upload.
-Apply the patch and reload the page.
-The button is changed for class=btn btn-mini like the button "edit"
 used in items in the tab Holdings
-Also added the Font Awesome icon upload "fa fa-upload" class.

Button is styled as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 6003c6b320a4fec0be37b4940a676dfdfa1875f4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16381 [QA Followup] - Wrap string for translations
Kyle M Hall [Fri, 29 Apr 2016 16:09:08 +0000]
Bug 16381 [QA Followup] - Wrap string for translations

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d50cdb72b366417b9ef5f8b5daa29308e0b3eaae)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16381: Fix capitalization on tags review page
Katrin Fischer [Fri, 29 Apr 2016 00:15:30 +0000]
Bug 16381: Fix capitalization on tags review page

- Fixes capitalization of the sub heading "Displaying ... terms"
- Fixes button label of "Test"

To test:
- Look at all, approved, rejected, pending tags and check
  the line below the heading "Tags" - "Displaying..."
- Check a term using the search box on the left side
  Before the patch: Test - Processing... - test
  After the patch this should be Test again in the end.

Capitalization looks good. QA tools complain about tabs, but there
are loads of tabs all over review.tt. Proper formatting of the whole file
could be done in a separate bug.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5aa4bb4f33ef0105e82c68f1c8f79a6225eb943f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16340: JS variable in opac-bottom.inc is declared two times
Hector Castro [Mon, 25 Apr 2016 16:04:13 +0000]
Bug 16340: JS variable in opac-bottom.inc is declared two times

MSG_NO_RECORD_SELECTED declared two times

To test: Go to cart and list (virtual shelves) in OPAC and
verify if those pages work as expected

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 c01bb7dfca65bfbc26197a3039988ba775eb4e79)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16270 (followup) Typo authentification vs authentication
Marc Véron [Fri, 15 Apr 2016 14:18:37 +0000]
Bug 16270 (followup) Typo authentification vs authentication

Additionally fix typo in following files:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt

To test: Apply patch, verify in files that authentification is
         replaced by authentication

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e297342f52bcdbc09b4a0c1b4d28cbb50ae2518f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16270: Typo authentification/authentication
Jonathan Druart [Fri, 15 Apr 2016 07:05:37 +0000]
Bug 16270: Typo authentification/authentication

Test plan;
Trigger /cgi-bin/koha/errors/404.pl
Confirm the typo without the patch and that it's fixed with this patch
applied.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1c85d476aa8604fb93f0c27bec207aa9f4048467)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16253: Changing 'delete order' to 'cancel order'
Aleisha [Tue, 26 Apr 2016 01:15:47 +0000]
Bug 16253: Changing 'delete order' to 'cancel order'

To test:
1) Go to Acqui -> do a vendor search and view an open basket
2) Confirm last column heading says cancel instead of delete
3) Confirm link to cancel order says cancel instead of delete
4) If can't delete record, confirm reasons say cancel order instead of delete
5) Click the vendor name, then Baskets tab, then Receive Shipment
6) Fill vendor invoice field and click next
7) If there are any pending orders, confirm that all instances of 'delete order' now say cancel

Sponsored-by: Catalyst IT
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 61d670795fe89aca2d244668c51b1b75145bb5a5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16218: printfeercpt.tt (and others) does not include jQuery
Marc Véron [Thu, 7 Apr 2016 17:10:55 +0000]
Bug 16218: printfeercpt.tt (and others) does not include jQuery

This patch adds [% INCLUDE 'doc-head-close.inc' %] to the following files
(to make them include jQuery):

koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt

To test:

1) Temporarily include the follwing lines in syspref IntranetSlipPrinterJS:

function printThenClose() {
  if (typeof jQuery != 'undefined') {
    // jQuery is loaded => print the version
    alert(jQuery.fn.jquery);
  }
  else {
    alert('jQuery not available');
  }
}

2) Go to a users page and print slips:
From the Print button in the tool bar:
- Print summary
- Print slip
- Print quick slip
From the "Fines" tab: Account
- 'Print' link in the table with paid transactions

Without patch, a JavaScript message 'jQuery not avaliable' appears.
With patch, the message displays the current jQuery version (1.7.2)

3) Remove IntranetSlipPrinterJS
- Verify that the slips above print as expected.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0b6bc2b5983f0e66c13902e74352cdcd68971a7f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15009: QA follow-up
Jonathan Druart [Mon, 18 Apr 2016 09:37:18 +0000]
Bug 15009: QA follow-up

This patch adds a test to check the unicity of auth cats, simplify
the GetBudgetAuthCats subroutine and make it return an arrayref of scalar
instead of an arrayref of hashref with only 1 key.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9c5b8191009eba54e851512c9cfa2e3d5ab949df)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15009: Correctly populate planning filter
Jonathan Druart [Mon, 18 Apr 2016 09:36:51 +0000]
Bug 15009: Correctly populate planning filter

The filter for planning values was populated with empty strings.
Note that it's not caused by previous patches.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5e8ded21af689f43f9791f19772a478fb3c67afe)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15009 - Adds unit tests for C4::Budget::GetBudgetAuthCats
charles [Fri, 25 Mar 2016 21:09:24 +0000]
Bug 15009 - Adds unit tests for C4::Budget::GetBudgetAuthCats

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 1a9ca842939ba48789dd11bfa5b9510e73bad645)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15009 - Planning dropdown button in aqbudget can have empty line
Blou [Tue, 13 Oct 2015 20:12:49 +0000]
Bug 15009 - Planning dropdown button in aqbudget can have empty line

When displaying a budget, the Planning button in the admin toolbar displays

Plan by months
Plan by libraries
Plan by item types
Plan by

The last one is empty, due to C4::Budgets::GetBudgetAuthCats returning an empty field if the budget has no sort defined.
This prevents returning an array with empty element(s)

TEST:
1) Admin -> Budgets
2) Select a budget
   a) you must have '' (empty) in your aqbudgets.sort1_authcat field.
   b) edit the budget (direct DB or interface) to get that.
3) Click on Planning dropdown, see the "Plan by <nothing> " entry.
4) apply the patch, revalidate.

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

No more empty option
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 b8076d8ec7236360274e1a4e861969c86bb679ea)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 14050: Default framework for authorities should not be deletable
Marc Véron [Mon, 25 Apr 2016 13:02:36 +0000]
Bug 14050: Default framework for authorities should not be deletable

To test:
- Apply patch
- In staff client, go to Home > Administration > Authority types
- Verify that the Actions for the Default type do not contain the delete
  action
- Verify that other types have a delete action

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 9387 - Feedback message for FAILED check out items are not obvious for visually...
Owen Leonard [Wed, 6 Apr 2016 14:54:48 +0000]
Bug 9387 - Feedback message for FAILED check out items are not obvious for visually impaired

This patch adds a heading to the error dialg displayed when a barcode
has been submitted for checkout which doesn't exist. This patch also
modifies the markup of the error dialog in order to make error a little
more clear to sighted users.

To test, apply the patch and submit a barcode for checkout which does
not exist. The resulting error dialog should have a heading, "Barcode
not found."

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ae40e5e4c68f50ef1c68e8901e46c73e50c31a0a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16452: Remove the warnings raised by PatronLists.t
Jonathan Druart [Thu, 5 May 2016 14:36:50 +0000]
Bug 16452: Remove the warnings raised by PatronLists.t

We need to define a userenv to get rid of the warnings

Test plan:
  prove t/db_dependent/PatronLists.t
should not return any warnings

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit f0983f0570691a2b196fdc7539f5aaf85972c449)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16429 - Fix root problem
Kyle M Hall [Tue, 3 May 2016 10:36:15 +0000]
Bug 16429 - Fix root problem

The root of this issue is old code in circulation.pl that is no longer
needed and leaves the affected scripts open to future regressions.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Heather Braum <hbraum@nekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 640b9585f82ff898bebcebd01efab81bca311588)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16429 - Going to circulation from notice triggers may change logged in branch
Kyle M Hall [Tue, 3 May 2016 10:30:20 +0000]
Bug 16429 - Going to circulation from notice triggers may change logged in branch

If you edit notice triggers and then use the "Checko out" tab from the
top bar, you may change your logged in library by accident!

Test Plan:
1) Disable the system preference CircAutocompl
2) Go to the notice triggers
3) Select the triggers for a library other than the one you logged in as
4) Use the "Check out" tab at the top to check out to a patron
5) Note your logged in branch has changed ( you'll need to refresh the
    page if the check out search took you directly to one patron ).
6) Apply this patch
7) Repeat steps 2-4
8) Note the branch no longer changes

Tested with both patches applied. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Heather Braum <hbraum@nekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 56f65a9d0af39059d516a058350674bee997cb6d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16415 - Layout problem on staff client detail page if local cover images are...
Owen Leonard [Mon, 2 May 2016 14:04:21 +0000]
Bug 16415 - Layout problem on staff client detail page if local cover images are enabled

This patch fixes a layout problem which appears on the staff client
bibliographic detail page if local covers are enabled but Amazon covers
are not.

To test, apply the patch and turn off AmazonCoverImages.

- Enable the LocalCoverImages system preference and locate or create a
  record which has a local cover image associated with it.
- View the bibliographic detail page. The bibliographic details should
  display in two columns, with text on the left and local cover image on
  the right.
- Test with AmazonCoverImages and LocalCoverImages enabled.
- Test with AmazonCoverImages enabled and LocalCoverImages disabled.

All combinations are OK.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 31a0691a112b48f7462dc210d1898ea0147e3ab5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16398: Keep the expanded view after clearing the search form
Jonathan Druart [Fri, 29 Apr 2016 15:52:26 +0000]
Bug 16398: Keep the expanded view after clearing the search form

On the advanced search form, the "Clear fields" button should pass expanded_options
param to preserve the view we use.

Test plan:
- Click on more options
- Fill some fields
- Click on "Clear fields"
=> Without this patch you get the "fewer options" view
=> With this patch, you will keep the "more options" view

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16384: Fix cancel link for 'Edit basket'
Katrin Fischer [Fri, 29 Apr 2016 00:53:43 +0000]
Bug 16384: Fix cancel link for 'Edit basket'

When you edit the basket from the basket summary page,
saving the change brings you back to the basket summary
page, but cancelling brings you to the baskets page of
the vendor.

To test:
- Add a basket in acq
  - Test cancel link returns to baskets page of vendor
- Add a basket and save
- Edit this basket
  - Test cancel link now returns to basket summary page

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 e35b310a1e40bc9ee267c88caeca4a56ffbb4636)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16325: Do not return all suggestions if search for STATUS=''
Jonathan Druart [Tue, 3 May 2016 15:13:44 +0000]
Bug 16325: Do not return all suggestions if search for STATUS=''

This is a quick and dirty way to fix a bad bug in a messy area.
The "unknown status" tab in the suggestions table display all the
suggestions. It should only display suggestions with a STATUS=''

Test plan:
- Create some suggestions
- Go to Home > Acquisitions > Suggestions management
- Edit some suggestions and give them different status,
e.g. accepted, rejected, pending.
- Verify that they appear in the tabs as appropriate
- Edit one suggestion, set "Mark selected as" to --Choose a status--
=> Without this patch: New tab "Status unknown" containing all
suggestions
=> With this patch: tab contains only suggestions with "Unknown status"

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 44e0cb2895f5e9fbf541603f5497f67f58fd5baf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16325: Add a test for SearchSuggestions when searching for STATUS=''
Jonathan Druart [Tue, 3 May 2016 15:13:27 +0000]
Bug 16325: Add a test for SearchSuggestions when searching for STATUS=''

Test fails as expected without second patch and passes OK with second patch.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit cb912decef4ffa56c93920e4f62c56ac085703f5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16322: Translatability: Also adding "Status unknown" to column table
Hector Castro [Thu, 21 Apr 2016 21:47:28 +0000]
Bug 16322: Translatability: Also adding "Status unknown" to column table

Also add the "Status unknown to the column table
To test: follow previous commit

Signed-off-by: Marc Veron <veron@veron.ch>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f7d82d098a21bb06d3450a5696091c173d992561)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16322 - Translatability: "Unknown" in suggestion/suggestion.pl not translatable
Marc Véron [Thu, 21 Apr 2016 19:13:46 +0000]
Bug 16322 - Translatability: "Unknown" in suggestion/suggestion.pl not translatable

This patch adds translatability for the tab "Unknown" in
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt

To test:
- Apply patch
- Examine koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
  and verify that it handles the label "Unknown" (line 496)
- Go to suggestion/suggestion.pl, set status of a suggestion to -- Choose a status --
  and verify that the tab "Status unknown" appears
- Bonus test: Go through a translation process and verify that "Status unknown" is
  translated

Note: If you have a suggestion with unknown status, all suggestions are listed under
      this tab. This is not in the scope of this bug; this bug is about translation
      only.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d4819505971c6e7f1ce5f1017eddbbcf25254fea)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16233 Unclosed <strong> in opac-facets.inc
Chris Cormack [Sun, 10 Apr 2016 22:10:18 +0000]
Bug 16233 Unclosed <strong> in opac-facets.inc

To test:
1/ Do a search in the OPAC
2/ Restrict to only available items
3/ Notice the authors now appear bold
4/ Apply patch
5/ Refresh the page
6/ Authors should now look normal again

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e60182c2f033a2b5eac578eb7bac355e03eb6b76)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16230 - Show tooltip with menu item when fund cannot be deleted
Owen Leonard [Fri, 8 Apr 2016 17:33:01 +0000]
Bug 16230 - Show tooltip with menu item when fund cannot be deleted

This patch enables Bootstrap to generate a tooltip for the fund deletion
menu item when a fund cannot be deleted because it has children.

Also changed: Enable translation of the associated error message.

To test you must have at least one fund which has a child fund. Apply
the patch and go to Administration -> Funds.

- In the list of funds, find a fund which has children.
- Click the "Actions" menu. The "Delete" item should be disabled.
- Hovering over the "Delete" item should display a Bootstrap-style
  tooltip with the explanation "This fund has children."
- Clicking the "Delete" item should trigger an alert, "This fund has
  children. It cannot be deleted."
- Clicking "Delete" on funds without children should work correctly.

NOTE: Before tooltip shows in Chrome, but not bootstrap styling.
      After, bootstrap styled.
      The use of _() will add the ability to translate the alert().

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a669b3c132c7a187b3dd0d0cf2d95e990338b404)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16220 [Compiled CSS] The view tabs on opac-detail.pl are not responsive
Julian Maurice [Mon, 16 May 2016 11:16:57 +0000]
Bug 16220 [Compiled CSS] The view tabs on opac-detail.pl are not responsive

This patch updates the compiled CSS file with changes made in the
previous patch to the LESS files.

To test, apply both patches and clear your browser cache if necessary.

- View the bibliographic detail page for any record in the OPAC
- Confirm that the style of the "Normal," "MARC," and "ISBD" links looks
correct.
- Resize your browser to various widths, including very narrow widths.
Confirm that the links work well at all sizes.
- Repeat the test for each view, normal, MARC, and ISBD.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16220 - The view tabs on opac-detail.pl are not responsive
Owen Leonard [Thu, 7 Apr 2016 16:11:58 +0000]
Bug 16220 - The view tabs on opac-detail.pl are not responsive

When looking at the detail page for a bibliographic record, there are
tabs linking to the "Normal," "MARC," and "ISBD" views. These tabs need
to be styled responsively so that they work well at all browser widths.

This patch makes some slight markup changes to the templates and updates
the LESS files to add responsive styling.

This patch does not include the compiled CSS file, so the follow-up is
required to test the visual changes.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0fcbf1efe10a4269e3705dce10ef632e1739dbb1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16159 - guarantor section missing ID on patron add form
Owen Leonard [Tue, 3 May 2016 17:09:54 +0000]
Bug 16159 - guarantor section missing ID on patron add form

In the patron entry form template most <fieldset> and <legend> tags have
unique ids. This patch adds ids to fieldsets and legends which lack
them.

To test apply the patch and view the patron entry form. There should be
no visual changes. There should be no HTML validation errors triggered
by this change.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 553d06073b8af0ab6ed33393b22a953e3feca1e6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16105: Do not initialize the memory cache if not needed
Jonathan Druart [Fri, 18 Mar 2016 13:39:27 +0000]
Bug 16105: Do not initialize the memory cache if not needed

Cache::Memory is loaded and Koha::Cache::_initialize_memory is called
even if a memcached cache has been correctly initialize, it does not
make sense.
It should only be initialize if needed.

Test plan:
Correctly configure a memcache server and confirm that the memory cache
is not initialize.
Do not configure correctly a memcache server and confirm that the cache
system default on Cache::Memory

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 2026be47fd79fb15f1e9fb83be34403e8eb18079)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 14144: Clean ups and refactors
Mark Tompsett [Mon, 4 Apr 2016 22:59:33 +0000]
Bug 14144: Clean ups and refactors

perltidy
old new calls to new call format
attrType -> attr_type (perlcritic friendlier)
double quotes to single quotes
'' combinations to q{} (perlcritic friendlier)
refactored parameters to mock_net_ldap_search into a HASH

This piece is not necessary, but I think it is nicer.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as expected. No koha-qa erros

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fdda5d7d7cf8c724e57e5bb8b1e55533cb0e7b8b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 14144: Silence warnings t/db_dependent/Auth_with_ldap.t
Mark Tompsett [Mon, 4 Apr 2016 22:07:26 +0000]
Bug 14144: Silence warnings t/db_dependent/Auth_with_ldap.t

Revisiting this bug, I noticed that C4::Context->config() was mocked
poorly. I expanded the mock function a little and have quieted the
test which seemed to be working in a broken manner before.

TEST PLAN
---------
1) prove t/db_dependend/Auth_with_ldap.t
   -- shibboleth noise
2) apply this patch
3) prove t/db_dependend/Auth_with_ldap.t
   -- no noise
4) run koha qa test tools

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b140c4b2fdc894c0d53eca2bf2f2bb5cb1982a91)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 11203 - Datatables in acqusitions do not ignore "stopwords" in titles
Kyle M Hall [Tue, 5 Nov 2013 16:31:20 +0000]
Bug 11203 - Datatables in acqusitions do not ignore "stopwords" in titles

Sorting by the "summary" column does not produce the preferred results.
Title beginning with 'a', 'an', or 'the' are sorted using those
articles.

Test plan:
1) Place an order for 2 items with the titles "Alpha" and "The Alpha",
   along with some other records with titles starting with something
   between 'a' and 't', and 't' and 'z'
2) Sort the "pending orders" table, note the incorrect sorting
3) Receive all the items
4) Sort the "already received" table, note the incorrect sorting
5) Apply the patch
6) Repeat steps 1-4, note the corrected sorting
7) Check acqui/basket.pl for correct sorting
8) Check acqui/invoice.pl for correct sorting

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8e9e56d0d4aefef9ef7bd7bc48d9e859aadc465e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 9393 [QA Followup] - Don't display link if librarian cannot view the modification
Kyle M Hall [Tue, 19 Apr 2016 11:55:28 +0000]
Bug 9393 [QA Followup] - Don't display link if librarian cannot view the modification

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b46f4128ea250010b644aa55b544c3c663a7fd17)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 9393 - Add note to circulation.pl if borrower has pending modifications
Kyle M Hall [Tue, 18 Dec 2012 19:18:16 +0000]
Bug 9393 - Add note to circulation.pl if borrower has pending modifications

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
New link "patron modifications" (if there are) on the checkout page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 23f45686411aa4e26dab157d69b156c896136915)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16447: Remove occurrence of the borrow permission which does no longer exist
Jonathan Druart [Thu, 5 May 2016 13:52:04 +0000]
Bug 16447: Remove occurrence of the borrow permission which does no longer exist

Bug 7976 has removed this permission, but other patches re-added it...
Note that the occurrences in sendbasket.pl, edithelp.pl, opac/svc/login should
have been removed by bug 7976.

Test plan:
  git grep 'borrow.*=> 1'
should not return any results.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit c4eabeda0b1ca6b856483b3d225b9093dc6e316a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16407: Simplify comments
Jonathan Druart [Mon, 2 May 2016 09:46:59 +0000]
Bug 16407: Simplify comments

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 671f81e877a3e23127a2e8078921760e9b449a27)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16407: Fix Koha_borrower_modifications.t
Marcel de Rooy [Sat, 30 Apr 2016 14:55:28 +0000]
Bug 16407: Fix Koha_borrower_modifications.t

This test was using hardcoded borrower number, assuming they should be
present. Now we use TestBuilder.

Test plan:
Run the test.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test pass before and after patch.
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 d8d4277471908bf046d04b4e94eed6cd4c94f63b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16390: Accounts.t does not need MPL
Marcel de Rooy [Fri, 29 Apr 2016 06:01:26 +0000]
Bug 16390: Accounts.t does not need MPL

This test fails if you do not have a MPL branch, but a closer look shows
that we only need to replace one occurrence.

Test plan:
Run Accounts.t

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 6dbceac466772fa65fe3676163b89dec37151b23)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16170: Update schema
Julian Maurice [Mon, 16 May 2016 08:37:42 +0000]
Bug 16170: Update schema

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16369 - Clean up and improve plugins template
Owen Leonard [Tue, 26 Apr 2016 18:54:23 +0000]
Bug 16369 - Clean up and improve plugins template

This patch makes multiple changes to the plugins home page template to
bring it up to date with current interface patterns.

Test the following changes:

- Breacrumb links have been corrected to include "Tools" in the path.
  Verify that this link is correct.
- A toolbar has been added for an "Upload plugin" button. Uploading is
  an action, not a view, so it should be displayed in a toolbar. Verify
  that the button works correctly.
- Messages are now formatted as messages rather than as headings. To
  test, trigger a message by, for instance, uninstalling all plugins or
  passing an invalid "method" parameter with the URL.
- Incorrect capitalization corrected.
- Plugin actions are moved to a single "Actions" dropdown menu. This
  includes 'Run report,' 'Run tool,' 'Configure,' and 'Uninstall.' Test
  that all these menu options work correctly.
- The standard "Tools" sidebar menu has been added.
- An "onclick" attribute has been removed in favor of defining the event
  in JavaScript. Test by choosing the 'Uninstall' menu item for a
  plugin. Test both confirm and cancel actions.

Also changed:

- Corrected capitalization on the tools home page.
- Adding missing plugins link to the tools sidebar menu.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 822509eee5f50e0425115a576be8d1f2c0450d35)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16321 - 'Show all details' checkbox triggers JS error after jQuery upgrade
Owen Leonard [Thu, 21 Apr 2016 16:39:53 +0000]
Bug 16321 - 'Show all details' checkbox triggers JS error after jQuery upgrade

This patch fixes problems with show/hide actions on a few pages
caused by some problematic jQuery syntax.

To test, apply the patch and go to Acquisitions.

Testing basket.tt:

- Locate a vendor which has an open basket with multiple orders.
- View the details of that basket.
- Click the 'Show all details' checkbox above the table of orders.
  - Checking the box should trigger the display of additional columns in
    the table.
  - Unchecking the box should hide them again.

Testing invoice.tt:

- Go to Acquisitions -> Invoices and perform an invoice search.
- Click to view an invoice which includes one or more received records.
- Click the 'Show all details' checkbox above the table of titles and
  confirm that it fuctions as described above.

Testing newordersubscription.tt:

- Go to Acquisitions and locate a vendor which is linked to a
  subscription
- Create or add to a basket for that vendor.
- Add an order using the 'From a subscription' option.
- Perform a search for subscriptions.
- In the table of subscriptions search results, checking or
  unchecking the "Show only renewed" checkbox should work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 080ae7a8b9587aaa31b0adfb8925981dc574aa65)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16315 - OPAC Shelfbrowser doesn't display the full title
Owen Leonard [Tue, 3 May 2016 13:48:11 +0000]
Bug 16315 - OPAC Shelfbrowser doesn't display the full title

This patch adds subtitle information to the display of titles in the
OPAC's shelf browser.

To test, apply the patch and make sure OPACShelfBrowser is enabled.

- View the detail page for any title in the OPAC which has items.
- Click the "Browse shelf" link next to any item in the holdings table.
- The titles in the shelf browser should display with all subtitle
  information as defined in Keywords to MARC mapping.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Adding 245a and c as 'subtitle' in Keywords to Marc make them
show on shelf browser.
No errors.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 67f91f24e537ef93d0c121b68681dcdec9f417e1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16170: Update DB rev (3.22.06.003)
Kyle M Hall [Tue, 3 May 2016 15:04:20 +0000]
Bug 16170: Update DB rev (3.22.06.003)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16170: [QA Follow-up] Fix embeded typos
Marcel de Rooy [Fri, 1 Apr 2016 07:34:50 +0000]
Bug 16170: [QA Follow-up] Fix embeded typos

Just noticed this typo three times here.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6e0b6ecf1347a91c2d324abc08e76f1cd8d9ffd0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16170: [QA Follow-up] Adjust Items.t
Marcel de Rooy [Fri, 1 Apr 2016 07:24:04 +0000]
Bug 16170: [QA Follow-up] Adjust Items.t

Items.t inserts an item via biblioitem not correctly linked to biblio.
The new foreign key constraint does not allow that.
Actually, we should be choosing to either remove biblioitems from Koha or
remove biblionumber from items.

Note: This seems to be the only case where an item is added this way.

Test plan:
Run Items.t

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1608b89b7ff90ae1cc307d9f096ddaab29ba2192)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16170 - Corrected to make work more smoothly
Mark Tompsett [Thu, 31 Mar 2016 00:11:45 +0000]
Bug 16170 - Corrected to make work more smoothly

Signed-off-by: Mark Tompsett <mtompset@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 503cc30d9ae03f12b3c412d2d280ea76393b97da)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16170: Pseudo foreign key in Items
Marcel de Rooy [Wed, 23 Mar 2016 15:59:26 +0000]
Bug 16170: Pseudo foreign key in Items

While many of us would like to get rid of biblioitems one day, the current
scheme includes a biblioitemnumber and a biblionumber in Items.
(Which is not so great..)

But also note that biblionumber is NOT defined as a foreign key in Items,
although a belongs_to relation has been added to the DBIx scheme!
This inconsistency should be resolved. The "remove biblioitem table"
operation is a large one, but in the meantime we better make biblionumber
a regular FK not a 'pseudo' one.

Note: If in an (very) exceptional case biblionumbers are found in items,
that do not exist in biblio, this patch prints a warning at upgrade
time and does not add the constraint.

@RM: Please update the DBIx scheme accordingly.

Test plan:
[1] Run the upgrade. Check if the FK constraint has been added.
[2] Remove the FK constraint. Change the biblionumber of one item to an
    unexisting record. Run the upgrade again. Notice the warning.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested both cases: constraint added as well as warning printed.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 33694a8faac22e760e0559d99a9d013f7c90275b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16041: Update DB rev (3.22.06.002)
Kyle M Hall [Fri, 29 Apr 2016 13:51:00 +0000]
Bug 16041: Update DB rev (3.22.06.002)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 16041: Turn off StaffAuthorisedValueImages by default
Jonathan Druart [Wed, 30 Mar 2016 07:42:12 +0000]
Bug 16041: Turn off StaffAuthorisedValueImages by default

This feature is enabled by default, but the users are not aware of it
and it costs a lot of time processing to get the images.

There are 2 prefs to drive this feature: StaffAuthorisedValueImages and
AuthorisedValueImages. AuthorisedValueImages is not added by sysprefs.sql and
does not appear in updatedatabase.pl, we could easily imagine that
nobody uses it.
With XSLT enabled, the feature is only visible on a record detail page
at the OPAC, if AuthorisedValueImages is set.
Otherwise you need to turn the XSLT off. In this case you will see the
images on the result list (OPAC+Staff interfaces) and OPAC detail page,
but not the Staff detail page.

The idea of this patch is to introduce a quick switch if the feature is
not used by the library.

Test plan:
1/ Turn the pref on and set authorised_values.imageurl to NULL
Execute the DB entry
=> The pref have been turned off
2/ Turn the pref on and set an image for an authorised value
Execute the DB entry
You will get a warning
3/ Turn the pref off and set an image for an authorised value
Execute the DB entry
You will get a warning
4/ Turn the pref off and set authorised_values.imageurl to NULL
Execute the DB entry
You won't get a warning

Note that the opac detail page now checks the pref before retrieving the
images.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed update message 'that means'.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 78605bceb368ed298e7d47fbb64b255dfcdd2842)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15919: Batch checkout - Display the due date
Jonathan Druart [Mon, 2 May 2016 19:19:05 +0000]
Bug 15919: Batch checkout - Display the due date

When an item has been checked out in a batch, the due date will now be
displayed in the information column.

Test plan:
Use the batch checkout to check some items out
Confirm that the due date is displayed if the items have been checked
out.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 105869d3b968f061688a390993df1267baa11bd7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

7 years agoBug 15823: Redirect opac-discharge.pl to 404 page
Marc Véron [Thu, 5 May 2016 06:13:53 +0000]
Bug 15823: Redirect opac-discharge.pl to 404 page

See comment #17: Redirect to 404 in opac-discharge.pl and remove
message in template because with the redirect it will never be
reached.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a07db3537d70aa642f1f2e2731eb8e0cf200e1f4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>