]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 2426: Remove deprecated management permission
Katrin Fischer [Tue, 15 May 2018 23:19:53 +0000 (01:19 +0200)]
Bug 2426: Remove deprecated management permission

After review of the code it turns out that the management permission
that has been marked as deprecated a long time ago, does not have
any function.

The patch removes all remaining code related to it.

To test:
- Make sure you have a patron with the management permission
- Apply patch
- Run database update
- Check everything still works as expected

Bonus:
borrowers.flags is recalculated for patrons with management
permission.

To check:
- Create some 'permission twins' with and without management
  permission
- Note the value in borrowers.flags
- Apply patch, don't run database update
- Save permissions from GUI for one of the twins
- Note the newly calculated value
- Run database update
- Now both twins should have the same borrowers.flags value

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20120: (QA follow-up) display correct amount in redirect
Nick Clemens [Fri, 8 Jun 2018 12:03:01 +0000 (12:03 +0000)]
Bug 20120: (QA follow-up) display correct amount in redirect

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20120: force scalar context for CGI->param
Jonathan Druart [Thu, 3 May 2018 16:26:08 +0000 (13:26 -0300)]
Bug 20120: force scalar context for CGI->param

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20120: (QA follow-up) Pass on_editing parameter for Price plugin
Kyle M Hall [Fri, 27 Apr 2018 10:00:41 +0000 (06:00 -0400)]
Bug 20120: (QA follow-up) Pass on_editing parameter for Price plugin

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20120: Prevent writeoffs of more than the amount owed for a fee
Kyle M Hall [Fri, 9 Mar 2018 14:20:40 +0000 (09:20 -0500)]
Bug 20120: Prevent writeoffs of more than the amount owed for a fee

In short, it is possible to 'over-writeoff' a fee such that the value of the fee is now a credit.

Test Plan:
1) Attempt to writeoff a single fee, set the amount input to more than
   the amount of the fee.
2) Note the writeoff makes the fee go negative.
3) Apply this patch
4) Attempt to repeat step 1, you should be unable to write-off an
   amount more than the amount outstanding for the fee!

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20875: (bug 16735 follow-up) Fix library list for OpacAddMastheadLibraryPulldown
Jonathan Druart [Mon, 4 Jun 2018 14:23:35 +0000 (11:23 -0300)]
Bug 20875: (bug 16735 follow-up) Fix library list for OpacAddMastheadLibraryPulldown

This patch fixes a regression introduced by
  commit 2059f7d8016ab61172830e9b670279d3e28882b7
  Bug 16735: Migrate library search groups into the new hierarchical groups

It re-added code that was removed by bug 15758 (use of var BranchesLoop).

Test plan:
- Create library search groups
- Turn OpacAddMastheadLibraryPulldown on
- At the OPAC confirm that the search box with libraries and library
groups is displayed and works correctly.
- Remove the library search group
- The dropdown list should not have the optgroup tags

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20877: Do not consider DB user has permissions
Jonathan Druart [Mon, 4 Jun 2018 18:45:22 +0000 (15:45 -0300)]
Bug 20877: Do not consider DB user has permissions

Test plan:
0/ Do not apply the patch
1/ Confirm the new test fails
2/ Apply the patch
3/ Confirm the new test passes
4/ Test the installation process

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18821: (QA follow-up) Last tweaks for performance
Marcel de Rooy [Fri, 1 Jun 2018 09:00:57 +0000 (11:00 +0200)]
Bug 18821: (QA follow-up) Last tweaks for performance

[1] passing unsafe has no use since it is a scalar, removed it to unconfuse
[2] remove caching when pref is disabled
[3] caching userid removes the need for calling Patron->find each time
[4] subsequent changes in unit test
[5] cosmetic renames to move from session to daily basis (changed dev angle)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
First call going thru Koha::Patron takes about 0.0150 sec.
Subsequent calls only use caching and take about 0.0006 sec.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18821: Convert to using cache with date checking
Kyle M Hall [Sat, 26 May 2018 06:40:24 +0000 (06:40 +0000)]
Bug 18821: Convert to using cache with date checking

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18821: TrackLastPatronActivity is a performance killer
Kyle M Hall [Mon, 7 May 2018 17:29:12 +0000 (17:29 +0000)]
Bug 18821: TrackLastPatronActivity is a performance killer

Test Plan:
1) Apply this patch
2) Start a new session ( a private browser window works well )
3) Note the lastseen column in the borrowers table is updated
4) Browse a few pages, not the lastseen column is not updated again
5) Close the browser window and repeat steps 2-4
6) prove t/db_dependent/Auth.t

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20889: Prevent not for loan items to be checked out
Jonathan Druart [Wed, 6 Jun 2018 17:25:19 +0000 (14:25 -0300)]
Bug 20889: Prevent not for loan items to be checked out

1. Item type defined at item level (item-level_itypes=1)
2. Mark an item type not for loan (itemtypes.notforloan=1)
3. Checkout an item using this item type (items.itype="BK" for instance)
=> Checkout is not blocked!

I suspect
  commit 3953fdb921d7f280ffbaca813956357aa67d42ca
  Bug 19943: Remove itemtype vs itype confusion in CanBookBeIssued
to be the root of this issue.
One occurrence of $item->{itemtype} has not been replaced.
In this case it refers to the biblioitem->{itemtype} value whereas we want to use
$item->{itype}. So this issue does not happen if items.itype==biblioitem.itemtype
(just in case you are not reproducing the problem).

