]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 20175: [sql_modes] (follow-up) Set a correct default value for club_enrollments...
Jonathan Druart [Wed, 7 Feb 2018 14:58:02 +0000 (11:58 -0300)]
Bug 20175: [sql_modes] (follow-up) Set a correct default value for club_enrollments.date_created

From comment 6:
"""
Can't recreate database, when creating table structure, I got:
there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT
or ON UPDATE clause

I am on mysql 5.5.59, which is still default in jessie, more timestamp
columns are possible from mysql 5.6.5:
https://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-5.html
"""

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20175: [sql_modes] Set a correct default value for club_enrollments.date_created
Jonathan Druart [Mon, 5 Feb 2018 17:22:59 +0000 (14:22 -0300)]
Bug 20175: [sql_modes] Set a correct default value for club_enrollments.date_created

0000-00-00 00:00:00 is not a valid timestamp.

It will fix the installer and upgrade process

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20155: (follow-up) Compiled CSS
Owen Leonard [Wed, 7 Feb 2018 17:23:56 +0000 (17:23 +0000)]
Bug 20155: (follow-up) Compiled CSS

This patch contains the compiled opac.css file.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20155: Improve readability of OPAC header language menu
Owen Leonard [Wed, 7 Feb 2018 17:17:34 +0000 (17:17 +0000)]
Bug 20155: Improve readability of OPAC header language menu

This patch makes some minor HTML and CSS changes in order to make the
header's language-chooser menu more readable and consistent with the
Lists menu.

To test, apply this patch and the patch with the compiled CSS.

- Install and enable more than one translation.
- Set the OpacLangSelectorMode to either "top" or "both top and footer."
- View the OPAC's header menu and confirm that the links and menus look
  correct whether or not a user is logged in.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19451: (QA follow-up) Replace weird subquery
Marcel de Rooy [Fri, 9 Feb 2018 10:47:52 +0000 (11:47 +0100)]
Bug 19451: (QA follow-up) Replace weird subquery

As requested, we add a JOIN and make the SELECT distinct.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested that no-overwrite still works as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19451: (QA follow-up) Change parameter name no_overwrite to no-overwrite for...
Josef Moravec [Wed, 7 Feb 2018 21:06:10 +0000 (21:06 +0000)]
Bug 19451: (QA follow-up) Change parameter name no_overwrite to no-overwrite for consistency

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19451: Add no_overwrite option to borrowers-force-messaging-defaults.pl
Marcel de Rooy [Thu, 12 Oct 2017 10:19:11 +0000 (12:19 +0200)]
Bug 19451: Add no_overwrite option to borrowers-force-messaging-defaults.pl

This option allows you to add preferences only when they are not yet
present. In other words: skip patrons that already set their prefs.

Test plan:
[1] Delete all borrower messaging prefs for a patron.
[2] Run borrowers-force-messaging-defaults.pl -no-overwrite -doit
    Verify that the patron now has default msg preferences.
[3] Change his settings and make them non-default.
    For instance, increase days in advance.
[4] Run borrowers-force-messaging-defaults.pl -no-overwrite -doit
    Verify that the patron still has the non-default settings.
[5] Run borrowers-force-messaging-defaults.pl -doit
    Verify that the patron msg prefs have been overwritten.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15752: DBRev 17.12.00.012
Jonathan Druart [Mon, 12 Feb 2018 20:50:33 +0000 (17:50 -0300)]
Bug 15752: DBRev 17.12.00.012

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15752: (QA follow-up) Remove unecessary redirect
Josef Moravec [Thu, 21 Dec 2017 19:17:20 +0000 (19:17 +0000)]
Bug 15752: (QA follow-up) Remove unecessary redirect

If the borrowernumber is defined in query, it starts to get information
about previous borrower and the new one is taken into account fully on
second page reload

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15752: (QA follow-up) Remove unecessary redirect
Jonathan Druart [Thu, 21 Dec 2017 18:14:22 +0000 (15:14 -0300)]
Bug 15752: (QA follow-up) Remove unecessary redirect

We are on circulation.pl, no need to redirect.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15752: (QA follow-up) Inform user that patron was automatically switched
Josef Moravec [Fri, 18 Aug 2017 10:58:51 +0000 (10:58 +0000)]
Bug 15752: (QA follow-up) Inform user that patron was automatically switched

Test plan:

1) Start checking out to some patron - there should be no message about
auto switching
2) read the another patrons card - note the patron is switched and there
is a message about it at top of the main page content

Followed test plan, patch worked as described. Passed QA test tool
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15752: (follow-up) Search for patrons only if param barcode is defined
Josef Moravec [Fri, 18 Aug 2017 10:20:40 +0000 (12:20 +0200)]
Bug 15752: (follow-up) Search for patrons only if param barcode is defined

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15752: Automatically switch to patron when cardnumber is read during circulation
Chad Billman [Thu, 21 Jan 2016 15:59:01 +0000 (10:59 -0500)]
Bug 15752: Automatically switch to patron when cardnumber is read during circulation

