17.11.cx1/.git
3 years agoadd missing bibnum 17.11.06-cx2
Mason James [Thu, 13 Dec 2018 13:03:50 +0000 (02:03 +1300)]
add missing bibnum

modified:   serials/subscription-detail.pl

3 years agoupgrade to ssl
Mason James [Mon, 3 Dec 2018 00:52:32 +0000 (13:52 +1300)]
upgrade to ssl

Signed-off-by: Mason James <mtj@kohaaloha.com>
modified:   opac/tracklinks.pl

3 years agoadd clutscny class.def
Mason James [Fri, 30 Nov 2018 03:03:24 +0000 (16:03 +1300)]
add clutscny class.def

modified:   Label.pm

3 years agopass $subid for DML
Mason James [Wed, 21 Nov 2018 05:52:24 +0000 (18:52 +1300)]
pass $subid for DML

Signed-off-by: Mason James <mtj@kohaaloha.com>
modified:   subscription-add.pl

3 years agoSigned-off-by: Mason James <mtj@kohaaloha.com>
Mason James [Fri, 16 Nov 2018 07:06:39 +0000 (20:06 +1300)]
Signed-off-by: Mason James <mtj@kohaaloha.com>
new file:   link_bibs_to_authorities.pl

3 years agoadd 490a for linking
Mason James [Fri, 16 Nov 2018 06:59:47 +0000 (19:59 +1300)]
add 490a  for linking

Signed-off-by: Mason James <mtj@kohaaloha.com>
3 years agoCan't call method "biblio" on an undefined value at /usr/share/koha/lib/C4/Members...
Mason James [Thu, 9 Aug 2018 22:12:08 +0000 (10:12 +1200)]
Can't call method "biblio" on an undefined value at /usr/share/koha/lib/C4/Members.pm line 767.

3 years agofix the following error...
Mason James [Tue, 7 Aug 2018 01:52:29 +0000 (13:52 +1200)]
fix the following error...

 request.pl: Can't call method "notforloan" on an undefined value at /home/mason/g/k/1711cx1/C4/Reserves.pm line 1178

Signed-off-by: Mason James <mtj@kohaaloha.com>
3 years agoRT-2829, fix mellon regression in opac/opac-suggestions.pl
Mason James [Sat, 4 Aug 2018 22:41:53 +0000 (10:41 +1200)]
RT-2829, fix mellon regression in opac/opac-suggestions.pl

3 years agoBug 17843 regression 17.11.x (rt-2823)
Mason James [Wed, 25 Jul 2018 06:42:04 +0000 (18:42 +1200)]
Bug 17843 regression 17.11.x (rt-2823)

modified:   members/summary-print.pl

3 years agoconvert isbn13 to 10
Mason James [Wed, 11 Jul 2018 02:47:27 +0000 (14:47 +1200)]
convert isbn13 to 10

Signed-off-by: Mason James <mtj@kohaaloha.com>
3 years agoadd isbn validation
Mason James [Tue, 3 Jul 2018 04:16:38 +0000 (16:16 +1200)]
add isbn validation

Signed-off-by: Mason James <mtj@kohaaloha.com>
modified:   Carousel.pm

3 years agopt
Mason James [Tue, 3 Jul 2018 04:13:50 +0000 (16:13 +1200)]
pt

Signed-off-by: Mason James <mtj@kohaaloha.com>
3 years agodisable quilt
Mason James [Wed, 13 Jun 2018 18:14:25 +0000 (06:14 +1200)]
disable quilt

3 years agoCALYX 17.11.06 release
Mason James [Wed, 13 Jun 2018 17:32:09 +0000 (05:32 +1200)]
CALYX 17.11.06 release

3 years agoset updateJobProgress to 5 secs
Mason James [Thu, 7 Jun 2018 13:14:41 +0000 (01:14 +1200)]
set updateJobProgress to 5 secs

Signed-off-by: Mason James <mtj@kohaaloha.com>
3 years agowarns..
Mason James [Thu, 7 Jun 2018 08:20:49 +0000 (20:20 +1200)]
warns..