Test plan:
Make sure not for loan items cannot be checked out

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20889: Add tests - not for loan items cannot be checked out
Jonathan Druart [Wed, 6 Jun 2018 17:24:33 +0000 (14:24 -0300)]
Bug 20889: Add tests - not for loan items cannot be checked out

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20866: (QA follow-up) Use build_object and remove two tests
Marcel de Rooy [Tue, 5 Jun 2018 11:45:06 +0000 (13:45 +0200)]
Bug 20866: (QA follow-up) Use build_object and remove two tests

The unique constraint on userid is handled in TestBuilder. So let's use it.
The two tests if count==$count do not make much sense anymore when we
call ->count a few lines before. The check with search_limited is enough.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20866: Make ArticleRequests.t pass even if table is not empty
Jonathan Druart [Mon, 4 Jun 2018 18:28:02 +0000 (15:28 -0300)]
Bug 20866: Make ArticleRequests.t pass even if table is not empty

Previous patch from Marcel removed the data from article_requests, I do
not think it is a good idea to remove existing data, it could hide bugs.

This patch moves the count inside the subtest block in order to have the
correct value when these tests are executed.
Previous code was broken: Koha::Patron->store does not generate a
userid, and ->search_limited did not work correctly
(Koha::Patron->has_permission returned early because of the non-existing
userid, 'return unless $self->userid;');

Test plan:
[1] Create an article request.
[2] Run t/db_dependent/ArticleRequests.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17561: (follow-up) Pass itemnumber on returns and correct itemnumber param in...
Nick Clemens [Wed, 30 May 2018 13:07:39 +0000 (13:07 +0000)]
Bug 17561: (follow-up) Pass itemnumber on returns and correct itemnumber param in circulation

To test:
1 - Place two holds on a bib for a single patron
2 - Check in both items, confirm the screen message and slip are correct
3 - Checkout both items to another patron, confirm the screen message
and slip are correct

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17561: (QA follow-up) Update existing unit tests
Kyle M Hall [Fri, 18 May 2018 12:00:03 +0000 (08:00 -0400)]
Bug 17561: (QA follow-up) Update existing unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17561: (QA follow-up) Simplify new ReserveSlip code
Kyle M Hall [Fri, 18 May 2018 11:20:06 +0000 (07:20 -0400)]
Bug 17561: (QA follow-up) Simplify new ReserveSlip code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17561: ReserveSlip needs itemnumber for item level holds on same biblio
Benjamin Rokseth [Thu, 15 Mar 2018 11:57:37 +0000 (12:57 +0100)]
Bug 17561: ReserveSlip needs itemnumber for item level holds on same biblio

This patch fixes a regression after bug 14695.
This patch adds itemnumber and barcode as optional params in ReserveSlip used
by hold-transfer-slip.pl to generate HOLD_SLIP. This is for ReserveSlip to be
able to generate correct slips when items in multi-item holds are checked in.

Test plan:

1) activate a circulation rule with multi-item holds
2) Place two holds on same biblio for patron
3) for debugging, either use browser console to observe POST request and responses
   or use info from reserves, e.g. reserve_id in the HOLD_SLIP
4) checkin two items from same biblio on pickup branch
5) note that both holds are effectuated, but reserve_id is the same on both slips
6) also note that there is no itemnumber or barcode in the requests from returns.pl
7) Apply this patch
8) repeat 2-4
9) note that reserve_id is now different on the two slips

and/or:
Run tests:
  t/db_dependent/Reserves/ReserveSlip.t

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20861: Correct EDI permissions on EDI messsages
Katrin Fischer [Sun, 3 Jun 2018 08:09:23 +0000 (10:09 +0200)]
Bug 20861: Correct EDI permissions on EDI messsages

The permission for EDI is edi_manage, but 2 pages asked
for manage_edi, allowing users not to access those.

To test:
- Add edi_manage to your permissions
- Try to access the EDIFACT messages from the
  acq start page
- Verify it doesn't work
- Apply patch and try again
- You should be able to access the page now
- Try to access the other page directly (if you don't
  have EDI data):
  /cgi-bin/koha/acqui/edimsg.pl
- Verify you can access the page and don't get a
  permission error

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20838: Add 2 small tests to check ref
Jonathan Druart [Fri, 1 Jun 2018 14:39:52 +0000 (11:39 -0300)]
Bug 20838: Add 2 small tests to check ref

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20838: Make Koha::Library::Group->all_libraries return a list of Koha::Libraries
Jonathan Druart [Wed, 30 May 2018 17:53:28 +0000 (14:53 -0300)]
Bug 20838: Make Koha::Library::Group->all_libraries return a list of Koha::Libraries

Instead of a list of Koha::Library::Group
Ideally it should be a Koh::Libraries iterator

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>
6 years agoBug 20838: (bug 16735 follow-up) Fix search by group of libraries
Jonathan Druart [Wed, 30 May 2018 17:41:14 +0000 (14:41 -0300)]
Bug 20838: (bug 16735 follow-up) Fix search by group of libraries

In the last patches of bug 16735, we completely broke the feature!

The limit is using library_groups.id instead of branches.branchcode.

Test plan:
Create a group of library with the search feature
Search (OPAC and staff interfaces) using this limit

