]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 17854: Adds print/close icon in checkout
Christopher Brannon [Mon, 24 Sep 2018 19:51:36 +0000 (19:51 +0000)]
Bug 17854: Adds print/close icon in checkout

To Test:
1) Apply Patch.
2) Go to a patron checkout screen (circulation.pl).
3) Note there are no clear screen buttons in the upper right corner of
the checkout window.
4) Turn on the DisplayClearScreenButton preference.
5) Go back to patron checkout.  Note the clear screen button and the new
printer icon next to it.
6) Click the printer icon.  This will trigger a print slip function, and
close the patron screen.
7) Try to arrow back to the previous screen.  Should go to main menu and
not the patron screen, just like the orginal close button (X).

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21871: (QA follow-up) C4::Biblio qw(GetMarcUrls)
Katrin Fischer [Sun, 27 Jan 2019 05:14:34 +0000 (05:14 +0000)]
Bug 21871: (QA follow-up) C4::Biblio qw(GetMarcUrls)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21817

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21871: (QA follow-up) Use Koha.Preference in template
Katrin Fischer [Sun, 27 Jan 2019 05:13:06 +0000 (05:13 +0000)]
Bug 21871: (QA follow-up) Use Koha.Preference in template

Use TT plugin to get value for OPACURLOpenInNewWindow.

Works without, but might be a little nicer.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21817

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21871: (follow-up) Remove link tracking
Owen Leonard [Tue, 15 Jan 2019 19:18:47 +0000 (19:18 +0000)]
Bug 21871: (follow-up) Remove link tracking

Links to tracklinks.pl were erroneously copied from detail.tt. This
patch removes them.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21817

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21871: Show authority 856 links in the OPAC
Owen Leonard [Wed, 21 Nov 2018 13:54:45 +0000 (13:54 +0000)]
Bug 21871: Show authority 856 links in the OPAC

This patch modifies the authority detail view in the OPAC so that any
links found in 856 tags are displayed and active.

To test, apply the patch and locate or create an authority record which
contains one or more URLs in 856 tags.
 - View this record in the OPAC and confirm that the links appear.
 - Test records with and without link text.
 - Test records with and without public notes.

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21817

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22191: Add column configuration to libraries administration
Owen Leonard [Wed, 23 Jan 2019 15:23:15 +0000 (15:23 +0000)]
Bug 22191: Add column configuration to libraries administration

This patch adds column configuration to the table of libraries
in administration. No new defaults for the table are defined.

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

 - Go to Administration -> Libraries
   - Test that the "Column visibility" button works to show and hide
     columns. The "actions" column should be excluded.
   - Test that export options (Excel, CSV, etc) exclude the "actions"
     column.
 - Go to Administration -> Columns settings and edit the default
   configuration of the libraries table. Confirm that these
   changes are reflected in libraries administration.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22190: Add column configuration to patron category administration
Owen Leonard [Wed, 23 Jan 2019 14:48:31 +0000 (14:48 +0000)]
Bug 22190: Add column configuration to patron category administration

This patch adds column configuration to the table of patron categories
in administration. No new defaults for the table are defined.

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

 - Go to Administration -> Patron categoires.
   - Test that the "Column visibility" button works to show and hide
     columns. The "actions" column should be excluded.
   - Test that export options (Excel, CSV, etc) exclude the "actions"
     column.
 - Go to Administration -> Columns settings and edit the default
   configuration of the patron categories table. Confirm that these
   changes are reflected in patron category administration.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21449: Update two-column templates with Bootstrap grid: Circulation part 2
Owen Leonard [Thu, 24 Jan 2019 19:40:03 +0000 (19:40 +0000)]
Bug 21449: Update two-column templates with Bootstrap grid: Circulation part 2

This patch modifies several circulation templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths. For each page, test with
the CircSidebar preference both on and off.

 - Catalog -> Search -> Details -> Items -> View item's checkout history
 - Circulation -> Overdues with fines
 - Circulation -> Transfer
 - Circulation -> Patron -> Batch checkout
 - Circulation -> Built-in offline circulation interface
   - Synchronize
   - Pending offline circulation actions
   - Check out
   - Check in

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22148: Changed where user is redirected by cancelling payment
helene hickey [Wed, 16 Jan 2019 22:36:20 +0000 (22:36 +0000)]
Bug 22148: Changed where user is redirected by cancelling payment

To test:
1) Create a manual invoice and save
2) Go to Make a payment tab
3) Click 'Pay amount', then cancel
4) Notice you are redirected to the Transactions tab, rather than back to
Make a payment
5) Also try this with Pay selected and write off selected result when
cancelling should be the same
6) Apply patch and try steps 2-6 again
7) Verify that you are now redirected to the 'make a payment tab'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12283: Disable autocomplete for patron search inputs
Olli-Antti Kivilahti [Wed, 17 Oct 2018 19:03:00 +0000 (19:03 +0000)]
Bug 12283: Disable autocomplete for patron search inputs

In a production system, you don't usually search for the same
patron over and over, so there's no sense for the browser
to save a list of searched patrons in the patron quick
search. Therefore, should set autocomplete=off for that
input field.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22144: (QA follow-up) Prepare the ground for other formats
Tomas Cohen Arazi [Wed, 23 Jan 2019 16:25:33 +0000 (13:25 -0300)]
Bug 22144: (QA follow-up) Prepare the ground for other formats

This patch refactors the original implementation so it is ready for
supporting other formats. It also adds some error handling.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Biblio/Metadata.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22144: Add method metadata() to Koha::Biblio
Kyle M Hall [Wed, 16 Jan 2019 19:25:07 +0000 (14:25 -0500)]
Bug 22144: Add method metadata() to Koha::Biblio

It would be very convenient to be able to retrieve a bib's attached metadata objects directly from the biblio object. This would be very useful for Template Toolkit syntax in slips and notices where a library would like to use arbitrary metadata fields that aren't stored in the database.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Biblio.t