3 years agoBug 20055 - New suggestion from OPAC records borrowernumber instead of branchcode
Mason James [Wed, 31 Jan 2018 04:48:57 +0000 (17:48 +1300)]
Bug 20055 - New suggestion from OPAC records borrowernumber instead of branchcode

Signed-off-by: Mason James <mtj@kohaaloha.com>
3 years agoBug 19596 - Internal server error if open order with deleted biblio / null biblionumb...
Mason James [Wed, 31 Jan 2018 04:21:02 +0000 (17:21 +1300)]
Bug 19596 - Internal server error if open order with deleted biblio / null biblionumber (edit)

modified:   acqui/parcel.pl

Conflicts:
acqui/parcel.pl

3 years ago modified: C4/Search.pm
Mason James [Thu, 25 Jan 2018 05:54:36 +0000 (18:54 +1300)]
modified:   C4/Search.pm

3 years agoBug 19870: Loaned items show as available unless logged in
Mason James [Fri, 22 Dec 2017 02:33:01 +0000 (15:33 +1300)]
Bug 19870: Loaned items show as available unless logged in

here's a quick fix to the problem (on 17.05.00 and up)

1/ set OPACXSLTResultsDisplay = '';
2/ log out from opac

3/ search for a title in opac, see item is available in search results
4/ check out item
5/ search for a title in opac, see item is still available?1

6/ apply patch
7/ search for an title in opac, see item is now unavailable

we still need a .t/test file for resultsSearch(), but that might be a job for another day...

3 years agoRT #2623: OPAC Internal Server Error
Mason James [Thu, 21 Dec 2017 10:56:01 +0000 (23:56 +1300)]
RT #2623: OPAC Internal Server Error
my ( $borr ) = GetMember ( $borrowernumber ) if  $borrowernumber;

modified:   opac-suggestions.pl

3 years agolessc --clean-css="--s0 --advanced --compatibility=ie7" bootstrap/less/opac.less...
Mason James [Thu, 7 Dec 2017 05:18:14 +0000 (18:18 +1300)]
lessc --clean-css="--s0 --advanced --compatibility=ie7" bootstrap/less/opac.less > bootstrap/css/opac.css

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/css/opac.css

3 years agoadd https to caro
Mason James [Wed, 29 Nov 2017 00:37:46 +0000 (13:37 +1300)]
add https to caro
modified:   C4/Carousel.pm

3 years ago2410: SLGS : Issues with display of HTML notices
Mason James [Wed, 20 Sep 2017 22:01:15 +0000 (10:01 +1200)]
2410: SLGS : Issues with display of HTML notices

Signed-off-by: Mason James <mtj@kohaaloha.com>
3 years agomel opac
Mason James [Thu, 14 Sep 2017 01:46:06 +0000 (13:46 +1200)]
mel opac

Conflicts:
C4/Auth.pm

Conflicts:
opac/opac-main.pl

3 years agoBug 13932: unset userenv when using trusted header
Robin Sheat [Wed, 29 Apr 2015 05:26:11 +0000 (17:26 +1200)]
Bug 13932: unset userenv when using trusted header

As the trusted header system doesn't keep a session hanging around, when
running with plack it can end up with the userenv of another user, which
is bad. So this clears it forcing it to be recreated cleanly.

3 years agoWR237697: add in user checking
Robin Sheat [Wed, 22 Apr 2015 03:08:47 +0000 (15:08 +1200)]
WR237697: add in user checking

This ensures that the user exists so that we don't end up in a weird
anonymous logged in user state if they pass auth, but don't have a koha
account.

Conflicts:
C4/Auth.pm

3 years agoWR237697: add support for a trusted HTTP header
Mason James [Thu, 7 Dec 2017 03:49:50 +0000 (16:49 +1300)]
WR237697: add support for a trusted HTTP header

This adds support for a 'trusted_header' option in koha-conf.xml that
specified an HTTP header that you trust that contains the userid. This
is to allow Koha to be behind a reverse proxy (for example, running
plack fronted by apache) that does user authentication/authorisation.

Note: for reasons I can't really tell, this doesn't work when apache is
running Koha as CGI, but does work under plack.

Test plan:
* have a koha-plack setup.
* configure apache to send it a header:
  RequestHeader set X_REMOTE_USER "testuserid"
