koha.git
7 years agoBug 16148 - Revised layout and behavior of marc modification template management
Owen Leonard [Fri, 25 Mar 2016 13:47:11 +0000 (09:47 -0400)]
Bug 16148 - Revised layout and behavior of marc modification template management

This patch makes changes to the layout and behavior of the marc
modification template management page to make it adhere better to common
interaction patterns in Koha.

- The initial view shows a list of templates rather than pre-selecting
  the first available template for editing.

- A toolbar has been added with a "New template" button.

- The initial view of existing templates has an actions menu containing
  menu items for 'Edit actions,' 'Duplicate,' and 'Delete.' It doesn't
  appear to be possible to edit an existing template's name.

- The "Create template" form is no longer shown all the time.
  - Clicking the "New template" toolbar button triggers a modal with the
    form for creating a template. An existing template can be chosen to
    duplicate.
  - Choosing "Duplicate" from one of the template menus triggers the
    "New template" modal and preselects the corresponding template in
    the "duplicate" <select>.

- When editing actions for a template:
  - The breadcrumbs menu now reflects that a template is being modified.
  - The template name has been added as a heading.
  - A "New action" button appears in the toolbar
  - The "Edit" and "Delete" links now have a Bootstrap button style.
  - The add/edit form is now hidden by default.
  - Clicking "New action" or "edit" shows the add or edit form.
  - Clicking "Cancel" in the add/edit form hides the form.

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

- Got to Tools ->  MARC modification templates
- Test the "New template" button.
  - Confirm that new template creation works.
  - Confirm that duplicating a template works.
- Test the menu items in the "Actions" menu:
  - "Duplicate" should trigger the new template modal and preselect the
    template you chose to duplicate. Confirm that the template is
    successfully duplicated.
  - "Delete" should prompt you to confirm the deletion. Test both
    cancelling and confirming this operation.
  - "Edit actions" should load the page for adding or editing actions to
    a template. Test the operations on this page: New action, edit,
    delete, changing action order.

    Note that this patch does not fix Bug 15814, so action descriptions
    must still not contain single quotes.

Signed-off-by: Filippos Kolovos <f.kolovos@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16729: Use member-display-address-style*-includes when printing user summary
Marc Véron [Tue, 14 Jun 2016 05:07:05 +0000 (07:07 +0200)]
Bug 16729: Use member-display-address-style*-includes when printing user summary

This patch replaces the address part in moremember-print.tt to print identical
address information as displayed on the screen (including street numer, formatted as required by syspref 'AddressFormat'

To test:
- Apply patch
- Search for a user with all address information filled
- Verify that 'Print summmary' displays the same information
  as displayed on the screen.
- Change value of syspref 'AdressFormat'
- Verify that address format on 'Print summary' changes
  as appropriate

Signed-off-by: mehdi <mehdi@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16693: Remove reserve/renewscript.pl
Julian Maurice [Wed, 8 Jun 2016 11:47:58 +0000 (13:47 +0200)]
Bug 16693: Remove reserve/renewscript.pl

It is not used since bug 11703

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16672: Fix typo unqiue vs unique
Jonathan Druart [Tue, 14 Jun 2016 09:15:58 +0000 (10:15 +0100)]
Bug 16672: Fix typo unqiue vs unique

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16672 [QA Followup] - Convert negative days to positive days
Kyle M Hall [Mon, 13 Jun 2016 18:26:22 +0000 (18:26 +0000)]
Bug 16672 [QA Followup] - Convert negative days to positive days

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16672 - Add ability to remove expired holidays from special_holidays
Kyle M Hall [Mon, 6 Jun 2016 13:52:45 +0000 (13:52 +0000)]
Bug 16672 - Add ability to remove expired holidays from special_holidays

It would be very helpful if the cleanup_database.pl script had the
ability to delete holidays from the special_holidays table there were
older than a given number of days in the past.

Test Plan:
1) Apply this patch
2) Create some unique holidays in the past of varying ages
3) Test the new switch '--unique-holidays DAYS' for cleanup_database.pl
4) Verify only holidays older then the specified number of days are removed

NOTE: The language 'unique holdays' is used in the interface to match
      it's use in the staff web interface.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16543 - Make edit and delete links styled buttons in patron attribute types admin...
Owen Leonard [Wed, 25 May 2016 14:49:26 +0000 (10:49 -0400)]
Bug 16543 - Make edit and delete links styled buttons in patron attribute types administration

This patch modifies the Patron attribute types page, converting edit and
delete links to Bootstrap buttons with Font Awesome icons.

To test, apply the patch and go to Administration -> Patron attribute
types. The 'Edit' and 'Delete' buttons should look correct and work
correctly.

Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16541 - Make edit and delete links styled buttons in cities administration
Owen Leonard [Wed, 25 May 2016 14:56:13 +0000 (10:56 -0400)]
Bug 16541 - Make edit and delete links styled buttons in cities administration

This patch modifies the cities administration page, converting edit and
delete links to Bootstrap buttons with Font Awesome icons.

To test, apply the patch and go to Administration -> Cities and towns.
The 'Edit' and 'Delete' buttons should look correct and work correctly.

Signed-off-by: rainer <archiv@a-bibliothek.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16456: Reintroduce wording "Delete tag"
Jonathan Druart [Tue, 14 Jun 2016 10:09:42 +0000 (11:09 +0100)]
Bug 16456: Reintroduce wording "Delete tag"

"Delete tag" seems more appropriate than "Delete" on this tag, but I may
be wrong.

This patch also removes an extra space.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16456: Add Font Awesome icons to some buttons in Tools module, section Patrons...
Hector Castro [Sat, 14 May 2016 05:40:25 +0000 (23:40 -0600)]
Bug 16456: Add Font Awesome icons to some buttons in Tools module, section Patrons and circulation

Add Font Awesome Icons to section Patrons and circulation in Tools module.
Also correct a error dialog in JQuery functions

To test:
-Apply patch
-Goto Tools -> Patron list -> my_list_saved -> Add patrons -> Remove selected patrons,
 Clear all, Select all.
-Add new patron list and add some patrons, notice about the trash icon.
-Make some comments in some bib records and goto Tools->Comments
 you will presented with two tabs "Approved comments" and
 "Comments awaiting moderation".
 See the three new buttons: Approve, Delete, Unapprove.
-Set syspref TagsModeration to Require. This will show all pending tags to review.
-Make some tags in bib records and goto Tools -> Tags.
-Notice about the new look.
-In the new screen look the icons in buttons "Apply filter(s)", "Test", "Approved",
 "Reject". Notice about the new header bar above the DataTable with options: Select all,
  Clear all, Select all pending.
-Play with filters; Check if terms exist or not in appoved/rejected lists
-Play with Terms summary and see if DataTable is working as expected
-Click in some term tag with multiple titles
-A table with titles tagged with the term is presented
-See the new button 'Remove'
-Verify if you can remove tag from a selected title.
-Verify that all tools work as expected

NOTE: The Tag and Comments tools has been revised to fit with others
interfaces in Koha.
Bug ammended according with QA comment 5
Bug rebased because bug 16005
Test plan amended for clarity
Clock icon for "Select all pending" removed (QA comment 23).
Fix some forbidden patterns (tab char) in review.tt according by IRC comment
by Marc Veron

