]> git.koha-community.org Git - koha.git/log
koha.git
7 years agoBug 15711: Fixing the 'Delete selected' button on patroncard images
Aleisha Amohia [Wed, 24 Aug 2016 01:08:11 +0000 (01:08 +0000)]
Bug 15711: Fixing the 'Delete selected' button on patroncard images

To test:
1) Go to Tools -> Patron Card Creator -> Manage images
2) Upload an image if you haven't already
3) Click Delete selected without selecting any images
4) Notice broken behaviour as described in Description
5) Apply patch, refresh page
6) Click Delete selected without selecting any images
7) Notice alert. Click OK
8) Select one image or more, click Delete selected
9) Notice confirm delete message.

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bd3879e037727cdc2cc851aa910c68bd257ee6f4)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17785: Fix OAI-PMH's XSLT-generated URLs under Plack
Marcel de Rooy [Tue, 20 Dec 2016 15:11:36 +0000 (16:11 +0100)]
Bug 17785: Fix OAI-PMH's XSLT-generated URLs under Plack

Look at e.g. the URL for Show More at the end of the output of Records or
Identifiers. If you use Plack, you will see that it refers to
yourserver:/opac/oai.pl, which is not correct.

This is caused by using CGI's self_url in combination with script alias,
mounting point, etc. Note that we cannot solve this problem in the code of
Koha only. Since HTTP::OAI modules also call self_url, we still end up
with some wrong url's.

Instead of a larger architectural operation on Apache and Plack config files,
this patch adjusts the final xslt transformation on the OAI response.
It hardcodes the correct path only once, in a xslt variable. And replaces
all oai:OAI-PMH/oai:request/text() calls, containing wrong URLs, by this
variable.

Test plan:
Run oai.pl. Try the various verbs.
Verify that the URLs point to /cgi-bin/koha/oai.pl.

Edit: changed commit subject

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. Good workaround until a definitive solution is implemented.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1b492938e4eee4d1babe26417cfbf69cede2b844)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17781 - Improper branchcode set during renewal
Kyle M Hall [Thu, 22 Dec 2016 14:00:37 +0000 (14:00 +0000)]
Bug 17781 - Improper branchcode set during renewal

For no discernable reason, when AddIssue calls AddRenewal, it passes the
branchcode generated from _GetCircControlBranch. Assume
_GetCircControlBranch is set to return items.homebranch. So:
1) If an item owned by LibraryA is checked out at LibraryB, the
  statistic line branchcode will be LibraryB
2) If an item is renewed via the ajax datatables renewal function, the
  statistic line branchcode will be LibraryB the
3) If an item is renewed via scanning the item into the checkout again,
  statistic line branchcode will be *LibraryA*

This is clearly improper behavior. The renewal is taking place at
LibraryB, so the branchcode passed to AddRenewal should be LibraryB,
the logged in library. This also jives with the documentation for
the subroutine.

Test Plan:
1) Set CircControl to "the library the item is from" aka ( ItemHomeLibrary )
2) Set HomeOrHoldingBranch to 'The library the items is from" ( aka homebranch )
3) Create item with homebranch of LibraryA and holdingbranch of LibraryB
4) Set the logged in library to LibraryB
4) Check the item out to a patron at LibraryB
5) Note the statistics line has a branchcode of LibraryB
6) Check the item out again to trigger a renewal, renew the item
7) Note the statistic line has a branchcode of LibraryA!
8) Apply this patch
9) Repeat step 6
10) Note the statistics line has a branchcode of LibraryB!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: David Kuhn <kuhn@monterey.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2c67648093b9e7479b1dd1135c80ada2d46aee7c)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17742: Use TestBuilder to create the library and patron category
Jonathan Druart [Wed, 28 Dec 2016 08:57:14 +0000 (09:57 +0100)]
Bug 17742: Use TestBuilder to create the library and patron category

Moreover we do not need to remove the existing issues and patrons

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 853d355576698d1643080ef37b797e937338a1f8)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17742: Fix t/db_dependent/Patrons.t
Josef Moravec [Tue, 6 Dec 2016 21:07:56 +0000 (21:07 +0000)]
Bug 17742: Fix t/db_dependent/Patrons.t

Moves the getting of testing date for updated_on just after the storing
the test patron data to make the gap between generating data and now
date as short as possible

Fixes test 7

Use Koha::Database instead of C4::Context->dbh

Test plan
1. prove t/db_dependent/Patrons.t
2. read the diff

NOTE: Only minor improvement could be using test builder to
      generate the category and branch codes, rather than assume
      data exists. However, that is beyond scope of this bug.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5c2618d653f6a8fe4b220f1ca986c8d6c58264e3)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17246: Do no support arrayref to define multiple FK
Jonathan Druart [Mon, 5 Sep 2016 08:54:35 +0000 (09:54 +0100)]
Bug 17246: Do no support arrayref to define multiple FK

Currently you can call GetPreparedLetter like:

$prepared_letter = GetPreparedLetter(
    (
        module      => 'test',
        letter_code => 'TEST_HOLD',
        tables      => {
            reserves => [ $fk1, $fk2 ],
        },
    )
);

It assumes that $fk1 is a borrowernumber and $fk2 a biblionumber.
It seems hazardous to do this guess.

I suggest to remove this feature and only allow hashref indeed.

Test plan:
Use different way to generate letters and make sure you do not reach the croak

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ea7bd9c4ada6eb6f03d37e43cce89d1431293761)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 14637: Followup - Fix number of tests due to rebase
Kyle M Hall [Fri, 23 Dec 2016 13:35:34 +0000 (13:35 +0000)]
Bug 14637: Followup - Fix number of tests due to rebase

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0747a11b2648a20fcca9d3f5e02a4b3b9270b3f3)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 14637: Fix add patron category under MySQL 5.7
Jonathan Druart [Tue, 6 Sep 2016 09:40:46 +0000 (10:40 +0100)]
Bug 14637: Fix add patron category under MySQL 5.7

If no dateofbirthrequired or upperagelimit is set on the interface, the
->store method will receive an empty string defined for these values.
For INT field, we must explicitely set these empty value to undef
instead to avoid MySQL 5.7 (and strict mode) to raise:
  DBD::mysql::st execute failed: Incorrect integer value: ' for column
'dateofbirthrequired''

Test plan:
Using MySQL 5.7 (and/or sql_mode=STRICT_TRANS_TABLES)
Create a patron category without specifying upperagelimit or
dateofbirthrequired

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a28334aeceba9ea8fcfcd301c4c01f473110bbe3)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 14637: Fix add patron category under MySQL 5.7 - tests
Jonathan Druart [Tue, 6 Sep 2016 09:40:28 +0000 (10:40 +0100)]
Bug 14637: Fix add patron category under MySQL 5.7 - tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5ea0b70dad5213292cb678f38a8b93e5118bdf4d)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 15415 [QA Followup] - Make code more readable
Kyle M Hall [Fri, 23 Dec 2016 11:31:00 +0000 (11:31 +0000)]
Bug 15415 [QA Followup] - Make code more readable

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8e68e41df448e9bde7baf69ebab2646d2138cca4)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 15415: Warn when creating a new print profile
Aleisha Amohia [Fri, 2 Dec 2016 03:04:07 +0000 (03:04 +0000)]
Bug 15415: Warn when creating a new print profile