* add <trusted_header>X_REMOTE_USER</trusted_header> to koha-conf.xml
* verify that the user behaves as though they're logged in.

3 years agoSigned-off-by: Mason James <mtj@kohaaloha.com>
Mason James [Tue, 5 Sep 2017 09:44:39 +0000 (21:44 +1200)]
Signed-off-by: Mason James <mtj@kohaaloha.com>
new file:   misc/cronjobs/cleanup_database.pl1

3 years agolessc --compress bootstrap/less/opac.less > bootstrap/css/opac.css
Mason James [Thu, 31 Aug 2017 08:50:13 +0000 (20:50 +1200)]
lessc --compress bootstrap/less/opac.less > bootstrap/css/opac.css

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/css/opac.css

3 years agofix off-by-one caro bug, and local array
Mason James [Thu, 17 Aug 2017 05:51:25 +0000 (17:51 +1200)]
fix off-by-one caro bug, and local array

Signed-off-by: Mason James <mtj@kohaaloha.com>
3 years agofix for suggestions.pl with mellon
Mason James [Wed, 9 Aug 2017 06:51:51 +0000 (18:51 +1200)]
fix for suggestions.pl with mellon

Signed-off-by: Mason James <mtj@kohaaloha.com>
Conflicts:
opac/opac-suggestions.pl

3 years agofix unneeded debarred() call
Mason James [Fri, 28 Jul 2017 05:14:15 +0000 (17:14 +1200)]
fix unneeded debarred() call

Signed-off-by: Mason James <mtj@kohaaloha.com>
modified:   opac/opac-user.pl

3 years agofix caro local
Mason James [Mon, 17 Jul 2017 14:56:39 +0000 (02:56 +1200)]
fix caro local

modified:   C4/Carousel.pm

4 years agoadd local
Mason James [Fri, 9 Jun 2017 03:09:57 +0000 (15:09 +1200)]
add local
modified:   Carousel.pm

4 years agopt
Mason James [Thu, 8 Jun 2017 06:07:59 +0000 (18:07 +1200)]
pt

Signed-off-by: Mason James <mtj@kohaaloha.com>
modified:   C4/Carousel.pm

4 years agolocal working
Mason James [Thu, 8 Jun 2017 05:46:45 +0000 (17:46 +1200)]
local working

Signed-off-by: Mason James <mtj@kohaaloha.com>
modified:   C4/Carousel.pm

4 years agoswitch to amazon
Mason James [Thu, 8 Jun 2017 03:33:56 +0000 (15:33 +1200)]
switch to amazon

Signed-off-by: Mason James <mtj@kohaaloha.com>
modified:   Carousel.pm

4 years agoadd test for zero results
Mason James [Thu, 8 Jun 2017 02:18:53 +0000 (14:18 +1200)]
add test for zero results

Signed-off-by: Mason James <mtj@kohaaloha.com>
modified:   Carousel.pm

4 years agopt
Mason James [Wed, 7 Jun 2017 05:49:51 +0000 (17:49 +1200)]
pt

Signed-off-by: Mason James <mtj@kohaaloha.com>
4 years agoupdate to stable
Mason James [Fri, 12 May 2017 06:39:57 +0000 (18:39 +1200)]
update to stable

Signed-off-by: Mason James <mtj@kohaaloha.com>
modified:   debian/build-git-snapshot

4 years agorm debug
Mason James [Fri, 12 May 2017 06:33:39 +0000 (18:33 +1200)]
rm debug
modified:   C4/Auth.pm

4 years ago..
Mason James [Fri, 12 May 2017 05:56:45 +0000 (17:56 +1200)]
..

Signed-off-by: Mason James <mtj@kohaaloha.com>
4 years agoadd SetCCodeCookie
Mason James [Fri, 12 May 2017 05:43:55 +0000 (17:43 +1200)]
add SetCCodeCookie

Signed-off-by: Mason James <mtj@kohaaloha.com>
4 years agoccode fix
Mason James [Fri, 12 May 2017 05:37:36 +0000 (17:37 +1200)]
ccode fix