Signed-off-by: Te Rahui Tunua <terahuitunua@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22194: Add Koha::Exceptions::Metadata
Tomas Cohen Arazi [Wed, 23 Jan 2019 16:10:14 +0000 (13:10 -0300)]
Bug 22194: Add Koha::Exceptions::Metadata

This trivial patch adds a basic Koha::Exceptions::Metadata exception and
Koha::Exceptions::Metadata::Invalid for using when the data cannot be
decoded (maybe because of incompatibility between format, schema, or
just bad data).

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/Koha/Exceptions.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21918: Update buttons on fines to match newer buttons
Owen Leonard [Thu, 29 Nov 2018 19:56:43 +0000 (19:56 +0000)]
Bug 21918: Update buttons on fines to match newer buttons

This patch makes a number of changes to the "Pay fines" template, the
goal of which is to make the interface look better in general. Changes
include:

 - Styling the "Pay" and "Write off" buttons as Bootstrap buttons.
 - Adding DataTables sorting, searching, and filtering.
 - Adding a column showing the fine date.
 - Hide the "Add note" input, add a link to show it.
 - Add some missing "preventDefault" methods from events.
 - Add "Writeoff selected" to the buttons which are disabled when there
   is no checkbox selection.
 - The <tfoot> tag is now expected by the HTML validator to be after
   <tbody>, so this section has been moved to suppress validator errors.

To test, apply the patch and locate a patron who has multiple
outstanding fines.

 - Go to Fines -> Pay fines
 - Confirm that the table of fines is shown as a DataTable, with sorting
   on columns which have data.
 - Test columns settings in Administration -> Columns settings.
 - Confirm that fine dates are shown, and that sorting by this column
   works correctly.
 - Click an "Add note" link to show a note input field. Focus should be
   in the newly-displayed input.
   - Confirm that notes are still saved correctly when paying or writing
     off single or multiple fines.
   - Confirm that when the "add note" input is hidden, its contents are
     erased.
 - Uncheck all checkboxes by clicking the "Clear all" link at the top.
   The "Pay selected" and "Write off selected" buttons should become
   disabled.
   - Checking any checkbox should re-enable those buttons.
 - Test that the relocated "Apply" button (for outstanding credits)
   still works as expected.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22155: Schema updates
Nick Clemens [Wed, 30 Jan 2019 11:36:11 +0000 (11:36 +0000)]
Bug 22155: Schema updates

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22155: DBRev 18.12.00.011
Nick Clemens [Wed, 30 Jan 2019 11:35:59 +0000 (11:35 +0000)]
Bug 22155: DBRev 18.12.00.011

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22155: Adapt uses of biblio_metadata.marcflavour to schema
Tomas Cohen Arazi [Fri, 18 Jan 2019 02:25:38 +0000 (23:25 -0300)]
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema

This patch makes the code using Koha::Biblio::Metadata->marcflavour use
->schema instead for all interactions.

To test:
- Update the DB structure:
  $ updatedatabase
- Update the schema files:
  $ dbic
- Notice all the places in which biblio_metadata is used
  $ cd kohaclone
  $ git grep biblio_metadata
=> SUCCESS: They all use `schema` instead of marcflavour
- Notice all the places that use Koha::Biblio::Metadata:
  $ git grep Koha::Biblio::Metadata
=> SUCCESS: They all use the schema attribute when they used to use
marcflavour
- Run all the modified tests and scripts
=> SUCCESS: We are all good
- Sign off :-D

Note: while this seems like a minor change, the places in which plain
SQL is used really require understanding the queries and how they are
used, because some query results might be passed to some other method
that in turn uses the marcflavour attribute. I of course took that into
account but errare humanum est :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22155: DB update
Tomas Cohen Arazi [Fri, 18 Jan 2019 01:55:11 +0000 (22:55 -0300)]
Bug 22155: DB update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20634: Changing the identical label "Library:" to "Location" in Inventory Home.
Olivia Lu [Tue, 15 Jan 2019 21:24:25 +0000 (21:24 +0000)]
Bug 20634: Changing the identical label "Library:" to "Location" in Inventory Home.

To find fix:

1. Go to tools
2. Go to Inventory
3. Verify that under Item location filters the label should be "Location"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21971: TestBuilder::build_sample_item
Jonathan Druart [Thu, 6 Dec 2018 22:51:39 +0000 (19:51 -0300)]
Bug 21971: TestBuilder::build_sample_item

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21798: (RM follow-up) Fix a few added tests
Nick Clemens [Mon, 28 Jan 2019 20:14:27 +0000 (20:14 +0000)]
Bug 21798: (RM follow-up) Fix a few added tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21798: (QA follow-up) Fix Biblios.t
Marcel de Rooy [Thu, 13 Dec 2018 12:51:20 +0000 (13:51 +0100)]
Bug 21798: (QA follow-up) Fix Biblios.t

Global symbol "$bibnum" requires explicit package name

Test plan:
Run test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21798: replace gimme_a_biblio with build_sample_biblio
Jonathan Druart [Wed, 12 Dec 2018 16:17:02 +0000 (13:17 -0300)]
Bug 21798: replace gimme_a_biblio with build_sample_biblio

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21798: Replace 2 more occurrences
Jonathan Druart [Thu, 6 Dec 2018 21:00:09 +0000 (18:00 -0300)]
Bug 21798: Replace 2 more occurrences

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21798: Fix another test
Jonathan Druart [Tue, 13 Nov 2018 14:24:14 +0000 (11:24 -0300)]
Bug 21798: Fix another test

We should correctly generate the data we need, here we expect 2 records
with title starting with "Silence in the".

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21798: Fix a wrong test
Jonathan Druart [Tue, 13 Nov 2018 14:22:15 +0000 (11:22 -0300)]
Bug 21798: Fix a wrong test

Now biblioitem.itemtype has a value, GetItem should fill itype with this
value if item-level_itypes it not set

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21798: Unify the creation of bibliographic record in tests
Jonathan Druart [Tue, 13 Nov 2018 14:20:45 +0000 (11:20 -0300)]
Bug 21798: Unify the creation of bibliographic record in tests

