koha.git
5 years agoBug 22641: Use raw filter on html slip
Nick Clemens [Sat, 23 Mar 2019 08:13:13 +0000 (08:13 +0000)]
Bug 22641: Use raw filter on html slip

To test:
Enable SCO
Load a patron
Hit finish, print slip
Note slip shows as raw html
Apply patch
Repeat, get a correctly formatted slip

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=22068

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17978: Unit tests for changes
Nick Clemens [Mon, 24 Dec 2018 15:59:22 +0000 (15:59 +0000)]
Bug 17978: Unit tests for changes

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17978: Check if hold can be placed before placing on placerequest.pl
Nick Clemens [Mon, 24 Dec 2018 14:33:51 +0000 (14:33 +0000)]
Bug 17978: Check if hold can be placed before placing on placerequest.pl

To test:
 1 - Set an All/All/All rule with reserves limited 2 to
 2 - Search in the staff side
 3 - Select all records (or more than 2) from the results
 4 - Click 'Place hold'
 5 - Find a patron, place holds
 6 - You get more holds than you should
 7 - Delete those holds
 8 - Apply patch
 9 - Search and select more than 2 records
10 - Find patron, place holds
11 - Only 2 holds are placed

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17978: Circ rules will not limit holds
Kyle M Hall [Tue, 19 Dec 2017 19:20:56 +0000 (14:20 -0500)]
Bug 17978: Circ rules will not limit holds

The crux of this issue is that all those holds are unfilled record level holds. The code that checks for the number of holds the user already has *always* uses a branchcode of some form. Because of this, any open record level holds are completely ignored for this purpose.

Test Plan:
1) Set ReservesControlBranch to "item's home library"
2) Set an All libraries/All Patrons/All itemtypes rules limiting a patron to 2 holds
3) Place 3 record level holds, you can but you should not be able to!
4) Delete the holds
5) Apply this patch
6) Attempt to place 3 record level holds
7) Note that you cannot!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22068: (QA follow-up) Return meaningful error codes
Tomas Cohen Arazi [Fri, 5 Apr 2019 18:13:36 +0000 (15:13 -0300)]
Bug 22068: (QA follow-up) Return meaningful error codes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22068: Prevent patrons to cancel article request they did not create
Jonathan Druart [Thu, 14 Feb 2019 20:03:17 +0000 (17:03 -0300)]
Bug 22068: Prevent patrons to cancel article request they did not create

opac-article-request-cancel.pl doesn't check that the article request to
be cancelled actually belongs to the logged-in borrower. This results in
any logged-in user being able to cancel any article request just by
changing the id in the URL.

Test plan:
- Login with Patron P1, create an article request
- Cancel it
- Create another one
- Copy the cancellation link (must be /cgi-bin/koha/opac-article-request-cancel.pl?id=X)
- Login with Patron P2
- Hit the cancellation link
=> Without this patch the article request is cancelled
=> With this patch applied there is a 404 redirection

Note that the 404 will also appears when the article request id does not
exist.

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: Schema updates
Nick Clemens [Wed, 10 Apr 2019 19:57:10 +0000 (19:57 +0000)]
Bug 22600: Schema updates

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: DBRev 18.12.00.039
Nick Clemens [Wed, 10 Apr 2019 19:55:14 +0000 (19:55 +0000)]
Bug 22600: DBRev 18.12.00.039

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22512: DBRev 18.12.00.038
Nick Clemens [Wed, 10 Apr 2019 19:53:39 +0000 (19:53 +0000)]
Bug 22512: DBRev 18.12.00.038

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: (QA follow-up) Raise an exception on missing interface param
Tomas Cohen Arazi [Tue, 9 Apr 2019 14:58:19 +0000 (11:58 -0300)]
Bug 22600: (QA follow-up) Raise an exception on missing interface param

This patch makes add_credit and add_debit raise a
Koha::Exceptions::MissingParameter exception if the 'interface'
parameter is ommited.

The database will fail to generate the line anyways in strict mode, and
we better handle it gracefuly.

Bonus: fixed the TODOs in the tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: Update Tests adding 'interface' as needed
Martin Renvoize [Fri, 29 Mar 2019 09:46:12 +0000 (09:46 +0000)]
Bug 22600: Update Tests adding 'interface' as needed

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: Set 'commandline' interface appropriately
Martin Renvoize [Thu, 28 Mar 2019 14:32:05 +0000 (14:32 +0000)]
Bug 22600: Set 'commandline' interface appropriately

This patch change Koha::Cron to be a more generic Koha::Script class and
update all commanline driven scripts to use it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: Add 'cron' to interface types and set appropriately
Martin Renvoize [Mon, 25 Mar 2019 19:04:58 +0000 (19:04 +0000)]
Bug 22600: Add 'cron' to interface types and set appropriately

This patch adds 'cron' as a valid interface and sets it appropriately for
existing cron scripts.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: Add 'api' to interface types and set appropriately
Martin Renvoize [Thu, 28 Mar 2019 11:33:00 +0000 (11:33 +0000)]
Bug 22600: Add 'api' to interface types and set appropriately