With this syspref enabled scanning a patron barcode into the item
barcode field during circulation will redirect you to the patron's
circulation page.

This allows circulation with only a barcode scanner.

Testing:

- Enable the AutoSwitchPatron syspref
- Navigate to a patron's check out screen
- Enter a patron barcode into the "Enter item barcode" field

Result
- Browser should be redirected to the entered patron

Signed-off-by: Joel <aloi54@live.fr>
Followed test plan, patch works as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20166: Untranslatable course reserves delete prompt
Pasi Kallinen [Fri, 9 Feb 2018 06:35:18 +0000 (08:35 +0200)]
Bug 20166: Untranslatable course reserves delete prompt

Having a Template Toolkit statements inside the javascript
translation function _() prevents it from being picked for
translation.

The only example of such is the course reserve delete prompt.
Move the TT statement outside the string.

Test plan:

1) Update and install language xx-YY. Check that the msgids
   "Are you sure you want to delete this course? There is %s attached item."
   and
   "Are you sure you want to delete this course? There are %s attached items."
   do not exist in the xx-YY-staff-prog.po
2) Check the translated file
   intranet-tmpl/prog/fi-FI/modules/course_reserves/course-details.tt
   It should have two prompt texts above in English
3) Install patch
4) Update the language. Check that the msgids show up in
   xx-YY-staff-prog.po, translate them, and install the language.
5) Repeat 2, the prompts should now show up in the correct language.
6) Enable UsecourseReserves
7) Go to Home -> Course reserves
8) Create a new course, and add reserves to it
9) See the course details. Click on Delete course, the prompt
   should be correctly translated
10) Remove all but one of the reserves from the course
11) Repeat 9

To see if there are other such TT statements:

    rgrep -E '\b_\("[^"]*\[%' koha-tmpl/

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20054: Remove attribute "text/css" for <style> element in OPAC
Indranil Das Gupta (L2C2 Technologies) [Sun, 21 Jan 2018 18:29:35 +0000 (23:59 +0530)]
Bug 20054: Remove attribute "text/css" for <style> element in OPAC

Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator.

Test plan
=========

1/ Click the "Tag cloud" link on the OPAC. Paste the URL to your OPAC
   page (if it is hosted) to W3C Validator and watch the warning about
   type attribute "text/css".

2/ Apply patch and re-submit the page to the Validator. The warning
   will be gone.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: maksim <maksim@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20157: DBRev 17.12.00.011
Jonathan Druart [Fri, 9 Feb 2018 18:42:03 +0000 (15:42 -0300)]
Bug 20157: DBRev 17.12.00.011

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20157: Group search groups together
Jonathan Druart [Fri, 9 Feb 2018 14:17:37 +0000 (11:17 -0300)]
Bug 20157: Group search groups together

We do not actually need 2 groups, the previous feature worked for both
OPAC and STAFF interface.
The only difference was the "show_in_pulldown" feature.
Here we are going to REMOVE this feature for ergonomic reasons. We will
already have 3 features and it will surcharge the interface to add
another one. Moreover the feature will have to be applied at the OPAC
(and so will add lot of JS checks to keep data consistent: only useful
if ft_search_groups_opac is set).
Moreover it is quite easy to remove entry from the dropdown list in
JavaScript.

If people was really using this feature, we will re-add it, just let us
know.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20157: Do not display OPAC groups on the staff interface
Jonathan Druart [Fri, 9 Feb 2018 13:49:56 +0000 (10:49 -0300)]
Bug 20157: Do not display OPAC groups on the staff interface

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20157: Correctly hide the features for non first level groups
Jonathan Druart [Fri, 9 Feb 2018 13:10:31 +0000 (10:10 -0300)]
Bug 20157: Correctly hide the features for non first level groups

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20157: Save the features that have been checked
Jonathan Druart [Fri, 9 Feb 2018 13:00:06 +0000 (10:00 -0300)]
Bug 20157: Save the features that have been checked

Previous patch forgot to modify the controller script to save the
changes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20157: DBIC Schema changes
Kyle M Hall [Wed, 7 Feb 2018 19:48:56 +0000 (19:48 +0000)]
Bug 20157: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20157: Use group 'features' to decide which groups to use for group searching...
Kyle M Hall [Wed, 7 Feb 2018 19:44:28 +0000 (19:44 +0000)]
Bug 20157: Use group 'features' to decide which groups to use for group searching functionality

Instead of basing the group searches on the group name, which is an
inherently touchy system, we should use the same checkbox style that
Jonathan introduced for the patron limits by group feature.

Test Plan:
1) Check to ensure existing group searches still show as they used to

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20133: DBRev 17.12.00.010
Jonathan Druart [Fri, 9 Feb 2018 18:40:42 +0000 (15:40 -0300)]
Bug 20133: DBRev 17.12.00.010

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20133: (QA follow-up) Tweak new 'group features' section
Kyle M Hall [Wed, 7 Feb 2018 17:41:10 +0000 (12:41 -0500)]
Bug 20133: (QA follow-up) Tweak new 'group features' section

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20133: Enable/disable the "Hide patron information" feature per group of libraries
Jonathan Druart [Fri, 2 Feb 2018 17:23:42 +0000 (14:23 -0300)]
Bug 20133: Enable/disable the "Hide patron information" feature per group of libraries