Using the newly created subroutine

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21798: We need t::lib::TestBuilder::gimme_a_biblio
Tomas Cohen Arazi [Thu, 8 Nov 2018 20:06:54 +0000 (17:06 -0300)]
Bug 21798: We need t::lib::TestBuilder::gimme_a_biblio

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21495: Regression in hold override functionality
Kyle M Hall [Thu, 15 Nov 2018 13:35:33 +0000 (08:35 -0500)]
Bug 21495: Regression in hold override functionality

The changes caused by the patches for bug 11512 have broken existing
workflows for many libraries and are widely considered to be a bad move.
We should revert this behavior.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21478: (QA follow-up) Make sure tests don't fail randomly
Tomas Cohen Arazi [Mon, 28 Jan 2019 15:23:35 +0000 (12:23 -0300)]
Bug 21478: (QA follow-up) Make sure tests don't fail randomly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22168: Improve styling of new chart settings for reports
Owen Leonard [Fri, 18 Jan 2019 17:10:40 +0000 (17:10 +0000)]
Bug 22168: Improve styling of new chart settings for reports

This patch updates a number of aspects of the reports chart creation
interface: Chart creation form is now shown in a modal window, and a
separate link has been added to show or hide the chart itself.

Also changed: Minor markup and JavaScript cleanup.

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

- Run a report which returns more than one column.
- On the report results page, click the "Create chart" button. The chart
  settings form should appear in a modal window.
- Confirm that the form controls work correctly: Each label should give
  focus to the correct input. Changing the chart type should show or
  hide the appropriate form fields.
- Click the "Draw" button. The modal should disappear and the chart
  should be shown.
- Above the chart should be a "Hide chart" link which works to hide (and
  then show) the chart.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22061: DBRev 18.12.00.010
Nick Clemens [Mon, 28 Jan 2019 16:04:32 +0000 (16:04 +0000)]
Bug 22061: DBRev 18.12.00.010

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22061: (follow-up) set_password expects a hashref
Tomas Cohen Arazi [Mon, 28 Jan 2019 15:45:03 +0000 (12:45 -0300)]
Bug 22061: (follow-up) set_password expects a hashref

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22061: (QA follow-up) Rename password_2 => password_repeated
Tomas Cohen Arazi [Fri, 18 Jan 2019 16:34:55 +0000 (13:34 -0300)]
Bug 22061: (QA follow-up) Rename password_2 => password_repeated

As voted when the RFC was discussed, the attribute gets renamed. The
tests are adjusted accordingly.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons_password.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22061: Public route to change password
Tomas Cohen Arazi [Mon, 7 Jan 2019 11:25:08 +0000 (08:25 -0300)]
Bug 22061: Public route to change password

This patch implements a route to change patron's password for
unprivileged users. It's intended for using in the OPAC (or however
consumers find it useful).

It is a starting point for the public API, and the bug also implements
the on/off switch some community members asked for.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons_password.t \
          t/db_dependent/api/v1/auth.t
=> SUCCESS: Tests pass! i.e.
        - RESTPublicAPI is honoured
        - The /public/patrons/:patron_id/password endpoint works as
        expected
- Use your favourite API testing tool to try the endpoint.
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22061: OpenAPI spec
Tomas Cohen Arazi [Mon, 7 Jan 2019 11:24:45 +0000 (08:24 -0300)]
Bug 22061: OpenAPI spec

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22061: Unit tests
Tomas Cohen Arazi [Mon, 7 Jan 2019 11:24:28 +0000 (08:24 -0300)]
Bug 22061: Unit tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22061: Add a /public namespace that can be switched on/off
Tomas Cohen Arazi [Wed, 2 Jan 2019 18:05:47 +0000 (15:05 -0300)]
Bug 22061: Add a /public namespace that can be switched on/off

This patch adds a check in Koha::REST::V1::Auth::under to catch all
routes that begin with 'public' (inside /api/v1). If they match, and the
RESTPublicAPI syspref is off, then an exception is thrown, rendering a
403 error to the consumer.

Otherwise the routes are processed as usual. This is THE on/off switch
for the public REST API. The target use case: people not wanting an OPAC
or public interaction with the API besides privileged users.

In order to test, the rest of the patches are needed because the only
way to test a route is having it in the spec.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth.t
=> SUCCESS: tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22061: Add RESTPublicAPI syspref
Tomas Cohen Arazi [Wed, 2 Jan 2019 18:05:10 +0000 (15:05 -0300)]
Bug 22061: Add RESTPublicAPI syspref

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17006: (follow-up) set_password expects a hashref
Tomas Cohen Arazi [Mon, 28 Jan 2019 15:37:54 +0000 (12:37 -0300)]
Bug 17006: (follow-up) set_password expects a hashref

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17006: Add /patrons/{patron_id}/password
Tomas Cohen Arazi [Thu, 16 Aug 2018 10:02:17 +0000 (07:02 -0300)]
Bug 17006: Add /patrons/{patron_id}/password

This patch introduces an endpoint for changing a patron's password. It
targets privileged user with the right permissions, changing some
patron's password.

To test:

- Apply this patchset
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons_password.t
=> SUCCESS: tests pass!
- Play with the different use cases highlighted by the tests, on your
favourite REST testing tool (Postman, RESTer on FF, etc).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17006: OpenAPI spec
Tomas Cohen Arazi [Thu, 16 Aug 2018 10:01:21 +0000 (07:01 -0300)]
Bug 17006: OpenAPI spec

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17006: Unit tests
Tomas Cohen Arazi [Thu, 16 Aug 2018 10:00:38 +0000 (07:00 -0300)]
Bug 17006: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19770: Add cardnumber and CSS classed to patron info on waiting holds
Katrin Fischer [Mon, 14 Jan 2019 06:21:39 +0000 (06:21 +0000)]
Bug 19770: Add cardnumber and CSS classed to patron info on waiting holds