This patch adds 'api' as a valid interface and sets it appropriately for
both the new REST api and previous /svc/ api's.  Handling to keep the
interface of a logged in session is included such that if the OPAC or
Intranet use the API's internally via a Cookie we will maintain the
interface throughout the session.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: Add 'interface' to accountlines
Martin Renvoize [Thu, 28 Mar 2019 10:00:22 +0000 (10:00 +0000)]
Bug 22600: Add 'interface' to accountlines

This patch adds the 'interface' field to the accountlines table and
updates all Koha::Object routines and calls to use it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22512: Add status field to accountlines
Martin Renvoize [Thu, 14 Mar 2019 12:14:17 +0000 (12:14 +0000)]
Bug 22512: Add status field to accountlines

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21003: Made Edit keywords more consistent in add_items-step2.tt
Hayley Mapley [Thu, 7 Mar 2019 20:28:48 +0000 (20:28 +0000)]
Bug 21003: Made Edit keywords more consistent in add_items-step2.tt

When adding a course reserve with a barcode that already exists, the
title, breadcrumbs, and legend of the form all specify that the user is
editing, and not adding, the book.

Test plan:
Same as comment 1

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21003: Removed warning and changed wording on add_items-step2.tt
Hayley Mapley [Thu, 7 Mar 2019 02:50:12 +0000 (02:50 +0000)]
Bug 21003: Removed warning and changed wording on add_items-step2.tt

When editing an item in a Course Reserve, the page displayed is the same
that is displayed when adding an item to a Course Reserve. This patch
removes the warning 'This course already has this item on reserve' when
the item is being edited, as well as changes the title, breadcrumbs, and
header of the div. This patch also Changes the header of the div to say
'Edit 'book_name' in 'course_name'' instead of 'Add 'book_name' to
'course_name'' when adding items to a course reserve if the item is
already present.

To test:
1) Create a new course in Course Reserves (you will need Course
    Reserves enabled in syspref)
2) Add an item by clicking the Add reserves button
3) Click the edit button on the right hand side of the item listing
under the Reserves heading
4) Observe that the warning 'The course already has this item on reserve' appears, and that the title, breadcrumbs and
header of the div all say Add/Reserve
5) Apply the patch
6) Repeat step 3 and observe that the title, breadcrumbs and header of
the div now say Edit
7) Also verify that when adding a reserve with a barcode that does not
yet exist in the course reserves that the warning 'The course already...' is not displayed and that the header of the div says Add
8) Finally verify that when adding a reserve with a barcode that DOES
exist in the course reserves that the warning 'The course already...' IS
displayed and the header of the div says Edit
9) Sign off!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12441: Search.pl conditional checks and displays using same syspref
Hayley Mapley [Thu, 14 Mar 2019 03:47:59 +0000 (03:47 +0000)]
Bug 12441: Search.pl conditional checks and displays using same syspref

Script search.pl checks OPACdefaultSortField and OPACdefaultSortOrder, but
shows defaultSortField and defaultSortOrder when using Advanced Search
in the staff client.

Test plan:
Apply the patch and then check that the Advanced Search uses
defaultSortOrder and defaultSortField sysprefs instead of the OPAC
sysprefs in the conditional. Check that sort behaviour in Advanced
Search still functions as expected. (It should do - this doesn't change
what displays, just improves consistency).

Sponsored-by: Catalyst IT
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13782: Compiled CSS
Nick Clemens [Sat, 23 Mar 2019 09:43:47 +0000 (09:43 +0000)]
Bug 13782: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13782: RSS for news needs a bit of styling
Owen Leonard [Fri, 22 Mar 2019 18:16:33 +0000 (18:16 +0000)]
Bug 13782: RSS for news needs a bit of styling

This patch makes a number of updates to the display of news in the OPAC.
I hope that this makes OPAC news nicer/easier to read. It includes style
changes to make the RSS link look better too.

To test, apply the patch and regenerate the OPAC CSS. You should have
multiple active news items. View the OPAC news with varied values of
NewsAuthorDisplay and OpacNewsLibrarySelect.

Test the single news item view. Test with Quotes on and off, and with
OpacMainUserBlock populated or not.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22568: Replace RSS icon in the OPAC with Font Awesome
Owen Leonard [Fri, 22 Mar 2019 16:43:51 +0000 (16:43 +0000)]
Bug 22568: Replace RSS icon in the OPAC with Font Awesome

This patch removes the RSS icon image (feed-icon-16x16.png) from the
OPAC and replaces it with Font Awesome icons styled to match.

To test, apply the patch and regenerate the OPAC CSS. View the
following pages, confirming that the RSS icon looks correct:

 - OPAC home page (RSS news icon)
 - Search results page (Subscribe to search)
 - Recent comments
 - Search history
 - Lists -> View list

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22475: Shelving location doesn't appear on tags list view
Owen Leonard [Thu, 7 Mar 2019 16:04:25 +0000 (16:04 +0000)]
Bug 22475: Shelving location doesn't appear on tags list view

This patch corrects the tags list view so that shelving location appears
correctly. Previously the template tried to display a variable which was
empty.