As per Jonathan's comment in Comment 3, I've put that line of code in an
if statement that will only call the get_attr method if we are editing
an existing profile (therefore the profile id will exist).

To test:
1) Go to Tools -> Patron Card Creator -> New printer profile
2) Notice warn
3) Apply patch
4) Refresh page
5) Confirm warn is gone and page still works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 47e80e899aca7c79aaeb58350401a1963fbe709d)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 16933 - Update documentation/help file.
Dani Elder [Mon, 10 Oct 2016 13:51:43 +0000 (09:51 -0400)]
Bug 16933 - Update documentation/help file.

Updates help documentation about Alt+W to open renew tab.

To test: Go to circulation help page, open help file and see that new
line mentioning Alt+W.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f15eb9d5f534489585f2819ccbce43e6ddc95511)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 16933 - Alt-Y not working on "Please confirm checkout" dialogs
Tim McMahon [Thu, 8 Sep 2016 16:19:17 +0000 (12:19 -0400)]
Bug 16933 - Alt-Y not working on "Please confirm checkout" dialogs

This patch changes the keyboard shortcut for renew from Alt+y to Alt+w.

To test:
1) Press Alt+y when you get a "Please confirm checkout" dialog.
2) The renew tab is selected instead of confirming the dialog.
3) Apply the patch and refresh your browser to load the change.
4) Repeat step one.
5) Alt+y confirms the checkout, Alt+w selects the renew tab.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc676f4130b399b2f69878760e699c6d01fd262a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoAdd release notes for the 16.11.01 release v16.11.01
Koha instance kohadev-koha [Thu, 22 Dec 2016 22:16:31 +0000 (22:16 +0000)]
Add release notes for the 16.11.01 release

7 years agoBug 16914: Remove unused empty_lines.inc file
Tomas Cohen Arazi [Thu, 22 Dec 2016 15:46:06 +0000 (12:46 -0300)]
Bug 16914: Remove unused empty_lines.inc file

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>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0b915fbd9735d2585944253fc5230fdb7417fb80)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 16914: Rely on TT for newlines
Tomas Cohen Arazi [Thu, 22 Dec 2016 15:45:08 +0000 (12:45 -0300)]
Bug 16914: Rely on TT for newlines

The translation scripts have an historical tendency to chomp newlines
and we introduced an empty_line.inc file to force newlines when building
CSV output out of our templates (in item search and late orders).

This patch makes the mentioned templates use TT ability to force newlines
plus some misuses of the 'minus' sign.

Test plan:
- Apply the patch
- Do an item search that returns more than one result
- Export as CSV
=> SUCCESS: The CSV file is correctly formed.
- Install any translation:
  $ sudo koha-shell kohadev
 k$ cd kohaclone/misc/translator
 k$ perl translate install <chosen language>
- Enable <chosen language> (e.g. es-ES)
- Repeat the item search
- Export as CSV
=> SUCCESS: The CSV file is correctly formed in your chosen language.
- Have more than one late orders (bummer)
- Go to late orders
- Choose them
- Export as CSV (in english)
=> SUCCESS: The CSV file is correctly formed.
- Switch language
- Go to late orders
- Choose them
- Export as CSV (in english)
=> SUCCESS: The CSV file is correctly formed in your chosen language.
- Sign off :-D

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>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 152ce671eca4b5d74329b518d9d71106f4e60c84)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoIncrement version for 16.11.01 release
Katrin Fischer [Thu, 22 Dec 2016 19:41:31 +0000 (20:41 +0100)]
Increment version for 16.11.01 release

7 years agoTranslation updates for Koha 16.11.01
Bernardo Gonzalez Kriegel [Thu, 22 Dec 2016 09:38:05 +0000 (06:38 -0300)]
Translation updates for Koha 16.11.01

(cherry picked from commit 6115b6f486a8704586fa907bea7c3b57b0580ab3)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17743: Item search - Fix indexes build on MARC
Jonathan Druart [Thu, 15 Dec 2016 10:47:24 +0000 (10:47 +0000)]
Bug 17743: Item search - Fix indexes build on MARC

Searching items by custom search fields does not work because these
fields are not correctly processed in JS.

In case of custom search field, the parent of the option is not the
select but the optgroup element.

Test plan:
Create a custom search field on 245$c for instance
On the items search form, select this field and launch a search
=> Without this patch, the results will not be filtered and you will get
all your items
=> With this patch applied, the results should be correctly filtered

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c86a9e4d300fe746fe542e38a60148de6501f7a6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 16951: Replace some more
Jonathan Druart [Thu, 15 Dec 2016 12:50:42 +0000 (13:50 +0100)]
Bug 16951: Replace some more

In order to avoid warnings in the logs, $cgi->param should be forced to
scalar context

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e16ec2fcdb8bf67c507591386f94b9d024fec596)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 16951: Fix Item search sorting
Jonathan Druart [Thu, 15 Dec 2016 12:45:22 +0000 (13:45 +0100)]
Bug 16951: Fix Item search sorting

Caused by
  commit ac5a1bfececb5400a77f0ebad90181f5215d5a85
    Bug 16154: CGI->multi_param - Manual changes

The change was wrong, we wanted to retrieve a scalar (the string), not
an array.
We want to retrieve a string with the different column' names, not an
array of 1 element.

Test plan:
Launch an item search and play with column sort

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2184fa6ab1a7449857df15894c8de075aac729ec)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17692: Remove 'CGI::param called in list context' warnings
Jonathan Druart [Tue, 20 Dec 2016 14:29:49 +0000 (14:29 +0000)]
Bug 17692: Remove 'CGI::param called in list context' warnings

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 00591b2e091b5810b86aa47720501bdaa9695ccf)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17692 - Can't add library EAN under Plack
Kyle M Hall [Thu, 15 Dec 2016 11:10:38 +0000 (11:10 +0000)]
Bug 17692 - Can't add library EAN under Plack

When adding a library ean under plack, there is an "internal server
error" when running Plack. Tested with Koha 16.11 release.

Test Plan:
1) Apply this patch
2) Enable Plack
3) Add, Edit and Delete a Library EAN

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ffcac846ad125534c0008291d53f094cfde6cc4b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17761 - Renewing or returning item via the checkouts table causes lost and damage...
Kyle M Hall [Mon, 12 Dec 2016 11:59:30 +0000 (06:59 -0500)]
Bug 17761 - Renewing or returning item via the checkouts table causes lost and damaged statuses to disappear

Due to the fact that the lost and damaged status are contained within the due_due span,
when the item is renewed or returned these statuses disappear.
Some librarians find this disconcerting and it seems that it would be better to keep the visible.