Followed test plan, looks and works as expected
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>
7 years agoBug 16127 - Add discharge menu item to patron toolbar
Owen Leonard [Tue, 31 May 2016 14:08:03 +0000 (10:08 -0400)]
Bug 16127 - Add discharge menu item to patron toolbar

This patch changes the "Discharge" menu in the patron sidebar to read
"Discharges," and adds a "Discharge" menu item to the patron toolbar.

This adds some redunancy, but fits with the pattern of including "views"
in the sidebar and "actions" in the menu. The discharge feature can be
thought of either way.

To test you must have the 'useDischarge' system preference enabled.

- View the detail page for any patron.
- Confirm that the sidebar menu reads "Discharges."
- Confirm that the "More" menu contains a "Discharge" link which works
  correctly.

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>
7 years agoBug 16594: Fix obvious QA issues from bug 11371
Jonathan Druart [Sat, 11 Jun 2016 13:32:05 +0000 (14:32 +0100)]
Bug 16594: Fix obvious QA issues from bug 11371

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16594: Orders by fund report has wrong link to css and other issues
Hector Castro [Thu, 26 May 2016 14:41:08 +0000 (08:41 -0600)]
Bug 16594: Orders by fund report has wrong link to css and other issues

Orders by fund has wrong link to css and other issues
-> The example in the wiki is wrong: <https://wiki.koha-community.org/wiki/DataTables_HowTo>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
  [% INCLUDE 'datatables.inc' %]
-> Must be:
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
-> Missing <th></th> in <tfoot> tag
-> Wrong word used "Date deceived" should be "Date received"

NOTE: Wiki needs to be updated

To test:
-Look the code and notice about if else cluase without curly brackets
-Go to Reports > Orders by fund
-Play with: in filters 'All fund' Output: 'to screen into the browser'
-You will see a DataTable displayed in screen clutter
-Notice about 'Date deceived' and the foot of table
-Apply patch
-Refresh or execute again the report

Signed-off-by: Sinziana <s.paltineanu@berlin.bard.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16717: Improve variable naming
Jonathan Druart [Tue, 14 Jun 2016 10:18:32 +0000 (11:18 +0100)]
Bug 16717: Improve variable naming

$category was a categorycode, to help the readability it's better to
name it $categorycode or assign a Category to $category

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16717: Remove hardcoded category from Holds.t
Marcel de Rooy [Fri, 27 May 2016 11:48:10 +0000 (13:48 +0200)]
Bug 16717: Remove hardcoded category from Holds.t

There is actually no need to use the hardcoded patron category S in
this test.

Test plan:
Run t/db_dependent/Holds.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Test passes OK
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>
7 years agoBug 16607: Remove CPL/MPL from two unit tests
Marcel de Rooy [Fri, 27 May 2016 06:35:57 +0000 (08:35 +0200)]
Bug 16607: Remove CPL/MPL from two unit tests

Test t/db_dependent/Accounts.t:
This test created a MPL branch, but did not use it any more.

Test t/db_dependent/Items/AutomaticItemModificationByAge.t:
This test still used CPL/MPL branches. Now it uses two new branches.

Test plan:
[1] Run t/db_dependent/Accounts.t.
[2] Run t/db_dependent/Items/AutomaticItemModificationByAge.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Both tests pass OK
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>
7 years agoBug 16500: [QA Follow-up] Catch warning if branch MPL already exists
Marcel de Rooy [Thu, 26 May 2016 19:56:50 +0000 (21:56 +0200)]
Bug 16500: [QA Follow-up] Catch warning if branch MPL already exists

The current test had no warnings, when you have no MPL branch, and only
catches the warn from the second build on line 57. If you do have MPL,
a warning comes from line 56.

This patch fixes it by removing MPL from the test. A new branch is created
first and then we try to create it again.

Test plan:
Run the test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16500: Catch two warns in TestBuilder.t with warning_like
Marcel de Rooy [Wed, 11 May 2016 12:49:07 +0000 (14:49 +0200)]
Bug 16500: Catch two warns in TestBuilder.t with warning_like

When testing a wrong case in TestBuilder.t, two warns show up.
We can catch them with warning_like.

Test plan:
Run t/db_dependent/TestBuilder.t

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16720: Remove DBIx ActionLogs.pm
Tomas Cohen Arazi [Mon, 13 Jun 2016 16:04:25 +0000 (13:04 -0300)]
Bug 16720: Remove DBIx ActionLogs.pm

The update_dbix_class_files.pl script generates ActionLog.pm instead, which is
already on the source tree.

To test:
- Apply the patch
=> SUCCESS: Koha/Schema/Result/ActionLogs.pm is removed
- Run:
  $ mysql -uroot
  > CREATE DATABASE dbic; \q
  $ mysql -uroot dbic < kohaclone/installer/data/mysql/kohastructure.sql
  $ misc/devel/update_dbix_class_files.pl --db_name dbic --db_user root
=> SUCCESS: Koha/Schema/Result/ActionLogs.pm is not re-generated
- Run:
  $ git grep ActionLogs
=> SUCCESS: There's no code using it
- Sign off

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16692 - Error "No method update!" when creating new serial issue
Kyle M Hall [Wed, 8 Jun 2016 10:24:56 +0000 (10:24 +0000)]
Bug 16692 - Error "No method update!" when creating new serial issue

An improper method call was left over in C4::Serials::NewIssue from the
switch from DBIx::Class to Koha::Object.

Test Plan:
1) prove t/db_dependent/Serials.t
2) Note the errors
3) Apply this patch
4) prove t/db_dependent/Serials.t
5) No errors!

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16670: (bug 15823 follow-up) CGI->param should not be called in list context
Jonathan Druart [Mon, 6 Jun 2016 12:31:29 +0000 (13:31 +0100)]
Bug 16670: (bug 15823 follow-up) CGI->param should not be called in list context

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16502: Replace a few other ok-calls by is-calls
Marcel de Rooy [Mon, 23 May 2016 07:03:23 +0000 (09:03 +0200)]
Bug 16502: Replace a few other ok-calls by is-calls

Trivial changes that speak for themselves..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16502: Adjust test for GetPlugins
Marcel de Rooy [Mon, 23 May 2016 06:58:02 +0000 (08:58 +0200)]
Bug 16502: Adjust test for GetPlugins

The current test assumes that GetPlugins will return the test plugin
as the first one in the array. This is not correct.
This patch adjusts the test to a grep.

Test plan:
Run the test.
Bonus: Add additional plugins. Run the test again.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16502: Add additional test to Plugins.t
Marcel de Rooy [Mon, 16 May 2016 17:00:16 +0000 (19:00 +0200)]
Bug 16502: Add additional test to Plugins.t

In order to verify if the delete now really works, we add one test
in Plugins.t.

Test plan:
[1] Run the test.
[2] Bonus: Comment line 63 in Plugins.t where delete is called.
    Run the test again. It should fail now.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16502: Table koha_plugin_com_bywatersolutions_kitchensink_mytable not always...