Signed-off-by: Mason James <mtj@kohaaloha.com>
4 years agort2309: PMHCCN : In OPAC "Publisher"or "Published by :" label is not visible
Mason James [Wed, 19 Apr 2017 01:13:25 +0000 (13:13 +1200)]
rt2309: PMHCCN : In OPAC "Publisher"or "Published by :" label is not visible

Signed-off-by: Mason James <mtj@kohaaloha.com>
4 years agoRT2116, hide no-cover text
Mason James [Tue, 7 Mar 2017 03:04:54 +0000 (16:04 +1300)]
RT2116, hide no-cover text

Signed-off-by: Mason James <mtj@kohaaloha.com>
Conflicts:
koha-tmpl/opac-tmpl/bootstrap/less/opac.less

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/less/opac.less

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/less/opac.less

4 years agoadd id/classes to basket.tt
Mason James [Tue, 6 Dec 2016 02:12:05 +0000 (15:12 +1300)]
add id/classes to basket.tt

Signed-off-by: Mason James <mtj@kohaaloha.com>
4 years agoadd enumchron
Mason James [Sun, 27 Nov 2016 23:45:15 +0000 (12:45 +1300)]
add enumchron
modified:   XSLT.pm

Conflicts:
C4/XSLT.pm

Conflicts:
C4/XSLT.pm

4 years agoadd YTU xslt
Mason James [Sun, 27 Nov 2016 22:07:09 +0000 (11:07 +1300)]
add YTU xslt

Signed-off-by: Mason James <mtj@kohaaloha.com>
new file:   MARC21slim2OPACResults-ytu1.xsl

4 years agort1875, add regex to replace problematic DOS CRLF chars, before import
Mason James [Sun, 18 Sep 2016 12:43:12 +0000 (00:43 +1200)]
rt1875, add regex to replace problematic DOS CRLF chars, before import

Signed-off-by: Mason James <mtj@kohaaloha.com>
Conflicts:
admin/import_export_framework.pl

4 years ago1966: HBC : Default number of reports displayed
Mason James [Wed, 16 Nov 2016 01:49:20 +0000 (14:49 +1300)]
1966: HBC : Default number of reports displayed

modified:   koha-tmpl/intranet-tmpl/prog/js/datatables.js

4 years agogauth fix local auth
Mason James [Tue, 15 Nov 2016 16:58:39 +0000 (05:58 +1300)]
gauth fix local auth
Signed-off-by: Mason James <mtj@kohaaloha.com>
modified:   koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt

4 years agoadd caro tmpl
Mason James [Thu, 3 Nov 2016 02:29:54 +0000 (15:29 +1300)]
add caro tmpl

4 years agofix xxx in .tt
Mason James [Tue, 9 Jun 2015 06:03:40 +0000 (18:03 +1200)]
fix xxx in .tt

4 years agoadd --tempdir arg to rebuild_zebra.pl
Mason James [Thu, 20 Feb 2014 03:09:17 +0000 (16:09 +1300)]
add --tempdir arg to rebuild_zebra.pl

4 years agoadd libdatetime-format-dateparse-perl
Mason James [Mon, 8 Jun 2015 01:44:35 +0000 (13:44 +1200)]
add libdatetime-format-dateparse-perl
modified:   control

4 years agoadd css tweaks to ipsp subject-cloud
Mason James [Wed, 4 Feb 2015 04:55:48 +0000 (17:55 +1300)]
add css tweaks to ipsp subject-cloud

4 years agoBug 10756 - Carousel Display of New Titles on OPAC home page
Mason James [Wed, 4 Feb 2015 04:54:03 +0000 (17:54 +1300)]
Bug 10756 - Carousel Display of New Titles on OPAC home page

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc

Conflicts:
C4/Auth_cas_servers.yaml.sample

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc

Conflicts:
opac/opac-main.pl

4 years agort950 add id for BS cart mod
Mason James [Tue, 17 Jun 2014 19:13:27 +0000 (07:13 +1200)]
rt950 add id for BS cart mod

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc

4 years agort883 add IPSP ccode-opac
Mason James [Mon, 16 Jun 2014 04:34:33 +0000 (16:34 +1200)]
rt883 add IPSP ccode-opac

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/css/opac.css
opac/opac-search.pl

Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc

Conflicts:
opac/opac-search.pl

Conflicts:
opac/opac-search.pl

Conflicts:
C4/Category.pm
opac/opac-search.pl

modified:   C4/Auth.pm
modified:   koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
modified:   opac/opac-search.pl

4 years agort815, add classes to table
Mason James [Sat, 14 Jun 2014 02:41:53 +0000 (14:41 +1200)]
rt815, add classes to table

Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

4 years agobz 12120, patch for --tempdir /var/tmp
Mason James [Fri, 2 May 2014 07:29:20 +0000 (19:29 +1200)]
bz 12120,  patch for --tempdir /var/tmp
modified:   debian/scripts/koha-rebuild-zebra

4 years agoBug 20701: (17.11 follow-up) Move csrf token after checkauth and use 17.11.06 kc/17.11.x v17.11.06
Nick Clemens [Wed, 23 May 2018 10:37:35 +0000 (10:37 +0000)]
Bug 20701: (17.11 follow-up) Move csrf token after checkauth and use
scalar

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoUpdate release notes for 17.11.06 release
Nick Clemens [Tue, 22 May 2018 12:06:47 +0000 (12:06 +0000)]
Update release notes for 17.11.06 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 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: Nick Clemens <nick@bywatersolutions.com>
4 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

Works OK.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 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

Works OK.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoIncrement version for 17.11.06 release
Nick Clemens [Tue, 22 May 2018 11:52:58 +0000 (07:52 -0400)]
Increment version for 17.11.06 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoTranslation updates for Koha 17.11.06
Koha translators [Tue, 22 May 2018 11:37:22 +0000 (08:37 -0300)]
Translation updates for Koha 17.11.06

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 11943: Add unit test for double accepts
Marcel de Rooy [Fri, 4 May 2018 07:54:30 +0000 (09:54 +0200)]
Bug 11943: Add unit test for double accepts

Test plan:
Run t/db_dependent/Virtualshelves.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 11943: Prevent double accepts in Koha::Virtualshelfshare
Marcel de Rooy [Fri, 4 May 2018 07:34:02 +0000 (09:34 +0200)]
Bug 11943: Prevent double accepts in Koha::Virtualshelfshare

This 'bug' existed long enough now to finally remove it ;)

We do so by deleting the invitation if the borrower already has a share
on this list. Actually not that hard.

We still need: a unit test and a db revision.

