]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 16539: Add tests
Jonathan Druart [Wed, 18 May 2016 14:01:03 +0000 (15:01 +0100)]
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>
8 years agoBug 16539 - Koha::Cache is incorrectly caching single holidays
Nick Clemens [Tue, 17 May 2016 18:39:49 +0000 (14:39 -0400)]
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>
8 years agoBug 13669: Catch the errors to have them to the logs
Jonathan Druart [Sat, 21 May 2016 08:04:27 +0000 (09:04 +0100)]
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>
8 years agoBug 13669: Re-adds error handling to load_sql
Bernardo Gonzalez Kriegel [Fri, 20 May 2016 17:26:14 +0000 (14:26 -0300)]
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>
8 years agoBug 13669: (alternative) use DBIx::RunSQL
Bernardo Gonzalez Kriegel [Wed, 18 May 2016 19:25:25 +0000 (16:25 -0300)]
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>
8 years agoBug 13669: (followup) Fix kohastructure.sql so FK dependencies are sorted
Tomas Cohen Arazi [Wed, 18 May 2016 20:34:06 +0000 (17:34 -0300)]
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>
8 years agoBug 13669: Use perl to load SQL statements from sample data
Tomas Cohen Arazi [Wed, 18 May 2016 16:23:25 +0000 (13:23 -0300)]
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>
8 years agoBug 16501: Remove some unneeded warns in Upload.t
Marcel de Rooy [Wed, 11 May 2016 14:17:47 +0000 (16:17 +0200)]
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>
8 years agoBug 15086: Update DB rev (3.22.06.005)
Kyle M Hall [Mon, 16 May 2016 17:34:57 +0000 (17:34 +0000)]
Bug 15086: Update DB rev (3.22.06.005)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15086: Creators layout and template sql has warnings
Mark Tompsett [Thu, 29 Oct 2015 22:23:20 +0000 (18:23 -0400)]
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>
8 years agoBug 16481 - Report menu has unexpected issues
Owen Leonard [Mon, 9 May 2016 18:23:34 +0000 (14:23 -0400)]
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>
8 years agoBug 1859: Do not display <<>> if an entry without value is selected
Jonathan Druart [Fri, 13 May 2016 21:03:08 +0000 (22:03 +0100)]
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>
8 years agoBug 1859 - Notice fields: can't select multiple fields at once
Owen Leonard [Fri, 13 May 2016 00:35:01 +0000 (20:35 -0400)]
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>
8 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 (09:00 +0100)]
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>
8 years agoBug 16402: Update DB rev (3.22.06.004)
Kyle M Hall [Mon, 16 May 2016 17:09:53 +0000 (17:09 +0000)]
Bug 16402: Update DB rev (3.22.06.004)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16402: (QA followup)
Tomas Cohen Arazi [Mon, 16 May 2016 15:36:56 +0000 (12:36 -0300)]
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>
8 years agoBug 16402: Fix fox existing installations
Jonathan Druart [Mon, 9 May 2016 14:08:56 +0000 (15:08 +0100)]
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>
8 years agoBug 16402: Make kohastructure.sql valid for MySQL v5.7
Jonathan Druart [Thu, 5 May 2016 14:14:51 +0000 (15:14 +0100)]
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>
8 years agoBug 16476: Do not call CGI->param in list context, some more
Jonathan Druart [Mon, 9 May 2016 14:03:12 +0000 (15:03 +0100)]
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>
8 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 (14:42 +0200)]
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>
8 years agoBug 16154: Fix some other occurrences
Jonathan Druart [Wed, 13 Apr 2016 16:22:18 +0000 (17:22 +0100)]
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>
8 years agoBug 16154: CGI->multi_param - Assign a list
Jonathan Druart [Tue, 29 Mar 2016 08:52:25 +0000 (09:52 +0100)]
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>
8 years agoBug 16154: CGI->multi_param - Force scalar context
Jonathan Druart [Tue, 29 Mar 2016 08:51:07 +0000 (09:51 +0100)]
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>
8 years agoBug 16154: CGI->multi_param - Manual changes
Jonathan Druart [Tue, 29 Mar 2016 08:41:58 +0000 (09:41 +0100)]
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>
8 years agoBug 16154: CGI->multi_param - Declare a list
Jonathan Druart [Tue, 29 Mar 2016 08:15:43 +0000 (09:15 +0100)]
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>
8 years agoBug 16480: Unclosed tag <span> in shelves line 332 on intranet
Hector Castro [Mon, 9 May 2016 17:31:29 +0000 (11:31 -0600)]
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>
8 years agoBug 15403 [QA Follow] - Minor language tweak
Kyle M Hall [Fri, 15 Jan 2016 15:30:07 +0000 (15:30 +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>
8 years agoBug 15403: Tidy up error messages in Staff lists
Aleisha [Wed, 13 Jan 2016 23:44:58 +0000 (23:44 +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>
8 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 (12:10 -0600)]
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>
8 years agoBug 16381 [QA Followup] - Wrap string for translations
Kyle M Hall [Fri, 29 Apr 2016 16:09:08 +0000 (16:09 +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>
8 years agoBug 16381: Fix capitalization on tags review page
Katrin Fischer [Fri, 29 Apr 2016 00:15:30 +0000 (02:15 +0200)]
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>
8 years agoBug 16340: JS variable in opac-bottom.inc is declared two times
Hector Castro [Mon, 25 Apr 2016 16:04:13 +0000 (10:04 -0600)]
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>
8 years agoBug 16270 (followup) Typo authentification vs authentication
Marc Véron [Fri, 15 Apr 2016 14:18:37 +0000 (16:18 +0200)]
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>
8 years agoBug 16270: Typo authentification/authentication
Jonathan Druart [Fri, 15 Apr 2016 07:05:37 +0000 (08:05 +0100)]
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>
8 years agoBug 16253: Changing 'delete order' to 'cancel order'
Aleisha [Tue, 26 Apr 2016 01:15:47 +0000 (01:15 +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>
8 years agoBug 16218: printfeercpt.tt (and others) does not include jQuery
Marc Véron [Thu, 7 Apr 2016 17:10:55 +0000 (19:10 +0200)]
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>
8 years agoBug 15009: QA follow-up
Jonathan Druart [Mon, 18 Apr 2016 09:37:18 +0000 (10:37 +0100)]
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>
8 years agoBug 15009: Correctly populate planning filter
Jonathan Druart [Mon, 18 Apr 2016 09:36:51 +0000 (10:36 +0100)]
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>
8 years agoBug 15009 - Adds unit tests for C4::Budget::GetBudgetAuthCats
charles [Fri, 25 Mar 2016 21:09:24 +0000 (17:09 -0400)]
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>
8 years agoBug 15009 - Planning dropdown button in aqbudget can have empty line
Blou [Tue, 13 Oct 2015 20:12:49 +0000 (16:12 -0400)]
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>
8 years agoBug 14050: Default framework for authorities should not be deletable
Marc Véron [Mon, 25 Apr 2016 13:02:36 +0000 (15:02 +0200)]
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>
8 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 (10:54 -0400)]
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>
8 years agoBug 16452: Remove the warnings raised by PatronLists.t
Jonathan Druart [Thu, 5 May 2016 14:36:50 +0000 (15:36 +0100)]
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>
8 years agoBug 16429 - Fix root problem
Kyle M Hall [Tue, 3 May 2016 10:36:15 +0000 (10:36 +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>
8 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 (10:30 +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>
8 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 (10:04 -0400)]
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>
8 years agoBug 16398: Keep the expanded view after clearing the search form
Jonathan Druart [Fri, 29 Apr 2016 15:52:26 +0000 (16:52 +0100)]
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>
8 years agoBug 16384: Fix cancel link for 'Edit basket'
Katrin Fischer [Fri, 29 Apr 2016 00:53:43 +0000 (02:53 +0200)]
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>
8 years agoBug 16325: Do not return all suggestions if search for STATUS=''
Jonathan Druart [Tue, 3 May 2016 15:13:44 +0000 (16:13 +0100)]
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>
8 years agoBug 16325: Add a test for SearchSuggestions when searching for STATUS=''
Jonathan Druart [Tue, 3 May 2016 15:13:27 +0000 (16:13 +0100)]
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>
8 years agoBug 16322: Translatability: Also adding "Status unknown" to column table
Hector Castro [Thu, 21 Apr 2016 21:47:28 +0000 (15:47 -0600)]
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>
8 years agoBug 16322 - Translatability: "Unknown" in suggestion/suggestion.pl not translatable
Marc Véron [Thu, 21 Apr 2016 19:13:46 +0000 (21:13 +0200)]
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>
8 years agoBug 16233 Unclosed <strong> in opac-facets.inc
Chris Cormack [Sun, 10 Apr 2016 22:10:18 +0000 (10:10 +1200)]
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>
8 years agoBug 16230 - Show tooltip with menu item when fund cannot be deleted
Owen Leonard [Fri, 8 Apr 2016 17:33:01 +0000 (13:33 -0400)]
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>
8 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 (13:16 +0200)]
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>
8 years agoBug 16220 - The view tabs on opac-detail.pl are not responsive
Owen Leonard [Thu, 7 Apr 2016 16:11:58 +0000 (12:11 -0400)]
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>
8 years agoBug 16159 - guarantor section missing ID on patron add form
Owen Leonard [Tue, 3 May 2016 17:09:54 +0000 (13:09 -0400)]
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>
8 years agoBug 16105: Do not initialize the memory cache if not needed
Jonathan Druart [Fri, 18 Mar 2016 13:39:27 +0000 (13:39 +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>
8 years agoBug 14144: Clean ups and refactors
Mark Tompsett [Mon, 4 Apr 2016 22:59:33 +0000 (18:59 -0400)]
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>
8 years agoBug 14144: Silence warnings t/db_dependent/Auth_with_ldap.t
Mark Tompsett [Mon, 4 Apr 2016 22:07:26 +0000 (18:07 -0400)]
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>
8 years agoBug 11203 - Datatables in acqusitions do not ignore "stopwords" in titles
Kyle M Hall [Tue, 5 Nov 2013 16:31:20 +0000 (11:31 -0500)]
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>
8 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 (11:55 +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>
8 years agoBug 9393 - Add note to circulation.pl if borrower has pending modifications
Kyle M Hall [Tue, 18 Dec 2012 19:18:16 +0000 (14:18 -0500)]
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>
8 years agoBug 16447: Remove occurrence of the borrow permission which does no longer exist
Jonathan Druart [Thu, 5 May 2016 13:52:04 +0000 (14:52 +0100)]
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>
8 years agoBug 16407: Simplify comments
Jonathan Druart [Mon, 2 May 2016 09:46:59 +0000 (10:46 +0100)]
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>
8 years agoBug 16407: Fix Koha_borrower_modifications.t
Marcel de Rooy [Sat, 30 Apr 2016 14:55:28 +0000 (16:55 +0200)]
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>
8 years agoBug 16390: Accounts.t does not need MPL
Marcel de Rooy [Fri, 29 Apr 2016 06:01:26 +0000 (08:01 +0200)]
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>
8 years agoBug 16170: Update schema
Julian Maurice [Mon, 16 May 2016 08:37:42 +0000 (10:37 +0200)]
Bug 16170: Update schema

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16369 - Clean up and improve plugins template
Owen Leonard [Tue, 26 Apr 2016 18:54:23 +0000 (14:54 -0400)]
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>
8 years agoBug 16321 - 'Show all details' checkbox triggers JS error after jQuery upgrade
Owen Leonard [Thu, 21 Apr 2016 16:39:53 +0000 (12:39 -0400)]
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>
8 years agoBug 16315 - OPAC Shelfbrowser doesn't display the full title
Owen Leonard [Tue, 3 May 2016 13:48:11 +0000 (09:48 -0400)]
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>
8 years agoBug 16170: Update DB rev (3.22.06.003)
Kyle M Hall [Tue, 3 May 2016 15:04:20 +0000 (15:04 +0000)]
Bug 16170: Update DB rev (3.22.06.003)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16170: [QA Follow-up] Fix embeded typos
Marcel de Rooy [Fri, 1 Apr 2016 07:34:50 +0000 (09:34 +0200)]
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>
8 years agoBug 16170: [QA Follow-up] Adjust Items.t
Marcel de Rooy [Fri, 1 Apr 2016 07:24:04 +0000 (09:24 +0200)]
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>
8 years agoBug 16170 - Corrected to make work more smoothly
Mark Tompsett [Thu, 31 Mar 2016 00:11:45 +0000 (20:11 -0400)]
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>
8 years agoBug 16170: Pseudo foreign key in Items
Marcel de Rooy [Wed, 23 Mar 2016 15:59:26 +0000 (16:59 +0100)]
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>
8 years agoBug 16041: Update DB rev (3.22.06.002)
Kyle M Hall [Fri, 29 Apr 2016 13:51:00 +0000 (13:51 +0000)]
Bug 16041: Update DB rev (3.22.06.002)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16041: Turn off StaffAuthorisedValueImages by default
Jonathan Druart [Wed, 30 Mar 2016 07:42:12 +0000 (08:42 +0100)]
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>
8 years agoBug 15919: Batch checkout - Display the due date
Jonathan Druart [Mon, 2 May 2016 19:19:05 +0000 (20:19 +0100)]
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>
8 years agoBug 15823: Redirect opac-discharge.pl to 404 page
Marc Véron [Thu, 5 May 2016 06:13:53 +0000 (08:13 +0200)]
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>
8 years agoBug 15823: Can still access patron discharge slip without having the syspref on
Aleisha [Tue, 23 Feb 2016 04:06:30 +0000 (04:06 +0000)]
Bug 15823: Can still access patron discharge slip without having the syspref on

EDIT: Fix for OPAC side
EDIT: Comment 10
EDIT: Merge conflicts

To test:
1) Ensure syspref useDischarge is disabled
2) Go to /cgi-bin/koha/members/discharge.pl?borrowernumber=X&discharge=1
3) Validate that you are still able to generate a discharge slip for this patron
4) Apply patch and refresh page
5) Confirm that you are redirected to the circulation.pl page for the user and that an error message is there.
OPAC SIDE
6) Go to the OPAC
7) Go to /cgi-bin/koha/opac-discharge.pl
8) Confirm you get a message saying discharges are disabled
9) Go to /cgi-bin/koha/opac-discharge.pl?op=request
10) Confirm you see same message