Marcel de Rooy [Mon, 16 May 2016 15:19:54 +0000 (17:19 +0200)]
Bug 16502: Table koha_plugin_com_bywatersolutions_kitchensink_mytable not always dropped after running Plugin.t

If you run Plugin.t, the above table will still be present (when you
did not enable UseKohaPlugins). This would trigger a warning when
running the test a second time.

Why? The uninstall call does its work not completely due to a small
inconsistency in Koha::Plugins::Handler::delete when calling run
without the enable_plugins parameter.

This patch resolves that inconsistency and also removes an unneeded skip
in Plugin.t in case the KitchenSink module already exists.
Note: This is a small fix. But I wonder if the Handler routines run and
delete should not have been implemented in Koha::Plugins::Base.
Also note that plugins/plugins-uninstall.pl will not be affacted by this
change, since it checks whether the pref is enabled before calling the
delete method.

Test plan:
[1] Do not yet install this patch.
[2] Verify that plugins are enabled in koha-conf.xml.
[3] Disable UseKohaPlugins in System Preferences!
[4] Run t/db_dependent/Plugins.t.
[5] Verify that table koha_plugin_com_bywatersolutions_kitchensink_mytable
    still exists. (It should have been deleted.) Remove it manually.
[6] Apply this patch.
[7] Run the test again.
[8] Verify that the table does not exist.
[9] Run the test again (without warnings).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 13074: (followup) remove useless diag
Tomas Cohen Arazi [Mon, 9 May 2016 14:13:38 +0000 (11:13 -0300)]
Bug 13074: (followup) remove useless diag

On running all Items-related tests some useless diag showed up. Removing it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 13074: Use Koha::Cache to cache the defaults values of a MARC record
Jonathan Druart [Tue, 3 May 2016 10:08:47 +0000 (11:08 +0100)]
Bug 13074: Use Koha::Cache to cache the defaults values of a MARC record

With the global %default_values_for_mod_from_marc variable, the changes
made to the marc_subfield_structure table and especially the links
between MARC and DB fields are not safe and might be outdated (if a
field is linked/unlinked)

Test plan:
Under Plack:
- Link the barcode field, edit a record and set a barcode.
- Remove the mapping for the barcode field and then update again the
  barcode of the record.
The items.barcode DB field must not have been updated.

Without this patch, the field should have been updated.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12748: findSerialByStatus has been renamed with findSerialsByStatus
Jonathan Druart [Tue, 14 Jun 2016 09:49:41 +0000 (10:49 +0100)]
Bug 12748: findSerialByStatus has been renamed with findSerialsByStatus

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12748: Code tidy
Jonathan Druart [Tue, 14 Jun 2016 09:43:14 +0000 (10:43 +0100)]
Bug 12748: Code tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12748: Remove warning 'masks earlier declaration in same scope'
Jonathan Druart [Tue, 14 Jun 2016 09:39:08 +0000 (10:39 +0100)]
Bug 12748: Remove warning 'masks earlier declaration in same scope'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12748 - Add test for step 7 and 8 and rename findSerialByStatus
remi [Mon, 8 Feb 2016 20:04:07 +0000 (15:04 -0500)]
Bug 12748 - Add test for step 7 and 8 and rename findSerialByStatus

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12748 - Fixes duplicate serials with an "expected" status bug
remi [Tue, 11 Aug 2015 15:10:45 +0000 (11:10 -0400)]
Bug 12748 - Fixes duplicate serials with an "expected" status bug

Added a new sub to Serials.pm to be able to get serials with their statuses.
Now the sub ModSerialStatus checks for other serials with an "expected" status before doing anything.

Also modified Serials.t to be able to test those changes.

Test Plan
1) Apply patch
2) Run ./t/db_dependent/Serials.t
3) Validate that there are no errors
4) Go on "Serial collection information" page for a serial of your choice
5) Click on "Generate next"
6) Change the status of the original serial from "late" to "expected"
7) Change the newly generated serial from "expected" to "delete"
8) Validate that there are no new serials created by instruction 7 and that the serial was deleted
9) Run ./t/db_dependent/Serials.t

With QA Fixes

- Use the constant instead of the code (1 vs EXPECTED)
- Avoid interpolation in query
- use selectall_arrayref instead of fetchall_arrayref

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 10459 - Update Schema
Kyle M Hall [Tue, 14 Jun 2016 16:35:49 +0000 (16:35 +0000)]
Bug 10459 - Update Schema

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16592 - Use Bootstrap modal for MARC and Card preview on acquisitions receipt...
Owen Leonard [Thu, 26 May 2016 11:26:33 +0000 (07:26 -0400)]
Bug 16592 - Use Bootstrap modal for MARC and Card preview on acquisitions receipt summary page

This patch replaces Greybox modals on the acquisitions receipt summary
page with Bootstrap modals.

To test, apply the patch and go to Acquisitions -> Invoices -> View an
invoice ->  Go to receipt page.

- In the list of pending orders, test the "MARC" and "Card" links for
  various titles. Each should trigger a Bootstrap modal with the correct
  content.
- Repeat the same tests in the list of already received orders.

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>
7 years agoBug 16289: Refactore code and add tests
Jonathan Druart [Mon, 6 Jun 2016 19:46:01 +0000 (20:46 +0100)]
Bug 16289: Refactore code and add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16289: Abbreviated formatting for numbering patterns
Karl Holten [Mon, 18 Apr 2016 19:17:40 +0000 (14:17 -0500)]
Bug 16289: Abbreviated formatting for numbering patterns

To test:

1) Go to Serials -> Manage numbering patterns
2) Create .New Numbering Pattern.
3) Type in a name of 'Day, Month, Season' and a numbering formula of '{X} {Y} {Z}'.
4) Set up the X field as following: add 1, every 1, set back to 1, when more than 30.
5) Select the formatting for X. There should be six options available instead of the original three. Use the formatting 'Name of Day (abbreviated)'.
5) Set up the Y field to add 1 every 30 reset back to 1 when more than 12. Use the formatting option 'Name of month (abbreviated)'.
6) Set up the Z field to add 1 every 90 reset back to 1 when more than 4. Use the formatting option 'Name of season (abbreviated)'.
8) Select a frequency of 1/day.
9) Select a first issue publication date of Jan 1, 2016.
10) Set X to begin with 5 and have an inner counter of 5. Set Z to begin with 3 and have an inner counter of 10.
11) Click the 'Test Pattern' button.
12) Abbreviated versions of the day, month and season should appear in the test pattern.

Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16165 - Include link to ILS-DI documentation page in ILS-DI system preference
Claire Gravely [Sat, 4 Jun 2016 11:30:30 +0000 (13:30 +0200)]
Bug 16165 - Include link to ILS-DI documentation page in ILS-DI system preference

There is no clue in the system preference about the nice ILS-DI documentation
once you turn it on. We should include a note and the link, similar to how we
do it for the web self checkout.

Test plan:
Syspreference ILS-DI should now include URL in description.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 15213 - Fix tools sidebar to highlight Patron lists when in that module
Liz Rea [Thu, 19 Nov 2015 22:29:44 +0000 (11:29 +1300)]
Bug 15213 - Fix tools sidebar to highlight Patron lists when in that module