To test, apply the patch and locate an title which has both a tag
applied to it and a shelving location defined for one or more items. Go
to Tools -> Tags and click the tag to view titles with that tag. In the
location column of the table the shelving location should appear along
with library and call number.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10345: Increment copy number when adding multiple copies.
Björn Nylén [Thu, 28 Mar 2019 09:28:29 +0000 (10:28 +0100)]
Bug 10345: Increment copy number when adding multiple copies.

To test:
1. Add multiple copies of an item with data in the 'Copy number' field. Note that tha data will be identical for all items.
2. Apply patch.
3. Add multiple copies of an item with a positive integer (ie. only digits) in the 'Copy number' field. Note that the copy number is incremented for each item.
4. Add multiple copies of an item with some other type of data in the 'Copy number' field. Note that the copy number field remains unchanged for the added items.

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 22620: OPAC description for CCODE in opac-reserve.tt
Fridolin Somers [Tue, 2 Apr 2019 07:57:35 +0000 (09:57 +0200)]
Bug 22620: OPAC description for CCODE in opac-reserve.tt

Bug 20450 added CCODE to opac-reserve.tt using AuthorisedValues TT plugin.

This patch changes the plugin call so that it requests OPAC description.

Test plan :
1) Define a CCODE with staff and OPAC descriptions
2) Apply this collection on an item
3) At OPAC, place an hold on this item
4) Verify the collection display correctly OPAC description and not staff description

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 22575: Item type administration uses invalid error class for dialog
Owen Leonard [Tue, 26 Mar 2019 14:11:28 +0000 (14:11 +0000)]
Bug 22575: Item type administration uses invalid error class for dialog

This patch modifies the item types administration script so that it
passes a valid message type to the template, where the type is used as a
CSS class. "Error" is a nonexistent dialog class. It should be "alert."

To test, apply the patch and go to Administration -> Item types.

 - Try to delete an item type which is in use. The style of the error
   dialog should be correct.
 - Try to add an item type using a code which already exists. The error
   should look correct.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22432: Star ratings plugin replacement missing from a couple pages
Owen Leonard [Thu, 28 Feb 2019 13:12:59 +0000 (13:12 +0000)]
Bug 22432: Star ratings plugin replacement missing from a couple pages

This patch modifies two templates to conform to the change to the start
ratings plugin: Overdrive search results and RecordedBooks search
results.

On the Overdrive page, the star ratings are now correctly displayed
using the new plugin. On the RecordedBooks page, star ratings code has
been removed because it is unused. RecordedBooks doesn't provide ratings
information in their API.

To test you need credentials for both Overdrive and RecordedBooks. Apply
the patch and enable both services.

 - In the OPAC, perform a search that will return results from Overdrive
   and RecordedBooks.
 - Open the search results for each of those services.
   - On the Overdrive search results page, star ratings should appear
     correctly (in read-only mode).
   - On the RecordedBooks page everything should look the same.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22607: DBRev 18.12.00.037
Nick Clemens [Sat, 23 Mar 2019 08:51:15 +0000 (08:51 +0000)]
Bug 22607: DBRev 18.12.00.037

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22607: Change default value in issues.renewals to '0'.
Josef Moravec [Fri, 29 Mar 2019 08:13:48 +0000 (08:13 +0000)]
Bug 22607: Change default value in issues.renewals to '0'.

This patch change renewals column of issues and old_issues tables.

Now it is NOT NULL default 0. It does not make sense when number of
renewals is undefined, it is always integer with value zero or more

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22619: Fix null empty behaviour for new rules
Nick Clemens [Tue, 2 Apr 2019 00:34:43 +0000 (00:34 +0000)]
Bug 22619: Fix null empty behaviour for new rules

To test:
 1 - Go to Admin->Circulation and fines rules
 2 - Set All/All rules ot have a limit for Current checkouts allowed (and onsite checkouts allowed)
 3 - Select an itemtype to add a new rule
 4 - Save without entering any values
 5 - Note that new rule displays with the same numebr as the all/all rule
 6 - Check the DB, not no lines were added to circulation_rules table
 7 - Delete the rule from the staff client
 8 - Apply patch
 9 - Repeat, note the new rule is unlimited
10 - Run selenium tests
11 - They pass!
12 - Check no rules/itemtypes are added to your system by the tests

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22611: Correction for call to get create_item in EDI.pm
Colin Campbell [Mon, 1 Apr 2019 11:16:51 +0000 (12:16 +0100)]
Bug 22611: Correction for call to get create_item in EDI.pm

There was a typo in the addition of a call to
effective_create_items causing processing to abort after adding
a single copy.

This patch reverts to using the C4::Context call as used for the
first copy created, the intended call to effective_create_items
is a wrapper around that as the field in the basket is guaranteed
to be null (its not set when we call AddBasket). Being consistent
and explicit in what we call should guard against future changes
in dependencies exposing the logic flaw