Test plan:
[1] Share a list. Let user B accept.
[2] Without this patch: Share again and let B accept again.
[3] Verify that you have two shares for this list in virtualshelfshares.
[4] With this patch: Share another list, let B accept.
[5] Share this other list again, let B accept again.
[6] Verify that virtualshelfshares does not contain double entries now.
    (Note: This pertains to the second list only.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20687: (follow-up) Look for invitekey in show_accept and fix error codes
Marcel de Rooy [Fri, 4 May 2018 06:10:46 +0000 (08:10 +0200)]
Bug 20687: (follow-up) Look for invitekey in show_accept and fix error codes

We should check the invitekey in show_accept by passing it along in the
search call.
On the way I fixed some error checking: if the list number is invalid, or
the list is public or you are the owner, or if the key is not found, we
should set the right error code; the template contains those messages.

Test plan:
[1] Share a list and accept a correct invitation with another user.
[2] Try to accept some invalid proposals: wrong key, wrong list.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested invalid key, wrong list, owner, public list, expiry.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20687: Check all share keys for a given list
Nick Clemens [Tue, 1 May 2018 13:47:18 +0000 (13:47 +0000)]
Bug 20687: Check all share keys for a given list

This patch gets all the shares for a list and iterates through to find
the correct one when accepting from a link

To test:
1 - Create a private list in the opac
2 - Invite 2 patrons to the list
3 - Try to accept from the patron you first shared to
4 - You will get a failure message about expiration of the link
5 - Apply patch
6 - Now try to accept the first share
7 - It works! Success!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19030: Preserve link between order and subscription when editing an order
Jonathan Druart [Mon, 16 Apr 2018 20:41:42 +0000 (17:41 -0300)]
Bug 19030: Preserve link between order and subscription when editing an order

The aqorders.subscriptionid info is not sent to the template when the
order is edited. Which means we lose this link.

Test plan:
Create an order from a subscription
Edit the order
=> Without this patch, the aqorders.subscriptionid value is set to NULL
and items are created when receiving serial.

=> With this patch applied the link is preserved and expected behaviors
are preserved during all the acquisition workflow

You should also try and create several orders from the same subscription

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20556: Marking ILL request as complete..
Andrew Isherwood [Tue, 10 Apr 2018 15:50:56 +0000 (16:50 +0100)]
Bug 20556: Marking ILL request as complete..

When marking a request as complete, the status is updated internally
then the user to redirected to the view of the request.

Although the redirect header is sent, there is no exit to indicate that
the program flow should stop. As a result, an attempt is made to render
the template, which fails.

This patch simply adds the missing exit.

TEST PLAN
---------

- Create an ILL request
- "Manage request" > "Confirm request"
- "Mark completed"
- TEST: Ensure that no error is written to the error log upon clicking
"Mark completed"

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20562: Fix Returns.t test
Jonathan Druart [Thu, 19 Apr 2018 19:21:57 +0000 (16:21 -0300)]
Bug 20562: Fix Returns.t test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20562: Pass the Koha::Checkout object to AddIssuingCharge
Jonathan Druart [Mon, 16 Apr 2018 16:48:54 +0000 (13:48 -0300)]
Bug 20562: Pass the Koha::Checkout object to AddIssuingCharge

We do not need to pass all those parameters, just the checkout object is
enough.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20562: issue_id is not stored in accountlines for rental fees
Kyle M Hall [Sun, 8 Apr 2018 07:11:11 +0000 (07:11 +0000)]
Bug 20562: issue_id is not stored in accountlines for rental fees

Test Plan:
1) Apply this patch
2) Assign a charge to an item type
3) Checkout an item of that type to a patron
4) View the accountlines table for that patron
SELECT * FROM accountlines WHERE accounttype='Rent' and borrowernumber=##;
5) Note there is an issue_id

Or

1) Apply this patch
2) prove t/db_dependent/Circulation/issue.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 18725: Test return values of make_column_dirty
Jonathan Druart [Mon, 16 Apr 2018 15:56:01 +0000 (12:56 -0300)]
Bug 18725: Test return values of make_column_dirty

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 18725: (QA follow-up) Use make_column_dirty instead of status change
Marcel de Rooy [Fri, 13 Apr 2018 07:38:50 +0000 (09:38 +0200)]
Bug 18725: (QA follow-up) Use make_column_dirty instead of status change

Moving the status to the invalid 'processing' might well have unwanted
side-effects. (The status column will be set to empty string and we have
a problem if it is not processed.)

This patch allows pass-through of DBIX's make_column_dirty in
Koha::Object (simple tests included) and uses it to force an update.
If the update does not return true, it still exits.

Test plan:
[1] Read the changes.
[2] Run t/db_dependent/Koha/Object.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
Koha/Object.pm

4 years agoBug 18725: Prevent process_message_queue to send duplicate emails if message_queue...
Kyle M Hall [Thu, 26 Oct 2017 13:04:59 +0000 (09:04 -0400)]
Bug 18725: Prevent process_message_queue to send duplicate emails if message_queue is not writable.

Last week, we had a database server whose disk filled, causing database writes to fail.

This meant that messages in message_queue marked 'pending' were not marked as 'sent' when they were added to the postfix mail queue; messages were sent every 15 minutes (as specified in the cron job) until the disk space issues were cleared.

I would suggest adding a token write to the start of process_message_queue.pl as a 'canary in the coal mine'. If the database write fails, process_message_queue should stop, because it's not safe to proceed sending emails that may not be marked 'sent'.