Sponsored-by: Catalyst IT
Followed test plan, works as expected (both staff client and OPAC).
Re-tested, works OK.
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 853d3cfe4d76d6f847e4f30dca4d50d278951fd0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15682 - Only allow merging of 2 or more records form lsits (for consistency)
Nick Clemens [Mon, 28 Mar 2016 20:09:01 +0000 (20:09 +0000)]
Bug 15682 - Only allow merging of 2 or more records form lsits (for consistency)

Test as above but on shelves.pl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 9550e37fc66402500adf8bca7a1c90ee0104cdd0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15682 - Merging records from cataloguing search only allows to merge 2 records
Nick Clemens [Mon, 28 Mar 2016 20:01:30 +0000 (20:01 +0000)]
Bug 15682 - Merging records from cataloguing search only allows to merge 2 records

To test:
1 - Perform a cataloging search
2 - Attempt to merge 0 results - should fail
3 - Attempt to merge 1 resutls - should fail
4 - Attempt to merge 2 results - should succeed
5 - Attempt to merge 3 results - should succeed
6 - Test any other amount of records and if more than 1 it should
succeed

**Note: On shelves.pl you can merge a single record.  I think that is
incorrect so made this only work for 2. Will add a followup to fix
shelves.pl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 8f1e5ad95fd78cbf09028e3d2dfe0b2b77d4dd21)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15816: Redirect back to correct page after login
Jesse Weaver [Fri, 6 May 2016 19:52:46 +0000 (13:52 -0600)]
Bug 15816: Redirect back to correct page after login