In order to control this feature correctly it needs to be enabled for
group of libraries and not for all groups defined in the system.
Groups will be used for different usages and so the feature must not be
enabled by default for all of them.

Test plan:
Retest bug 18403 with the feature turned on/off for a given tree

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20133: UI Changes
Jonathan Druart [Fri, 2 Feb 2018 17:21:49 +0000 (14:21 -0300)]
Bug 20133: UI Changes

Add a checkbox to enable/disable the feature for given group of
libraries.

Important note: Only the top level node can turn the feature, the idea
is to avoid confusion, ease testing (by limiting the number of cases)
and force libraries to define one tree per feature (Maybe this is wrong,
but maybe good to start)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20133: DBIC Schema changes
Jonathan Druart [Fri, 2 Feb 2018 17:21:26 +0000 (14:21 -0300)]
Bug 20133: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20133: Add new column library_groups.ft_hide_patron_info
Jonathan Druart [Fri, 2 Feb 2018 17:21:14 +0000 (14:21 -0300)]
Bug 20133: Add new column library_groups.ft_hide_patron_info

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: DBRev 17.12.00.009
Jonathan Druart [Fri, 9 Feb 2018 18:38:54 +0000 (15:38 -0300)]
Bug 18403: DBRev 17.12.00.009

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Fix few errors found with hit_pages.t
Jonathan Druart [Mon, 12 Feb 2018 17:14:32 +0000 (14:14 -0300)]
Bug 18403: Fix few errors found with hit_pages.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Add POD for output_and_exit_if_error
Jonathan Druart [Fri, 9 Feb 2018 19:57:01 +0000 (16:57 -0300)]
Bug 18403: Add POD for output_and_exit_if_error

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Fix error triggered by subgroups being added to group
Kyle M Hall [Fri, 9 Feb 2018 13:51:02 +0000 (08:51 -0500)]
Bug 18403: Fix error triggered by subgroups being added to group

With one root group and two child groups and it works fine.
But if I create any groups under *those* groups, not only does it not work,
I get the following error:
Template process failed: undef error - SQL::Abstract::puke(): [SQL::Abstract::__ANON__]
Fatal: SQL::Abstract before v1.75 used to generate incorrect SQL when the -IN operator was
given an undef-containing list: !!!AUDIT YOUR CODE AND DATA!!! (the
upcoming Data::Query-based version of SQL::Abstract will
emit the logically correct SQL instead of raising this
exception) at /home/vagrant/kohaclone/Koha/Objects.pm line 269

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Deal with the DB user
Jonathan Druart [Wed, 12 Apr 2017 12:56:22 +0000 (09:56 -0300)]
Bug 18403: Deal with the DB user

On first login, Koha explodes before the logged in user does not exist
in DB.
This patch deals with that by adding several checks when it's needed.

Test plan:
Use the DB user to create a superlibrarian user.
The DB user should no be allowed to do anything else.

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Bug 18403: Fix patron creation

memberentry.pl can be called to create a new patron, in that case the
patron does not exist yet.

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: REST API - patrons endpoint
Jonathan Druart [Mon, 10 Apr 2017 20:34:34 +0000 (17:34 -0300)]
Bug 18403: REST API - patrons endpoint

There is something wrond here, the userenv is no set and so we cannot
user search_limited.
Should we set the userenv or filter on the libraries using
libraries_where_can_see_patrons?
WAITING FOR FEEDBACK HERE.

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Guarantors
Jonathan Druart [Mon, 10 Apr 2017 13:23:37 +0000 (10:23 -0300)]
Bug 18403: Guarantors

Technically a kid from your library group could have a guarantor
attached to another
group of library, let's deal with this case.

Test plan:
- Create a kid from your library group
- With a superlibrarian staff user create a guarantor that is outside of
the group of
libraries of the kid
- Login with a limited staff user and confirm that on the patron detail
page you do not
see the link to the guarantor detail page.

Note that you see the firstname and surname of the guarantor
Q. should it be hidden?

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Article requests
Jonathan Druart [Fri, 7 Apr 2017 20:53:35 +0000 (17:53 -0300)]
Bug 18403: Article requests

Same as previously but for article requests.

Test plan:
Test article requests and make sure you do not need the requests for
patrons that
are attached to a group that is not part of your library's group

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Patron discharges
Jonathan Druart [Fri, 7 Apr 2017 18:42:51 +0000 (15:42 -0300)]
Bug 18403: Patron discharges

This patch deals with patron's discharges.

Test plan:
Same as previously you will need to request dischages at the OPAC.
On the staff interface the logged in user should not be allowed to see
discharge
from patrons outside his library group.
The number of discharges waiting displayed on the mainpage should be
correct as well.

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Bug 18403: (follow-up) Patron discharges