Test Plan:
1) Apply this patch
2) Make the message_queue table unwriteable somehow
3) Run process_message_queue.pl
4) Script should die with error

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>
4 years agoBug 20584: Prevent Koha/Patron/Categories.t to fail randomly
Jonathan Druart [Fri, 13 Apr 2018 18:09:53 +0000 (15:09 -0300)]
Bug 20584: Prevent Koha/Patron/Categories.t to fail randomly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19546: (QA follow-up) Make the returning cd more fool proof
Marcel de Rooy [Mon, 5 Mar 2018 09:27:33 +0000 (10:27 +0100)]
Bug 19546: (QA follow-up) Make the returning cd more fool proof

Trivial and hypothetical fix.
If you create /root/AA B (space in dirname), the quotes added here will
help you to get back where you came from.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
4 years agoBug 19546: Run starman from the instance's home dir
Tomas Cohen Arazi [Fri, 2 Mar 2018 13:36:34 +0000 (10:36 -0300)]
Bug 19546: Run starman from the instance's home dir

This patch makes koha-plack jump into the instance's home directory to
run.

It is required because Perl 5.18 introduced a breaking change that
makes perl die if @INC includes directories for which the user doesn't
have read permission, and need to be traversed when querying for a lib.
This is the case of '.', which is introduced automatically into @INC
until Perl 5.26 (which removes the 'feature').