Added some comments to make logical flow of code clearer

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19380: Use Koha::Item::get_transfer instead of GetTransfers
Julian Maurice [Tue, 19 Mar 2019 13:16:06 +0000 (14:16 +0100)]
Bug 19380: Use Koha::Item::get_transfer instead of GetTransfers

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19380: Add transfer informations in ILS-DI GetRecords response
Julian Maurice [Wed, 27 Sep 2017 13:32:53 +0000 (15:32 +0200)]
Bug 19380: Add transfer informations in ILS-DI GetRecords response

Test plan:
1. Put an item into a 'transfer' state
  a. Place a hold on an item in branch A for a patron of branch B
  b. Check in this item in branch A and confirm transfer
2. Go to http://opac/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=XXX
   where XXX is the biblionumber of the biblio the item belongs to.
3. Verify you have a new <transfer> element inside //record/items/item
   that contains <datesent>, <frombranch> and <tobranch>
4. Check in the same item in branch B, so that the item is not flagged
   as being transferred
5. Repeat 2
6. Verify that the <transfer> element is not there.
7. prove t/db_dependent/ILSDI_Services.t

Followed test plan, patch worked as described. Also ran QA test tools
and modified files passed

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: (follow-up) Add Modern::Perl
Nick Clemens [Fri, 29 Mar 2019 13:17:14 +0000 (13:17 +0000)]
Bug 13895: (follow-up) Add Modern::Perl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22518: DBRev 18.12.00.036
Nick Clemens [Fri, 29 Mar 2019 11:44:55 +0000 (11:44 +0000)]
Bug 22518: DBRev 18.12.00.036

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22518: (QA follow-up) Add rows updated to feedback
Martin Renvoize [Fri, 29 Mar 2019 10:46:47 +0000 (10:46 +0000)]
Bug 22518: (QA follow-up) Add rows updated to feedback

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22518: Add database update 'just in case'
Martin Renvoize [Fri, 15 Mar 2019 13:43:03 +0000 (13:43 +0000)]
Bug 22518: Add database update 'just in case'

All cases I could find where 'O' was referenced it was referenced
alongside 'FU'.. as such I've written this DB update to case any last
cases of 'O' and update them to 'FU' "just in case"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22518: Remove references to 'O' accounttype
Martin Renvoize [Fri, 15 Mar 2019 13:29:00 +0000 (13:29 +0000)]
Bug 22518: Remove references to 'O' accounttype

I went back over 12 years to and still only found "FIXME: What are these
accounttypes" concerning the 'O' type and I couldn't find anywhere where
it was being set.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22586: IntranetReportsHomeHTML no longer renders as HTML on reports-home.pl
Lucas Gass [Tue, 26 Mar 2019 11:17:31 +0000 (11:17 +0000)]
Bug 22586: IntranetReportsHomeHTML no longer renders as HTML on reports-home.pl

As of 18.11 the IntranetReportsHomeHTML syspref no longer renders HTML
on report-home.pl. I think this is being filtered wrong in the template.

Test Plan:

1) Edit IntranetReportsHomeHTML, set to "<p>Test</p>"
2) View a report, note that you see the html p tags are displayed
litterly
3) Apply this patch
4) Reload the page
5) Note the p tags are rendered as html

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22596: use raw TT filter in items search with custom field
Fridolin Somers [Wed, 27 Mar 2019 14:37:51 +0000 (15:37 +0100)]
Bug 22596: use raw TT filter in items search with custom field

When items search is with a custom field using authorised values, html TT filter is breaking the JS, it should use raw.

Test plan :
1) Go to Administration > Item search fields
2) Define a search field with an authorised values category
3) Go to items search
4) Use the "New field" link
5) Check use of custom field is OK

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22127: Update date accessioned plugin - remove unused routine
Josef Moravec [Mon, 14 Jan 2019 11:27:32 +0000 (11:27 +0000)]
Bug 22127: Update date accessioned plugin - remove unused routine

Test plan:
1) Apply the patch
2) Have set dateaccessioned plugin to an item subfield (it is set on 952$d by default)
3) Confirm the functionality of this plugin is same as before patch

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21646: Clean up Overdrive template
Owen Leonard [Wed, 24 Oct 2018 14:54:35 +0000 (14:54 +0000)]
Bug 21646: Clean up Overdrive template

This patch modifies the OverDrive administration page to correct some
markup issues:

 - Switch to Bootstrap grid
 - Add missing header search box
 - Add missing DataTable configuration
 - Remove unnecessary fieldset

To test you do not need to have OverDrive credentials. Apply the patch
and go to System preferences -> Enhanced content -> OverDrive. In the
description of the "OverDriveAuthName" preference, follow the link to
manage "individual branch authnames."

 - Confirm that the page looks correct, including the header search
   box, page title, and breadcrumbs
 - Confirm that the page adjusts well to various browser window sizes.
 - Confirm that the DataTable works correctly.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: (QA follow-up) Make the class plural