To test:

Add some patron lists, navigate through the lists interface and make
sure that while you are in the module, that Patron lists is highlighted
on the sidebar.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: fix alignement

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16637: Dependency for C4::Tags not listed
Mark Tompsett [Sat, 4 Jun 2016 15:11:00 +0000 (11:11 -0400)]
Bug 16637: Dependency for C4::Tags not listed

Added optional dependency, so as to explain why testing
explodes when the Enhanced Content system preference
TagsExternalDictionary is set. It is optional, because not only
does TagsExternalDictionary have to be set, but TagsEnabled
must be 'Allow'.

Also tweaked C4/Tags.pm to ignore TagsExternalDictionary,
if Lingua::Ispell is not installed. A warning is given.

TEST PLAN
---------
 1) Set the Enhanced Content system preference
    TagsExternalDictionary to /usr/bin/ispell

 2) sudo apt-get install liblingua-ispell-perl
    -- should be a new install

 3) prove t/db_dependent/Tags.t
    -- should work fine

 4) sudo apt-get remove liblingua-ispell-perl

 5) prove t/db_dependent/Tags.t
    -- should explode

 6) Clear the Enhanced Content system preference
    TagsExternalDictionary

 7) prove t/db_dependent/Tags.t
    -- should work fine

 8) apply patch

 9) prove t/db_dependent/Tags.t
    -- should work fine

10) Set the Enhanced Content system preference
    TagsExternalDictionary to /usr/bin/ispell

11) prove t/db_dependent/Tags.t
    -- should work, with warning.

12) sudo apt-get install liblingua-ispell-perl

13) prove t/db_dependent/Tags.t
    -- should work fine

14) run koha qa test tools.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Post-hackfest hotel Olympia lobby signoff. Kalimera!
Works as expected.
At this moment the Tags.t test does not need the database btw,
but the module should have much more test coverage.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16636 [QA Followup] - Move tests to t/External
Kyle M Hall [Fri, 10 Jun 2016 18:02:14 +0000 (18:02 +0000)]
Bug 16636 [QA Followup] - Move tests to t/External

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16636: [QA Follow-up] Move External_BakerTaylor.t to t
Marcel de Rooy [Fri, 10 Jun 2016 08:31:34 +0000 (10:31 +0200)]
Bug 16636: [QA Follow-up] Move External_BakerTaylor.t to t

When we mock the preferences completely now, we do not need
db access anymore.

Test plan:
Run the test without exporting KOHA_CONF.
The test passes with some warns about koha-conf.xml.
If you point KOHA_CONF to etc/koha-conf.xml, you have no warns.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16636: [QA Follow-up] Make BakerTaylor plack safe
Marcel de Rooy [Fri, 10 Jun 2016 07:30:51 +0000 (09:30 +0200)]
Bug 16636: [QA Follow-up] Make BakerTaylor plack safe

Initialize file level lexicals each call. Do not call _initialize
outside the module.
Adjust test by mocking preferences.

Test plan:
Run t/db_dependent/External_BakerTaylor.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested module with trivial script under Plack/memcached by toggling
the associated preferences.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16636: t/00-load.t warning from C4/External/BakerTaylor.pm
Mark Tompsett [Thu, 2 Jun 2016 00:43:30 +0000 (20:43 -0400)]
Bug 16636: t/00-load.t warning from C4/External/BakerTaylor.pm

Since the tests are expecting an initialize function, the
initialize call was just moved outside of the INIT block.

TEST PLAN
---------
1) prove t/00-load.t
   -- warnings about INIT for BakerTaylor
2) prove `git grep -l BakerTaylor | grep [.]t$`
   -- should all run okay
3) apply patch
4) repeat steps 1 and 2
   -- warning should be gone, and everything else run okay
5) run koha qa test tools

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Florent Mara <florent.mara@gmail.com>
NOTE: Tweaked test plan based on comment #4,
      Added sign off based on comment #6.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16635: [QA Follow-up] Eliminate some global package vars
Marcel de Rooy [Mon, 6 Jun 2016 08:49:06 +0000 (10:49 +0200)]
Bug 16635: [QA Follow-up] Eliminate some global package vars

[1] $branch is only related to line 123 as fallback.
[2] $width moved to a constant; sub width is not used.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested the corresponding plugin in item editor.
Test t/db_dependent/Barcodes.t and Barcodes_ValueBuilder.t still pass.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16635: t/00-load.t warning from C4/Barcodes/hbyymmincr.pm
Mark Tompsett [Thu, 2 Jun 2016 00:41:27 +0000 (20:41 -0400)]
Bug 16635: t/00-load.t warning from C4/Barcodes/hbyymmincr.pm

According to http://perldoc.perl.org/vars.html, "our" should
be a reasonable substitute for the "use vars". By declaring as
"our", and removing the INIT, prove t/00-load will no longer
generate a warning about INIT for the C4/Barcodes/hbyymmincr.pm
module.

TEST PLAN
---------
1) prove t/00-load.t
   -- warnings about INIT for hbyymmincr
2) prove `git grep -l hbyymmincr | grep [.]t$`
   -- should all run okay
3) apply patch
4) repeat steps 1 and 2
   -- warning should be gone, and everything else run okay
5) run koha qa test tools

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16634: Translatability: Fix issue in memberentrygen.tt
Marc Véron [Wed, 1 Jun 2016 20:28:51 +0000 (22:28 +0200)]
Bug 16634: Translatability: Fix issue in memberentrygen.tt

This patch fixes a small translatability issue in
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
The sentence following sentence was splitted by HTML tags:
"Attribute value xxxxx is already in use by another patron record."

To test:
- Review code
- Apply patch
- In Admin, create a unique patron attribute type and try to give
  two patrons the same value for this attribute type.

Signed-off-by: Rocio Dressler <rocio@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16633: Translatability: Issues in tags/review.tt (sentence splitting)
Marc Véron [Wed, 1 Jun 2016 19:26:55 +0000 (21:26 +0200)]
Bug 16633: Translatability: Issues in tags/review.tt (sentence splitting)

This patch fixes translatability issues in
koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt
(isolated words by sentence splitting).

To test:
- Review code and verify that changes make sense.

Signed-off-by: Rocio Dressler <rocio@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16620: Translatability: Fix problem with isolated word "please" in auth.tt
Marc Véron [Tue, 31 May 2016 08:17:13 +0000 (10:17 +0200)]
Bug 16620: Translatability: Fix problem with isolated word "please" in auth.tt

This patch fixes a translatability problem (syntax in different languages) with a tag-isolated word "please"
in koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt

To test:
- Verify in code that there is no sentence spliting by a-tags (lines 80/84).

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16613: fix MARC 09X help links
phette23 [Fri, 27 May 2016 17:13:14 +0000 (10:13 -0700)]
Bug 16613: fix MARC 09X help links

The 09X MARC fields, such as 099 local call number or 090
locally-assigned Library of Congress call number, all point to
non-existent pages on the LC website, e.g.
http://www.loc.gov/marc/bibliographic/bd090.html