=> Without this patch you will see that the generated search query does
not contain branchcodes
=> With this patch applied you will see the branchcodes

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>
6 years agoBug 3849: DBRev 18.06.00.001
Nick Clemens [Mon, 4 Jun 2018 15:21:06 +0000 (15:21 +0000)]
Bug 3849: DBRev 18.06.00.001

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 3849: (follow-up) Add database update to change descriptions
Katrin Fischer [Mon, 28 May 2018 22:17:46 +0000 (22:17 +0000)]
Bug 3849: (follow-up) Add database update to change descriptions

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 3849: Improve descriptions of granular acquisition permissions
Katrin Fischer [Sun, 20 May 2018 19:06:25 +0000 (21:06 +0200)]
Bug 3849: Improve descriptions of granular acquisition permissions

The permissions for acquisitions were not very clearly described.
This patch changes the descriptions in the include file (GUI) and
in the default SQL.

To test:
- Go to any patron account in staff
- Go to more > permissions
- Verify that the meaning of each acquisition permission is clear
  from the description

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20831: Fix KohaTable calls after bug 9573
Josef Moravec [Tue, 29 May 2018 08:49:19 +0000 (08:49 +0000)]
Bug 20831: Fix KohaTable calls after bug 9573

Test plan:
0) Do not apply the patch
1) Confirm not working datatable on patrons hold history page
2) Apply the patch
3) The table should be working now

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20763: Remove unecessary Koha::Patron fetch
Jonathan Druart [Mon, 28 May 2018 19:36:54 +0000 (16:36 -0300)]
Bug 20763: Remove unecessary Koha::Patron fetch

If $borrowernumber is not set, there is no userenv.
So let's pick the library code set in the userenv instead of fetching
the Koha::Patron->branchcode from DB

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>
6 years agoBug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl...
Kyle M Hall [Mon, 14 May 2018 12:45:00 +0000 (08:45 -0400)]
Bug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl is visited without logging in

Some code executed in the script opac-suggestions.pl if the system preference AllowPurchaseSuggestionBranchChoice is enabled assumes there is a logged in user. If there is not, patrons will see the error "Internal Server Error".

Test Plan:
1) Enable AllowPurchaseSuggestionBranchChoice
2) Enable AnonSuggestions
3) In the OPAC, perform a search that will have no results,
   click the "Make a purchase suggestion" link.
4) Note the error
5) Apply this patch
6) Reload the page
7) The page should load now!

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20840: (bug 2696 follow-up) Fix biblio info fetch
Jonathan Druart [Fri, 1 Jun 2018 16:54:53 +0000 (13:54 -0300)]
Bug 20840: (bug 2696 follow-up) Fix biblio info fetch

There is no accountlines.biblionumber field, if the account line is
linked to an item, accountline-details.pl will explode with:
Template process failed: undef error - The method biblionumber is not
covered by tests!

Test plan:
Create a fine for a given item
Pay the fine
View the detail of the account line

=> Without this patch you get a software error
=> With this patch applied you will see the biblio's title

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>
6 years agoBug 20825: (QA follow-up) set biblioitemnumber with correct value
Nick Clemens [Tue, 29 May 2018 15:53:59 +0000 (15:53 +0000)]
Bug 20825: (QA follow-up) set biblioitemnumber with correct value

Both biblionumber and biblioitemnumber for item were set to
biblionumber, when they don't line up tests fail

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20798: Client side validation for for fund selection prevents adding only some...
Kyle M Hall [Mon, 21 May 2018 18:56:58 +0000 (14:56 -0400)]
Bug 20798: Client side validation for for fund selection prevents adding only some records to a basket

Bug 19453 "fixed" the fund validation that never actually worked. This validation should be removed altogether instead. It is overly simplistic and simply checks to see if each record in the batch has a fund selected regardless of whether that record will be imported or not.

In addition, the code completely ignores items generated by MarcItemFieldsToOrder such that even if items on that page have a fund selected, the javascript forces the librarian to make a selection from the left-hand fund pulldown even though it will not be used.

Considering this bad validation is basically 'new' as it never worked before, the most sensible course of action would be to 'undo' the change and remove the validation.

Test Plan:
1) Add records to a basket from an import batch
2) Select only some of those items in the batch
3) Note Koha will not let you import them unless you set funds for *all*
   records in the batch
4) Apply this patch
5) Note Koha no longer forces a budget to be selected in the pulldown

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=20789
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20761: Fix some js includes in rancor
Nick Clemens [Sun, 13 May 2018 01:44:28 +0000 (01:44 +0000)]
Bug 20761: Fix some js includes in rancor

To test:
1 - Load the advanced cataloging editor
2 - Inspect the network tab in your browser (F12)
3 - Note failure to load 'cataloging_.js'
4 - Note some other scripts don't have versioning
5 - Apply patch
6 - Reload page
7 - Note cataloging.js loads with version number
8 - Note more js files have versioning

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20696: Fix a few ugly "eq undef" comparisons in Search.pm
Marcel de Rooy [Wed, 2 May 2018 14:13:20 +0000 (16:13 +0200)]
Bug 20696: Fix a few ugly "eq undef" comparisons in Search.pm

Comparisons like $a eq undef should normally raise a warning like:
    Use of uninitialized value in string eq at ...
But unfortunately we still suppress warnings here and there.