Fix QA issue:
forbidden pattern: Do not assume male gender, use they/them instead (bug 18432) (line 150)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Patron reviews
Jonathan Druart [Fri, 7 Apr 2017 17:37:47 +0000 (14:37 -0300)]
Bug 18403: Patron reviews

This patch adds a new method Koha::Reviews->search_limited to return the
reviews
a logged in user is allowed to see depending his permissions.

Test plan:
Create some reviews at the OPAC and make sure a staff user is limited
(or not) to approve
or decline it.
The number of reviews displayed on the mainpage should be correct as
well.

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Patron modification requests
Jonathan Druart [Fri, 7 Apr 2017 17:02:09 +0000 (14:02 -0300)]
Bug 18403: Patron modification requests

Limit patron's modifications based on logged in patron permissions.

Test plan:
Create some patron's modification requests at the OPAC
Make sure the logged in staff user see (or not) the modification depending his
permissions.
The number of modification displayed on the mainpage should be correct as well.

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Add new method Koha::Patron->can_see_patrons_from
Jonathan Druart [Fri, 7 Apr 2017 17:00:34 +0000 (14:00 -0300)]
Bug 18403: Add new method Koha::Patron->can_see_patrons_from

Technical note:
Sometimes we do not have the patron object, for instance for the patron modifications
we will need to know if the logged in user can modify patron's from a given library.
This new subroutine 'can_see_patrons_from' will then be useful

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Add tests for Koha::Patrons
Jonathan Druart [Wed, 5 Apr 2017 10:34:47 +0000 (07:34 -0300)]
Bug 18403: Add tests for Koha::Patrons

A bit late but here are the tests for
 Koha::Patron->libraries_where_can_see_patrons
 Koha::Patron->can_see_patron_infos
 Koha::Patron->search_limited

Test plan:
  prove t/db_dependent/Koha/Patrons.t
should return green

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Refactor and add Koha::Patron->libraries_where_can_see_patrons
Jonathan Druart [Thu, 6 Apr 2017 15:59:46 +0000 (12:59 -0300)]
Bug 18403: Refactor and add Koha::Patron->libraries_where_can_see_patrons

Technical note:
Here we are just refactoring a code that have been copied into 3 different places.
libraries_where_can_see_patrons is a terrible method's name, feel free to suggest
something better. The method return a list of branchcodes to be more efficient,
instead of Koha::Libraries

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Add new methods Koha::Patrons->search_limited and use it where needed
Jonathan Druart [Thu, 6 Apr 2017 15:42:03 +0000 (12:42 -0300)]
Bug 18403: Add new methods Koha::Patrons->search_limited and use it where needed

Most of the time when we search for patrons we do not want to search for all patrons,
but just the ones the logged in user is allowed to see the information.
This patch takes care of that by adding a new search_limited method to Koha::Patrons.
When called this method only search for patrons that the logged in user is allowed
to see.

Test plan:
Patron autocomplete search should be limited

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: output_and_exit_if_error for circulation.pl
Jonathan Druart [Wed, 5 Apr 2017 21:55:13 +0000 (18:55 -0300)]
Bug 18403: output_and_exit_if_error for circulation.pl

This is a follow-up for a previous patch, changes have been tested
already

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Batch patron modification tool
Jonathan Druart [Wed, 5 Apr 2017 21:47:30 +0000 (18:47 -0300)]
Bug 18403: Batch patron modification tool

Do not allow a logged in staff user to modify patrons that are not part of his
group if he is not allowed.

Test plan:
Make sure you are not allowed to modify patrons that are not part of your group
from the batch patron modification tool

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for view_holdsq...
Jonathan Druart [Wed, 5 Apr 2017 20:25:13 +0000 (17:25 -0300)]
Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for view_holdsqueue]

Same that the previous patch but for the holds queue

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory]
Jonathan Druart [Wed, 5 Apr 2017 20:04:36 +0000 (17:04 -0300)]
Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory]

On this page we do not have the patron object sent to the template,
let's pass it!

Test plan:
Go on the checkout history of a bibliographic record
(catalogue/issuehistory.pl)
You should not see patron's information that are not part of your group
if you
are not allowed to see them.

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Use patron-title.inc when hidepatronname is used
Jonathan Druart [Wed, 5 Apr 2017 19:43:41 +0000 (16:43 -0300)]
Bug 18403: Use patron-title.inc when hidepatronname is used

There is already a HidePatronName syspref to hide patron's information
on bibliographic
record detail pages and the hold list.

Test plan:
With the HidePatronName enabled, make sure the patron's information are
hidden from
the catalogue and hold list pages. If the logged in user is not allowed
to see the
patron's info, no link and no cardnumber will be displayed
With he HidePatronName disabled, make sure the patron's information are
displayed
if the logged in user is allowed to see the patron's info.

Technical note:
This patch improves the existing patron-title.inc include file to
display patron's
information. Using it everywhere patron's details are displayed will
permit to
homogenise the way they are displayed. The file takes now a patron
object (what
should be, in the future, the only way to use it), that way we can call
the new
method on it to know if patron's information can be shown by the logged
in used.