Patch makes use fo patron-string.inc for displaying the patron information
on the waiting holds report.

It also adds spans with classes for phone and email.

To Test:
1 - View the holds awaiting pickup report
2 - Note there is no cardnumber for the patron
3 - Apply patch
4 - Cardnumber shows now
5 - Verify the same works for 'Holds over' tab

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18661: Made "Replace only included patron attributes" default on patron import
Te Rauhina Jackson [Tue, 16 Jan 2018 20:49:20 +0000 (20:49 +0000)]
Bug 18661: Made "Replace only included patron attributes" default on patron import

Test Plan:
1) Go to the import patrons page and notice that "Replace all patron attributes" is selected by default in the Patron Attributes section.
2) Apply this patch
3) Go back to the import patrons page and notice that "Replace only included patron attributes" is delected by default.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19994: Used Modern::Perl in Authorities perl scripts
Jasmine Amohia [Thu, 17 Jan 2019 00:51:11 +0000 (00:51 +0000)]
Bug 19994: Used Modern::Perl in Authorities perl scripts

Test plan:
1. Review code of the following files and confirm that 'use Modern::Perl;' is used in place of
'use strict; use warnings;'

auth_finder.pl
authorities-home.pl
authorities.pl
blinddetail-biblio-search.pl
detail-biblio-search.pl
detail.pl
export.pl
merge.pl
merge_ajax.pl

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10562: Improve Leader06 Type Labels in MARC21slim2OPACResults.xsl
Owen Leonard [Fri, 29 Jun 2018 16:27:28 +0000 (16:27 +0000)]
Bug 10562: Improve Leader06 Type Labels in MARC21slim2OPACResults.xsl

This patch takes the suggestions in Bug 10562 and implements those
changes in MARC21slim2OPACResults.xsl. This patch also makes the
following changes:

 - De-duplicate famfamfam icons: Remove the /silk subdirectory and move
   non-duplicates to famfamfam/; Correct paths to these images in
   templates and CSS
 - Improve the granularity of some material type icon choices: Show
   "Film," "Picture," or "Object" instead of "Visual material."
 - Remove unnecessary title attributes from material type images
 - Implement the kind of changes made in Bug 18235, "Add classes to
   material type icons on result lists and detail pages"

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15110: Improve decreaseHighHolds system preference description
helene hickey [Thu, 17 Jan 2019 02:28:57 +0000 (02:28 +0000)]
Bug 15110: Improve decreaseHighHolds system preference description

To test:
1) Apply patch
2) Go to Koha admin
3) Search in system prefernces for 'high demand'
4) Verify that the system prefernce 'decreaseLoanHighHolds' is in the
results of the search

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22124: Update cataloguing plugin system to not generate type parameter in script tag
Josef Moravec [Mon, 14 Jan 2019 09:16:53 +0000 (09:16 +0000)]
Bug 22124: Update cataloguing plugin system to not generate type parameter in script tag

Test plan:
1) Apply the patch
2) Have defined some cataloguing plugin which generates javascript - for
example dateaccessioned.pl
3) Go to cataloguing/adding item and show source
-> there should be no type parameter in script tag in code added by
cataloguing pulgin
4) prove t/db_dependent/FrameworkPlugin.t

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22136: Added 'ExtendedPatronAttributes' notes to 'Import Patrons' notes.
Ethan Amohia [Wed, 16 Jan 2019 04:01:44 +0000 (04:01 +0000)]
Bug 22136: Added 'ExtendedPatronAttributes' notes to 'Import Patrons' notes.

Fixed ExtendedPatronAttributes typo.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22134: (follow-up) Simplify check for expired patron
Owen Leonard [Fri, 18 Jan 2019 13:05:55 +0000 (13:05 +0000)]
Bug 22134: (follow-up) Simplify check for expired patron

This patch move the check for "is_expired" to the template and removes
unnecessary code from the script.

The page now correctly handles messages for patrons who are about to
expire, as defined in the NotifyBorrowerDeparture preference.

To test, apply the patch and locate a patron record which is expired.

 - On the patron detail page (members/moremember.pl) you should see a
   message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.

Select a patron who will expire within the period defined in
NotifyBorrowerDeparture.

 - On the patron detail page you should see a message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22134: Add account expiration information to patron details
Owen Leonard [Tue, 15 Jan 2019 14:53:07 +0000 (14:53 +0000)]
Bug 22134: Add account expiration information to patron details

This patch modifies the patron detail template in the staff client so
that when a patron's registration is expired a message shows at the top
of the page along with the same "Renew" and "Edit" links which appear on
the checkout page. Links are also shown next the the expiration date in
the body of the page.

This patch also corrects the capitalization of the "Edit Details" link
on circulation.tt.

To test, apply the patch and locate a patron record which is expired.

 - On the patron detail page (members/moremember.pl) you should see a
   message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.
 - On the patron's checkout page the "Edit details" link in the
   expiration message should have correct capitalization.

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19818: Add id into tag html from moremember.tt
helene hickey [Thu, 17 Jan 2019 01:09:04 +0000 (01:09 +0000)]
Bug 19818: Add id into tag html from moremember.tt

1) Go to the patron details for a patron
2) On the right of the screen, right click one of the labels below
   'Library use' etc, and Inspect Element
3) View <li> tags which should now each have a unique <id> tag for each

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22102: Markup fixes for OPAC article request page
Owen Leonard [Fri, 11 Jan 2019 14:52:28 +0000 (14:52 +0000)]
Bug 22102: Markup fixes for OPAC article request page

This patch makes a few improvements to the OPAC article request page:

- Improve the breadcrumbs menu by adding a link to the title
- Add a header with the record's title
- Wrap the "no article requests" message in the correct dialog div
- Remove obsolete CDATA marker

To test, apply the patch and log in to the OPAC

 - Peform a search which will return multiple results
 - Click "Request article" on a title for which article requests can be
   submitted.
   - Confirm that the breadcrumbs menu looks and works correctly.
 - Click "Request article" on a title for which article requsts are not
   allowed.
   - Confirm that the message is correctly styled.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21945: Clean up stock rotation template