Test plan:
- enter the advanced cataloging editor
- begin to input any MARC tag of form 09X
- click the help link at the bottom of the browser window
=> Without this patch, taken to a URL of form `'http://www.loc.gov/marc/bibliographic/bd' +
  tag + '.html'` which is broken because the only documentation for
  these tags is at https://www.loc.gov/marc/bibliographic/bd09x.html
=> With this patch applied, the link is correct

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>
7 years agoBug 16563: Translatability: Issues in opac-account.tt (sentence splitting)
Marc Véron [Mon, 23 May 2016 09:20:10 +0000 (11:20 +0200)]
Bug 16563: Translatability: Issues in opac-account.tt (sentence splitting)

This patch removes splitting by <i>-tags from 2 sentences.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16540 - Clean up opac-auth.tt for translatability
Marc Véron [Wed, 1 Jun 2016 14:41:55 +0000 (16:41 +0200)]
Bug 16540 - Clean up opac-auth.tt for translatability

This patch fixes translatability issues in opac-auth.tt (ugly
translations caused by sentence splitting).

It was necessary to change indentation to make the the file more
readable and to make sure that changes have no side effects.

The changes do not touch the overall functionallity.

To test:
- Review code to verify that no functionality change is introduced
  and to verify that the text changes make sense.
- Apply patch, verify that OPAC login page behaves as before.

UPDATE: Amended for comment #10 / mv
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16667: Unused variable and function call in circulation.pl
Tomas Cohen Arazi [Sun, 5 Jun 2016 11:46:06 +0000 (08:46 -0300)]
Bug 16667: Unused variable and function call in circulation.pl

This patch removes an unused occurence of the $branches variable. Probably a
leftover from a recent rewrite.

To test:
- Run:
  $ git grep '$branches' circ/circulation.pl
=> FAIL: Only on occurence of the variable
- Apply the patch
- Run:
  $ git grep '$branches' circ/circulation.pl
=> SUCCESS: The variable has been removed
- Sign off :-D

Regards

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16609: Catch warning from Koha::Hold in Hold.t
Marcel de Rooy [Fri, 27 May 2016 12:02:42 +0000 (14:02 +0200)]
Bug 16609: Catch warning from Koha::Hold in Hold.t

Before this patch, the suspend step triggers a warn from Koha::Hold.
Now we catch it.

Test plan:
Run the test. Do not see the warning about unable to suspend.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
NOTE: Nice clean up!

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>
7 years agoBug 16608 - Missing entity nbsp in some XML files
Fridolin Somers [Fri, 27 May 2016 08:50:00 +0000 (10:50 +0200)]
Bug 16608 - Missing entity nbsp in some XML files

The special character "non breaking space" &nbsp; is not contained in XML syntax by default.
So we add it in the file header :
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>

Even if the source code files do no contain this character, it can be that translated files contain it.
French for example "Titre&nbsp;:".

This entity is missing in all files in koha-tmpl/intranet-tmpl/prog/en/data/ and in some files of koha-tmpl/intranet-tmpl/prog/en/xslt.

Test plan :
  - generate French templates:
    cd misc/translator
    ./translate install fr-FR
    cd ../..
  - run test:
    prove -v t/00-valid-xml.t
    you get failing error message
  - apply this patch
  - translate again
  - run test again: it passes

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described following test plan
Tes pass, no errors.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16608 - Add xsd extension to t/00-valid-xml.t
Fridolin Somers [Fri, 27 May 2016 08:46:44 +0000 (10:46 +0200)]
Bug 16608 - Add xsd extension to t/00-valid-xml.t

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16589 - Quote of the day: Fix upload with csv files associated to LibreOffice...
Marc Véron [Sat, 28 May 2016 07:44:40 +0000 (09:44 +0200)]
Bug 16589 - Quote of the day: Fix upload with csv files associated to LibreOffice Calc

To reproduce:
- Install LibreOffice and make sure that csv files are associated to Calc
  (Note: tested with Firefox 46.0.1 on Windows 8)
- Go to Home > Tools > Quote editor > Quote uploader
- Try to upload a valid CSV (e.g. Example from Bug 15684)
Result: File can not be uploaded
        (Incorrect filetype: application/vnd.sun.xml.calc)
To test:
- Apply patch
- Try to upload again
Expected result: Quotes are imported.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Can't reproduce on a Mac but get it fails on a Windows Box: fixed with this
  patch.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Can't recreate on debian but the fix looks safe.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16560: Translatability: Issues with "The entered " in opac-memberentry.tt
Marc Véron [Mon, 23 May 2016 12:16:02 +0000 (14:16 +0200)]
Bug 16560: Translatability: Issues with "The entered " in opac-memberentry.tt

This patch fixes two splitted sentences to avoid translation issues:

The entered <a href="#borrower_cardnumber">card number</a> is the wrong length.
The entered <a href="#borrower_cardnumber">card number</a> is already in use.

To test:
Apply patch and verify that html in the 2 that are changed is correct and that
they are not splitted by a-tags.

Note: I could not figure out under which conditions this code displays in
      the OPAC self registration form.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 15676 - Actions in pending offline circulation actions are not translatable
Owen Leonard [Thu, 26 May 2016 16:29:38 +0000 (12:29 -0400)]
Bug 15676 - Actions in pending offline circulation actions are not translatable

This patch modifies the offline circulation transaction processing page
so that English strings describing actions are processed in the template
rather than being output directly from the script.

To test, apply the patch and create an offline circulation file
containing at least one checkout, one check-in, and one payment.

- Upload the file and choose 'Add to offline circulation queue.'
- View pending offline circulation actions
- In the list of pending actions, the actions column should show "Check
  out" instead of "issue," "Check in" instead of "return," and "Payment"
  instead of "payment."

Strings appear as expected.
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>
7 years agoBug 14897 - Header name mismatch in ./modules/catalogue/detail.tt
Dimitris Antonakis [Sat, 4 Jun 2016 13:00:47 +0000 (16:00 +0300)]
Bug 14897 - Header name mismatch in ./modules/catalogue/detail.tt

We changed the detail.tt file for staff interface from Publication details to
"Serial enumeration / chronology" to match the cataloguing editor.

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14605 - Corrects the individual fine's description
Blou [Mon, 27 Jul 2015 20:24:46 +0000 (16:24 -0400)]
Bug 14605 - Corrects the individual fine's description

When paying a fine, the description is built out of the borrower's type and title, instead of the actual fine's description.

STEPS:
1) in the staff, go to a user with a fine to pay.
   a) if none, go to a user and Fines>>"Create manual invoice" with a distinctive description.
2) In Fines>>Pay fines, click the "Pay" button on the line of the fine.
3) This will take you a "Pay an individual fine" screen, where the description will look like "Staff Mrs", for the category and title of the borrower.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16492: Add a FIXME to explain the possible problem with no_set_userenv
Jonathan Druart [Wed, 8 Jun 2016 14:32:31 +0000 (15:32 +0100)]
Bug 16492: Add a FIXME to explain the possible problem with no_set_userenv

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16492: Test that no_set_userenv will not set userenv if not exist yet
Jonathan Druart [Wed, 25 May 2016 16:33:00 +0000 (17:33 +0100)]
Bug 16492: Test that no_set_userenv will not set userenv if not exist yet

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16492 - Checkouts ( and possibly checkins and other actions ) will use the patron...
Kyle M Hall [Tue, 10 May 2016 16:36:03 +0000 (16:36 +0000)]
Bug 16492 - Checkouts ( and possibly checkins and other actions ) will use the patron home branch as the logged in library