Test plan:
[1] Just read this patch and confirm the small changes.
[2] Git grep on "eq undef" and do not find other occurrences.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Passes test plan and QA tools. Searching works correctly.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20818: Add missing QA Manager entry in 18.05.00 release notes
Jonathan Druart [Thu, 24 May 2018 19:33:19 +0000 (16:33 -0300)]
Bug 20818: Add missing QA Manager entry in 18.05.00 release notes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20781: Set a minimum enrollemnt period 'in months' of 1
Nick Clemens [Fri, 18 May 2018 14:01:09 +0000 (14:01 +0000)]
Bug 20781: Set a minimum enrollemnt period 'in months' of 1

To test:
 1 - Browse to Admin->Patron Categories
 2 - Click '+ New category'
 3 - Enter data as required, however, enter 0 in 'Enrolment period' ->
'in months'
 4 - Save
 5 - View the list of categories, the new category has 'Enrolment period'
= 'until'
 6 - Create a patron in this category, note their dateexipry is
'0000-00-00'
 7 - Search for them
 8 - internal server error
 9 - Delete that patron
10 - Apply patch
11 - Edit the category, note you cannot save with 0 months
12 - Set 1 month and save
13 - Create a patron in this cateogry
14 - Note they have a valid dateexpiry
15 - Search for them
16 - All works
17 - Create a new category and verify you cannot add with 0 months

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20767: Display a stack trace when a method is not covered by tests
Jonathan Druart [Mon, 14 May 2018 17:04:01 +0000 (14:04 -0300)]
Bug 20767: Display a stack trace when a method is not covered by tests

When a method is not allowed yet (not covered by tests), developers get
an error the is not really useful: "The method XXX is not covered by
tests!"
It would be more useful to have a stack trace in order to know where
this error come from.

Test plan:
Modify some code to display this stack trace and confirm it makes sense
to have it, i.e. it will make debug easier

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 3886: Fix mismatch of required permissions for printing slips
Katrin Fischer [Wed, 16 May 2018 00:45:02 +0000 (02:45 +0200)]
Bug 3886: Fix mismatch of required permissions for printing slips

- Print summary (summary-print.pl)
- Print quick slip (printslip.pl)
- Print slip (printslip.pl)
- Print overdues (print_overdues.pl)

Perl scripts all require circulate_remaining_permissions, while
in the template we were checking for edit_borrowers.

Now the print pull down will only be visible if the patron has
circulate or circulate_remaining_permissions.

To test:
- Verify that printing the listed slips works for staff users
  with either circulate or circulate_remaining_permissions
  and without edit_borrowers.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20774: Trivial HTML error in itemslost.tt
Owen Leonard [Thu, 17 May 2018 11:38:39 +0000 (11:38 +0000)]
Bug 20774: Trivial HTML error in itemslost.tt

This patch makes a minor correction to the markup of the lost items
report template.

To test, apply the patch and run the lost items report with parameters
which will return results. The report results should look correct, and
the page should validate with no relevant errors.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20752: Fix capitalization on the files tab for patron files
Katrin Fischer [Thu, 10 May 2018 17:54:38 +0000 (17:54 +0000)]
Bug 20752: Fix capitalization on the files tab for patron files

- Activate EnableBorrowerFiles
- Go to any patron account in staff
- Go to the files tab
- Check that strings on the page ar all properly capitalized
  - button
  - legend on section

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20791: Correct capitalization on 'Notices & slips' page
Katrin Fischer [Fri, 18 May 2018 05:39:19 +0000 (05:39 +0000)]
Bug 20791: Correct capitalization on 'Notices & slips' page

- Standardizes spelling to 'Notices & slips'

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20827: Display Fund's owner name when selected
Jonathan Druart [Mon, 28 May 2018 14:40:20 +0000 (11:40 -0300)]
Bug 20827: Display Fund's owner name when selected

When a fund is created or edited and does not have a owner yet, the
name of the patron will not be displayed when selected.

The HTML element the JS code expects is not present in the DOM.

Test plan:
- Create a fund, set a owner
- remove the owner, edit, etc.
- Save
- Edit again
Make sure it works as expected.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20652: Fix result sorting after search on limit only
Jonathan Druart [Tue, 24 Apr 2018 18:38:41 +0000 (15:38 -0300)]
Bug 20652: Fix result sorting after search on limit only

1 chomp was missing, spaces were replaced with %20
This patch adds extra chomps, but it does not hurt