Owen Leonard [Tue, 4 Dec 2018 16:52:44 +0000 (16:52 +0000)]
Bug 21945: Clean up stock rotation template

This patch makes some minor markup upgrades to the stock rotation
template: Replace some YUI markup with Bootstrap; Add some missing <tr>
tags; Remove invalid "type" attribute from <script> tag.

To test, apply the patch and go to Tools -> Stock rotation. Confirm that
the page looks correct and adjusts well at various browser widths. Test
with various views: New rota, edit rota, manage stages, manage items.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22104: Clean up patron API keys template
Owen Leonard [Fri, 11 Jan 2019 17:06:45 +0000 (17:06 +0000)]
Bug 22104: Clean up patron API keys template

This patch makes two corrections to the patron API key template: Convert
to Bootstrap grid and correct class on "new key" button.

To test, apply the patch and enable the RESTOAuth2ClientCredentials
preference.

 - Open a patron record in the staff client and choose More -> Manage
   API keys.
 - On the API keys page, confirm that the page adjusts well at various
   page widths.
 - Confirm that the size of the "Generate new client id/key pair" button
   matches the buttons in the toolbar.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22026: Removed 'use Modern::Perl;' from Koha::REST::classes
Jasmine Amohia [Thu, 17 Jan 2019 02:55:46 +0000 (02:55 +0000)]
Bug 22026: Removed 'use Modern::Perl;' from Koha::REST::classes

Test plan:
1) Check all Koha/REST files and confirm that 'use Modern::Perl;' has
been removed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21926: Enhance OAI-PMH:archiveID system preference description
Josef Moravec [Fri, 30 Nov 2018 10:26:54 +0000 (10:26 +0000)]
Bug 21926: Enhance OAI-PMH:archiveID system preference description

Test plan:
1) Apply the patch
2) Go to Administration -> System preferences -> Web services, section
OAI-PMH
3) See description on OAI-PMH:archiveID and confirm it does make sense
and have the link to implementation guidelines

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21290: Updating documentation for ModItem
helene hickey [Wed, 16 Jan 2019 23:20:38 +0000 (23:20 +0000)]
Bug 21290: Updating documentation for ModItem

To test:
Review the patch and check it is now updated correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21964: Update two-column templates with Bootstrap grid: Patrons part 2
Owen Leonard [Wed, 2 May 2018 17:56:43 +0000 (17:56 +0000)]
Bug 21964: Update two-column templates with Bootstrap grid: Patrons part 2

This patch modifies several patron templates to use the Bootstrap grid
instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags in the modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Patrons home page
   - New patron
 - Patron -> Fines -> Create manual invoice
 - Patron -> Set permissions
 - Patron -> Change password
 - Patron -> Edit

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20679: Removed 'rows per page' from report print layout
Jasmine Amohia [Wed, 16 Jan 2019 20:53:40 +0000 (20:53 +0000)]
Bug 20679: Removed 'rows per page' from report print layout

Test plan:
1. Create a report or view an existing report
2. Notice that 'Rows per page:' is visible
3. Print report (Ctrl+P)
4. Confirm that on printed report, 'Rows per page:' is no longer visible

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22149: Fixed grammar in the manage_circ_rules_from_any_libraries description
Jasmine Amohia [Wed, 16 Jan 2019 23:10:35 +0000 (23:10 +0000)]
Bug 22149: Fixed grammar in the manage_circ_rules_from_any_libraries description

Test plan:
1. Review patch and confirm that the sentence makes sense

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21930: Reworded message on permissions.inc
Jack Kelliher [Tue, 15 Jan 2019 03:24:17 +0000 (03:24 +0000)]
Bug 21930: Reworded message on permissions.inc

1. Go to patrons account, more, Set Permissions.
2. Dropdown the Parameters section.
3. Text should display "If not set the logged in user could only edit
circulation rules for its the own library (please note that
        manage_circ_rules is still required)"
4. Apply patch and reload page
5. Text should now display "Edit circulation rules from any library. If
not set the logged in user could only edit circulation rules for their
own library (please note that manage_circ_rules is still required)"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22029: Google plus has been removed from the social links.
helene hickey [Tue, 15 Jan 2019 21:08:47 +0000 (21:08 +0000)]
Bug 22029: Google plus has been removed from the social links.

For testing:
1) Make sure SocailNetworks is enabled
2) Find a book and verify that in the social links, there is a Google
Plus option
3) apply patch and verify that the Google Plus option is no longer there

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20569: Improved description of CheckPrevCheckout system preference
Jasmine Amohia [Tue, 15 Jan 2019 21:34:32 +0000 (21:34 +0000)]
Bug 20569: Improved description of CheckPrevCheckout system preference

The CheckPrevCheckout preference can be overriden by a setting in the
patron categories, I've edited the options to reflect this.

Test plan:
1. Check the CheckPrevCheckout system preferences and confirm that the
options are clear

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22138: updated tab names on members/paycollect.pl
Jasmine Amohia [Wed, 16 Jan 2019 00:54:52 +0000 (00:54 +0000)]
Bug 22138: updated tab names on members/paycollect.pl

Test plan:
1. Give patron outstanding fees
2. Search patron and select 'Make payment'
3. Select either 'Pay' or 'Write off'
4. Confirm that first tab title remains as 'Transactions'
5. Confirm that current tab title remains as 'Make a payment'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21573: Compiled CSS
Nick Clemens [Mon, 28 Jan 2019 12:51:02 +0000 (12:51 +0000)]
Bug 21573: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21573: Move lists barcode and biblionumber entry form to modal
Owen Leonard [Mon, 15 Oct 2018 15:10:28 +0000 (15:10 +0000)]
Bug 21573: Move lists barcode and biblionumber entry form to modal