Bug 14507 introduced the use of checkpw in C4::SIP::ILS::Patron so that
non-Koha internal authentication processes would be able to function via
SIP ( LDAP et al ).

The problem is that checkpw changes the userenv to that of the patron!
This is not usually an issue in Koha because most of the time that
patron running through checkpw is the one to be logged in.

Aside from SIP2 the only other area where this may be an issue is in SCO
when using SelfCheckoutByLogin.

Test Plan:
1) On master, check out an item to a patron via SIP2
2) Note the checkout lists the item as having been checked out
   from the patron's home library not matter which library is was
   supposed to be checked out from.
3) Apply this patch
4) Re-checkout the item
5) The item should now be checked out as if it was checked out from
   the library as defined in the SIP configuration file.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 10459 - DBRev 16.06.00.002
Kyle M Hall [Fri, 10 Jun 2016 17:15:21 +0000 (17:15 +0000)]
Bug 10459 - DBRev 16.06.00.002

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 10459: Add tests for borrowers.updated_on
Jonathan Druart [Tue, 7 Jun 2016 09:20:53 +0000 (10:20 +0100)]
Bug 10459: Add tests for borrowers.updated_on

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 10459 renamed timestamp to updated_on
Mark Tompsett [Thu, 26 May 2016 01:57:34 +0000 (21:57 -0400)]
Bug 10459 renamed timestamp to updated_on

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 10459: Borrowers should have a timestamp
Marcel de Rooy [Mon, 10 Nov 2014 13:17:40 +0000 (14:17 +0100)]
Bug 10459: Borrowers should have a timestamp

This patch adds a timestamp column to the borrowers table in kohastructure
and updatedatabase. (And also to the deletedborrowers table.)
A timestamp may be useful in synchronizing with external systems (among other
reasons).

Test plan:
Run updatestructure on an existing database, or install a new one.
Verify that the borrowers table has a timestamp now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested updatestructure and running kohastructure.sql.
Passed t/db_dependent/Members.t.

updatedatabase.pl did not apply. I edited and then run it. Columns were added as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Bug 10459: Follow up to update to atomic update methodology

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
New column created, no errors.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16695: Require Exception::Class 1.38 instead of 1.39
Jonathan Druart [Wed, 8 Jun 2016 13:52:04 +0000 (14:52 +0100)]
Bug 16695: Require Exception::Class 1.38 instead of 1.39

Looking at
http://cpansearch.perl.org/src/DROLSKY/Exception-Class-1.40/Changes
there is no need to require 1.39

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16647: update debian/control for 16.*
Galen Charlton [Tue, 7 Jun 2016 00:44:07 +0000 (00:44 +0000)]
Bug 16647: update debian/control for 16.*

This patch updates debian/control* to match what
was used for building the 16.05.00 packages, and includes
changes to:

- specify a floor for the Swagger2 version
- add dep on libio-socket-ip-perl, which is needed
  for the package to work on Debian Wheezy
- suggest libwww-youtube-download-perl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16649: Make OpenLibrarySearch test pass even if launches offline
Jonathan Druart [Sat, 4 Jun 2016 11:26:27 +0000 (12:26 +0100)]
Bug 16649: Make OpenLibrarySearch test pass even if launches offline

Test plan:
  prove t/OpenLibrarySearch.t
should return green even if you are offline

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16675: fix breakage of t/Languages.t
Galen Charlton [Tue, 7 Jun 2016 01:42:59 +0000 (01:42 +0000)]
Bug 16675: fix breakage of t/Languages.t

This patch fixes test breakage introduced by the patch for bug 16088,
which added caching of getlanguages().  Upon inspection, it looks like
the patch for 16088 does not introduce a regression on bug 10560,
so this patch adds a couple cache-clearings.

To test
-------
[1] Verify that t/Languages.t passes.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16668: Fix t/Ris.t tests
Jonathan Druart [Tue, 7 Jun 2016 11:29:33 +0000 (12:29 +0100)]
Bug 16668: Fix t/Ris.t tests

Caused by bug 16442.
Now we need to mock the marcflavour pref

Test plan:
  prove t/Ris.t
should return green

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16618: 00-load.t prematurely stops all testing
Mark Tompsett [Mon, 30 May 2016 16:16:36 +0000 (12:16 -0400)]
Bug 16618: 00-load.t prematurely stops all testing

Rather than add/remove regular expressions to skip modules (like bug 9054), encapsulate the decision logic into a separate function.

Currently there are three libraries which trigger halts:
Koha::NorwegianDB (which was already there)
Koha::ElasticSearch::Indexer
Koha::SearchEngine::Elasticsearch::Search

TEST PLAN
---------
1) prove t/00-load.t
   -- should barf horribly on Catmandu stuff
      if not: sudo apt-get remove libcatmandu-marc-perl
      then repeat step.
2) apply patch
3) prove t/00-load.t
   -- should not barf horribly
4) run koha qa test tools

NOTE: The four optional modules for Koha::NorwegianDB are
      listed in the PerlDependencies.pm, while there is
      no mention of Catmandu libraries at all there.
      This may be another bug which needs fixing.

TECH NOTES (for ideas of how to tinker around):
These three things should trigger the three module cases:
sudo apt-get remove libcatmandu-marc-perl
sudo apt-get remove libcatmandu-store-elasticsearch-perl
sudo apt-get remove libconvert-basen-perl

You probably had koha-perldeps installed before, so the following wil mostly fix:
sudo apt-get install koha-perldeps libcatmandu-marc-perl

And in case you didn't have elastic search stuff installed:
echo deb http://packages.elastic.co/elasticsearch/1.7/debian stable main | sudo tee /etc/apt/sources.list.d/elasticsearch.list
wget -O- https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get update

cd ~
wget http://debian.koha-community.org/koha/otherthings/elasticsearch_deps.tar.gz
tar xvf elasticsearch_deps.tar.gz
cd es_deps
sudo dpkg i lib*
sudo apt-get install -f

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16596: Display library and patron category descriptions instead of their code
Jonathan Druart [Thu, 26 May 2016 09:55:09 +0000 (10:55 +0100)]
Bug 16596: Display library and patron category descriptions instead of their code

Test plan:
On circ/circulation-home.pl and reserve/request.pl, search for patrons
The descriptions for the libraries and patron categories should be
displayed.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
On top of Bug 13336
Works as described, now descriptions instead of codes.
No errors

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
https://bugs.koha-community.org/show_bug.cgi?id=16455

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16578: Same fix for the staff interface
Jonathan Druart [Wed, 25 May 2016 17:09:27 +0000 (18:09 +0100)]
Bug 16578: Same fix for the staff interface

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as first patch
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16578: Fix wide character errors in opac-export.pl
Tomas Cohen Arazi [Tue, 24 May 2016 17:28:44 +0000 (14:28 -0300)]
Bug 16578: Fix wide character errors in opac-export.pl