Test plan:
Advanced Search
Choose an Item type (do not enter any other search limits)
Search
Click on Sort (it doesn't appear to matter what you sort on)

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20822: (bug 18789 follow-up) Fix HOLD_SLIP
Jonathan Druart [Mon, 28 May 2018 18:11:09 +0000 (15:11 -0300)]
Bug 20822: (bug 18789 follow-up) Fix HOLD_SLIP

Caused by
  commit ab47e46ea0ade643b308a8b00708d57995c57050
  Bug 18789: Pass a Koha::Patron object from returns.pl

circ/returns.pl does not send a $patron Koha::Patron object to the
template in case print_slip is set

Test plan:
Confirm a hold and print the slip

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20825: (bug 19943 follow-up) call notforloan on itemtype instead of biblioitem
Jonathan Druart [Mon, 28 May 2018 14:24:43 +0000 (11:24 -0300)]
Bug 20825: (bug 19943 follow-up) call notforloan on itemtype instead of biblioitem

On bug 19943:
 -        elsif ($biblioitem->{'notforloan'} == 1){
 +        elsif ($biblioitem->notforloan == 1){

The biblioitems table does not contain a notforloan column, this comes
from the item type.

This bug only appears when item type is defined at biblio level
(item-level_itypes=0)

Test plan:
Set item-level_itypes = biblio
Check an item out

Without this patch it explodes with
"The method notforloan is not covered by tests!"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I reproduced the error condition and verified the tests failed without
this patch. After this patch is applied, tests pass and checkout
succeeds.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20825: Add regression tests
Jonathan Druart [Mon, 28 May 2018 14:20:32 +0000 (11:20 -0300)]
Bug 20825: Add regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoKoha 18.06 - It's Adventure time!
Nick Clemens [Fri, 25 May 2018 16:54:31 +0000 (16:54 +0000)]
Koha 18.06 - It's Adventure time!

There was once an ILS from New Zealand
They said "How hard could it be?" and
So we all came together
To help make it better
Come join us! The adventure will be grand!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoKoha 18.05.00 is here! v18.05.00
Jonathan Druart [Thu, 24 May 2018 13:40:27 +0000 (10:40 -0300)]
Koha 18.05.00 is here!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoAdd release notes for Koha 18.05.00
Jonathan Druart [Thu, 24 May 2018 14:45:52 +0000 (11:45 -0300)]
Add release notes for Koha 18.05.00

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agorevert missing part of bug 20073
Jonathan Druart [Thu, 24 May 2018 17:18:08 +0000 (14:18 -0300)]
revert missing part of bug 20073

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoRevert "Bug 20073: Update DBIC Schema changes"
Jonathan Druart [Thu, 24 May 2018 17:17:18 +0000 (14:17 -0300)]
Revert "Bug 20073: Update DBIC Schema changes"

This reverts commit dc300b6547355019d9135c2023c444df7a7f3cff.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoFix translation issues
Jonathan Druart [Thu, 24 May 2018 17:26:55 +0000 (14:26 -0300)]
Fix translation issues

1.
 <failure message="msgfmt
 failure">misc/translator/po/fr-CA-staff-prog.po:713: number of format
 specifications in 'msgid' and 'msgstr' does not match

2.
 <failure message="msgfmt
 failure">misc/translator/po/hy-Armn-staff-prog.po:53901: 'msgstr' is
 not a valid C format string, unlike 'msgid'. Reason: The character
 that terminates the directive number 1 is not a v
 alid conversion specifier.

Found with:
 sudo apt-get install translate-toolkit
 junitmsgfmt misc/translator/po/ar-Arab-staff-prog.po

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoTranslation updates for Koha 18.05.00
Koha translators [Thu, 24 May 2018 13:37:29 +0000 (10:37 -0300)]
Translation updates for Koha 18.05.00

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19287: (follow-up) Use the notice defined for the library of the patron
Jonathan Druart [Thu, 24 May 2018 13:09:36 +0000 (10:09 -0300)]
Bug 19287: (follow-up) Use the notice defined for the library of the patron

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20701: Add csrf protection to mancredit.pl
Jonathan Druart [Thu, 3 May 2018 12:09:19 +0000 (09:09 -0300)]
Bug 20701: Add csrf protection to mancredit.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20701: Add csrf protection to maninvoice.pl
Nick Clemens [Thu, 3 May 2018 11:52:24 +0000 (11:52 +0000)]
Bug 20701: Add csrf protection to maninvoice.pl

TO test:
1 - Be signed in to Koha
2 - Add a manual invoice to an account, works fine
3 - Now do it via url: http://localhost:8081/cgi-bin/koha/members/maninvoice.pl?borrowernumber=5&type=test&amount=5&add=Save
4 - Apply patches
5 - Test that everything continues to work as expected (but more securely)
6 - Try adding a new invoice via URL
7 - Should get 'internal server error' and wrong csrf token in logs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20803: Cannot search to hold or use print options from API keys interface
Owen Leonard [Tue, 22 May 2018 17:46:36 +0000 (17:46 +0000)]
Bug 20803: Cannot search to hold or use print options from API keys interface

This patch adds a required JS asset to the patron API key interface.
Without it, JS-based functions in the toolbar do not work.

To test you must have RESTOAuth2ClientCredentials enabled.

 - From a patron detail page, choose More -> Manage API keys.
 - Test the toolbar buttons on this page, especially "Search to hold"
   and the various print options.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20730: Move the authentication block before doing anything
Jonathan Druart [Tue, 8 May 2018 17:27:38 +0000 (14:27 -0300)]
Bug 20730: Move the authentication block before doing anything

No need to add more information here, it's self-explanatory...

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20801: Make dependency on memcached mandatory
Mirko Tietgen [Tue, 22 May 2018 11:48:10 +0000 (13:48 +0200)]
Bug 20801: Make dependency on memcached mandatory

Move memcached from suggested to depends for Debian packages.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20800: Keep Koha on Stretch from using broken libhttp-oai-perl
Mirko Tietgen [Tue, 22 May 2018 10:32:19 +0000 (12:32 +0200)]
Bug 20800: Keep Koha on Stretch from using broken libhttp-oai-perl

libhttp-oai-perl in Stretch is 4.03 and broken. Koha depends on
libhttp-oai-perl << 4 for that reason. To make the installation of Koha
on Stretch as easy as possible, this patch adds the alternative
libhttp-oai-3.27-perl which we provide in the Koha repository.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoRevert "Bug 20073: Move Elasticsearch configs to yaml files and improve the default...
Jonathan Druart [Mon, 21 May 2018 14:02:04 +0000 (11:02 -0300)]
Revert "Bug 20073: Move Elasticsearch configs to yaml files and improve the default settings."

This reverts commit f489d2034bbc3bff67230423a7986d5ea34060ec.

This commit breaks the install process when using debian packages.
Reverting as we are very close to the 18.05.00 release

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoRevert "Bug 20073: Remove perlcritic error"
Jonathan Druart [Mon, 21 May 2018 14:01:58 +0000 (11:01 -0300)]
Revert "Bug 20073: Remove perlcritic error"

This reverts commit 67359a97f4cbf828dbe93a7b08ec7283258b46c5.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20792: (bug 18789 follow-up) Fix patron edit page if TranslateNotices is set
Jonathan Druart [Mon, 21 May 2018 13:40:43 +0000 (10:40 -0300)]
Bug 20792: (bug 18789 follow-up) Fix patron edit page if TranslateNotices is set

translated_language is not a Koha::Patron's method but a simple variable
sent to the template.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoRelease notes for 18.05.00-rc2
Jonathan Druart [Thu, 17 May 2018 16:36:48 +0000 (13:36 -0300)]
Release notes for 18.05.00-rc2

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18786: Add PAYMENT_TYPE to the installer file
Jonathan Druart [Thu, 17 May 2018 16:16:32 +0000 (13:16 -0300)]
Bug 18786: Add PAYMENT_TYPE to the installer file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18856: (QA follow-up) Rename method to avoid confusion
Kyle M Hall [Thu, 11 Jan 2018 14:44:08 +0000 (09:44 -0500)]
Bug 18856: (QA follow-up) Rename method to avoid confusion

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Hmm. I would have liked the opac parameter even better ;)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18856: Don't show cancel option for waiting holds in OPAC
Jonathan Druart [Wed, 10 Jan 2018 19:49:33 +0000 (16:49 -0300)]
Bug 18856: Don't show cancel option for waiting holds in OPAC

This is the alternative patch of Kyle's
"""
If a hold is 'waiting' for the patron to collect then the patron should
be prevented from cancelling the hold via their account in the opac.
If a patron tries to cancel the hold, Koha will give an 'are you sure'
alert and when you click Yes the page just refreshes and the hold
remains.
Staff can cancel the hold from the staff interface but they can then
action the waiting hold.
I think therefore that it is correct behaviour that a patron cannot
cancel a hold when it reaches waiting state via the opac but it would be
useful to either have a warning to prevent the cancellation or a useful
message when they attempt to do so.

The template was using a method that tells Koha if *staff* can cancel a
hold,
instead of patron.

Test Plan:
1) Set up a waiting hold
2) Try to cancel it from the opac
3) Note you cannot
4) Apply this patch
5) Reload the page
6) Note the cancel button has disappeared for found holds
"""

It sounds better to keep the ->is_cancelable method, for readability

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19862: Turn off RoutingListAddReserves on new installations
Katrin Fischer [Tue, 17 Apr 2018 05:55:52 +0000 (07:55 +0200)]
Bug 19862: Turn off RoutingListAddReserves on new installations

The RoutingListAddReserves feature currently doesn't work as
expected (see bug 2894) and should be turned off for new
installations until properly fixed.

To test:
- Run the web installer
- Confirm that RoutingListAddReserves is set to "Don't place"

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update about page for documentation team
Lee Jamison [Wed, 16 May 2018 15:56:26 +0000 (11:56 -0400)]
Bug 7143: Update about page for documentation team

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20706: Fix bad HTML link to help file
Mark Tompsett [Tue, 15 May 2018 02:59:24 +0000 (02:59 +0000)]
Bug 20706: Fix bad HTML link to help file

Before there is no href.
After there is.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20706: Adds en language code to the links to the manual
Katrin Fischer [Thu, 10 May 2018 17:03:47 +0000 (19:03 +0200)]
Bug 20706: Adds en language code to the links to the manual

As we don't have a fix yet to link to the right translated manual,
this adds /en to the links from the help files to the manual to
make them work again.

Check with both patches applied, that the links work.
You will have to change 17.11 to 18.05.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20706: Fixes the links to the manual to reflect chanced chapter file names
Katrin Fischer [Thu, 3 May 2018 21:26:40 +0000 (23:26 +0200)]
Bug 20706: Fixes the links to the manual to reflect chanced chapter file names

The numbering in front of the chapter file names has been removed,
so the links need to be adapted accordingly.

Note:
Testing this in master currently won't work for 2 reasons:
- We are still using 17.11 as version variable, will be 18.05 later.
- We are missing the lanugage code before /html and this leads
  to an outdated version of the 18.05 manual.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20724: (QA follow-up) Remove two obsolete comment lines
Marcel de Rooy [Wed, 16 May 2018 12:43:27 +0000 (14:43 +0200)]
Bug 20724: (QA follow-up) Remove two obsolete comment lines

No test plan :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20724: Add tests for ReservesNeedReturns
Jonathan Druart [Thu, 10 May 2018 14:40:33 +0000 (11:40 -0300)]
Bug 20724: Add tests for ReservesNeedReturns

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20724: Move the ReservesNeedReturns logic to AddReserve
Jonathan Druart [Thu, 10 May 2018 14:40:11 +0000 (11:40 -0300)]
Bug 20724: Move the ReservesNeedReturns logic to AddReserve

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20724: Correctly mark an hold as waiting - ReservesNeedReturns
Kyle M Hall [Thu, 10 May 2018 12:12:04 +0000 (08:12 -0400)]
Bug 20724: Correctly mark an hold as waiting - ReservesNeedReturns

We need to call Koha::Hold->set_waiting to correctly
calculate the expiration date.

It fixes a regression introduced by
  commit 26634151dbce0bf39ff6c9eda5b58bb993996a2d
  Bug 12063 - Fix QA failures

The expiration date has to be set for waiting holds

== Test plan (time to execute: less than 4min) ==
1. Set ReservesNeedReturns to "Don't automatically"
2. Place a hold on a specific item
3. Check it in and confirm hold
4. The hold should have an expiration date
     record page → Hold → "Expiration" column
5. It should be listed in staff:/cgi-bin/koha/circ/waitingreserves.pl
6. Set ReservesNeedReturns to "Automatically"
7. Place a hold on a specific item
    (which should also behave like we check the item in to
    keep it for the patron)
8. The hold should have an *empty* expiration date
     record page → Hold → "Expiration" column
9. Holds awaiting pickup page should crash
     staff:/cgi-bin/koha/circ/waitingreserves.pl
10. Cancel the hold to remove the corrupted data
     record page → Hold → the red X
11. Apply this patch
12. Place a hold on a specific item
13. The hold should have an expiration date (not empty)
14. It should be listed in staff:/cgi-bin/koha/circ/waitingreserves.pl
15. Celebrate!

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20437: Update debian/control
Mirko Tietgen [Tue, 15 May 2018 17:23:25 +0000 (19:23 +0200)]
Bug 20437: Update debian/control

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20437: Force the dependency on HTTP::OAI < 4.0
Tomas Cohen Arazi [Fri, 16 Mar 2018 18:22:47 +0000 (15:22 -0300)]
Bug 20437: Force the dependency on HTTP::OAI < 4.0

Until HTTP::OAI is patched so it actually works, and bug 17704 fixes the API change Koha-side, we need to explicitly pull the right version. Otherwise people using Debian 9+ derived distros (Ubuntu 16.04+) are seeing production issues.

This implies packaging our custom libhttp-oai-perl distribution in the meantime.

This patch makes Koha require a version lower than 4.0.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20693: Update control file
Mirko Tietgen [Tue, 15 May 2018 11:58:03 +0000 (13:58 +0200)]
Bug 20693: Update control file

Auto-generated file.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20693: Plack fails, because 'libcgi-emulate-psgi-perl' package is not installed
Mirko Tietgen [Tue, 15 May 2018 11:47:10 +0000 (13:47 +0200)]
Bug 20693: Plack fails, because 'libcgi-emulate-psgi-perl' package is not installed

Add CGI::Emulate::PSGI to PerlDependencies.pm

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17084: Automatic debian/control updates (master)
Mirko Tietgen [Mon, 14 May 2018 20:21:14 +0000 (22:21 +0200)]
Bug 17084: Automatic debian/control updates (master)

18.05.00-rc1

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20764: Fix Plugins.t v18.05.00-rc1
Jonathan Druart [Mon, 14 May 2018 16:09:16 +0000 (13:09 -0300)]
Bug 20764: Fix Plugins.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20764: (follow-up) Rename the test file
Jonathan Druart [Mon, 14 May 2018 15:33:48 +0000 (12:33 -0300)]
Bug 20764: (follow-up) Rename the test file

There is something wrong here...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20404: Fix Patrons/Import.t
Jonathan Druart [Mon, 14 May 2018 15:25:42 +0000 (12:25 -0300)]
Bug 20404: Fix Patrons/Import.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20764: Rename the test file
Jonathan Druart [Mon, 14 May 2018 15:14:33 +0000 (12:14 -0300)]
Bug 20764: Rename the test file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20764: (QA follow-up) Fix path to sample plugins
Tomas Cohen Arazi [Mon, 14 May 2018 15:03:32 +0000 (12:03 -0300)]
Bug 20764: (QA follow-up) Fix path to sample plugins

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20764: Koha_Template_Plugin_KohaPlugins.t is db dependent
Mirko Tietgen [Mon, 14 May 2018 12:46:20 +0000 (14:46 +0200)]
Bug 20764: Koha_Template_Plugin_KohaPlugins.t is db dependent

t/Koha_Template_Plugin_KohaPlugins.t is DB dependent.
This patch moves it to t/db_dependent/

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20428: Display warning if the entry is empty
Jonathan Druart [Mon, 14 May 2018 14:11:34 +0000 (11:11 -0300)]
Bug 20428: Display warning if the entry is empty

And not only if the entry is missing. We should do the same for other
entries.
Also, use Koha::UploadedFile->temporary_directory to know the fallback
value.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20428: (QA follow-up) Remove redundant directory level
Marcel de Rooy [Mon, 14 May 2018 07:05:21 +0000 (09:05 +0200)]
Bug 20428: (QA follow-up) Remove redundant directory level

Upload creates its own upload folder in the temp folder, so there is no
need to add another level in temporary_directory.
Removing the creation of this folder in koha-create-dirs too.

Also removing the use Koha::UploadedFiles in about.pl. No longer needed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20428: Make upload_tmp a more general tmp directory
Tomas Cohen Arazi [Fri, 11 May 2018 17:24:32 +0000 (14:24 -0300)]
Bug 20428: Make upload_tmp a more general tmp directory

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20428: Added missing parameter --upload-tmp-path
Mark Tompsett [Tue, 8 May 2018 16:14:48 +0000 (16:14 +0000)]
Bug 20428: Added missing parameter --upload-tmp-path

Line 463 lists valid parameters, but it was missing
upload-tmp-path: which resulted in the koha-create
saying it is an invalid parameter.

TEST PLAN
---------
1) apply all patches but this.
2) sudo perl ~/misc4dev/cp_debian_files.pl
3) restart_all
4) sudo koha-create --create-db --upload-tmp-path unique-path
awesome-test-name
   -- Fails to run.