This uses a hacky but simple method to get the correct script name under
proxied packaged Plack.

Test plan:
  1) Log out of both the OPAC and staff side.
  2) Try to access a page that requires login (opac-reserve.pl is a
good one for the OPAC), then log in.
  3) You will be redirected back to mainpage.pl or opac-user.pl.
  4) Repeat above for both staff side and OPAC.
  5) Apply patch.
  6) Repeat steps 1-4; you should be redirected back to the original
     page you were on.
  7) Repeat the above for both a traditional CGI and kohadevbox/package
     Plack installation.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bc707baf02c672fdd8f6d2095137694d7e400a97)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15194 - Drop-down menu 'Actions' has problem in 'Saved reports' page with languag...
Owen Leonard [Tue, 3 May 2016 13:59:01 +0000 (09:59 -0400)]
Bug 15194 - Drop-down menu 'Actions' has problem in 'Saved reports' page with language bottom bar

This patch changes the direction of the "actions" menu on the saved
reports page so that it popup up instead of down.

To test, apply the patch and go to Reports -> Saved reports.

- Click the "Actions" menu for any report and confirm that the menu
  displays above the button instead of below it.

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 de98a936751efc00d893f6e74e440416d66140b4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14632: Add Copyright for the Koha Dev Team
Jonathan Druart [Sat, 23 Apr 2016 06:30:35 +0000 (07:30 +0100)]
Bug 14632: Add Copyright for the Koha Dev Team

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
https://bugs.koha-community.org/show_bug.cgi?id=14362

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 68dbe8415f17801798fea26803b9bd9fd5e713bb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14362: Regression tests
Mark Tompsett [Mon, 8 Jun 2015 03:40:50 +0000 (23:40 -0400)]
Bug 14362: Regression tests