This simple patch fixes wide character warning raised by opac-export.pl when
'MARC (Unicode/UTF-8)' and 'MARC (Unicode/UTF-8, Standard)' formats are chosen for downloading records.

To test:
- Have records indexed
- Open your OPAC logs:
  $ tail -f /var/log/koha/kohadev/opac-error.log
- Open the detail page in the opac for a record
- Choose Save record > MARC (Unicode/UTF-8)
=> FAIL: opac-export.pl: Wide character in print at /home/vagrant/kohaclone/opac/opac-export.pl line 116., referer: http://localh...
- Choose Save record > MARC (Unicode/UTF-8, Standard)
=> FAILE opac-export.pl: Wide character in print...
- Apply the patch
- Choose Save record > MARC (Unicode/UTF-8)
=> SUCCESS: No warnings raised.
- Choose Save record > MARC (Unicode/UTF-8, Standard)
=> SUCCESS: No warnings raised.
- Sign off :-D

Followed test plan, works as expected.
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>
7 years agoBug 16465: Fix typo issues vs checkouts
Jonathan Druart [Wed, 11 May 2016 12:04:38 +0000 (13:04 +0100)]
Bug 16465: Fix typo issues vs checkouts

Test plan:
Confirm the wording is correct

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16465: discharge - Add a title tag at the OPAC
Jonathan Druart [Wed, 11 May 2016 11:57:47 +0000 (12:57 +0100)]
Bug 16465: discharge - Add a title tag at the OPAC

Test plan:
Confirm that the opac-discharge.pl has now a title

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16428: [QA Follow-up] Useless call to GetMarcStructure in _build_default_values_f...
Marcel de Rooy [Wed, 11 May 2016 13:47:46 +0000 (15:47 +0200)]
Bug 16428: [QA Follow-up] Useless call to GetMarcStructure in _build_default_values_for_mod_marc

The routine calls GetMarcStructure and does not use its return value
after all.

Test plan:
Run t/db_dependent/Items.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16428: Use the biblio framework to know if a field is mapped
Jonathan Druart [Tue, 3 May 2016 10:03:52 +0000 (11:03 +0100)]
Bug 16428: Use the biblio framework to know if a field is mapped

The subroutine _build_default_values_for_mod_marc takes the
frameworkcode in parameter, but ModItemFromMarc did not pass it.
It uses it to know if a field is mapped or not to a Koha field
(C4::Koha::IsKohaFieldLinked).
Consequently the default framework ("") was always used.

This bug has been found working on bug 13074 and has been put on a
separate bug report to ease the backport.

Test plan:
Without this change, the tests added by bug 16428 won't pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16441: Fix Letters.t
Jonathan Druart [Tue, 7 Jun 2016 10:48:46 +0000 (11:48 +0100)]
Bug 16441: Fix Letters.t

These tests were wrong, but the package variable used to cache the
letters hid the problem.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16441: Do not use a package variable to cache C4::Letters::getletter
Jonathan Druart [Wed, 4 May 2016 18:43:43 +0000 (19:43 +0100)]
Bug 16441: Do not use a package variable to cache C4::Letters::getletter

C4::Letters::getletter use a package variable (%letter) to cache letter
returned by the subroutine.
I have not found any direct issues caused by that but it is safer to
remove it.
It won't be a big deal to hit the DBMS to get a valid letter when
needed.

No test plan here, just confirm that the changes make sense.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirm that performance loss is just a millisecond or so per
subsequent call of getletter.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16678: updatedatabase.pl 3.23.00.006 DB upgrade crashes if subscription_numberpat...
Jacek Ablewicz [Wed, 8 Jun 2016 08:46:18 +0000 (10:46 +0200)]
Bug 16678: updatedatabase.pl 3.23.00.006 DB upgrade crashes if subscription_numberpatterns.numberingmethod contains parentheses

It seems that if subscription_numberpatterns.numberingmethod contains parentheses, updatedatabase.pl crashes when running the 3.23.00.006 DB upgrade snippet, with the following error:

[Mon Jun 6 09:06:54 2016] updatedatabase.pl: Unmatched ( in regex; marked by <-- HERE in m/ ( <-- HERE / at /home/koha/kohaclone/installer/data/mysql/updatedatabase.pl line 11498.

Steps to reproduce:
1/ Have a Koha DB version<3.23.00.006
2/ Create a subscription numbering with parentheses in it:
   ie "Vol. (Month, Year)" with pattern
       Vol. {X} ({Y}, {Z})
3/ Add some serials using that numbering method so that serialseq is filled in DB:
   ie  "Vol. 16 (February, 2015)"
4/ Run the updatedatabase.pl script either from the cli or just start the webinstaller
5/ The error is produced

To test:
1/ apply patch
2/ try to reproduce this issue once again, should be fixed now
3/ have a look at the code, make sure the changes are consistent

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note: I have not tested the patch, but the diff looks good.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16570: Do not tell all checked-in items are part of a rotating collection
Jonathan Druart [Tue, 24 May 2016 18:57:16 +0000 (19:57 +0100)]
Bug 16570: Do not tell all checked-in items are part of a rotating collection

When an item is checked-in a message will tell you it's part of a
rotating collection, even if it's not true.

Test plan:
Make sure the message appears only when needed.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16443: [QA Follow-up] Add two tests for get_fields
Marcel de Rooy [Fri, 10 Jun 2016 09:49:45 +0000 (11:49 +0200)]
Bug 16443: [QA Follow-up] Add two tests for get_fields

Adds t/db_dependent/Members/Statistics.t.

Test plan:
Run the test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16443: Make C4::Members::Statistics plack safe
Jonathan Druart [Wed, 4 May 2016 19:08:53 +0000 (20:08 +0100)]
Bug 16443: Make C4::Members::Statistics plack safe

If the prefs is updated, the fields won't be.
To make sure we already fetch updated values, we should remove the
package variable and define it in the subroutine.

There is not test plan, just make sure the changes are consistent.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16455: Remove the "Too late to run INIT block" from C4::Tags
Jonathan Druart [Thu, 5 May 2016 15:58:06 +0000 (16:58 +0100)]
Bug 16455: Remove the "Too late to run INIT block" from C4::Tags

The pref TagsExternalDictionary is used to tell Lingua::Ispell to use an
other dictionary, different from the default one (/usr/bin/ispell).

To do so we need to set $Lingua::Ispell::path to the expected path.
It's currently done in the INIT block.

If you try to use C4::Tags, you will get the famous "Too late to run
INIT block at C4/Tags.pm line 74." warning. Plack use the INIT block to
load functions at run time, when we are using C4::Tags when hitting a pl
script, the compilation phase is finished and it's "too late to run INIT
block" from C4::Tags.

I do not really know if it has an impact on the behavior of
Lingua::Ispell (i.e. is the path redefined?), but I know that this INIT
block is not executed when we want.

Test plan:
under Plack,
- hit /cgi-bin/koha/opac-search.pl and confirm that the warning does no
longer appears
- Use another dictionnary (??), fill TagsExternalDictionary with its
  path and confirm that it is used by the tags approval system

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoBug 16508: Updating a syspref requires parameters_remaining_permissions
Jonathan Druart [Tue, 17 May 2016 13:38:04 +0000 (14:38 +0100)]
Bug 16508: Updating a syspref requires parameters_remaining_permissions

And not all of parameters flags.

Test plan:
1/ Create a staff user.
2/ Go to details, select more->set permissions.
3/ Set catalogue, Manage Koha system settings (Administration panel),
manage circulation rules, and Remaining system parameters permissions.
4/ Log in as the new staff user, go to administration > system
preferences. Change a syspref and save it... it will save correctly.
5/ Log back in as superlibrarian
6/ On the 'set permissions' screen, un-check 'manage circulation rules'
and save.
7/ Log back in to the new staff user, and try to change the same
systemprefrence and save.

Followed test plan, works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoBug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl
Jonathan Druart [Fri, 13 May 2016 19:46:42 +0000 (20:46 +0100)]
Bug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl

The script opac/opac-addbybiblionumber.pl is not plack safe because the
variable @biblios is declared with our and is not assigned to an empty
array (so not reset).

The issue:
When trying to add items to a list (virtualshelf), the biblionumbers are
added to the @biblios variable and the list is not reset between each
run.

Test plan:
Check from records from the result list and add them
to a list.
Cancel or save and re-add them (or others) to a list (same or
different).
=> Without this patch, the list of records will never stop growing, the
previous items added are still listed when adding new ones.
=> With this patch, the behavior is the one expected.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoRevert "Bug 7143 - Bug for tracking changes to the about page"
Brendan Gallagher [Sat, 4 Jun 2016 12:42:52 +0000 (15:42 +0300)]
Revert "Bug 7143 - Bug for tracking changes to the about page"

This reverts commit 6dc7401f2f631763ccae0db5bf52bb7731268fbc.

7 years agoBug 7143 - Bug for tracking changes to the about page
Brendan Gallagher [Sat, 4 Jun 2016 09:57:39 +0000 (09:57 +0000)]
Bug 7143 - Bug for tracking changes to the about page

Adjusting the history file for new developers

7 years agoBug 15641 - Typo in explanation for MembershipExpiryDaysNotice
Aliki Pavlidou [Sat, 4 Jun 2016 12:10:38 +0000 (12:10 +0000)]
Bug 15641 - Typo in explanation for MembershipExpiryDaysNotice

There's an extra period after the word "in" in the MembershipExpiryDaysNotice sys

"Send an account expiration notice when a patron's card will expire in. [value box

Bug fixed!

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoBug 16537 - Overdue and Status triggers grammar
Rocio Dressler [Sat, 4 Jun 2016 09:24:45 +0000 (02:24 -0700)]
Bug 16537 - Overdue and Status triggers grammar

Test plan:

1) Go to the staff client
2) Click on Tools - Overdue notice/status triggers
3) Confirm that the first sentence reads "a" checkout rather than "an" checkout

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoBug 16444: Make C4::Tags plack safe
Jonathan Druart [Wed, 4 May 2016 19:20:51 +0000 (20:20 +0100)]
Bug 16444: Make C4::Tags plack safe