NOTE: I am not sure this syspref makes sense anymore. Should not we
remove it?

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Only display libraries from group in dropdown lists
Jonathan Druart [Wed, 5 Apr 2017 17:11:02 +0000 (14:11 -0300)]
Bug 18403: Only display libraries from group in dropdown lists

From where patrons it's about patrons, we do not want to display the libraries
from all the system, but only the ones from the group.

Test plan:
- See the overdues (circ/overdue.pl) and make sure you can only see overdues from
patrons part of your group (do not forget to test the CSV export).
- Search for patrons, the 'library' filters (headers and left side) should only
display libraries from your group
- Search for article request by patron's library: only the libraries from your
group should be displayed

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Adapt patron search
Jonathan Druart [Wed, 5 Apr 2017 16:19:42 +0000 (13:19 -0300)]
Bug 18403: Adapt patron search

This patch modifies the patron search code to limit the libraries to the
ones
the logged in user is allowed to access

Test plan:
Search for patrons
You should not see patrons you are not allowed to see.

Technical note:
I am really glad to have refactored all the patron searches before
having to
write this patch. It tooks me ~40 l to acchieve this job and affect all
patron searches.
Thanks refactoring!

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Add sub output_and_exit_if_error - unknown_patron & cannot_see_patron_infos
Jonathan Druart [Tue, 4 Apr 2017 21:48:45 +0000 (18:48 -0300)]
Bug 18403: Add sub output_and_exit_if_error - unknown_patron & cannot_see_patron_infos