Tomas Cohen Arazi [Wed, 27 Mar 2019 17:23:18 +0000 (14:23 -0300)]
Bug 13895: (QA follow-up) Make the class plural

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: Fix test
Josef Moravec [Wed, 13 Mar 2019 16:25:38 +0000 (16:25 +0000)]
Bug 13895: Fix test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: Adapt naming according to voted RFC
Josef Moravec [Wed, 13 Mar 2019 16:03:09 +0000 (16:03 +0000)]
Bug 13895: Adapt naming according to voted RFC

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: (follow-up) Fix POST response
Josef Moravec [Mon, 25 Feb 2019 22:17:01 +0000 (22:17 +0000)]
Bug 13895: (follow-up) Fix POST response

Test plan:
prove t/db_dependent/api/v1/chcekouts.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: Change renewal endpoint
Josef Moravec [Thu, 21 Feb 2019 00:26:17 +0000 (00:26 +0000)]
Bug 13895: Change renewal endpoint

Instead of PUT on /checkout/{checkout_id} endpoint, you should now call
POST on /checkouts/{checkout_id}/renewal

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: Refactor test using REST Basic auth
Josef Moravec [Thu, 21 Feb 2019 00:15:22 +0000 (00:15 +0000)]
Bug 13895: Refactor test using REST Basic auth

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: Remove create_item and create_biblio subs from test
Josef Moravec [Wed, 20 Feb 2019 21:42:36 +0000 (21:42 +0000)]
Bug 13895: Remove create_item and create_biblio subs from test

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: Remove the opac checks in privileged endpoint
Josef Moravec [Wed, 20 Feb 2019 21:30:49 +0000 (21:30 +0000)]
Bug 13895: Remove the opac checks in privileged endpoint

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: (follow-up) Adapt checkout endpoint to openapi, update terminology
Josef Moravec [Mon, 4 Feb 2019 14:22:54 +0000 (14:22 +0000)]
Bug 13895: (follow-up) Adapt checkout endpoint to openapi, update terminology

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: (QA follow-up) Adjust OpenAPI definitions for checkouts
Tomas Cohen Arazi [Fri, 10 Nov 2017 19:16:49 +0000 (16:16 -0300)]
Bug 13895: (QA follow-up) Adjust OpenAPI definitions for checkouts

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13895: Add API routes for checkouts retrieval and renewal
Julian Maurice [Mon, 23 Mar 2015 12:10:46 +0000 (13:10 +0100)]
Bug 13895: Add API routes for checkouts retrieval and renewal

GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bugs 16699 and 14868

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Lari Taskula <larit@student.uef.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: (follow-up) Minor markup correction and reindentation
Owen Leonard [Wed, 27 Mar 2019 12:18:41 +0000 (12:18 +0000)]
Bug 21772: (follow-up) Minor markup correction and reindentation

This patch makes one minor markup correction: In HTML5 <tfoot> must be
after <tbody>. Previously the opposite was true.

I've also done a little bit of opinionated reindentation. There should
be no changes visible to the user from this patch.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: (QA follow-up) Fix setting variables to PROCESS in holds
Josef Moravec [Wed, 27 Mar 2019 08:43:16 +0000 (08:43 +0000)]
Bug 21772: (QA follow-up) Fix setting variables to PROCESS in holds

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: (QA follow-up) Fix button class on Cancel hold button
Josef Moravec [Wed, 27 Mar 2019 08:40:15 +0000 (08:40 +0000)]
Bug 21772: (QA follow-up) Fix button class on Cancel hold button

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: (QA follow-up) Hide .tdlabel class in sco for consistancy with opac-user...
Josef Moravec [Wed, 27 Mar 2019 08:32:37 +0000 (08:32 +0000)]
Bug 21772: (QA follow-up) Hide .tdlabel class in sco for consistancy with opac-user page.

Test plan:
1) Compare holds table on selfcheckout and opac-user page, you will see
the difference: In self checkout there are labels like Status, Pickup
location, and so on in every table cell.
2) Apply the patch, the label in selfcheckout dissappear

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: (follow-up) Included more information on tab label for SCO
Agustin Moyano [Tue, 12 Mar 2019 01:57:37 +0000 (22:57 -0300)]
Bug 21772: (follow-up) Included more information on tab label for SCO

Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: (follow-up) Remove redundant variable
Agustin Moyano [Thu, 7 Mar 2019 19:31:55 +0000 (16:31 -0300)]
Bug 21772: (follow-up) Remove redundant variable

Sponsored-by: City of Portsmouth Public Library
Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: Add holds and account information to SCO
Agustin Moyano [Thu, 7 Mar 2019 18:58:41 +0000 (15:58 -0300)]
Bug 21772: Add holds and account information to SCO

This patch introduces holds and account information to the SCO page. It
uses the introduced include files that are also used in OPAC
(opac-user.pl and opac-account.pl).

To test:
1) Have a patron that has holds and account lines
2) Enable the SCO module
3) Use the patron's cardnumber to get to its details
=> SUCCESS: New tabs are presented, and they display holds and account
information as expected
4) Sign off :-D

Sponsored-by: City of Portsmouth Public Library
Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: Move OPAC holds and account tables into .inc
Agustin Moyano [Thu, 7 Mar 2019 18:51:46 +0000 (15:51 -0300)]
Bug 21772: Move OPAC holds and account tables into .inc