C4::Tags use a package variable to cache the pref
TagsExternalDictionary, it's not needed and not safe.

There is not test plan, just make sure the changes are consistent.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoBug 16088: Fix the number of tests to skip
Jonathan Druart [Wed, 11 May 2016 12:13:38 +0000 (13:13 +0100)]
Bug 16088: Fix the number of tests to skip

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoBug 16088: Introduce Koha::Cache::Memory::Lite to cache the language
Jonathan Druart [Mon, 9 May 2016 16:27:51 +0000 (17:27 +0100)]
Bug 16088: Introduce Koha::Cache::Memory::Lite to cache the language

The goal of this patch is to avoid unecessary flush of the L1 cache on
creating a new CGI object each time C4::Languages::getlanguage is called
without a CGI object.

The new class Koha::Cache::Memory::Lite must be flushed by the CGI
constructor overide done in the psgi file. This new class will ease
caching of specific stuffs used by running script.

Test plan:
At the OPAC and the intranet interfaces:
Open 2 different browser session to simulate several users
- Clear the cookies of the browsers
- User 1 (U1) an User 2 (U2) should be set to the default language
  (depending on the browser settings)
- U1 chooses another language
- U2 refreshes and the language used must be the default one
- U2 chooses a third language
- U1 refreshes and must be still using the one he has choosen.

Try to use a language which is not defined:
Add &language=es-ES (if es-ES is not translated) to the url, you should
not see the Spanish interface.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoBug 16458: Update library when a guarantor is set
Jonathan Druart [Wed, 11 May 2016 11:00:01 +0000 (12:00 +0100)]
Bug 16458: Update library when a guarantor is set

If you edit a patron from the Edit link of the patron information block
(step 1 of the memberentry script), the branchcode is not displayed. If
you set a guarantor to a child from this form, a JavaScript error will
be raised:
  JavaScript error form.branchcode is undefined

It happens because there is the branchcode is not displayed and there is
no element with a branchcode name.

To avoid this issue, a branchcode hidden input is added to the form and
it will be updated when a guarantor is selected (same behavior as when
you edit a patron using the complete form).

Test plan:
Edit a patron using the Edit link of the patron info block (not the Edit
button in the toolbar)
Set a guarantor
=> Notice that the branchcode of the patron has been updated with the
branchcode of the guarantor

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoBug 16529 - Clean up and improve upload template
Owen Leonard [Mon, 16 May 2016 14:52:17 +0000 (10:52 -0400)]
Bug 16529 - Clean up and improve upload template

This patch makes some fixes and improvements to the template for Tools
-> Upload, including markup corrections, removal of 'onclick,' and
conversion of some links to styled buttons.

To test, apply the patch and go to Tools -> Upload.

- Confirm that uploading a file works correctly.
- Confirm that clicking 'Cancel' during a file upload works correctly.
- Search existing uploads.
  - Confirm that the 'Download' and 'Delete' buttons look correct and
    work correctly.
- In Administration -> MARC bibliographic framework, choose a
  framework and configure a tag subfield to use the upload plugin.
- Create or edit a bibliographic record using the framework you
  modified.
- Click the tag editor icon next to your modified subfield to trigger
  the pop-up window with the upload form.
  - Confirm that this window has a layout which is adjusted for the size
    of the window.
  - Confirm that uploading and selecting files from this window works
    correctly.

Signed-off-by: Rocio Dressler <rocio@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoBug 16442: Make C4::Ris plack safe
Jonathan Druart [Wed, 4 May 2016 18:53:46 +0000 (19:53 +0100)]
Bug 16442: Make C4::Ris plack safe

C4::Ris incorrectly uses 4 package variables:
- $utf: not used, can be removed
- $intype: set to marcflavour once, but later it assumes that it is
  usmarc if not defined
- $marcprint: always 0, so set it to 0
- $protoyear: only used in 1 subroutine, let's define it at this
  level

Test plan:
Just make sure the RIS export works as before this patch

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
7 years agoBug 7143 : Ooops double counted a developer
Chris Cormack [Fri, 3 Jun 2016 12:09:33 +0000 (12:09 +0000)]
Bug 7143 : Ooops double counted a developer

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>