Test plan:
Login with a patron that is not allowed to see patron's information for patrons
outside of his group. Try to access patron's information from scripts of the patron
module (members/*) and circ/circulation.pl.
You should be able to access patron's information of patrons outside of your group
and get "You are not allowed to see the information of this patron."
If you try and access a patron page with a borrowernumber that does not exist, you
should get "This patron does not exist"

Technical note:
A new C4::Output subroutine is created in this patch: "output_and_exit_if_error"
Executed at the beginning of the script it will permit not to copy/paste all the
different checks to know if the logged in user is authorised to see patron's information.
The design here can be discussed, but I did not find an alternative with as less changes.
On the way I refactor what we did with 'unknowuser' previously: it will now work with all
patron pages, not only the few that used it.
Note that the 'or die "Not logged in";' part should not be needed, but... who trusts
C4::Auth?
I think it could be used as a safeguard later. I am willing to sed and remove them
if required.

Changes in discharge.pl are mainly indentation changes.

With this patch we should now have a $patron variable that refer to the patron we
want to access. That will be very useful to remove plenty of code in members/* and
only pass this variable to the template (instead of 1 variable per patron's attribute).

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Update permissions - borrowers => 1|* becomes borrowers => 'edit_borrowers'
Jonathan Druart [Tue, 4 Apr 2017 20:45:30 +0000 (17:45 -0300)]
Bug 18403: Update permissions - borrowers => 1|* becomes borrowers => 'edit_borrowers'

Test plan:
Login with a patron that only have the 'edit_borrowers' permission.
You should be able to access patron's information of patrons inside of your group.

Technical note:
Before this patchset the borrowers permission module contains only 1 permission 'edit_borrowers'.
That meant
  borrowers => 1
and
  borrowers => '*'
had the same behavior.
Moreover, now that we have 2 permissions, 'CAN_user_borrowers' is set when all
permissions of 'borrowers' are set.
We need to update the different occurrences of these tests.

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Add new method Koha::Patron->can_see_patron_info
Jonathan Druart [Thu, 6 Apr 2017 19:10:18 +0000 (16:10 -0300)]
Bug 18403: Add new method Koha::Patron->can_see_patron_info

Technical note:
This is the method that will be called on the logged_in_user variable sent to
the template. Moreover we will check that the logged in user can access patron'
information when access to members/* and some circulation scripts will be done.

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Send logged_in_user to template from C4::Auth
Jonathan Druart [Tue, 4 Apr 2017 19:43:58 +0000 (16:43 -0300)]
Bug 18403: Send logged_in_user to template from C4::Auth

Technical note:
To ease future changes we are passing a logged_in_user variable to templates.
It contains the Koha::Patron object representing the logged in patron.
This will be very useful for this patch and even after (for instance we will be
able to replace easily loggedinusername and loggedinusernumber).

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Add new method Koha::Library::Group->has_child
Jonathan Druart [Thu, 6 Apr 2017 19:10:02 +0000 (16:10 -0300)]
Bug 18403: Add new method Koha::Library::Group->has_child

This is more a follow-up for bug 15707. It could be moved on its own bug report
if necessary.

IMPORTANT NOTE: At the moment the feature only works for 1 level depth, see
bug 15707 comment 166+ for the discussion

It means that if we have:
 root_group
     + groupA
         + groupA1
             + groupA1_library2
         + groupA_library1
         + groupA2
     + groupB
         + groupB_library1
groupA1_library2 is not considered a child of groupA1.
Note that this can change.

Test plan:
  prove t/db_dependent/LibraryGroups.t
should return green

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Add new method Koha::Library->library_group
Jonathan Druart [Thu, 6 Apr 2017 19:09:46 +0000 (16:09 -0300)]
Bug 18403: Add new method Koha::Library->library_group

This is more a follow-up for bug 15707. It could be moved on its own bug report
if necessary.

Test plan:
  prove t/db_dependent/LibraryGroups.t
should return green

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18403: Hide patron information if not part of the logged in user library group
Jonathan Druart [Tue, 4 Apr 2017 19:01:41 +0000 (16:01 -0300)]
Bug 18403: Hide patron information if not part of the logged in user library group

This patchset adds a new feature that will allow libraries inside a
single Koha installation to restrict access to information of patrons
that

The group of libraries feature is introduced by bug 15707, see this bug for more
information.

Let's imagine that 2 groups G1 and G2 are defined and that they include 2 libraries
each G1a, G1b and G2c, G2d: logged in users attached to G1a will only see patron's
information from G1a and G1b.
To add more flexibility, a new user permission named 'view_borrower_infos_from_any_libraries'
will drive this behavior. If set, the patron will be able to see patron's information
of any libraries.

If the restriction is set, the logged in user will not be able to search, show, edit,
delete patron's information of patrons attached to groups of libraries outside his
own group.
In situations we need to refer to a patron, for holds and checkouts for instance,
and his information cannot be viewed, a text "A patron from library G1A" will be
displayed.

Considered unecessary or outside the scope of this bug report:
* The report module is not affected by this feature for obvious reasons
* The firstname and surname of guarantors, basket (acq) managers, patrons linked
to orders are still displayed.
* Log viewer: Can only be staff
* patron list: you cannot add patrons from another group of librairies, but can
see/delete from list (too much rewrite, or we can test for patron one by one?).
* "Patron card creator" tool is not impacted by this feature.
* Upload patron images is not impacted by this patch, should it be?
* Tools:
  - Upload patrons
  - Clean borrowers tool (This can can done easily updating Koha::Patrons->search
with Koha::Patrons->search_limited in search_upcoming_membership_expires and
search_patrons_to_anonymise but we will need to move GetBorrowersToExpunge to
Koha::Patrons first)
We can discuss these different points but will be other bug reports not to add
more complexity to this first patchset.

Test plan:
You will find a test plan in the following commit messages.
Start by creating different group of libraries and patrons with and without the
new permission. Open different browser sessions to ease the tests.
Note that all patches have to be applied to test the different test plans.

Technical notes:
For QAers (and others) a techical note will be added to the commit messages of this
patchset. I would recommend you to read them one by one to understand the different
steps of this development.

+ Special attention should be payed to the REST api changes
+ Should we restrict the logged in user to libraries from his group when
he wants to set his library (Home › Circulation › Set library)?

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: DBRev 17.12.00.008
Jonathan Druart [Fri, 9 Feb 2018 18:44:25 +0000 (15:44 -0300)]
Bug 16735: DBRev 17.12.00.008

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: DBIC Schema files
Jonathan Druart [Tue, 5 Dec 2017 17:09:23 +0000 (14:09 -0300)]
Bug 16735: DBIC Schema files

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: Fix POD format for Koha::Library::Groups methods
Jonathan Druart [Fri, 9 Feb 2018 20:00:44 +0000 (17:00 -0300)]
Bug 16735: Fix POD format for Koha::Library::Groups methods

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: Remove unecessary use of Koha::LibraryCategories in onboarding
Jonathan Druart [Fri, 9 Feb 2018 14:35:03 +0000 (11:35 -0300)]
Bug 16735: Remove unecessary use of Koha::LibraryCategories in onboarding

This was not used, it has been copied/pasted from admin/branches.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: (QA follow-up) Fix rebase error
Tomas Cohen Arazi [Mon, 11 Dec 2017 16:29:33 +0000 (13:29 -0300)]
Bug 16735: (QA follow-up) Fix rebase error

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: (QA follow-up) POD fixes
Tomas Cohen Arazi [Mon, 11 Dec 2017 15:46:05 +0000 (12:46 -0300)]
Bug 16735: (QA follow-up) POD fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: Use libraries in all subgroups, not just immediate children
Kyle M Hall [Tue, 8 Aug 2017 16:40:45 +0000 (12:40 -0400)]
Bug 16735: Use libraries in all subgroups, not just immediate children

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: Filter individual libraries from search group pulldown
Kyle M Hall [Tue, 21 Feb 2017 13:36:22 +0000 (13:36 +0000)]
Bug 16735: Filter individual libraries from search group pulldown

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: Remove use of get_categories
Kyle M Hall [Tue, 21 Feb 2017 12:26:25 +0000 (12:26 +0000)]
Bug 16735: Remove use of get_categories

Feature using it is completely undocumented as far as my research has
shown.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: Don't use objects for database update
Kyle M Hall [Tue, 21 Feb 2017 12:07:18 +0000 (12:07 +0000)]
Bug 16735: Don't use objects for database update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: Migrate library search groups into the new hierarchical groups
Kyle M Hall [Wed, 22 Jun 2016 17:10:23 +0000 (17:10 +0000)]
Bug 16735: Migrate library search groups into the new hierarchical groups

Test Plan:
1) Apply this patch set
2) Note your existing search groups have been ported over to the new
   __SEARCH_GROUPS__ group if you had any
3) Create the group __SEARCH_GROUPS__ if one does not already exist
4) Add some first level subgroups to this group, add libraries to those groups
5) Search the library group searching in the intranet and opac
6) Note you get the same results as pre-patch

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: Clean up sample data
Kyle M Hall [Thu, 23 Jun 2016 13:24:54 +0000 (13:24 +0000)]
Bug 16735: Clean up sample data

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: Remove tables no longer needed
Kyle M Hall [Thu, 23 Jun 2016 11:44:15 +0000 (11:44 +0000)]
Bug 16735: Remove tables no longer needed

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16735: Remove modules no longer needed
Kyle M Hall [Wed, 22 Jun 2016 18:28:03 +0000 (18:28 +0000)]
Bug 16735: Remove modules no longer needed

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: DBRev 17.12.00.007
Jonathan Druart [Fri, 9 Feb 2018 18:13:35 +0000 (15:13 -0300)]
Bug 15707: DBRev 17.12.00.007

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: (QA follow-up) Style buttons correctly
Tomas Cohen Arazi [Wed, 6 Dec 2017 19:12:47 +0000 (16:12 -0300)]
Bug 15707: (QA follow-up) Style buttons correctly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: DBIC Schema files
Jonathan Druart [Tue, 5 Dec 2017 17:05:28 +0000 (14:05 -0300)]
Bug 15707: DBIC Schema files

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: Display error if group title is already used
Kyle M Hall [Wed, 1 Mar 2017 13:58:54 +0000 (13:58 +0000)]
Bug 15707: Display error if group title is already used

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I added !$branchcode && to the checked condition so we can add multiple
libraries back.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: Updates for Bootstrap 3
Kyle M Hall [Wed, 22 Feb 2017 19:54:58 +0000 (19:54 +0000)]
Bug 15707: Updates for Bootstrap 3

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: Add UNIQUE constraint to library groups table
Kyle M Hall [Tue, 21 Feb 2017 12:21:12 +0000 (12:21 +0000)]
Bug 15707: Add UNIQUE constraint to library groups table

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: Switch datetimes to timestamps
Kyle M Hall [Tue, 21 Feb 2017 12:16:03 +0000 (12:16 +0000)]
Bug 15707: Switch datetimes to timestamps

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: (follow-up) use cat-search instead of cities-search in header
Josef Moravec [Wed, 7 Dec 2016 01:01:52 +0000 (01:01 +0000)]
Bug 15707: (follow-up) use cat-search instead of cities-search in header

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: (QA follow-up) Allow object names to be styled without impeding translation
Kyle M Hall [Mon, 20 Jun 2016 11:45:10 +0000 (11:45 +0000)]
Bug 15707: (QA follow-up) Allow object names to be styled without impeding translation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: (QA follow-up) Remove class for treegrid
Kyle M Hall [Tue, 14 Jun 2016 13:20:32 +0000 (13:20 +0000)]
Bug 15707: (QA follow-up) Remove class for treegrid

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: (QA follow-up) Fix UI issues
Kyle M Hall [Tue, 14 Jun 2016 11:55:25 +0000 (11:55 +0000)]
Bug 15707: (QA follow-up) Fix UI issues

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: (QA follow-up) Drop table if exists
Jonathan Druart [Sun, 12 Jun 2016 09:15:38 +0000 (10:15 +0100)]
Bug 15707: (QA follow-up) Drop table if exists

1/ DROP table if exists
2/ FAIL   spelling
    decendents  ==> descendants

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: (QA follow-up) Switch to treetable which Koha already uses
Kyle M Hall [Tue, 19 Apr 2016 13:33:39 +0000 (13:33 +0000)]
Bug 15707: (QA follow-up) Switch to treetable which Koha already uses

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: Fix conflict with bug 15446 (type vs _type)
Jonathan Druart [Mon, 15 Feb 2016 17:24:35 +0000 (17:24 +0000)]
Bug 15707: Fix conflict with bug 15446 (type vs _type)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: Unit Tests
Kyle M Hall [Fri, 5 Feb 2016 06:53:20 +0000 (06:53 +0000)]
Bug 15707: Unit Tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: Add library groups editor
Kyle M Hall [Sun, 31 Jan 2016 11:22:51 +0000 (11:22 +0000)]
Bug 15707: Add library groups editor

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: Add Koha::Library::Group(s) modules
Kyle M Hall [Sun, 31 Jan 2016 11:22:19 +0000 (11:22 +0000)]
Bug 15707: Add Koha::Library::Group(s) modules

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15707: Update DB
Kyle M Hall [Sun, 31 Jan 2016 11:21:00 +0000 (11:21 +0000)]
Bug 15707: Update DB

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19928: Mock delimiter pref in tests
Jonathan Druart [Fri, 9 Feb 2018 17:49:21 +0000 (14:49 -0300)]
Bug 19928: Mock delimiter pref in tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19801: Display messages on user details page as well as on check out page
Liz Rea [Wed, 13 Dec 2017 02:14:58 +0000 (15:14 +1300)]
Bug 19801: Display messages on user details page as well as on check out page

To test:

Look up a borrower, add a message (internal or opac)
Click the Details tab for that borrower
Messages should be displayed above the user information [is this the right place? it could go below]
adding messages on this page should make them immediately available
deleting messages on this page should delete them immediately and bring you back to the detail page.

Basically, make sure messages work from both the Check out and detail pages and that there are no typos.

Messages should work the same as they always have from the Check Out page.

sponsored-by: Catalyst IT
Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Bug 19801 - Fixes for QA

- Fixes indentation
- changes messages to patron_messages (even though it's not like that on the circulation page.)

Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
6 years agoBug 10032: (follow-up) Move title attribute to button container
Owen Leonard [Thu, 4 Jan 2018 14:16:42 +0000 (14:16 +0000)]
Bug 10032: (follow-up) Move title attribute to button container

This patch modifies the "Close basket" button markup so that the title
attribute on a disabled button is added to the button wrapper <div>
instead of the <a> tag. This allows the title attribute tooltip to
appear when the cursor is hovered over the button.

To test, follow the original patch's test plan and confirm that when the
"Close basket" button is disabled, hovering the mouse over the button
triggers the title attribute tooltip.

Signed-off-by: Charlotte Cordwell <charlotte.cordwell123@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 10032: Improve GUI when uncertain price prevents closing the basket
Jon Knight [Tue, 12 Dec 2017 17:50:36 +0000 (17:50 +0000)]
Bug 10032: Improve GUI when uncertain price prevents closing the basket

Added disabled "Close this basket" button when uncertain
prices are present.
Note that whilst this has a "title" attribute, there is no tooltip
shown because JQueryUI disabled buttons don't get DOM events.

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

Signed-off-by: Charlotte Cordwell <charlotte.cordwell123@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 20156: Display a markup for the current language in header menu
Owen Leonard [Wed, 7 Feb 2018 17:42:09 +0000 (17:42 +0000)]
Bug 20156: Display a markup for the current language in header menu

This patch replaces Glyphicon markup with Font Awesome markup so that a
check mark appears next to the currently-selected language in the staff
client header's language menu.

Also changed in this patch: Some classes have been removed because they
are not used in staff client CSS.

To test you must have multiple languages installed and enabled in the
staff client.

 - Set the StaffLangSelectorMode system preference to "top" or "both top
   and footer"
 - Confirm that the currently-select language in the langauge menu has a
   check mark next to it.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 20134: Remove /api/v1/app.pl from the generated URLs
Tomas Cohen Arazi [Mon, 5 Feb 2018 13:28:37 +0000 (10:28 -0300)]
Bug 20134: Remove /api/v1/app.pl from the generated URLs

This patch removes the /api/v1/app.pl prefix from generated baseUrl.
It has the consequence of hardcoding / as the base path for the API.

This is ok because we don't currently support mounting Koha pieces in
different than hardcoded paths (/cgi-bin/koha?), but certainly worth
mentioning because this will need to depend on a syspref or config entry
when someone chages this behviour.

To test:
- On master, point your browser to:
  http://kohadev.mydnsname.org:8080/api/v1/
=> FAIL: basePath looks like /api/v1/app.pl/api/v1
- Apply this patch
- Restart memcached and plack:
  $ restart_all
or
  $ sudo systemctl restart memcached && sudo systemctl restart
  koha-common
- Reload http://kohadev.mydnsname.org:8080/api/v1/
=> SUCCESS: basePath is /api/v1
- Sign off :-D

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 12904: Fix occurrences not caught by script
Jonathan Druart [Tue, 6 Feb 2018 13:41:03 +0000 (10:41 -0300)]
Bug 12904: Fix occurrences not caught by script

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
6 years agoBug 12904: Force browser to load new javascript files after upgrade
Jonathan Druart [Tue, 23 Jan 2018 13:22:47 +0000 (10:22 -0300)]
Bug 12904: Force browser to load new javascript files after upgrade

This patch has been automatically generated using:
  perl kv.pl **/*.tt **/*.inc

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
6 years agoBug 12904: Pass KOHA_VERSION in C4::Auth
Jonathan Druart [Tue, 23 Jan 2018 13:24:52 +0000 (10:24 -0300)]
Bug 12904: Pass KOHA_VERSION in C4::Auth

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
6 years agoBug 12904: Add mod_expire to etc/koha-httpd.conf
Olli-Antti Kivilahti [Wed, 24 May 2017 13:34:17 +0000 (09:34 -0400)]
Bug 12904: Add mod_expire to etc/koha-httpd.conf

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
6 years agoBug 12904: Apache configuration
Kyle M Hall [Thu, 22 Dec 2016 15:42:30 +0000 (15:42 +0000)]
Bug 12904: Apache configuration

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>