This should trigger the error. Attempts to shift system time
zones did not make sense as to the number of failures.

Added Time::Fake dependency, if it isn't installed these extra
tests don't run. There is a nice skip message about it.

Added License text.

TEST PLAN
---------
 1) apply test patch
 2) sudo dpkg-reconfigure tzdata
    -- set your system time to GMT (Africa/Abidjan)
 3) prove t/Circulation/AgeRestrictionMarkers.t
    -- should not fail, even if you change system
       time to any time.
 4) sudo dpkg-reconfigure tzdata
    -- set your timezone to Eastern
 5) sudo date -s"2015-06-18 21:15:00"
 6) date
    -- should be past 9pm Eastern timezone
 7) prove t/Circulation/AgeRestrictionMarkers.t
    -- kaboom!
 8) sudo date -s"2015-06-18 12:00:00"
 9) date
    -- should be noon Eastern timezone
10) prove t/Circulation/AgeRestrictionMarkers.t
    -- success?! Time sensitive tests are bad tests.
11) sudo apt-get install libtime-fake-perl
12) prove t/Circulation/AgeRestrictionMarkers.t
    -- kaboom!
    -- changing timezone to anything other than GMT
       should trigger a kaboom.
13) apply fix patch
14) prove t/Circulation/AgeRestrictionMarkers.t
    -- should work all the time.