This patch modifies the staff client lists page so that the
barcode/biblionumber entry form from the left hand sidebar into a modal
window, triggered by a button in the toolbar.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - View the contents of a list in the staff client, logged in as a user
   who has permission to add items.
 - Click the "Add items" button. A modal window should appear with the
   barcode/biblionumber entry form.
 - Submit barcodes and/or biblionumbers and confirm that the correct
   titles are added to the list.
 - Log in again as a user who does not have permission to add to the
   list. Confirm that the button isn't present.

Signed-off-by: Mackey Johnstone <mackeyfj@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17353: (follow-up) Adjust config variable for moremember.tt too
Nick Clemens [Thu, 10 Jan 2019 20:40:02 +0000 (20:40 +0000)]
Bug 17353: (follow-up) Adjust config variable for moremember.tt too

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17353: Add phone number column to checkout search
Nick Clemens [Mon, 26 Sep 2016 17:43:20 +0000 (17:43 +0000)]
Bug 17353: Add phone number column to checkout search

This patch adds borrowers.phone as 'Primary phone' in the checkout
search results. It also ads the table to columns configuration

To test:
1 - Perform a checkout search
2 - Note phone is not displayed
3 - Apply patch
4 - Note phone does not display
5 - Visit columns configuration
6 - Unhide the 'phone' column
7 - Note phone displays
8 - Ensure page functions as before patch

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20729: Compiled CSS
Nick Clemens [Mon, 28 Jan 2019 12:36:22 +0000 (12:36 +0000)]
Bug 20729: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20729: Update style of datepickers
Owen Leonard [Wed, 10 Oct 2018 18:16:10 +0000 (18:16 +0000)]
Bug 20729: Update style of datepickers

This patch updates the styling of form fields which are configured to
use the jQueryUI datepicker widget. Some CSS has been added, and the
default datepicker configuration has been changed.

To test, apply the patch, rebuild the staff client CSS file, and clear
your cache if necessary. Test pages which include a datepicker to
confirm that they look correct and work correctly. Some examples:

 - Circulation -> Check out -> Specify due date
 - Patrons -> Add patron -> Date of birth, registration date, expiry
   date fields
 - Serials -> Search subscriptions -> Search results page sidebar
 - Tools -> News -> Add news item

And confirm that this change hasn't adversely affected the calendar
tool:

 - Tools -> Calendar

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21399: Sort patron fines in OPAC by date descending as a default
Owen Leonard [Tue, 27 Nov 2018 19:25:09 +0000 (19:25 +0000)]
Bug 21399: Sort patron fines in OPAC by date descending as a default

This patch modifies the DataTables configuration of the logged-in user's
"Fines and charges" table in the OPAC so that the table is sorted by
date, descending.

To test, apply the patch and log in to the OPAC as a user with multiple
fines. Go to the "your fines" page and confirm that the table is sorted
by default on the first column with the newest entries first.

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21913: Clean up payment details page
Owen Leonard [Wed, 24 Oct 2018 16:09:12 +0000 (16:09 +0000)]
Bug 21913: Clean up payment details page

This patch makes various corrections and improvements to the payment
details page:

 - Grid converted to Bootstrap
 - Correct title tag
 - Add patron toolbar
 - Adding missing patron-related JavaScript
 - Improve some language

To test, apply the patch and locate a patron who has one or more
payments on their account.

 - Open Fines -> Account -> Details of a transaction
 - Confirm that the page looks correct and adjusts well at various
   browser widths.
 - Confirm that patron toolbar items work correctly

Signed-off-by: Jose-Mario <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22083: Typo in circulation_batch_checkouts.tt
Caroline Cyr La Rose [Tue, 8 Jan 2019 14:28:35 +0000 (09:28 -0500)]
Bug 22083: Typo in circulation_batch_checkouts.tt

There is a typo in circulation_batch_checkouts.tt that makes Koha skip
a warning if the user cannot borrow due to circulation rules.

This patch corrects this typo.

To test:

1. In Administration > Global system preferences, 'Allow'
   BatchCheckouts and enter patron categories in
   BatchCheckoutsValidCategories
2. Go to Administration > Circulation and fines rules
3. Enter a rule where a certain category of patrons (that is in
   BatchCheckoutsValidCategories) cannot take out a particular item type