5) apply this patch
6) repeat 2-4
7) sudo vi /etc/koha/sites/awesome-test-name/koha-conf.xml
   -- the upload_tmp_path entry should have unique-path
      in it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20428: Make about.pl inform about missing upload_tmp_path entry
Tomas Cohen Arazi [Thu, 29 Mar 2018 13:45:30 +0000 (10:45 -0300)]
Bug 20428: Make about.pl inform about missing upload_tmp_path entry

This patch makes about.pl warn about a missing upload_tmp_path entry in
koha-conf.xml. It also mentions the effectively used tmp dir.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20428: Make Koha::UploadedFile use the new config entry for tmp files
Tomas Cohen Arazi [Thu, 29 Mar 2018 13:44:59 +0000 (10:44 -0300)]
Bug 20428: Make Koha::UploadedFile use the new config entry for tmp files

This patch makes Koha::UploadedFile->temporary_directory try to use the
new configuration entry. It will fallback to File::Spec->tmpdir
otherwise.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20428: Add the option to specify a tmp uploads dir
Tomas Cohen Arazi [Thu, 29 Mar 2018 13:25:43 +0000 (10:25 -0300)]
Bug 20428: Add the option to specify a tmp uploads dir

This patch adds an option to the koha-conf.xml file for specifying
a temporary uploaded files directory.