15) less t/Circulation/AgeRestrictionMarkers.t
    -- the license text should be similar to
       http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence
16) koha qa test tools.

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 a2aba3c86f106603212eb2c5beb52c3cdfe49857)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Conflicts:
C4/Installer/PerlDependencies.pm

8 years agoBug 14362: PEGI15 Circulation/AgeRestrictionMarkers test fails
Mark Tompsett [Mon, 8 Jun 2015 01:26:53 +0000 (21:26 -0400)]
Bug 14362: PEGI15 Circulation/AgeRestrictionMarkers test fails

It is best to test when UTC date is a date in the future compared
to your timezone. I'm in Eastern, so right now, I expect this
test to fail for another 2.5 hours.

TEST PLAN
---------
1) prove t/Circulation/AgeRestrictionMarkers.t
   -- fails for PEGI 15 after 9pm.
2) Apply patch
3) prove t/Circulation/AgeRestrictionMarkers.t
   -- works.
4) koha qa test tools

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 73f55165bef229668a135bee7e8c90a2c9c3f0a7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13877 - Fix QA issues
Alex Arnaud [Fri, 22 Apr 2016 09:03:50 +0000 (11:03 +0200)]
Bug 13877 - Fix QA issues

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit b84aa1779e0aa09c1a307e195908a205ea82aa88)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13877 - Make serialseq season name translatable regardless its position in a...
Alex Arnaud [Tue, 15 Mar 2016 15:36:28 +0000 (16:36 +0100)]
Bug 13877 - Make serialseq season name translatable regardless its position in a string

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit adb8d41053357eeb68fa148a04c2202df6e54974)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13041: Fix add of basket's manager when name contains a single quote
Julian Maurice [Mon, 9 May 2016 09:42:05 +0000 (11:42 +0200)]
Bug 13041: Fix add of basket's manager when name contains a single quote