This patch moves the code to render the account and holds information
for the patron into include files. They are loaded in the opac-user.tt
and opac-account.tt templates respectively.

To test:
1) Have a patron with account lines and holds
2) Notice they are displayed in the patron's detail section in the OPAC
3) Apply this patch
4) Reload the patron's detail page
=> SUCESS: Everything looks the same, no behaviuor or layout change.
5) Sign off

Sponsored-by: City of Portsmouth Public Library
Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19722: DBRev 18.12.00.035
Nick Clemens [Thu, 28 Mar 2019 18:16:33 +0000 (18:16 +0000)]
Bug 19722: DBRev 18.12.00.035

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19722: Don't show items at job completion if over pref
Nick Clemens [Tue, 26 Mar 2019 20:20:29 +0000 (20:20 +0000)]
Bug 19722: Don't show items at job completion if over pref

To test:
1 - Set MaxItemsToDisplayForBatchMod to some number
2 - Modify less items than that
3 - Note they show
    a - Note if over 1000 they show in a simple display
4 - Modify more items
5 - Note they do not show and you see a note

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19722: (follow-up) Adjust template parameters
Nick Clemens [Mon, 16 Jul 2018 17:41:28 +0000 (17:41 +0000)]
Bug 19722: (follow-up) Adjust template parameters

Before we passed 'too_many_items' this was renamed to
'too_many_items_display' but deletion template lacked changes

To test:
1 - Test a batch deletion by list and file
2 - Test with deleting biblios and without
3 - Results should be as expected

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19722: Add MaxItemsToDisplayForBatchMod systempreference
Nick Clemens [Thu, 30 Nov 2017 23:22:27 +0000 (23:22 +0000)]
Bug 19722: Add MaxItemsToDisplayForBatchMod systempreference

To test:
1 - Get a list of itemnumbers or barcodes
2 - Set MaxItemsToProcessForBatchMod to less than this number of items
3 - Attempt to batch edit, you arent allowed
4 - Set MaxItemsToProcessForBatchMod to some hugh number like 60000
5 - Try a list of as many items as possible 30000 was good for me (they
        should exist in your system)
6 - Try to batch edit, system will timeout on displaying these items
7 - Apply patch, update database
8 - Set MaxItemsToDisplayForBatchMod to 1000 (default)
9 - Try large file again, should not display items, but allow
modification, wait for this to finish
10 - SetMaxItemsToProcessForBatchMod to 1000 and try large file again
11 - Should be prohibited as before

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22525: Navigation arrows on the bottom of Cataloging search pages
Owen Leonard [Tue, 19 Mar 2019 16:03:43 +0000 (16:03 +0000)]
Bug 22525: Navigation arrows on the bottom of Cataloging search pages

This patch adds a second set of pagination links to the cataloging
search result page, at the bottom of the first set of search results.

Also added is a horizontal rule after the second set of links in order
to make it clearer that the links are for the search results above.

To test, apply the patch and go to Cataloging. Perform a search which
will return multiple pages of results. Confirm that the links work
correctly.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22505: Add column configuration to patron list table
Julian Maurice [Wed, 13 Mar 2019 13:19:44 +0000 (14:19 +0100)]
Bug 22505: Add column configuration to patron list table

Test plan:
1. Create a list of patrons
2. Add some patrons to this list
3. Go to this patron list
   (/cgi-bin/koha/patron_lists/list.pl?patron_list_id=XXX)
4. Verify that you can show/hide all columns except the one containing
   the checkbox
5. Verify that you can export the table data using the Export menu
6. Go to admin/columns_settings.pl, and verify that the configuration
   works for table 'patron-list-table'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 22516: DBRev 18.12.00.034
Nick Clemens [Thu, 28 Mar 2019 18:02:35 +0000 (18:02 +0000)]
Bug 22516: DBRev 18.12.00.034

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22516: Database update
Martin Renvoize [Fri, 15 Mar 2019 08:43:12 +0000 (08:43 +0000)]
Bug 22516: Database update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22516: Remove remaining calls to lastincrement
Martin Renvoize [Fri, 15 Mar 2019 08:38:17 +0000 (08:38 +0000)]
Bug 22516: Remove remaining calls to lastincrement

A few places still set lastincrement and the tests still checked for
correct values. But nowhere in the code still uses lastincrement for
anything meaningful.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18213: DBRev 18.12.00.033
Nick Clemens [Thu, 28 Mar 2019 15:44:47 +0000 (15:44 +0000)]
Bug 18213: DBRev 18.12.00.033

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18213: (follow-up) Correctly sort facets
Nick Clemens [Thu, 15 Mar 2018 12:53:13 +0000 (12:53 +0000)]
Bug 18213: (follow-up) Correctly sort facets