The koha-create script is adjusted to handle it and a convenient option
switch is added. If ommited, it will default to
/var/lib/koha/<instance>/uploads_tmp.

koha-create-dirs is patched to create the required directory with the
right permissions.

The docs get the new parameter documented.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20404: Turn on ExtendedPatronAttributes by default for new installations
Katrin Fischer [Thu, 10 May 2018 19:05:07 +0000 (21:05 +0200)]
Bug 20404: Turn on ExtendedPatronAttributes by default for new installations

Extended patron attributes are a very useful feature that should be
more obvious. We should activate them by default for new installations.

For testing:
- Run the web isntaller on an empty database
- Check that after installation ExtendedPatronAttributes is turned on

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19181: Do not screenshot
Jonathan Druart [Fri, 11 May 2018 19:25:13 +0000 (16:25 -0300)]
Bug 19181: Do not screenshot

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19181: Fix jenkins failure
Jonathan Druart [Fri, 11 May 2018 18:41:35 +0000 (15:41 -0300)]
Bug 19181: Fix jenkins failure

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20623: (QA follow-up) avoid fetch() calls in some cases
Victor Grousset [Fri, 11 May 2018 15:43:33 +0000 (17:43 +0200)]
Bug 20623: (QA follow-up) avoid fetch() calls in some cases

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20737: Use https for baker and taylor cover images
Nick Clemens [Wed, 9 May 2018 11:51:20 +0000 (11:51 +0000)]
Bug 20737: Use https for baker and taylor cover images