If you are trying to add a user as a manager of a basket in
acquisitions, a JavaScript error will be triggered if that user has a
single quote in their name (e.g. "O'Neil"). This patch corrects the
issue.

Also changed by this patch: Increased the size of the patron search
popup and made a correction to some invalid HTML.

To test you should have a patron whose name contains a single quote who
is also a user with permission to manage acquisitions.

- Apply the patch and go to Acquisitions.
- Locate an open basket and view the details for that basket.
- In the "Managed by" section, click the "Add user" button to trigger
  the patron search popup.
  - Search for the patron described above and click the "Add" button.
  - In the parent window, the patron you chose should have been added to
    the "Managed by" section.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12721: (followup) Replace mysqlism by DBIx::Class
Marc Véron [Wed, 27 Apr 2016 10:38:58 +0000 (12:38 +0200)]
Bug 12721: (followup) Replace mysqlism by DBIx::Class

This patch removes the mysqlism (see comment #18)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed QA tools complaints about missing lines before
and after =cut in POD.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ef97b6b301a5c1a9ef5c63cc93933bf7442513fc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12721 - Prevent software error if incorrect fieldnames given in sypref Statistics...
Marc Véron [Sun, 18 Oct 2015 14:28:52 +0000 (16:28 +0200)]
Bug 12721 - Prevent software error if incorrect fieldnames given in sypref StatisticsFields

To reproduce issue:
See comment #1

To test:
- Apply patch
- Leave syspref StatisticsFields empty
- Display statistics for an author

  => Result: Table displays Shelving location, Collection code, Item type
           (as before)

- Change syspref to any combination of location|itype|ccode
  => Result: Table displays columns as appropriate

- Change syspref to some garbage
  => Result: Same as with empty syspref (was crashing without patch)

- Change syspref to valid combination with trailing |
  => Result: Table displays columns as appropriate (was crashing
     without patch)

- Change syspref to a combination of valid and invalid fields
  (location|blah|ccode)
  => Result: Table displays column of valid fields only (was crashing
     without patch)

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 5fc93bce9b786797724539bea1a1689e959078e6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12721 - Syspref StatisticsFields: Warning on About page and text change in System...
Marc Véron [Sun, 18 Oct 2015 16:27:58 +0000 (18:27 +0200)]
Bug 12721 - Syspref StatisticsFields: Warning on About page and text change in System preferences

This patch adds a warning to the about page if the syspref 'StatisticsFields' is misconfigured.
Additionally, the text on Home > Administration > SystemPreferences for 'Statistics Fields'
is changed.

To test:
- Apply patch
- Edit syspref 'StatisticsFields'. Verify that the explanation makes sense.
- Leave field empty
  => verify that no message appears on About page, tab System information
- Insert valid field names, e.g. location|itype
  => verify that no message appears on the About page
- Add trailing char
  => verify that the warning message appears on the About page
- Fill in some garbage or misspell a field name
  => verify that the warning message appears on the About page

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 95f492b4d2505103269b295a34bab74804df9746)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12663: (QA followup)
Nick Clemens [Thu, 31 Mar 2016 19:48:23 +0000 (19:48 +0000)]
Bug 12663: (QA followup)

    Insert SCOUserCSS/JS 'after' OPACUserCSS/JS rather than 'instead of'
    i.e. Remove IF/ELSE and use 2 IF

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 6dce6f171d475d49a905d42f7bbab348def71f7c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page
Nick Clemens [Tue, 8 Mar 2016 22:04:32 +0000 (22:04 +0000)]
Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page