Test Plan:
1) Find a lost item checked out to a patron
2) Renew that lost item via the checkouts table
3) Notice the lost status disappears from that row
4) Apply this patch
5) Refresh the page ( you may want to clear your browser cache as well )
6) Renew the item again
7) The lost status should remain visible!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Edie Discher <edischer@cityoffargo.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 97eb773c0a4054f0538c8966e207734f6f56bdd5)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17652: opac-account.pl does not include login branchcode
Chris Kirby [Mon, 28 Nov 2016 05:15:02 +0000 (00:15 -0500)]
Bug 17652: opac-account.pl does not include login branchcode

opac-account.pl does not include the login branchcode, whereas the other pages
available to users (opac-user, opac-memberentry, opac-passwd, opac-readingrecord,
opac-suggestions, opac-messaging, opac-shelves, etc.) on login DO provide
the login branchcode. Having the login branchcode available on opac-account.pl
would facilitate customization of the OPAC for individual branches.

To test:
1) Login to the OPAC and open  /cgi-bin/koha/opac-account.pl
2) Inspect the body tag and observe the class attribute does not include
   the login branchcode.
3) Apply the patch.
4) Repeat step 2.
5) Observe that the login branchcode is present.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1bfcebfb7fa0837428fb577a6fc059886fe37afb)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17681: Exiisting typos might thow some feees when recieved
Marcel de Rooy [Fri, 25 Nov 2016 12:22:42 +0000 (13:22 +0100)]
Bug 17681: Exiisting typos might thow some feees when recieved

Yes, we are fixing these four typos here.

Test plan:
[1] Read the changes.
[2] Run t/Auth_with_shibboleth.t
[3] Run git grep recieved| grep -v -e 'recievedlist' | grep -v -e 'serials-recieve.tt'

Note: serials-recieve.tt is just history. Bonus points for the one who makes
us get rid of that column recievedlist.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
EDIT:
Rebased. Change in Accounts has been corrected already.
Removed the po file.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b5c1a965b165093fb66a5db356da84b4a62bf9a6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17547: (MARC21|NORMARC) have Chronological term field $9 indexed
Tomas Cohen Arazi [Fri, 2 Dec 2016 20:16:10 +0000 (17:16 -0300)]
Bug 17547: (MARC21|NORMARC) have Chronological term field $9 indexed

This patch makes Zebra index the 648$9 link for chronological terms on
bibliographic records. This way an authority search on chronological terms
will show the right number in 'Used in X records' message.

To test:
- Have a record with a 648 field, linked to an authority record (i.e. with an authid on 648$9).
- Search for the record, notice it is indexed.
- Perform an authority search for the chronological term
=> FAIL: the term is linked to our record, but koha shows '0' count.
- Apply the patch
- Run:
  $ cd kohaclone
  $ xsltproc etc/zebra/xsl/koha-indexdefs-to-zebra.xsl \
       etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml \
     > etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
  $ git diff
=> SUCCESS: Notice the shipped etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
   is up-to-date
- Run:
  $ sudo cp etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
            /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
  $ sudo koha-restart-zebra kohadev
  $ sudo koha-rebuild-zebra -f -b -v kohadev
- Search for the record, notice it is indexed.
- Perform an authority search for the chronological term
=> SUCCESS: the term is linked to our record, usage count is 1
- Sign off :-D

I assume NORMARC is similar on this regard. Feel free to fail it if the NORMARC part of the
patch is wrong.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cb3f899826966b5da1242292091aa71ab4831618)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17759: Remove invalid guarantorid's in Members.t
Marcel de Rooy [Mon, 12 Dec 2016 12:48:40 +0000 (13:48 +0100)]
Bug 17759: Remove invalid guarantorid's in Members.t

See also bug 17733. As long as we have no FK, these invalid guarantorid's
can make tests fail.
Adding a sql statement to clear them in the beginning of the test.

Test plan:
[1] Since it seems that AUTO_INC+8, +9 and +10 may fail one or two tests,
    we should manipulate one or two borrowers:
    Run this SQL query first:
SELECT `AUTO_INCREMENT` FROM  INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '[your database]' and table_name='borrowers';
    Now run: UPDATE borrowers SET guarantorid=[former value + 8] WHERE borrowernumber=[some existing borrowernumber]
[2] Without this patch, run Members.t. Should fail two tests.
[3] Apply the patch. Fetch the new AUTO_INCREMENT value and update
    guarantorid accordingly again for the manipulated borrower.
[4] Run the test. It should not fail.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 82d75e124e416aef13f11d43837438799bd850dd)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17749 - Missing l in '.pl' in link on waitingreserves.tt
Nick Clemens [Thu, 8 Dec 2016 19:41:33 +0000 (19:41 +0000)]
Bug 17749 - Missing l in '.pl' in link on waitingreserves.tt

Fixes a small typo introduced by Bug 17010

waitingreserves.p#[% tab %]

should be

waitingreserves.pl#[% tab %]

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a1592ec10be56569b64774a3dde1e85c53ba36d9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17733: Fix Members.t
Jonathan Druart [Tue, 6 Dec 2016 16:09:21 +0000 (17:09 +0100)]
Bug 17733: Fix Members.t

In some dirty DB (Jenkins), the borrowers.guarantorid field is not set
to a valid patron id.
That make some tests fail if we create a patron with that patron id.

In my DB, auto increment for borrowers is set to 52 before the tests
On the 4th run of the tests, some tests fail.
Before I got a patron with a guarantorid=112 (I let you do the math).

Test plan:
The easiest is to trust me

Todo: Add a FK!
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Opened a new report for special case: Bug 17759.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 62074e39f0bbce1665f2b329beecc61fc55c994e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17666: [QA Follow-up] Mark File::Slurp as required
Marcel de Rooy [Thu, 15 Dec 2016 07:43:05 +0000 (08:43 +0100)]
Bug 17666: [QA Follow-up] Mark File::Slurp as required

Not optional since we are 'using' it in updatedatabase.pl.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6b67f635b14b6ce1337785f65ef1dfaa4a36258e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17666: Revert "Bug 16685 [QA Followup] - Use Path::Tiny::slurp instead of File...
Jonathan Druart [Mon, 12 Dec 2016 21:44:59 +0000 (21:44 +0000)]
Bug 17666: Revert "Bug 16685 [QA Followup] - Use Path::Tiny::slurp instead of File::Slurp"

This reverts commit 7ac1bc35372990520a7c67870b2c702c41bbebcc.

On a kohadevbox:
Error flock (1) on
'/home/vagrant/kohaclone/installer/data/mysql/atomicupdate/bug_xxxx.perl':
No locks available at installer/data/mysql/updatedatabase.pl line 13637.

This is because Path::Tiny->slurp[_utf8] uses flocks which does not work
with NFS

Test plan:
Execute a .perl atomic update file on a kohadevbox
=> Without this patch you should get the flock error
=> With this patch the update should work fine

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c9e95aa22e56536654305ab32ab1b15a27e89557)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 11274 Sent Notices Tab Not Working Correctly
Owen Leonard [Mon, 21 Nov 2016 13:26:13 +0000 (08:26 -0500)]
Bug 11274 Sent Notices Tab Not Working Correctly