The Mojolicious::Plugins lib prefixes the plugin names with
'Mojolicious::Plugin' so it first looks (for example) for
Mojolicious::Plugin::Koha::REST::Plugin::Pagination (Pagination is just
the first one on the list). When it looks for it at '.' it dies (because
of Perl's behaviour) so it doesn't query for the right namespace (the
following to try).

I only reproduced it in koha-testing-docker. To test, you just need to
try this patched koha-plack and make sure it doesn't break due to this
permissions issue.

To test:
- In your koha-testing-docker clone, run:
  $ docker-compose up -p test
- Open a shell inside the container (on a separate terminal):
  $ docker exec -it test_koha_1 bash
- From within the /root directory, restart plack:
  $ cd /root
  $ koha-plack --restart kohadev
=> FAIL: Logs show plack is broken due to permissions problems trying to
    find Mojolicious::Plugin::Koha::REST::Plugin::Pagination
- Use the patched script from this patch:
  $ /kohadevbox/koha/debian/scripts/koha-plack --restart kohadev
=> SUCCESS: Plack runs fine, no error in the logs
- Sign off :-D

Note: people who has environments in which the problems is reproducible,
    please test this version of koha-plack and stamp your sign-off,
    PLEASE.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
4 years agoBug 20721: (bug 19403 follow-up) Prevent Circulation.t to fail randomly
Jonathan Druart [Mon, 7 May 2018 16:15:34 +0000 (13:15 -0300)]
Bug 20721: (bug 19403 follow-up) Prevent Circulation.t to fail randomly

If items.restricted == 1, CanBookBeIssued will not returned what we are
testing.

The easiest and global fix is to define a default value at TestBuilder
package level

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 20426: Fix default fund value when adding orders from iso2709 file
Jonathan Druart [Mon, 2 Apr 2018 15:56:21 +0000 (12:56 -0300)]
Bug 20426: Fix default fund value when adding orders from iso2709 file

A new bug has been highlighted since:
  commit b830349f45007629f141a9835e05b95f90ee4b92
  Bug 19453: Incorrect jQuery selector for fund drop down validation

Prior to bug 19453 the check on the existence of the fund did not work
as expected, no select with name='budget_code' existed and the error was
never raised.
Now it works but expect a fund to be selected for every record to
import.
This check must only be done if there is no default value selected.

Test plan:
- Create an order from a staged file
- Do not select any funds
=> You must get a warning
- Select a specific fund for some of the records
=> You must get a warning
- Select a default fund in the last tab
=> You must not get a warning and the records must be imported and
inserted with the correct fund

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 20536: (ILL) authnotrequired should be explicitly unset on opac
Martin Renvoize [Fri, 6 Apr 2018 09:22:20 +0000 (10:22 +0100)]
Bug 20536: (ILL) authnotrequired should be explicitly unset on opac

* koha/opac-illrequest.pl - Added explicit setting of authnotrequired

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 20552: Fix HTML tag for search facets
Claire Gravely [Tue, 10 Apr 2018 12:46:11 +0000 (12:46 +0000)]
Bug 20552: Fix HTML tag for search facets

The tags for home library and holding library in the 'refine your
search' list should be h5.

This patch changes the html tag for the availability, holding library and home library
facets.

To test:
- Search for an item in the OPAC where the relevant facet appears
- Use 'Inspect element' to check the tag
- Apply patch
- Confirm the facet now has the h5 tag
- Confirm spacing is improved

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 3841: (follow-up) Add the ACQ framework for pl-PL
Jonathan Druart [Tue, 10 Apr 2018 15:04:59 +0000 (12:04 -0300)]
Bug 3841: (follow-up) Add the ACQ framework for pl-PL

No idea why I missed pl-PL!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 19581: Fix Koha_Elasticsearch.t
Jonathan Druart [Mon, 9 Apr 2018 20:43:41 +0000 (17:43 -0300)]
Bug 19581: Fix Koha_Elasticsearch.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 19581: (follow-up) Fix handling of new and old arrays for auth compat
Nick Clemens [Fri, 16 Mar 2018 09:03:46 +0000 (09:03 +0000)]
Bug 19581: (follow-up) Fix handling of new and old arrays for auth compat

Stolen from bug 20244

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 19581: Remove unused comment and line
Nick Clemens [Tue, 13 Mar 2018 09:32:04 +0000 (09:32 +0000)]
Bug 19581: Remove unused comment and line

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 19581: Unit tests
Nick Clemens [Sun, 5 Nov 2017 01:47:49 +0000 (01:47 +0000)]
Bug 19581: Unit tests

This patch makes a few changes to the tests to take into account the
change to indexing.

To test:
prove t/db_dependent/Koha_Elasticsearch_Indexer.t
Should return green

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 19581: Remove 'split' option from Catmandu fixes for marc
Nick Clemens [Sun, 5 Nov 2017 01:51:39 +0000 (01:51 +0000)]
Bug 19581: Remove 'split' option from Catmandu fixes for marc

This option in combination with append seems to add null entries in the indexes
for fields that don't exist. These fields then affect sorting. Removing it solves
the issue

To test:
1 - Have an ES setup
2 - Catalog and index some records
3 - View a record in ES:
    curl 'localhost:9200/koha_kohadev_biblios/data/4?pretty=yes'
4 - Note there are 'null' entries in the indexes, save this result for
comparison
5 - Apply patch
6 - Reindex, amking sure to delete existing indexes
    perl misc/search_tools/rebuild_elastic_search.pl -d
7 - View the record again
8 - Note the null entries are removed
9 - Note indices are otherwise intact

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 20122: Explicitly set path to fix emptying cart functionality
Mark Tompsett [Fri, 6 Apr 2018 14:59:28 +0000 (14:59 +0000)]
Bug 20122: Explicitly set path to fix emptying cart functionality

This is caused by bib_list not being deleted.
The path was not explicitly set.
This patch adds path=/ explicitly to ensure it
does get deleted.

TEST PLAN
---------
1) search for 'the' in OPAC
2) add several items to cart.
3) look at your cart.
4) empty and close the cart, select all->remove
   -- either way window closes and it looks empty.
5) refresh the page
   -- cart comes back.
   -- in chromium inspecting the page, specifically
      the "Application" area, bib_list is shown as
      a cookie still.
6) apply patch
7) restart_all and empty cache forcing JS reload
8) repeat steps 1-5
   -- this time cart stays empty.
   -- and the bib_list cookie is gone

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> using firefox 59.0.2
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20325: Remove warning, it is no longer true
Kyle M Hall [Thu, 5 Apr 2018 10:12:44 +0000 (06:12 -0400)]
Bug 20325: Remove warning, it is no longer true

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20325: Do not remove accountlines between tests
Jonathan Druart [Wed, 4 Apr 2018 18:36:46 +0000 (15:36 -0300)]
Bug 20325: Do not remove accountlines between tests

This is part of the tests, to make sure they have not been deleted

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
t/db_dependent/Accounts.t

4 years agoBug 20325: Move tests to a subtest
Jonathan Druart [Wed, 4 Apr 2018 18:19:54 +0000 (15:19 -0300)]
Bug 20325: Move tests to a subtest

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
t/db_dependent/Accounts.t