Currently if not logged in when browsing to
http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl
You are redirected to opac-auth.tt and SCOUserCSS and SCOUserJS are not
loaded. This page passes through a parameter to the template to indicate
this is an SCO login and appropriate CSS and JS should be loaded.

Additionally this patch ensure that when loggin in using the form you
are redirected to the sco-main.pl instead of the patron account page for
the user.

To test:
1 - Verify that normal login works on both staff and opac
2 - Verify that SCO link goes to login page if AutoSelfCheckAllowed is
set to "Don't allow"
3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are
present on SCO log in page with AutoSelfCheck disabled
4 - Verify that a logged in opac user without permissions cannot access
the self-checkout module
5 - Verify that AutoSelfCheckAllowed and associated system preferences
function as expected
6 - Verify the AutoSelfCheck user is logged out if they attempt to visit
another page

Followed test plan.
If I go to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl, CSS and JS trigger already on
the login form, I suppose that is intended.
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 e476be5568d41bb06ce2fef5e8da6417cf9ed682)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16426: follow-up of bug 15840 - correctly manage userid while inserting patrons
Jonathan Druart [Tue, 3 May 2016 07:58:33 +0000 (08:58 +0100)]
Bug 16426: follow-up of bug 15840 - correctly manage userid while inserting patrons

Bug 15840 tried to fix a bug but makes things more complicated than it
was before.
If an userid is not provided for 1 or more rows of the csv file, it
should not be updated. However, if a userid is provided and it already
used by an other patron, the import should fail for this row (but not
crash!).

Test plan:
0/ Create a patron with a userid=your_userid
1/ Use the import patron tool to update this userid
=> userid should have been updated
2/ Update another data and do not provide the userid
=> data should have been updated and not the userid
3/ Update another data and provide the userid, but set it to an empty
string, or '0'
=> data should have been updated and not the userid
4/ Update another patron, and set userid=your_userid
=> Update should fail and an error whouls be displayed ("already used by
another patron")

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 7b76b24fad305b0253eb1d779f074d265087ca73)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16426: Add tests for ModMember - do not update userid
Jonathan Druart [Tue, 3 May 2016 07:58:26 +0000 (08:58 +0100)]
Bug 16426: Add tests for ModMember - do not update userid

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e883c19f3778c0247c11e6bdd3f27bbdd927468d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12752: FIX letter names in 3.15.00.041
Jonathan Druart [Wed, 6 Apr 2016 14:59:02 +0000 (15:59 +0100)]
Bug 12752: FIX letter names in 3.15.00.041

3.15.00.041 was wrong, the name of the letter should not always been the
name of the first HOLD notice.
PREDUE_PHONE should be updated with the first name of the PREDUE notice,
same for OVERDUE_PHONE and OVERDUE

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6d52cd63f351cd56f36492b80c10c0d8568ef03d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16217: Update DB rev (3.22.06.001)
Brendan Gallagher [Fri, 29 Apr 2016 02:26:46 +0000 (02:26 +0000)]
Bug 16217: Update DB rev (3.22.06.001)

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