4. Search the catalog for an item of that item type
5. Copy the barcode
6. Go into patrons and find a patron of that category
7. Click on the Batch checkout tab
8. Paste the barcode in the box and click Check out
9. It should say 'Too many checked out'
10. Apply the patch
11. Try the check out again, it should show both warnings ('Too many
    checked out' and 'This patron can't check out this item per library
    circulation policy')

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20640: (follow-up) Always send a backend on migrate
Martin Renvoize [Fri, 11 Jan 2019 16:12:24 +0000 (16:12 +0000)]
Bug 20640: (follow-up) Always send a backend on migrate

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20640: (follow-up) Make error message translatable
Martin Renvoize [Fri, 11 Jan 2019 14:50:47 +0000 (14:50 +0000)]
Bug 20640: (follow-up) Make error message translatable

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20640: (follow-up) Redirect to new request at completion
Martin Renvoize [Fri, 11 Jan 2019 12:41:29 +0000 (12:41 +0000)]
Bug 20640: (follow-up) Redirect to new request at completion

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20640: (follow-up) Degrade gracefully on error
Martin Renvoize [Thu, 1 Nov 2018 15:29:08 +0000 (15:29 +0000)]
Bug 20640: (follow-up) Degrade gracefully on error

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20640: Add backend migration support to ILL
Martin Renvoize [Fri, 27 Apr 2018 07:48:53 +0000 (08:48 +0100)]
Bug 20640: Add backend migration support to ILL

- Add core methods required to support the migration of ILL requests
between backends.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19945: Use CanItemBeReserved in ILSDI HoldItem instead of CanBookBeReserved.
Alex Arnaud [Tue, 18 Sep 2018 13:05:26 +0000 (13:05 +0000)]
Bug 19945: Use CanItemBeReserved in ILSDI HoldItem instead of CanBookBeReserved.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19945: Add a test proving that using CanBookBeReserved in ILSDI::HoldItem is...
Alex Arnaud [Tue, 18 Sep 2018 12:59:26 +0000 (12:59 +0000)]
Bug 19945: Add a test proving that using CanBookBeReserved in ILSDI::HoldItem is wrong.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19945: (follow-up) optimization and test correction
Mark Tompsett [Tue, 27 Mar 2018 19:31:36 +0000 (19:31 +0000)]
Bug 19945: (follow-up) optimization and test correction

The double call to CanItemBeReserved was pointless in
the C4/Reserves.pm HoldItem, as CanBookBeReserved calls
CanItemBeReserved and even returns that code.

Additionally, the tests failed, because there were 5
tests not 4.

TEST PLAN
----------
prove t/db_dependent/ILSDI_Services.t
run koha qa test tools

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19945: ILSDI - Return the reason a reserve is impossible
Alex Arnaud [Wed, 10 Jan 2018 15:31:54 +0000 (15:31 +0000)]
Bug 19945: ILSDI - Return the reason a reserve is impossible

Currently, the ILDSI services HoldTitle and HoldItem always return a
"NotHoldable" code is the reserve is impossible. We need to know why

Test plan:

 - Apply this patch
 - Place a hold on a non reservable title using ILS-DI web service
   (http://koha-opac.example.org/cgi-bin/koha/ilsdi.pl?service=HoldTitle&patron_id=1&bib_id=1&request_location=)
 - you should get the reason instead of NotHoldable,
 - Place a hold on a non reservable item using ILS-DI web service
   (http://koha-opac.example.org/cgi-bin/koha/ilsdi.pl?service=HoldItem&patron_id=1&bib_id=1&item_id=1)
 - you should get the reason instead of NotHoldable,

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22066: Record library_id for manual credits
Tomas Cohen Arazi [Mon, 7 Jan 2019 17:06:01 +0000 (14:06 -0300)]
Bug 22066: Record library_id for manual credits

On creating manual credits, the (newly introduced) branchcode should be
set now. This trivial patch makes it work.

To test:
- Create a manual credit for a known patron
- Using MySQL check the result:
  $ sudo mysql
  > SELECT * FROM accountlines WHERE borrowernumber=<known_id>;
=> FAIL: The created accountline row has NULL for the branchcode
- Apply this patch
- Create a manual credit for the patron
- Run:
  > SELECT * FROM accountlines WHERE borrowernumber=<known_id>;
=> SUCCESS: branchcode is set correctly
-Sign off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21241: DBRev 18.12.00.009
Nick Clemens [Mon, 28 Jan 2019 11:45:49 +0000 (11:45 +0000)]
Bug 21241: DBRev 18.12.00.009

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21241: (follow-up) Made SQL change idempotent
Alex Buckley [Mon, 24 Dec 2018 21:38:24 +0000 (21:38 +0000)]
Bug 21241: (follow-up) Made SQL change idempotent

Also added the new pref to sysprefs.sql

Also simplified the conditional statement.

Sponsored-By: Brimbank Library, Australia
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21241: (follow-up) Code Golf
Martin Renvoize [Wed, 7 Nov 2018 11:35:36 +0000 (11:35 +0000)]
Bug 21241: (follow-up) Code Golf

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21241: (follow-up) Syspref to control fallback to SMS when no email is defined
Alex Buckley [Wed, 31 Oct 2018 13:52:29 +0000 (13:52 +0000)]
Bug 21241: (follow-up) Syspref to control fallback to SMS when no email is defined

This patch adds a new system preference (FallbackToSMSIfNoEmail)
which if enabled Koha will send suggestion notices by SMS if a borrower
has a defined SMSalertnumber and no email.

The use of the syspref prevents automatic fallback to sending suggestion notices as SMS when there's no defined email.

Test plan:
1. Chose a patron who has no email address set, but does have a
smsalertnumber set (this value is set in the Patron messaging
preferences section after the SMSSendDriver syspref is set)

2. Log into the OPAC with that user and submit a suggestion

3. In the staff client go to Acquisitions->Suggestions and tick the
suggestion and set its status to 'Accepted'

4. In the database query the message_queue and notice the
message_transport_type of the message is set to 'email' even though the
patron has no email address set.

5. Apply patches, restart memcached and plack

6. Check the 'FallbackToSMSIfNoEmail' syspref
is disabled

7. Repeat steps 2,3 and observe in the message_queue
table the message_transport_type = 'email'

    i.e. If the syspref is disabled then the message is still sent by email
    to borrowers with defined smsalertnumber and no email address

8. Enable the 'FallbackToSMSIfNoEmail' syspref
and repeat steps 2,3 and notice the
message_transport_type = 'sms'

    i.e. If the syspref is enabled then the message is sent by sms to
    borrowers with defined smsalertnumber and no email address

9. Repeat steps 2,3 with a patron with an email
address and no smsalertnumber trying with the 'FallbackToSMSIfNoEmail' syspref
enabled and disabled and notice in both cases the
message_transport_type = email.

    i.e. If a borrower has an email address defined the suggestion
    notice will always be sent via email

10. Repeat steps 2,3 with a patron with no email or smsalertnumber trying with the 'FallbackToSMSIfNoEmail' syspref enabled and disabled and notice in both cases the message_transport_type = email

    i.e. If the borrower has no smsalertnumber and no email defined then the
    suggestion notice will be sent by 'email'

11. Run t/db_dependent/Suggestions.t

Sponsored-By: Brimbank Libraries, Australia
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 21241: (follow-up) Renamed system preference

Sponsored-By: Brimbank Library, Australia
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21241: Conditional to choose appropriate message_transport_type for suggestion...
Alex Buckley [Thu, 16 Aug 2018 14:06:56 +0000 (02:06 +1200)]
Bug 21241: Conditional to choose appropriate message_transport_type for suggestion notices

Introducing a conditional into C4/Suggestions.pm to check if no patron
email exists but a smsalertnumber does exist then the suggestion notice
message_transport_type is set to 'sms', otherwise the suggestion
message_transport_type='email'.

This ensures patrons with no email address still receieve their
suggestion notices because at present the message_transport_type is
hardcoded to 'email'.

Test plan:
1. Chose a patron who has no email address set, but does have a
smsalertnumber set (this value is set in the Patron messaging
preferences section after the SMSSendDriver syspref is set)

2. Log into the OPAC with that user and submit a suggestion

3. In the staff client go to Acquisitions->Suggestions and tick the
suggestion and set its status to 'Accepted'

4. In the database query the message_queue and notice the
message_transport_type of the message is set to 'email' even though the
patron has no email address set.

5. Apply this patch, restart memcached and plack

6. Repeat steps 2,3 with the same patron and query the message_queue
table again and notice this time the message_transport_type = 'sms'

7. Repeat steps 2,3 with a patron with no smsalertnumber or email
address. Query the database and observe the
message_transport_type=email.

If no smsalertnumber is set then the message_transport_type is set to
'email' by default

Sponsored-By: Brimbank Library, Australia
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22207: course reserves page does not have unique <body> id
Lucas Gass [Fri, 25 Jan 2019 15:37:21 +0000 (15:37 +0000)]
Bug 22207: course reserves page does not have unique <body> id

Test plan: Go to cgi-bin/koha/opac-course-reserves.pl in the OPAC and
make sure the body id is opac-course-reserves

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21089: Compiled CSS
Nick Clemens [Mon, 28 Jan 2019 11:37:47 +0000 (11:37 +0000)]
Bug 21089: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21089: Overlapping elements in ordering information on acqui/supplier.pl
Owen Leonard [Mon, 7 Jan 2019 13:48:55 +0000 (13:48 +0000)]
Bug 21089: Overlapping elements in ordering information on acqui/supplier.pl

This patch changes the HTML structure of the vendor edit page so that
the markup is a little simpler. CSS is modified to match. This structure
should serve as a model for other similar form structures:

 <fieldset class="rows">
     <ol>
         <li>
             <label>General label:</label>
             <label class="radio">
                 Specific label 1 <input type="radio" />
             </label>
             <label class="radio">
                 Specific label 2 <input type="radio" />
             </label>
         </li>
     </ol>
 </fieldset>

To test, apply the patch and regenerate the staff client CSS.

 - Go to Acquisitions -> Vendor search -> Vendor -> Edit vendor
 - In the "Ordering information" section, confirm that the position of
   radio buttons looks correct.
 - Confirm that radio button labels work correctly.
 - Confirm that the adjacent dropdown menus work well.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21478: Make Koha::Hold->suspend reject found holds
Tomas Cohen Arazi [Fri, 25 Jan 2019 16:49:37 +0000 (13:49 -0300)]
Bug 21478: Make Koha::Hold->suspend reject found holds

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21478: Unit tests
Tomas Cohen Arazi [Fri, 25 Jan 2019 16:48:54 +0000 (13:48 -0300)]
Bug 21478: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21478: Add Koha::Exceptions::Hold
Tomas Cohen Arazi [Fri, 25 Jan 2019 15:48:04 +0000 (12:48 -0300)]
Bug 21478: Add Koha::Exceptions::Hold

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21877: (RM follow-up) Move space into conditional
Nick Clemens [Mon, 28 Jan 2019 11:32:55 +0000 (11:32 +0000)]
Bug 21877: (RM follow-up) Move space into conditional

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21877: Use AuthorisedValues.GetDescriptionByKohaField for notforloan in checkout
Fridolin Somers [Tue, 22 Jan 2019 08:45:02 +0000 (09:45 +0100)]
Bug 21877: Use AuthorisedValues.GetDescriptionByKohaField for notforloan in checkout

Using only TT plugin for authorised value description is a better code.

Test plan :
Part 1:
1.1) On a catalog with items.notforloan defined with authorized values category NOT_LOAN
1.2) Define in NOT_LOAN an authorized values 1 with description 'at the beach'
1.3) Define in NOT_LOAN an authorized values 2 with description empty
Part 2:
2.1) Set preference 'AllowNotForLoanOverride' to 'Don't allow'
2.2) Edit an item with notforloan=1
2.3) Checkout this item => You see 'Item not for loan (at the beach)'
2.4) Edit an item with notforloan=2
2.5) Checkout this item => You see 'Item not for loan'
Part 3:
3.1) Set preference 'AllowNotForLoanOverride' to 'Allow'
3.2) Edit an item with notforloan=1
3.3) Checkout this item => You see 'Item is normally not for loan (at the beach)'
3.4) Edit an item with notforloan=2
3.5) Checkout this item => You see 'Item is normally not for loan'

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21877: Show authorized value description for withdrawn in checkout
Fridolin Somers [Tue, 22 Jan 2019 08:47:22 +0000 (09:47 +0100)]
Bug 21877: Show authorized value description for withdrawn in checkout

During checkout the withdrawn information is displayed in a message :
"Item has been withdrawn".

Like in other pages and like notforloan, we should display the withdrawn authorized value description.

This patch adds this display.
Add <span> so that translation does not change.
Also adds class 'co-withdrawn' (like in checkin 'ci-*' classes) to ease hidding this new information via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description 'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description empty
4) Edit an item with withdrawn=1
5) Checkout this item => You see 'Item has been withdrawn (dropped in trash)'
6) Edit an item with withdrawn=2
7) Checkout this item => You see 'Item has been withdrawn'

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22203: Holds modal does not link to patorn account
Nick Clemens [Thu, 24 Jan 2019 14:57:46 +0000 (14:57 +0000)]
Bug 22203: Holds modal does not link to patorn account

To test:
1 - Place a hold for a patron
2 - Check the item in at the pickup location
3 - Note the holds modal does not link to patron
4 - Apply patch
5 - Check in item again
6 - Patron name in modal is a link

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>