Previously we sorted alphabetically - that works for 1-9.
With a 10th facet category we should sort numerically

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18213: Add Template plugin and fix for C4/Languages
Nick Clemens [Fri, 7 Jul 2017 10:44:57 +0000 (10:44 +0000)]
Bug 18213: Add Template plugin and fix for C4/Languages

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18213: DB Update (facet order)
Nick Clemens [Thu, 6 Jul 2017 09:41:31 +0000 (09:41 +0000)]
Bug 18213: DB Update (facet order)

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18213: Add language facets to Elasticsearch
Nick Clemens [Wed, 5 Jul 2017 12:11:35 +0000 (12:11 +0000)]
Bug 18213: Add language facets to Elasticsearch

This patch add language as a facet to ES results - it adds
a new template plugin for languages to get the appropriate
description given an iso 639-2 code

To test:
1 - Make sure you have records with differing languages (in the MARC21 008
        field characters 35-37 or UNIMARC 101a)
2 - Apply patch
3 - Reload Elasticsearch settings:
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
4 - Reindex your records
5 - Search for a phrase that will return results in several languages
6 - Verify you see factes correctly labelled for 'Language'
7 - Verify the facets work
8 - Verify both opac and staff results
9 - prove t/db_dependent/Languages.t

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (follow-up) fix tests and remove trailing space
Nick Clemens [Thu, 28 Mar 2019 15:57:13 +0000 (15:57 +0000)]
Bug 18235: (follow-up) fix tests and remove trailing space

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: DBRev 18.12.00.032
Nick Clemens [Thu, 28 Mar 2019 15:41:22 +0000 (15:41 +0000)]
Bug 18235: DBRev 18.12.00.032

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (RM follow-up) fix mappings reset
Nick Clemens [Thu, 28 Mar 2019 15:12:52 +0000 (15:12 +0000)]
Bug 18235: (RM follow-up) fix mappings reset

Without this we could not recreate mappings as there are no defaults for
the additional fields - this restores behavoiur from before patches

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (QA follow-up) Restore facet_order for su-geo field in mappings file
Josef Moravec [Sat, 23 Mar 2019 09:29:52 +0000 (09:29 +0000)]
Bug 18235: (QA follow-up) Restore facet_order for su-geo field in mappings file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (QA follow-up) Series facet name after rebase
Josef Moravec [Fri, 8 Mar 2019 07:34:09 +0000 (07:34 +0000)]
Bug 18235: (QA follow-up) Series facet name after rebase

Bug 19575 changes many field names so "se" facet field became "title-series"

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (QA follow-up) Make db update idempotent
Josef Moravec [Mon, 4 Mar 2019 13:52:19 +0000 (13:52 +0000)]
Bug 18235: (QA follow-up) Make db update idempotent

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: Do not call get_facetable_fields excessively
Jonathan Druart [Mon, 4 Mar 2019 00:36:22 +0000 (21:36 -0300)]
Bug 18235: Do not call get_facetable_fields excessively

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: Update facet_order default value in atomic update
Jonathan Druart [Mon, 4 Mar 2019 00:23:12 +0000 (21:23 -0300)]
Bug 18235: Update facet_order default value in atomic update

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (QA follow-up) Add missing filters
Josef Moravec [Fri, 1 Mar 2019 06:59:48 +0000 (06:59 +0000)]
Bug 18235: (QA follow-up) Add missing filters

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (QA follow-up) Fix POD
Josef Moravec [Fri, 1 Mar 2019 06:59:15 +0000 (06:59 +0000)]
Bug 18235: (QA follow-up) Fix POD

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: Add unit tests for get_facetable_fields
Alex Arnaud [Fri, 23 Mar 2018 15:55:09 +0000 (15:55 +0000)]
Bug 18235: Add unit tests for get_facetable_fields

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: DB changes
Jonathan Druart [Wed, 8 Mar 2017 18:25:55 +0000 (15:25 -0300)]
Bug 18235: DB changes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: Add missing POD to get_facetable_fields
Jonathan Druart [Fri, 20 Apr 2018 13:44:03 +0000 (10:44 -0300)]
Bug 18235: Add missing POD to get_facetable_fields

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: ES - Facets configurable
Jonathan Druart [Wed, 8 Mar 2017 15:04:46 +0000 (12:04 -0300)]
Bug 18235: ES - Facets configurable

This patch adds a new section 'Facet order' in the Biblio tab of the
'Search engine configuration' admin page of the Elastic mappings.
The idea is to let the librarians define the facet to display and order
them as their needs.

The ergonomic is not perfect and I am open to any suggestions.

Test plan:
Move up and down the field list to order the facets
Hide/show some facets
Rebuild index
At the OPAC and the staff interface you should see the changes on the
search result page.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21049: Set 007/00 when selecting material type (Rancor)
Julian Maurice [Fri, 8 Mar 2019 09:12:50 +0000 (10:12 +0100)]
Bug 21049: Set 007/00 when selecting material type (Rancor)

There is a 1-1 relationship between the material type values and the
position 00 of 007 field. Selecting a material type should set this
position's value.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21049: Fix value of material select for Rancor 007 widget
Julian Maurice [Wed, 6 Mar 2019 07:43:18 +0000 (08:43 +0100)]
Bug 21049: Fix value of material select for Rancor 007 widget

The material type is selected in accordance with position 0 of 007