This patch implements the notices toggle event using a different method.
Using on() lets us bind the event to a parent element, allowing the
event to attach to elements which may not exist on the page yet.

Test plan the same as original patch:

1) have a patron with more then 20 notices sent
2) go to patron profile -> notices
-> without patch, the showing/hidding of notices content does work
correctly only on first loaded page
-> with patch, it should work correctly everywhere - try to use
paginator, searching, ordering....

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6163337cd8caab98db993e4d51ac73abbdd83b86)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17744: Remove the oai_dc:dcCollection wrapper in OAI responses
Julian Maurice [Thu, 8 Dec 2016 09:13:35 +0000 (10:13 +0100)]
Bug 17744: Remove the oai_dc:dcCollection wrapper in OAI responses

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3e9dc5d51c5a14fcefe8611c532fe970e930b72a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17722: Make PatronLists.t run inside a transaction
Tomas Cohen Arazi [Mon, 5 Dec 2016 14:19:12 +0000 (11:19 -0300)]
Bug 17722: Make PatronLists.t run inside a transaction

This patch makes t/db_dependent/PatronLists.t run inside a transaction.
It also makes it generate its own data using t::lib::TestBuilder instead
of relying on sample patrons on the DB.

To test:
- Run:
  $ prove t/db_dependent/PatronLists.t
=> SUCCESS: Tests pass
- Apply the patch
- Run:
  $ prove t/db_dependent/PatronLists.t
=> SUCCESS: Tests pass
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 427ba8b0c7f7a976e3c90a4f811836532e0f3875)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 14541 (QA followup) Add warning to gist system preference
Nick Clemens [Thu, 8 Dec 2016 17:19:03 +0000 (17:19 +0000)]
Bug 14541 (QA followup) Add warning to gist system preference

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 36c608ab846c97aa76ea2fd721c7ce09f2c638ed)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 14541: Do not truncate tax rate values
Jonathan Druart [Wed, 9 Nov 2016 09:13:27 +0000 (09:13 +0000)]
Bug 14541: Do not truncate tax rate values

Tax rates are stored in decimal(6,4) fields which means that 4 decimals
are allowed.
If a tax rate is 8.42%, it is stored as 0.0842
If a tax rate has more precision than that, Koha won't deal correctly
with it. We will need to update the DB structure.

With this patch, the tax rate will be displayed with the same precision
as in the DB. So if you enter 8.42, you will see 8.42% instead of 8.4%
without this patch.

Test plan:
Do a full acquisition workflow with a tax rate like 8.42% and confirm
that it is correctly displayed.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cb3d6625e87fbc861c11e181cea36f9f9cd329cc)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17668: Fix typo in parcel.pl - listinct vs listincgst
Jonathan Druart [Tue, 22 Nov 2016 15:28:04 +0000 (15:28 +0000)]
Bug 17668: Fix typo in parcel.pl - listinct vs listincgst

This typo has been introduced by
  commit eed14b080db8691f371b4c19f1a190b87fcc396a
    Bug 13001: Refactor VAT and price calculation - parcel page
So before the tax rewrite (13321, 13323).
It sounded weird to me that testers did not catch the bug on this page.

To understand the logic:
Conditions are listincgst, invoiceincgst
Conditions | Before this patch |  If we fix the typo  | After this patch
 0     0   |    excluded       |    excluded          |   excluded
 0     1   |    included       |    included          |   included
 1     0   |    excluded       |    excluded          |   excluded
 1     1   |    included       |    included          |   included

Test plan:
Create 4 vendors with the difference combinations
Create a basket, add an order (with a tax) and receive it
Confirm that the different values displayed on the parcel page are correct

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3e112f3837346b500ce863a248920d3207e27131)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 15822: Fix 500 error when searching if items.onloan=0000-00-00
Jonathan Druart [Wed, 23 Nov 2016 10:06:04 +0000 (10:06 +0000)]
Bug 15822: Fix 500 error when searching if items.onloan=0000-00-00

The calls
  output_pref({ dt => dt_from_string( $date ) })
are wrong and should be replaced with
  output_pref({ str => $date })
For better error handling.

Here we fix the problem of items.onloan when searching

Test plan:
- Set items.onloan=0000-00-00 (UPDATE items SET onloan='0000-00-00')
This can come from old data or bad migration
- Execute a search
=> Without this patch you get
Can't locate object method "ymd" via package "dateonly" (perhaps you forgot to load "dateonly"?) at /home/vagrant/kohaclone/Koha/DateUtils.pm line 225.
=> With this patch you won't get the error

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 167c74bfd386287783e101989b804077b1020369)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 16376 - Koha::Calendar->is_holiday date truncation creates fatal errors for TZ...
David Cook [Mon, 23 May 2016 01:57:04 +0000 (11:57 +1000)]
Bug 16376 - Koha::Calendar->is_holiday date truncation creates fatal errors for TZ America/Santiago

Using a DateTime object with a timezone of America/Santiago
was causing fatal errors for Koha::Calendar->is_holiday
and Koha::Calendar->exception_holidays, when the objects
were truncated to an invalid local time.

Using a floating zone allows us to use the same day, month, year
for comparison purposes without running into the possibility of
creating an invalid local time and thus a fatal software error.

Edit:

While the changes to is_holiday and single_holiday make sense (Jonathan agrees too)
I didn't manage to have them fail, because truncate is not failing in my trials, but
days_between. So to me, it narrows down to have exception_holiday return floating tz
datetime objects so it doesn't break days_between.

Anyway, it is ok to push this patch, and the regression test I provide covers this scenario
I'm describing.

To test:
- Apply the regression tests patch
- Run:
  $ prove t/db_dependent/Holidays.t
=> FAIL: Unexpected error due to bad timezone/date combination
- Apply this patch
- Run:
  $ prove t/db_dependent/Holidays.t
=> SUCCESS: Tests pass

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 32354d8322afd05704d87cb38d9bc032ce8c4ec1)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 16376: (regression tests)
Tomas Cohen Arazi [Tue, 6 Dec 2016 14:29:08 +0000 (11:29 -0300)]
Bug 16376: (regression tests)

This patch introduces a regression test for exception_holidays. This routine
returns a list of datetimes to be used in date comparison and some datetimes don't exist
in some timezones, so floating timezones should be used instead.

To test:
- Apply the patch on master
- Run:
  $ prove t/db_dependent/Holidays.t
=> FAIL: The new test fails

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c6a0848ff0b7acbec4d7bf817447d7cc84c0615e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17716: (followup) Remove dep on existing data and tidy
Tomas Cohen Arazi [Fri, 2 Dec 2016 18:32:13 +0000 (15:32 -0300)]
Bug 17716: (followup) Remove dep on existing data and tidy

This patch removes the requirement for this tests for the DB to include
at least 10 borrowers to pass. Borrowers are now created on each run
using t::lib::TestBuilder and a loop.

Bonus: some tiny changes to tidy the file.

To test:
- Run:
  $ prove t/db_dependent/CourseReserves.t