Easy change, should be able to verify with code review or testing with
dummy values

To test:
1 - Put some values in baker and taylor prefs (don't need to be valid)
2 - Do a search on the opac (and have some items with isbns)
3 - Inspect the cover images links to ensure they are formed correctly
4 - prove -v t/External/BakerTaylor.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20707: Replace circ/search.pl circulate permission requirement with catalogue
Nick Clemens [Fri, 4 May 2018 13:54:49 +0000 (13:54 +0000)]
Bug 20707: Replace circ/search.pl circulate permission requirement with catalogue

To test:
 1 - Setup a staff patron with permissions:
   - catalogue
   - reserveforothers
   - course_reserves
 2 - Log in to staff client as that patron
 3 - Find a record and click to place a hold
 4 - Type more than three letters into the search bar but don't submit
 5 - Note that you will not receive autocomplete results
 6 - Either submit, or try to visit any page in staff client
 7 - Your session has been expired, you must log in again
 8 - Log in, go to course reserves
 9 - As before, trigger the autocomplete search in the instrcutor field
10 - Again your session has been terminated
11 - Apply patch
12 - Repeat above actions, this time you will not be kicked out

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7910: Give feedack when the subscriptions have been renewed
Jonathan Druart [Wed, 18 Apr 2018 18:11:47 +0000 (15:11 -0300)]
Bug 7910: Give feedack when the subscriptions have been renewed

This patch adds a message to the user to let them know the subscription
have been renewed successfully.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>