Test plan:
1. Create a new record using the advanced editor
2. Select a material type for field 007 and set at least the position 0
   of this field
3. Save the record and reload the page
4. The material type should remain selected
5. Try with all available material types

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22593: Fix bad ternaries after bug 22008
Martin Renvoize [Wed, 27 Mar 2019 13:55:05 +0000 (13:55 +0000)]
Bug 22593: Fix bad ternaries after bug 22008

A series of ternaries were introduced when we moved to add_debit which
defaulted to 'user 0' should a userenv not be set.  This was incorrect
as userenv may well not be set (during cronscript runs for example) and
the new constraint would not allow such a default. We switch to 'undef'
here to satisfy the constraint.

Test plan
1) Ensure you have data in your system that would be caught by the
longoverdues cronjob.
2) Ensure you're sysprefs are setup to charge for lost items
3) Run the script and varify it runs to completion without errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 12159: (QA follow-up) Remove double use module
Marcel de Rooy [Fri, 22 Mar 2019 10:52:16 +0000 (10:52 +0000)]
Bug 12159: (QA follow-up) Remove double use module

Speaks for itself.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12159: (QA follow-up) Rename relation in Patron::Attributes
Marcel de Rooy [Fri, 22 Mar 2019 10:49:03 +0000 (10:49 +0000)]
Bug 12159: (QA follow-up) Rename relation in Patron::Attributes

It seems that we do not need the extra belongs_to in the schema result
files if we rename the relation to code.

Test plan:
Run t/db_dependent/Koha/Patrons.t
Run t/db_dependent/Koha/Patron/Attributes.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12159: Add tests
Josef Moravec [Fri, 16 Mar 2018 11:03:23 +0000 (11:03 +0000)]
Bug 12159: Add tests

Test plan:
prove t/db_dependent/Koha/Patron/Attributes.t t/db_dependent/Koha/Patrons.t

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12159: Fix getting extended patron attributes for circ-menu
Josef Moravec [Thu, 15 Mar 2018 13:12:55 +0000 (13:12 +0000)]
Bug 12159: Fix getting extended patron attributes for circ-menu

Changes:
- Replace getting preference ExtendedPatronAttributes by Koha.Preference
in templates
- Add Koha::Patron->attributes for getting patrons extended attributes
- Use this method in circ-menu.inc
- Remove getting attributes from members perl scripts

Test plan:
0) Apply the patch
1) Add some patron attributes type - with free text, authorised value,
    limited by libraries...
2) Add some values to this attributes for some patrons
3) Go through as many patron pages as you can and confirm that
attributes are shown at side panel when they shoul and are not shown
when they should not be shown

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed Koha/Schema/Result/BorrowerAttribute.pm
[EDIT] Added missing semicolon on L114 in Koha/Patron/Attribute.pm

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10577: (QA follow-up) Remove tab chars
Josef Moravec [Wed, 27 Mar 2019 16:04:13 +0000 (16:04 +0000)]
Bug 10577: (QA follow-up) Remove tab chars

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10577: (QA follow-up) Remove bad call signature
Martin Renvoize [Wed, 13 Mar 2019 11:16:09 +0000 (11:16 +0000)]
Bug 10577: (QA follow-up) Remove bad call signature

Whilst working through this patch for signoff I found a case where the
calling signature of GetBudgetPeriod was incorrect. I removed the
superflous passed parameter in this followup

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10577: Improve semantics of GetBudgetPeriod()
Galen Charlton [Thu, 11 Jul 2013 16:41:26 +0000 (16:41 +0000)]
Bug 10577: Improve semantics of GetBudgetPeriod()

Remove the option to pass zero to this function in
order to get "the" active budget.  This was a problem
in three ways:

- Koha doesn't require that there be only one active
  budget at a time, so the concept of "the" active
  budget doesn't make sense.
- Having the single parameter be either an ID or a flag
  based on its value is poor function design.
- No callers of GetBudgetPeriod() were actually using this
  modality.

This patch also improves the DB-dependent tests for budgets by

- wrapping the test in a transaction
- counting budgets correctly

To test:

[1] Apply the patch.
[2] Verify that prove -v t/db_dependent/Budgets.t passes
[3] Verify in the staff interface that:
    - the budget hierarchy displays correctly
    - you can add and modify a budget

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22536: Display problem in Holds to Pull report
Owen Leonard [Tue, 19 Mar 2019 12:41:26 +0000 (12:41 +0000)]
Bug 22536: Display problem in Holds to Pull report

This patch modifies the display of several values in the holds to pull
report so that they can be displayed as lists instead of as chunks of
HTML generated in SQL.

This patch modifies the SQL in pendingreserves.pl so that values can be
formatted in the same way that holding branch is. The better long-term
solution is to remove SQL from pendingreserves.pl altogether, but this
is a quick fix.

This patch also makes a couple of minor markup changes to fix
validation.

To test, apply the patch and go to Circulation -> Holds to pull. To see
the changes the patch makes your holds to pull list should have titles
with multiple items at multiple branches, with call number, copy number,
and enumeration data. These values should all be displayed in bulleted
lists.

Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>