SUCCESS => Tests pass with and without the patch.
- Sign off :-D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17716: Remove itemtype-related t/db_dependent/CourseReserves.t
Tomas Cohen Arazi [Fri, 2 Dec 2016 18:21:58 +0000 (15:21 -0300)]
Bug 17716: Remove itemtype-related t/db_dependent/CourseReserves.t

This patch makes t/db_dependent/CourseReserves.t create
good sample data for its tests. It does so by creating a random
itemtype.

To test:
- Run
  $ prove t/db_dependent/CourseReserves.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
  set for item"
- Apply the patch
- Run:
  $ prove t/db_dependent/CourseReserves.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17715: Remove itemtype-related t/db_dependent/Holds/RevertWaitingStatus.t warnings
Tomas Cohen Arazi [Fri, 2 Dec 2016 17:32:30 +0000 (14:32 -0300)]
Bug 17715: Remove itemtype-related t/db_dependent/Holds/RevertWaitingStatus.t warnings

This patch makes t/db_dependent/Holds/RevertWaitingStatus.t create
good sample data for its tests. It does so by creating a random
itemtype.

To test:
- Run
  $ prove t/db_dependent/Holds/RevertWaitingStatus.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
  $ prove t/db_dependent/Holds/RevertWaitingStatus.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17714: Remove itemtype-related t/db_dependent/Members/* warnings
Tomas Cohen Arazi [Fri, 2 Dec 2016 17:19:22 +0000 (14:19 -0300)]
Bug 17714: Remove itemtype-related t/db_dependent/Members/* warnings

This patch makes t/db_dependent/Members/* create
good sample data for its tests. It does so by creating a random
itemtype.

To test:
- Run
  $ prove t/db_dependent/Members/*
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
  $ prove t/db_dependent/Members/*
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17713: Fix Members.t tests
Jonathan Druart [Fri, 2 Dec 2016 15:10:51 +0000 (15:10 +0000)]
Bug 17713: Fix Members.t tests

If the category_type is 'S', GetBorrowersToExpunge won't return the
patron.

Test plan:
  t/db_dependent/Members.t
should always return green

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17720: CSRF - Handle unicode characters
Jonathan Druart [Mon, 5 Dec 2016 08:17:21 +0000 (08:17 +0000)]
Bug 17720: CSRF - Handle unicode characters

From the pod of Digest::MD5:
"""
Since the MD5 algorithm is only defined for strings of bytes, it can not
be used on strings that contains chars with ordinal number above 255
(Unicode strings). The MD5 functions and methods will croak if you try
to feed them such input data.
What you can do is calculate the MD5 checksum of the UTF-8
representation of such strings.
"""

Test plan:
- Set a MySQL/MariaDB password with unicode characters:
  UPDATE user SET password=PASSWORD('❤') WHERE USER='koha_kohadev';
  FLUSH PRIVILEGES
- Update your $KOHA_CONF file
- Restart Memcached
- Hit the files modified by this patch

=> Without this patch, you will get a software error (with "Wide
character in subroutine entry" in the logs).
=> With this patch, everything will go fine

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: removed debugging leftover

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17696: Add 2 missing periods in opac-suggestions.tt
phette23 [Tue, 29 Nov 2016 20:16:23 +0000 (12:16 -0800)]
Bug 17696: Add 2 missing periods in opac-suggestions.tt

Problem:

- two missing trailing periods in template

Test plan:

- configure MaxOpenSuggestions with a low limit (e.g. 1)
- visit opac-suggestions.pl?op=add, login if necessary
- note that the period is missing from the second sentence of the leading paragraph under the "Enter a new purchase suggestion" heading
- continue to submit suggestions until you've reached the MaxOpenSuggestions limit
- observe the missing period in the "TooManySuggestionsText" paragraph
- apply patch
- revisit opac-suggestions.pl?op=add
- note that the period is now present in the second sentence of the leading paragraph under the "Enter a new purchase suggestion" heading
- note that the period is also present at the end of the "TooManySuggestionsText" paragraph

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17709 - Article request broken - 'internal server error'
Kyle M Hall [Thu, 1 Dec 2016 20:11:41 +0000 (20:11 +0000)]
Bug 17709 - Article request broken - 'internal server error'

Article requsts from OPAC and from intranet are showing an 'internal
server error'. I am testing in 16.11 with Plack.

Test Plan:
1) Set circ rule to record only article requests
2) Attempt to place a request on a record with no items
3) Note the error
4) Apply this patch
5) You should now be able to place the request!

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17670: Grammar mistakes - effect vs affect
Aleisha Amohia [Wed, 23 Nov 2016 01:25:23 +0000 (01:25 +0000)]
Bug 17670: Grammar mistakes - effect vs affect

In two places:

1. Administration -> Preferences -> Circulation ->
   AllowMultipleIssuesOnABiblio: says effect, should say affect
2. Reports -> Lost Items -> Help (top-right corner): says effect, should
   say affect

To test, navigate to these two places and confirm charges have been made
and are correct.

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17577: Improve sample notices for article requests
Katrin Fischer [Mon, 7 Nov 2016 22:16:06 +0000 (23:16 +0100)]
Bug 17577: Improve sample notices for article requests

- Adds "Dear..."
- Fixes capitalization
- Removes 'E-mail' from the description as you could also have
  a print template

To test:
- Make sure the SQL has no errors
- Install the letters and proof read them

If you agree - sign off!

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17395 - exporting checkouts in CVS generates a file with wrong extension
Fridolin Somers [Tue, 4 Oct 2016 10:52:46 +0000 (12:52 +0200)]
Bug 17395 - exporting checkouts in CVS generates a file with wrong extension

In checkouts table, the is an export form (when some exports syspref are enabled).
Export using a CSV profile will create a file with name koha.mrc (same as ISO2709 export).
It would be better with koha.csv.

Bug 14647 manages the export page, this but will only manage for export from checkouts table where file name is hard-coded.

Test plan :
- Enable checkouts exports by setting syspref ExportWithCsvProfile with a profile for record export
- Go to circ page of a patron with checkouts : /cgi-bin/koha/circ/circulation.pl?borrowernumber=xxx
- Show checkouts table
- Select some checkboxes in "Export" column
- Select "CSV" in export format combo-box
- Click on "Export"
=> Without patch, the generated file is koha.mrc
=> With patch, the generated file is koha.csv
- Check ISO2709 export generates a file named koha.mrc

Signed-off-by: Dani Elder <dani@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 16873: Improve renewal error messages on self check
Jonathan Druart [Fri, 19 Aug 2016 11:01:32 +0000 (12:01 +0100)]
Bug 16873: Improve renewal error messages on self check

When a patron is not allowed to renew from the self check module, the
only message displayed is "No renewals allowed".
It would be nicer to let him/her know that the renewal is not allowed
because it's a on-site checkout or automatic renewal.

To do so we can call CanBookBeRenewed instead of CanBookBeIssued and get
the renewal error.

Test plan:
0/ Switch off AllowSelfCheckReturns
1/ check out an item and tick "auto renewal"
2/ Go on the self check module
=> auto renewal message is displayed
3/ check out an item and tick "on-site checkout"
4/ Go on the self check module
=> on-site checkout message is displayed
5/ check out an item without ticking any checkboxes (regular checkout)
Renew it to reach the max renew allowed
6/ Go on the self check module
=> regular checkout message is displayed
7/ Switch on AllowSelfCheckReturns and repeat previous steps
=> "Return this item" button is displayed in addition of the renewal
error message

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 14699: Reword "Select all/Clear all" and change their behaviour
Julian Maurice [Thu, 13 Oct 2016 09:05:00 +0000 (11:05 +0200)]
Bug 14699: Reword "Select all/Clear all" and change their behaviour

"Select all" -> "Select all visible rows"
"Clear all" -> "Clear selection on visible rows"

+ fix the bug where the Delete link was visually enabled only if you
checked a box in the first page (now every checkbox enable the link)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 14699: Show number of selected searches in search history
Julian Maurice [Tue, 8 Sep 2015 06:49:44 +0000 (08:49 +0200)]
Bug 14699: Show number of selected searches in search history

With the number displayed, it should remove the ambiguity about what
"Select all" and "Clear all" do.
The number is repeated in the "Delete" confirmation dialog.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 14699: Fix intranet search history issues due to pagination
Julian Maurice [Thu, 20 Aug 2015 13:38:59 +0000 (15:38 +0200)]
Bug 14699: Fix intranet search history issues due to pagination

DataTables removes hidden rows from the DOM. Because of that, "Select
all", "Clear all" and the form submission don't work correctly
(basically they act only on the currently displayed page).

This patch fixes just that.

Test plan:
1/ Go to your search history page
2/ Make you sure you have at least 21 entries in your search history. If
not, do some searches and come back here.
3/ Click "Select all" and change page. The checkboxes on the new page
should be checked.
4/ Check some checkboxes on this new page and click "Clear all". Go back
to the previous page, checkboxes shouldn't be checked.
5/ Check some checkboxes on at least 2 different pages and click
"Delete". All selected search history entries should be deleted.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17676: Update default COLLATE of marc_subfield_structure
Jonathan Druart [Thu, 24 Nov 2016 13:37:52 +0000 (13:37 +0000)]
Bug 17676: Update default COLLATE of marc_subfield_structure

(This issue has been raised on bug 17216 comments 93-103)
On bug 11944 (3.19.00.006) we updated the default COLLATE for all our tables to
utf8_unicode_ci but not the marc_subfield_structure table.
Indeed we want to keep tagsubfield a utf8_bin (to allow lowercase and uppercase
of the same letter for subfields).
We should have set the default collate to utf8_unicode_ci for further changes.

This patch updates the DB entry 3.19.00.006 to set the default COLLATE to this
table (for people upgrading from prior to 3.19.00.006) and set this
default COLLATE on 16.06.00.033 (for people upgrading from after 3.19.00.006).

The error is:
DBD::mysql::db do failed: Can't create table `koha_kohadev`.`#sql-306_9f9` (errno: 150 "Foreign key constraint is incorrectly formed") [for Statement "
            ALTER TABLE marc_subfield_structure
            MODIFY COLUMN authorised_value VARCHAR(32) DEFAULT NULL,
            ADD CONSTRAINT marc_subfield_structure_ibfk_1 FOREIGN KEY (authorised_value) REFERENCES authorised_value_categories (category_name) ON UPDATE CASCADE ON DELETE SET NULL;
            "] at installer/data/mysql/updatedatabase.pl line 13175.
Upgrade to 16.06.00.033 done (Bug 17216 - Add a new table to store authorized value categories)

Test plan:
1/ git checkout v3.18.00
2/ Do an install
3/ git checkout master;
4/ perl installer/data/mysql/updatedatabase.pl
=> Without this patch, you get the error
=> With this patch applied you will not get it and the default COLLATE for
marc_subfield_structure will be correctly set. Make sure tagsubfield is
still utf8_bin

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Will put some notes on the Bugzilla report.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17344 - Followup to fix selectors
Nick Clemens [Tue, 22 Nov 2016 11:28:51 +0000 (11:28 +0000)]
Bug 17344 - Followup to fix selectors

Add '#' selector to several tags
Fix some spacing
Remove duplicated line

To highlight that all is working set PatronQuickAddFields as below for testing:
streetnumber|address|address2|city|state|zipcode|country|branchcode

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17344 - Can't set guarantor in quick add brief form
Nick Clemens [Mon, 21 Nov 2016 11:47:00 +0000 (11:47 +0000)]
Bug 17344 - Can't set guarantor in quick add brief form

This patch updates the guarantor form to work with the quick add form

To test:
1 - Quick add a 'Kid' patron (or other patron type that may have
    guarantor)
2 - Verify form appears as expected
3 - Test that you can add a patron manually or using selector
4 - Test that deletion works as expected
5 - Test 3 and 4 from the full version of the form
6 - Save or cancel and add a new patron using the full form only
7 - Verify that adding/deleting guarantor works with no errors
8 - Sign off

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17292 Follow-up, fix typos
Frédéric Demians [Sat, 22 Oct 2016 10:41:21 +0000 (12:41 +0200)]
Bug 17292 Follow-up, fix typos

- wrong assignation
- reference to 'serials' table rather than 'serial'

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoDBRev 16.11.00.000 v16.11.00
Kyle M Hall [Tue, 22 Nov 2016 12:14:00 +0000 (12:14 +0000)]
DBRev 16.11.00.000

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoMerge remote-tracking branch 'translations/16.11.0-translate' into HEAD
Kyle M Hall [Tue, 22 Nov 2016 17:45:56 +0000 (17:45 +0000)]
Merge remote-tracking branch 'translations/16.11.0-translate' into HEAD

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoAdd release notes for the 16.11.00 release
Kyle M Hall [Tue, 22 Nov 2016 11:58:05 +0000 (11:58 +0000)]
Add release notes for the 16.11.00 release

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 8835 - DBRev 16.06.00.050
Kyle M Hall [Tue, 22 Nov 2016 13:49:59 +0000 (13:49 +0000)]
Bug 8835 - DBRev 16.06.00.050

7 years agoBug 8835: New db rev for issn_idx
Marcel de Rooy [Thu, 13 Oct 2016 08:49:17 +0000 (10:49 +0200)]
Bug 8835: New db rev for issn_idx

This db rev reapplies dbrev 3.15.00.049 in case that one failed due to
existence of issn_idx.

Test plan:
If you do not have index issn_idx, recreate it:
    ALTER TABLE biblioitems ADD INDEX issn_idx (issn (255))
Run this db rev. You should see: Removed issn_idx.
Rerun the dbrev. You should see: Everything is fine.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
7 years agoBug 8835: Drop issn_idx for completeness
Marcel de Rooy [Wed, 12 Oct 2016 13:29:01 +0000 (15:29 +0200)]
Bug 8835: Drop issn_idx for completeness

When dbrev 3.15.00.049 failed, the still existing issn_idx must have
been the cause.
This patch only adjusts the old db rev.
Still thinking if we also need a new db rev to fix isbn and issn for
those installs where 3.15.00.049 failed too. (In that case the fields
may not have been changed to mediumtext and no indexes were added.)

Test plan:
Ideally, run an upgrade from something older than 3.15.00.49.
But running the added sql command from the command line might convince
you too.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
7 years agoBug 17278: Fix test compilation errors
Jonathan Druart [Tue, 22 Nov 2016 07:33:50 +0000 (07:33 +0000)]
Bug 17278: Fix test compilation errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17278: Fix "show all items" link
Jonathan Druart [Mon, 3 Oct 2016 11:27:21 +0000 (12:27 +0100)]
Bug 17278: Fix "show all items" link

Then we need to remove the "available" part from the query.
They are really awkward patches...

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17278: Use available limit when requesting zebra when ccl query is used
Jonathan Druart [Mon, 3 Oct 2016 09:45:13 +0000 (10:45 +0100)]
Bug 17278: Use available limit when requesting zebra when ccl query is used

When a ccl query is used, the buildQuery subroutine does not handle
the available limit (not an index).
This available limit is handle later in the subroutine.
This affect the author links on the detail page for instance (an=xx).
A much better solution would be to keep an 'available' zebra index up-to-date.

Test plan:
(OPAC or staff interface, it does not matter)
- Launch a search, click on a result and then on an author link to
  launch another query (an:xx)
- Limit to available items without the 'facet'
=> Without this patch you won't get any results
=> With this patch applied you should get relevant result (regarding the
known bugs 16970, 13715, 13658, 5463, etc.)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17609: Small typo in about.tt
Hector Castro [Wed, 16 Nov 2016 16:05:09 +0000 (10:05 -0600)]
Bug 17609: Small typo in about.tt

Small typo whould => should
To avoid any misunderstanding you should not export the memcached config
from ENV in line 79

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17609: Tiny typo in ElasticSearch mappings (mappings.tt)
Hector Castro [Thu, 10 Nov 2016 17:26:45 +0000 (11:26 -0600)]
Bug 17609: Tiny typo in ElasticSearch mappings (mappings.tt)

Typo found when translating in:

intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt:74

An error occurred when updateing mappings => updateing

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17391 - DBRev 16.06.00.049
Kyle M Hall [Tue, 22 Nov 2016 11:38:26 +0000 (11:38 +0000)]
Bug 17391 - DBRev 16.06.00.049

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17391 (QA Followup) use INSERT INGORE in atomicupdate
Nick Clemens [Tue, 22 Nov 2016 11:05:19 +0000 (11:05 +0000)]
Bug 17391 (QA Followup) use INSERT INGORE in atomicupdate

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17391: Fix number of values in sysprefs.sql
Jonathan Druart [Thu, 17 Nov 2016 09:01:19 +0000 (09:01 +0000)]
Bug 17391: Fix number of values in sysprefs.sql

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17391: Add atomic update file
Jonathan Druart [Thu, 17 Nov 2016 08:58:55 +0000 (08:58 +0000)]
Bug 17391: Add atomic update file

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17391: Add missing prefs to sysprefs.sql
Katrin Fischer [Sun, 16 Oct 2016 12:20:42 +0000 (14:20 +0200)]
Bug 17391: Add missing prefs to sysprefs.sql

Adds
- ReturnpathDefault
- ReplytoDefault
to the sysprefs.sql file.

To test:
- Run the web installer in any language
- Check all preferences are installed without error
- Check prefs listed above now exsit in your
  systempreferences table

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17616: (follow-up)Select tag on elasticsearch mappings page is not closed properly
Hector Castro [Mon, 14 Nov 2016 21:20:22 +0000 (15:20 -0600)]
Bug 17616: (follow-up)Select tag on elasticsearch mappings page is not closed properly

Also some close tag </selected> should be </select>
Follow previous patch to test

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17616: Select tag on elasticsearch mappings page is not closed properly
Josef Moravec [Fri, 11 Nov 2016 16:48:15 +0000 (16:48 +0000)]
Bug 17616: Select tag on elasticsearch mappings page is not closed properly

Test plan
1) Have SearchEngine syspref set to Elastic
2) Look at source on admin/searchengine/elasticsearch/mappings.pl
-> without patch you'll see select with attribute
   data-id="mapping_search_field_name" closing tag written badly as
   "/select>"
-> with patch everything looks OK

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17086: Reword borrowers to patrons in Swagger tags for holds
Lari Taskula [Tue, 9 Aug 2016 11:42:15 +0000 (14:42 +0300)]
Bug 17086: Reword borrowers to patrons in Swagger tags for holds

Routes for holds have tags called "borrowers". We should use "patrons" instead
in order not to have both (endpoints for patrons already add "patrons").

This patch changes the tags from borrowers to patrons in:
GET  /holds
POST /holds

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17626 (QA followup)
Nick Clemens [Tue, 22 Nov 2016 10:45:56 +0000 (10:45 +0000)]
Bug 17626 (QA followup)

    Fix SAX parser error pointing to INSTALL docs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17626: Remove existing install instructions and link to the wiki pages instead
Jonathan Druart [Tue, 15 Nov 2016 08:55:04 +0000 (08:55 +0000)]
Bug 17626: Remove existing install instructions and link to the wiki pages instead

Since we are pretty bad to maintain INSTALL files, I'd suggest to point
to the wiki.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17626: Remove INSTALL.distri files
Jonathan Druart [Tue, 15 Nov 2016 08:54:45 +0000 (08:54 +0000)]
Bug 17626: Remove INSTALL.distri files

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17132 - Availability search broken when using Elastic
Kyle M Hall [Mon, 15 Aug 2016 18:12:44 +0000 (18:12 +0000)]
Bug 17132 - Availability search broken when using Elastic

Elastic appears to be indexing onloan as a string, but our code assumes
it is a boolean.

Test Plan:
1) Ensure you are set up using Elastic as your search engine
2) Search only for available items from the advanced search
3) Note you get no results
4) Apply this patch
5) Re-run the search
6) You should now get results!

Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17663 - DBRev 16.06.00.048
Kyle M Hall [Mon, 21 Nov 2016 16:34:46 +0000 (16:34 +0000)]
Bug 17663 - DBRev 16.06.00.048

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17663: Forgotten userpermissions from bug 14686
Marcel de Rooy [Sun, 20 Nov 2016 15:35:53 +0000 (16:35 +0100)]
Bug 17663: Forgotten userpermissions from bug 14686

Bug 14686 added in a dbrev:
    (13, 'upload_general_files', 'Upload any file'),
    (13, 'upload_manage', 'Manage uploaded files');

But these were not added in userpermissions.sql somehow :)
So, what now?

This patch:
[1] adds them to userpermissions.sql as should have been done,
[2] adds a dbrev to add them for newer installs that did not run the
    14686 dbrev.

Test plan:
[1] Run this sql statement:
    DELETE FROM permissions WHERE code = 'upload_general_files' OR
        code = 'upload_manage'
[2] Run the db rev.
[3] Check if you see Tools/Upload (with sufficient perms).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17660: #adv is considered as an ad by adblock
Jonathan Druart [Fri, 18 Nov 2016 15:26:17 +0000 (15:26 +0000)]
Bug 17660: #adv is considered as an ad by adblock

So let's rename it!

Test plan:
Edit a $t in any framework, you should be able to unfold the "Advanced
constraints" part

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17419: Fix smsalertnumber and mobile confusion in moremember.pl
Lari Taskula [Mon, 10 Oct 2016 14:06:07 +0000 (17:06 +0300)]
Bug 17419: Fix smsalertnumber and mobile confusion in moremember.pl

members/moremember.pl will set mobile number as smsalertnumber in template if
smsalertnumber is not defined. This will cause incorrect display for SMS number
in patron's Details-tab. This confusion between smsalertnumber and mobile is
already fixed in Bug 14683, but members/moremember.pl was not fixed yet.

This is a minor issue since it won't occur for manually added new patrons due to
fixes already pushed in Bug 14683, but in case patron's smsalertnumber is null
in database, this bug can be replicated:

To test:
1. Set EnhancedMessagingPreferences to "Allow" and make sure SMSSendDriver
   has been set.
2. Add a new patron, give it a mobile/other phone number.
3. Run a SQL query:
   update koha.borrowers set smsalertnumber=NULL where borrowernumber=XXX;
   (replace XXX with your new patron's borrowernumber)
4. Go to patron's details tab and observe that SMS number shows the mobile/
   other phone you provided earlier.
5. Apply patch.
6. Refresh patron's details tab.
7. Observe that smsalertnumber is now empty, as it should be.

Followed test plan, works as expected.
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoTranslations update for 16.11.0
Bernardo Gonzalez Kriegel [Sun, 20 Nov 2016 20:34:19 +0000 (17:34 -0300)]
Translations update for 16.11.0

7 years agoBug 17543: Update German web installer sample files for 16.11
Katrin Fischer [Mon, 7 Nov 2016 22:03:33 +0000 (23:03 +0100)]
Bug 17543: Update German web installer sample files for 16.11

Updates sample files with German translations:
- Sample notices for article requests

To test:
- Make sure the German web installer installs all
  sample files correctly.
- Bonus: check German translations.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested german installer/translation
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch:
- Authorised value HSBND_FREQ
is done by bug 17576 (and correctly translated in German)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17642: [QA Follow-up] Issues_stats.pl is not plack safe
Marcel de Rooy [Fri, 18 Nov 2016 07:37:07 +0000 (08:37 +0100)]
Bug 17642: [QA Follow-up] Issues_stats.pl is not plack safe

Resolve:
Variable "$ccodes" is not available at reports/issues_stats.pl line 358.
Variable "$locations" is not available at reports/issues_stats.pl line 359.
Variable "$ccodes" is not available at reports/issues_stats.pl line 358.
Variable "$locations" is not available at reports/issues_stats.pl line 359.

Test plan:
Run the script. Choose Collection or Shelving Location.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17642: Do not explode if no authorised value exist
Jonathan Druart [Thu, 17 Nov 2016 11:23:57 +0000 (11:23 +0000)]
Bug 17642: Do not explode if no authorised value exist

Can't call method "lib" on an undefined value at
/home/vagrant/kohaclone/Koha/AuthorisedValues.pm line 137.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17642: Add and use get_descriptions_by_koha_field
Jonathan Druart [Wed, 16 Nov 2016 16:46:34 +0000 (17:46 +0100)]
Bug 17642: Add and use get_descriptions_by_koha_field

Ok I am silly, we needed to replace to use the cache mechanism for
search_by_koha_field, not find_by_koha_field...
Let's create another subroutine

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17642: use get_description_by_koha_field when needed
Jonathan Druart [Wed, 16 Nov 2016 16:29:07 +0000 (17:29 +0100)]
Bug 17642: use get_description_by_koha_field when needed

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17642: Add get_description_by_koha_field
Jonathan Druart [Wed, 16 Nov 2016 16:23:23 +0000 (17:23 +0100)]
Bug 17642: Add get_description_by_koha_field

Most of the time we just need the descriptions (lib or
opac_description), so let's add a new method for that and cache the
descriptions in L1.
Ideally we should cache it in L2 as well, but the AV code is not robust
enough to allow that

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17642: use find_by_koha_field when needed
Jonathan Druart [Wed, 16 Nov 2016 15:37:16 +0000 (16:37 +0100)]
Bug 17642: use find_by_koha_field when needed

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17642: Add find_by_koha_field
Jonathan Druart [Wed, 16 Nov 2016 15:08:59 +0000 (15:08 +0000)]
Bug 17642: Add find_by_koha_field

When we call search_by_koha_field with an authorised_value, we actually
expect only 1 value

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17642: Try to fix AV code
Jonathan Druart [Wed, 16 Nov 2016 10:49:03 +0000 (10:49 +0000)]
Bug 17642: Try to fix AV code

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17559: Fixed HTML element ID of B_streetnumber
Radek Šiman [Thu, 3 Nov 2016 13:45:43 +0000 (14:45 +0100)]
Bug 17559: Fixed HTML element ID of B_streetnumber

There is a duplicate ID in HTML code, because of this:
<input type="text" id="B_address" name="B_streetnumber" size="5"
value="" />
<input type="text" id="B_address" name="B_address" size="40" value="" />

Test plan:
1) Edit a patron and look into its HTML code
2) Find input: name="B_streetnumber"
3) Its ID is B_address - a duplicate within the code in fact
4) Apply the patch
5) Repeat steps 1 and 2
6) The ID is unique now: B_streetnumber

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17645 - Remove obsolete interface customization images
Owen Leonard [Wed, 16 Nov 2016 13:22:08 +0000 (08:22 -0500)]
Bug 17645 - Remove obsolete interface customization images

This patch removes three files which are obsolete following the removal
of the OPAC prog template.

To test, apply the patch and confirm that these files no longer exist in
misc/interface_customization:

- koha3-opac-button-background.png
- koha3-opac-button-background.psd
- koha3-opac-button-background.svg

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17601 - Regression: Incomplete CSS update introduced by Bug 14610
Kyle M Hall [Thu, 10 Nov 2016 10:47:25 +0000 (10:47 +0000)]
Bug 17601 - Regression: Incomplete CSS update introduced by Bug 14610

Bug 14610 revised staff-global.css so that the "holdcount" class was
renamed "number_box." That's good. It's good to have something more
generic since the class is used in multiple places.

The problem is that there are still several instances of the "holdcount"
class in the templates which should have been updated at the same time
to say "number_box." Those instances are now unstyled.

Test Plan:
1) Apply this patch
2) Check that the holds count on catalogue/detail.pl is styled
3) Check that the patron modifications count on members/member.pl is styled
4) Check that the pending comments count on tools/tools-home.pl is styled
5) Check that the pending tags count on tools/tools-home.pl is styled

Signed-off-by: Chris Kirby <christopherlawrencekirby@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>