koha.git
5 years agoBug 21585: Ignore missing firstname in ILL requests table
Magnus Enger [Tue, 16 Oct 2018 19:25:43 +0000]
Bug 21585: Ignore missing firstname in ILL requests table

To test:
- Make sure you have a patron with just a surname and no firstname
- Create an ILL request so that the name of this patron shows up in
  the Patron column of the ILL requests table
- Before the patch, the name will display as "null Surname"
- Apply the patch
- Reload the ILL requests page
- The name should now display as just "Surname"
- Sign ye merrily off

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ea877f6cba299373e0ebb9c59f8797baba98bec)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21717: Fix generation of real's values
Jonathan Druart [Mon, 29 Oct 2018 21:16:19 +0000]
Bug 21717: Fix generation of real's values

With strict SQL modes we now have TestBuilder tests that fail randomly with:
  Out of range value for column 'tax_rate_on_receiving'
  Out of range value for column 'discount'

We are trying to insert a value that is too high for the type defined at DB level.

It happens for discount when a value > 100 is generated. The datatype is float(6,4).
From the MySQL Doc:
"""
MySQL permits a nonstandard syntax: FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D).
Here, (M,D) means than values can be stored with up to M digits in total, of which D digits may be after the decimal point.
"""

So float(6,4) does not allow 100.

To recreate easily the issue:
  use t::lib::TestBuilder;
  my $builder = t::lib::TestBuilder->new;
  $builder->build( { source => 'Aqorder', value => { discount => 100 } } )->{discount};

To make sure this patch fixes the issue you can use this script:
  use Modern::Perl;
  use t::lib::TestBuilder;
  my $builder = t::lib::TestBuilder->new;
  my ( $real, $i ) = ( 0, 0 );
  while ( $real < 100 ) {
      $real = $builder->_gen_real( { info => { size => [ 6, 4 ] } } );
      warn $i++;
  }
  warn "$i - $real";

Test plan:
0/ Does not apply this patch
1/ Run the snippet above
2/ Confirm that it fails quite quickly (constantly before 500 for me)
3/ Apply this patch
4/ Run again the script
5/ Confirm that it is stuck in an infinite loop
6/ CTRL-C :D

QA Note:
Other _gen_* subroutine may need a fix, but we will wait for them to fail
TODO:
1. Add JS check to the interface to prevent the use to enter a value > 100
2. Allow '100' as a valid value for discount (?)

Followed test plan, patch worked as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5e2b67d8c5982029c427c75930bfec6a4395dd9f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21556: Do not crash if a biblio is deleted twice
Jonathan Druart [Tue, 16 Oct 2018 17:52:25 +0000]
Bug 21556: Do not crash if a biblio is deleted twice

To recreate:
- Go to a bibliographic detail page
- Delete it
- Go back
- Delete it again
=> Without this patch you will get a 500
 Can't call method "holds" on an undefined value at
 /home/vagrant/kohaclone/C4/Biblio.pm line 406.
=> With this patch applied it will silently redirect you to the search
form.

Note: We could/should improve the behavior and display a message, but
DelBiblio will need to be moved to Koha::Biblio->delete and other
callers adjusted

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 515ed462cff54afd0725471c977d437fbeb54aa4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21556: Deleting same record twice leads to fatal software error
David Cook [Fri, 12 Oct 2018 01:53:22 +0000]
Bug 21556: Deleting same record twice leads to fatal software error

If you delete a record, confirm the deletion, and try to delete the
record and confirm it again befoe the first deletion completes, you'll
generate a fatal software error.

This patch unbinds the click handlers for the "Delete record" button
after the deletion is confirmed and just before the Javascript
processes the redirect to the next page in the process.

To test:
1) You will need a bibliographic record that is able to be deleted
2) Click "Edit", then "Delete record", then "OK"
3) While the browser is reloading, click "Edit", then "Delete record",
    then "OK
4) Observe a fatal error such as "Internal server error" or 'Can't call
method "holds" on an undefined value at
/home/vagrant/kohaclone/C4/Biblio.pm line 406.'
5) Apply the patch
6) Run "restart_all" on kohadevbox (or otherwise restart Plack if
    running Plack)
7) Navigate to another bibliographic record that is able to be deleted
8) Click "Edit", then "Delete record", then "OK"
9) While the browser is reloading, click "Edit", then "Delete record"
10) Observe that no fatal software error is generated
11) You are redirected to
http://localhost:8081/cgi-bin/koha/catalogue/search.pl (on kohadevbox)

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9d78af26d96dd356a1ca05199c0fec20cd5077e1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21725: Use full statement in HAVING rather than constructed column
Nick Clemens [Tue, 30 Oct 2018 11:59:26 +0000]
Bug 21725: Use full statement in HAVING rather than constructed column

To test:
1 - prove -v t/db_dpendent/Acquisition/GetBasketsInfosByBookseller.t
2 - Apply patch
3 - prove -v t/db_dpendent/Acquisition/GetBasketsInfosByBookseller.t
4 - It passes
5 - Have some open/closed and some fully and not full received baskets
6 - View a vendor and confirm baskets are shwn as expected
7 - Check 'Show all baskets' shows all baskets

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note sure this is the best thing but it fixes the issue

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b5c456479da6a1033f9a697ca1bcf4295920aeb1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21476: Fix HTML5 media from playing in the OPAC - incorrect filters
Nick Clemens [Tue, 23 Oct 2018 12:30:25 +0000]
Bug 21476: Fix HTML5 media from playing in the OPAC - incorrect filters

This patch makes a correction to a template filter to prevent
incorrectly-encoded HTML in media source links which were preventing
media from embedding correctly in the OPAC.

To test, apply the patch and enable the HTML5MediaEnabled and
HTML5MediaYouTube system preferences.

- Edit a record to include links to videos in 856$u. For example:
  - https://www.youtube.com/watch?v=grTwH6Evdfc
    - https://archive.org/download/POPEYEMeetsSindbadTheSailor1936/POPEYE%20meets%20Sindbad%20The%20Sailor%20%281936%29.ogv

    View the record in the OPAC and confirm that the videos display in
    the
    "Play media" tab and that they play correctly.

Tested and works as described, also matches the intranet code.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7736b5c2e32975502fa6198b5f7ec64feb7b8ffc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21742: Fix YouTube variable propagation
Nick Clemens [Wed, 31 Oct 2018 12:18:58 +0000]
Bug 21742: Fix YouTube variable propagation

The loop to find all media has an $isyoutube variable. This was declared
outside the loop and never reset. Once a YouTube video was encountered
all subsequent videos were considered as YouTube. This patch reduces the
scope of the variable and resets per loop.

To test:
1 - Enable HTML5Media and HTML5MediaYouTube
2 - Add 856$u to record for a youtube vido and a pdf (sample record
        attached to bug)
3 - View the record, the Play media tab has two video boxes
4 - Play the second, it fails
5 - Apply patch
6 - View record, Play media should include only one video link

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8ceba54c8dcfd9b598375b8af432c0111ec63d04)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21698: (QA follow-up) Fix typo verbosev -> verbose
Josef Moravec [Mon, 29 Oct 2018 19:59:00 +0000]
Bug 21698: (QA follow-up) Fix typo verbosev -> verbose

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 04114d4b835c10bb03b9c092268fc632d5552fed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21698: Fix POD of cancel_unfilled_holds.pl
Magnus Enger [Fri, 26 Oct 2018 20:47:16 +0000]
Bug 21698: Fix POD of cancel_unfilled_holds.pl

To test:
- Run "perldoc misc/cronjobs/holds/cancel_unfilled_holds.pl"
- Notice some problems:
-- No description in the NAME section
-- Descriptions of options in the SYNOPSIS section
-- A literal head1
-- Long options are listed with a single leading dash
-- Options --verbose and --confirm are not listed under OPTIONS)
- Take a look at the script itself to see that --verbose and
  --confirm should be listed.
- Also note the typo on line 97: 'v|verbosev' => \$verbose,
- Apply the patch
- Look at the script and perldoc again and check that all problems
  described above are now fixed.

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b7b6727f92615bcebf2f037202e6647a34c7705a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 18720: Use exception instead of die in GetBasketAsCsv
Josef Moravec [Mon, 5 Jun 2017 09:55:12 +0000]
Bug 18720: Use exception instead of die in GetBasketAsCsv

Test plan:
prove t/db_dependent/Acquisition/GetBasketAsCSV.t

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 77ea4686395f88c9678c611a78e6db4fd4c04101)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 10442: Remove references to non-standard "error" class
Owen Leonard [Mon, 13 Aug 2018 13:39:42 +0000]
Bug 10442: Remove references to non-standard "error" class

The CSS for <div class="error"> is obsolete and should not be used. This
patch removes the definition from the main CSS file and corrects
instances of its use in the templates to the standard <div class="dialog
alert">.

To test:

- In Acquisitions -> Late orders, locate an order from a vendor which
  doesn't have an email address. Selecting that order and clicking
  "Claim" should trigger an error dialog, "This vendor has no email." It
  should be styled correctly.

- With  AcqCreateItem set to "when placing an order," add to an existing
  order using the "From a new (empty) record" option. Add two items with
  identical barcodes and submit the form. A error should show at
  the top of the page.

- With AcqCreateItem set to "when receiving an order," receive an order
  and add two items with identical barcodes. Submitting the form should
  trigger an error message at the top of the page.

With the remaining cases I don't know how to trigger the errors in
question, so a visual check of the changes may be required:

- Administration -> Funds -> "You are not authorized to modify this
  fund"
- Administration -> Search engine configuration
  (/admin/searchengine/elasticsearch/mappgings.pl) -> Various
  modification errors.
- With the  AutoEmailOpacUser preference set to "send," adding a patron
  without an email address can trigger an error, "This member has no
  email."
- With plugins enabled, and installed, there are error messages
  displayed under various circumstances.

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 52028d9932ce1d10ad690261d8f6983b074b2909)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21702: (follow-up) Fix another typo
Martin Renvoize [Fri, 9 Nov 2018 15:38:43 +0000]
Bug 21702: (follow-up) Fix another typo

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21702: (follow-up) Fix a typo
Martin Renvoize [Fri, 9 Nov 2018 15:27:31 +0000]
Bug 21702: (follow-up) Fix a typo

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21080: Fix patron's attributes display when PA_CLASS is used
Jonathan Druart [Mon, 29 Oct 2018 22:23:53 +0000]
Bug 21080: Fix patron's attributes display when PA_CLASS is used

When a patron attribute class (AV PA_CLASS) is created, the patron's
edit view is broken:
https://screenshots.firefox.com/62uNhoUtH6rPXm9l/pro.kohadev.org

To recreate:
1. Create 1+ authorised values PA_CLASS
2. Create patron's attributes using it
3. Edit a patron

it depends on the order of the fieldset and the ol elements

This is certainly not the best fix but the display does not look broken!

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 559e051bb9eecbc92f63aa2941caea6ee373fe0e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 14716: Fix more unencoded url parameters.
Ere Maijala [Fri, 26 Oct 2018 15:13:10 +0000]
Bug 14716: Fix more unencoded url parameters.

Fixes issues found during QA and unifies the SubfieldSelect function across the utils xsl's.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bffd0d8f11fd68e7706e57c571c9b29d15d800ea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 14716: URI-encode URLs in NORMARC xsl templates.
Ere Maijala [Fri, 14 Sep 2018 22:32:07 +0000]
Bug 14716: URI-encode URLs in NORMARC xsl templates.

https://bugs.koha-community.org/show_bug.cgi?id=14716

Test plan:

1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a140843721de52477c6460ccca0c1bf0d0aafcfd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 14716: URI-encode URLs in UNIMARC xsl templates.
Ere Maijala [Thu, 22 Feb 2018 13:37:25 +0000]
Bug 14716: URI-encode URLs in UNIMARC xsl templates.

https://bugs.koha-community.org/show_bug.cgi?id=14716

Test plan:

1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.
4. Also try the attached test records and make sure their links work.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8bdde434657121e884103048d64cfde86a57bf8b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 14716: URI-encode URLs in MARC21 xsl templates.
Ere Maijala [Thu, 22 Feb 2018 13:37:25 +0000]
Bug 14716: URI-encode URLs in MARC21 xsl templates.

https://bugs.koha-community.org/show_bug.cgi?id=14716

Test plan:

1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.
4. Also try the attached test records and make sure their links work.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 217c8a656f8ba46aa12e5e21f3d0d86132950788)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21702: Make mancredit.pl use the patron id for the staff user
Martin Renvoize [Fri, 9 Nov 2018 14:47:09 +0000]
Bug 21702: Make mancredit.pl use the patron id for the staff user

(RMaint) This is a simpler re-implimentation of
466e29263910c85ce6417f322dc505558eeaa8a3 and
a90502043f12055b7e6b61f9c23d924d2e02b999 created for the 18.05.x series.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21581: (RMaint follow-up) Skip deprecated GRS-1 test for feature
Martin Renvoize [Fri, 9 Nov 2018 13:03:17 +0000]
Bug 21581: (RMaint follow-up) Skip deprecated GRS-1 test for feature

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21581: (QA follow-up) Update comment according to code in SearchAuthorities
Josef Moravec [Mon, 29 Oct 2018 22:35:57 +0000]
Bug 21581: (QA follow-up) Update comment according to code in SearchAuthorities

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 541a90765ccb4ab29ac43eefbc5e17de9764bc84)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21581: Pass through authorities indexes
Nick Clemens [Tue, 16 Oct 2018 15:09:32 +0000]
Bug 21581: Pass through authorities indexes

To test:
 1 - Define a rule:
  Matching rule code: LCAUTH
  Match threshold: 100
  Record type: Authority record
  MATCH POINTS
  Search index: LC-card-number
  Score: 100
  Tag: 010
  Subfield: a
 2 - Have a record with an LC number in 010
 3 - Export it
 4 - Edit the record in Koha, move the value from 010 to another field
 5 - Import the original record
 6 - Use the matching rule above, you expect it won't match (nothing in 010 anymore)
 7 - It matches?!?!?!
 8 - Enable zebra logging in koha-conf.xml
  <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 9 - tail -f /var/log/koha/kohadev/zebra-output.log
10 - On manage marc apply matchign with no rule, then reapply with rule
11 - View the output in the log - the index searched is 'Any'
12 - Apply patch
13 - Reapply matching
14 - Note we search the expected index and no match is found

NOTE: By applying bug 21579, I was able to view the difference, and
      see that it didn't match identically, because I had moved the
      value from 010 to 155. No log checking needed. clean/delete batch.
      Apply patch, no match. clean/delete batch.
      Edit authority back, matches.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6093e08443b393a3983778b4f92d0df56d419cd9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21581: Unit tests and updated data
Nick Clemens [Wed, 24 Oct 2018 11:53:07 +0000]
Bug 21581: Unit tests and updated data

To test:
1 - Apply this patch only
2 - prove -v t/db_dependent/Search.t
3 - It fails
4 - Apply second patch
5 - prove -v t/db_dependent/Search.t
6 - It passes!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit da2a8c7b18811e67d78a5e6e81fd93039ae3af5e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 20720: (QA follow-up) Some minor corrections
Katrin Fischer [Sun, 28 Oct 2018 05:43:30 +0000]
Bug 20720: (QA follow-up) Some minor corrections

Made some corrections to countries, spelling and
changed OPUS entry.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3a150b5d7519c2969de6d966193af242e1e787e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 20720: Found some more sponsors to add to 'about'
Martin Renvoize [Sat, 20 Oct 2018 12:49:51 +0000]
Bug 20720: Found some more sponsors to add to 'about'

git log|grep -i "sponsored-by"|sort -n | uniq
git log|grep -i "sponsored by"|sort -n | uniq

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5367bfcabd395c926be1c8e215d0e8c2eb76898f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 20720: Using git Sponsored-by lines to update 'about'
Martin Renvoize [Fri, 19 Oct 2018 16:17:41 +0000]
Bug 20720: Using git Sponsored-by lines to update 'about'

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cde4bb0d2337add26de87dcb68ca5da371283099)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21242: If not searching for patron, move to log viewer
Nick Clemens [Fri, 17 Aug 2018 12:22:50 +0000]
Bug 21242: If not searching for patron, move to log viewer

To test:
1 - Bring up a patron
2 - Click 'Modification log'
3 - Note you get borrower info
4 - Move the object field into info field
5 - Submit
6 - You are now on the 'Log viewer' page with admin options, not
borrower circ options

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 411e78864918c909feffeadb341db37cea0a4393)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21634: Keep "circulation" module selected when viewing patron's logs
Jonathan Druart [Tue, 23 Oct 2018 13:15:11 +0000]
Bug 21634: Keep "circulation" module selected when viewing patron's logs

To recreate:
- View a patron detail page
- Click "Modification log"
- Notice that the url has "modules=MEMBERS&amp;modules=circulation", but
the "Circulation" option is not selected in the "Modules" dropdown list.
This is because of uppercase vs lowercase.

The bug:
- Right after you click "Modification log" you will see all the
"members" and "circulation" logs
- Submit the form without changing any input/select from the form
=> Now you only see the "members" logs.

Test plan:
- Apply the patch
- Click "Modification log"
- Notice that the url now contains "modules=MEMBERS&amp;modules=CIRCULATION"
- Submit the form without changing any input/select from the form
=> Now you have the "members" and "circulation" modules selected.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad56b39888f1422606b16375b903fffa19bc59ba)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21349: Instructors with special characters in cardnumber cannot be removed from...
Mark Tompsett [Fri, 14 Sep 2018 23:06:49 +0000]
Bug 21349: Instructors with special characters in cardnumber cannot be removed from course reserves

The cardnumber can contain strange non-javascript-friendly
characters. This patch converts all the internal references
to borrowernumber, but displays the cardnumber when showing
list of matching users.

TEST PLAN
---------
1) Make sure Course Reserves is being used. Check system preferences.
2) Make sure there is a Course entered.
3) Make sure there is a patron with an cardnumber which breaks
   the existing javascript (eg. Ka-boom:Ka-boom!KABOOM@#$!)
4) Go into the course list.
5) Click the course name link
6) In the "Instructor Search" box enter the patron name.
7) Select the patron which has the ugly cardnumber.
8) Click Save
   -- The course listing should have the new teacher listed.
9) Click the course name link again.
10) Click 'Remove' beside the instructor's name.
    -- nothing happens, and inspecting the error console gives
       you the ugly error described in comment #0
11) apply this patch
12) restart_all
13) sudo service apache2 restart
14) refresh the page.
15) click 'Remove' beside the instructor's name.
    -- name is removed.
16) Click Save
    -- the course listing no longer lists the new teacher.
17) Actually confirm that adding and removing others normally
    works as expected.
18) run koha qa test tools.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

(cherry picked from commit 2ca766f39245e1c3bd9b4acc9ce01a9eeaec8a56)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21186: (follow-up) Incorrect Bootstrap modal event name in multiple templates
Owen Leonard [Thu, 25 Oct 2018 15:24:29 +0000]
Bug 21186: (follow-up) Incorrect Bootstrap modal event name in multiple templates

This patch addresses a few more instances of this problem which I didn't
catch in my first pass.

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

- Go to Circulation -> Check in and check in an item which has a hold.
  - When the 'Hold found' modal appears the checkin barcode field
    behind it should be disabled.
  - When the modal is dismissed the checkin field should be enabled
    again and focus should be on that field.

- Go to Administration -> Library groups.
  - Click the "Add group" button. The cursor focus should be on the
    title field.

- Go to Tools -> MARC modification templates.
  - Click the "New template" button. The cursor focus should be on the
    name field.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b94399131614a304b3a0282ec8a85194cc72b3cf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21186: Incorrect Bootstrap modal event name in multiple templates
Owen Leonard [Wed, 8 Aug 2018 19:03:38 +0000]
Bug 21186: Incorrect Bootstrap modal event name in multiple templates

Modals in the staff client which load data via AJAX require an "on
close" action in order to clear the modal of the loaded data. The
problem presents itself the second time the modal is opened: The
"loading" message doesn't appear, and the data from the previous link
is shown until the new data loads.

To test, apply the patch and test the following pages. In each case,
click multiple instances of the modal trigger link/button to confirm
that the "loading" message always appears between re-displays of the
modal.

- Acquisitions -> Vendor -> Add to basket -> From a staged file -> Add orders
  - Test the "MARC" and "Card" links
- Acquisitions -> EDIFACT messages
  - Test the "View message" button
- Acquisitions -> Vendor -> Add to basket -> From an existing record
  - Test "View MARC" link
- Acquisitions -> Vendor -> Invoices -> Invoice -> Receipt page
  - Test the "Order," "MARC," and "Card" links.
- Catalog -> Bibliographic record details
  - Test the MARC Preview link.
- Cataloging -> Cataloging search results
  - Test the Actions -> MARC preview and Actions -> Card preview menu
    items
- Cataloging -> Cataloging search results -> Merge
  - Test the "View MARC" linkscataloguing/merge.tt
- Tools -> Patron lists -> Actions -> Print patron cards
- Tools -> Batch record modification -> Results -> Show MARC
- Tools -> Staged MARC record management -> View batch
  - Test MARC preview shown when you click a staged title

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7b6107beaf06d3e3956dc69145d966a35de1a59d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21621: Remove incorrect GROUP BY from tools/letter.pl
Jonathan Druart [Fri, 19 Oct 2018 15:06:43 +0000]
Bug 21621: Remove incorrect GROUP BY from tools/letter.pl

Fix:
  'koha_kohadev.letter.name' isn't in GROUP BY

DBD::mysql::db selectall_arrayref failed: 'koha_kohadev.letter.name' isn't in GROUP BY [for Statement "SELECT branchcode, module, code, name, branchname
            FROM letter
            LEFT OUTER JOIN branches USING (branchcode)
     GROUP BY branchcode,module,code ORDER BY module, code, branchcode"] at /home/vagrant/kohaclone/tools/letter.pl line 383.

Test plan:
- Copy some default notice templates for specific libraries
- List the different notice templates
- Confirm that notices appear only one, with "all libraries" you will see all

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0cffb0f7589aa52d65bda9a8a4934790a141f3a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21311: (follow-up) Adjust wording of failed login message
Marcel de Rooy [Thu, 25 Oct 2018 09:37:42 +0000]
Bug 21311: (follow-up) Adjust wording of failed login message

Based on the feedback of Jonathan, Katrin, Mark and Martin (thx), adding
the general remark that if lockout is enabled, an account may be locked
out after x attempts. This does not say that the account on hand is
locked or not.

Adding a <p> tag between 'Log in'-button and 'Forgot your password' for
presentation.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e64650216f568e7d7ad26e25ae59493202d871a3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21311: Remove locked message from opac-auth.tt
Marcel de Rooy [Wed, 10 Oct 2018 14:04:38 +0000]
Bug 21311: Remove locked message from opac-auth.tt

We should not expose more information than needed when someone tries
to login with invalid credentials. Saying that an account is locked
reveals that the account exists (or perhaps an email address).

Trivial fix. Keeping the var too_many_login_attempts for staff.
Note: We do not remove this distinction for the staff client here (in the
assumption that a library may well have additional security measures in
place for staff client). But it could be done too (on another report).

Test plan:
Enable lockout feature.
Enter invalid credentials until account locks out (on OPAC !!)
Note that message does no longer change to 'Account is locked'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 716301d6f5bb149e963c5547d69d4019c20953db)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21641: (follow-up) Address wrong call method
Andrew Isherwood [Thu, 25 Oct 2018 13:17:59 +0000]
Bug 21641: (follow-up) Address wrong call method

This patch substitutes C4::Accounts->getnextacctno for
C4::Accounts::getnextacctno since getnextacctno is only expecting to be
passed a borrowernumber

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4858c4f736d366701fa6a3f1def2727dd85c70ce)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21641: (follow-up) Address additional call
Andrew Isherwood [Thu, 25 Oct 2018 12:23:31 +0000]
Bug 21641: (follow-up) Address additional call

This patch makes the same change as the main patch, just for an
additional occurance of getnextacctno

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6fba062d291e065b4a6d7ffebdf82db9d6935971)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21641: Added C4::Accounts to getnextacctno() call
Alex Buckley [Wed, 24 Oct 2018 03:37:57 +0000]
Bug 21641: Added C4::Accounts to getnextacctno() call

Test plan:
1. Fetch and checkout the master branch
2. Checkout an item with a rental charge associated with it to a user
and notice an error is thrown
3. Apply patch
4. Restart memcached and plack
5. Repeat steps 1 and 2 and notice the checkout happens successfully

Sponsored-By: Catalyst IT

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 344dba2fb84a743603c1c51294be4e378e6e5dc7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21680: Remove dead code - C4::Accounts::fixaccounts
Josef Moravec [Fri, 26 Oct 2018 09:28:01 +0000]
Bug 21680: Remove dead code - C4::Accounts::fixaccounts

Test plan:

git grep fixacccounts
-- without patch there are 3 occurences
-- with patch - no occurence of fixaccounts

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 89bad1fa460dc75bdaeb40e82ee56639e35fe0c9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21654: Remove refund_lost_item_fee_rules.sql from the installer process
Jonathan Druart [Wed, 24 Oct 2018 22:50:02 +0000]
Bug 21654: Remove refund_lost_item_fee_rules.sql from the installer process

This is a follow-up patch for bug 14048 comment 97

Test plan:
  git grep refund_lost_item_fee_rules.sql
should not return any results

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 51ce2ebfe12e344beec4d73109e885c5c303347c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21562: Fix sort by checkout date in the circulation table
Jonathan Druart [Mon, 22 Oct 2018 19:51:25 +0000]
Bug 21562: Fix sort by checkout date in the circulation table

The sort is done in SQL but resort by DataTables when displaying the
results.
iDataSort should be used to mimick date_due sort behavior.

Test plan:
- Check some items out
- Modify the checkout and due dates, like:
    2018-10-22
    2018-01-23
    2018-05-27
- Sort by checkout date, then due date. The sort should be correct for
all values of the DateFormat syspref

Followed test plan, patch works as described and passes QA test tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f32ee27deb7abe531ad5e5db5242f7243e3baa8d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21629: Use cn_sort instead of itemcallnumber when displaying a list
Jonathan Druart [Mon, 22 Oct 2018 20:02:51 +0000]
Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list

DBMS can sort callnumbers correctly using cn_sort. We should use it
showing a list's content.

Test plan:
- Add items with callnumber to a list
- Display the list
- List the content by callnumbers
=> Confirm that the records are correctly sorted by callnumber

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 20cba0d2956de5b1ff38b4a5f4b0f620204930e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21639: DBRev 18.05.05.003
Nick Clemens [Fri, 26 Oct 2018 17:09:18 +0000]
Bug 21639: DBRev 18.05.05.003

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 22d817ddc863354b0a6316c6ddb91e2cc86cf603)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21639: (follow-up) Adjust the other languages
Jonathan Druart [Thu, 25 Oct 2018 15:00:35 +0000]
Bug 21639: (follow-up) Adjust the other languages

uk-UA was wrong.
We should use the same file for all languages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f106c3a13aa0ee69d744c683e99d9d6ec3c10ffa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21639: Adjust the other languages
Nick Clemens [Wed, 24 Oct 2018 19:43:18 +0000]
Bug 21639: Adjust the other languages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7c25be79a00b6b7b8b2f4b38eb2dd9f3f6cb502e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21639: Add phone transports to new and existing installs
Nick Clemens [Wed, 24 Oct 2018 01:33:42 +0000]
Bug 21639: Add phone transports to new and existing installs

To test:
1 - Confirm if you do or do not have 'phone' transports defined in the
message_transports table
2 - Apply patch
3 - Run updatedatabase
4 - If you didn't have them you should now
5 - Run updatedatabase again, confirm it doesn't error
6 - sudo koha-mysql kohadev
7 - DELETE from message_transports WHERE message_transport_type =
'phone'
8 - Run updatedatabase again
9 - Confirm the message transports table is restored
10 - Drop your DB (or reset_all in kohadevbox)
11 - Ensure the table is fully populated including phone notices

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 71fdba0ff014017287ca7b1f524850fadad81af1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21587: don't drop patrons to notify in order creation
Victor Grousset [Thu, 18 Oct 2018 09:54:58 +0000]
Bug 21587: don't drop patrons to notify in order creation

It only worked on modification.

== Test plan ==
1. have/create a active budget
2. have/create a fund
3. have/create a vendor with minimal info
4. create a basket with minimal info
5. add an order line to the basket
     Add a user in "To notify on receiving"
6. Modify the order
7. The patrons isn't here. This is the bug
8. Add a user in "To notify on receiving"
9. Save
10. Modify the order
11. The patron is here now
12. Apply this patch
13. Retry step 5 to 11 and patron should be saved on order creation
14. Celebrate! :D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bf8b4e773c089a4094b18c62af91711b8af99f82)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21603: Remove incorrect GROUP BY from C4::CourseReserves
Jonathan Druart [Thu, 18 Oct 2018 21:00:15 +0000]
Bug 21603: Remove incorrect GROUP BY from C4::CourseReserves

'koha_kohadev.c.department' isn't in GROUP BY

Test plan:
Prove that the test fail without this patch and pass with this patch
applied (switch on the SQL modes)

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 41397c855397aee9847943c2f124e0bdc8ba7eb7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves
Jonathan Druart [Thu, 18 Oct 2018 20:37:35 +0000]
Bug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves

'koha_kohadev.me.shelfname' isn't in GROUP BY

Same as
  commit 7e220e0d8f107cce63f32bfaa1919c04b4dea6e2
  Bug 20179: [sql_modes] Remove GROUP BY in get_shelves_containing_record

Test plan:
- Add public and privates shelves
- Shares some of them
- List them
=> The correct numbers of shelves must be displayed

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b106ddb96b21a78559d7a60057e94024e7db4a16)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl
Jonathan Druart [Tue, 23 Oct 2018 13:35:24 +0000]
Bug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl

batchMod.pl: DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_val
ue' isn't in GROUP BY [for Statement "SELECT authorised_value, lib FROM authorised_values LEFT JOIN authorised_values_branches ON ( id = av_id )  WHERE category = ? AND ( branchcode = ? OR branchcode IS NULL )
GROUP BY lib ORDER BY lib, lib_opac" with ParamValues: 0='WITHDRAWN', 1="CPL"] at /home/vagrant/kohaclone/tools/batchMod.pl line 396.

We must use Koha::AuthorisedValues->search instead of a raw SQL query.

Test plan:
Edit some items in a batch
Confirm that the dropdown list (AV) are correctly filled

We will lose speed efficiency here, but better to be consistent, then cache AV in Koha::AuthorisedValues

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit dab4426457578094eb5aac6531d1a1db631d05c7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 7143: Update about page for new devs Margaret Hade and Isobel Graham
Nick Clemens [Fri, 26 Oct 2018 16:25:02 +0000]
Bug 7143: Update about page for new devs Margaret Hade and Isobel Graham

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d71fb84f6fb40f7eb59a9f86f1a07d57f58f3c0a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 20758: Fix for BrowseResultSelection typo
Isobel Graham [Sat, 20 Oct 2018 08:12:19 +0000]
Bug 20758: Fix for BrowseResultSelection typo

To test:
1) The  BrowseResultSelection description should no longer contain
"fromt"

Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d8edb017e4107802e55b5887a1454651565a2e49)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21505: Box around 'Additional fields' does not contain the fields
Owen Leonard [Tue, 9 Oct 2018 18:05:04 +0000]
Bug 21505: Box around 'Additional fields' does not contain the fields

This patch modifies the subscription detail page markup to eliminate a
confusing bordered <legend> tag. It is replaced with an <hr> to
delineate the sections and an <h3> tag to serve as the heading.

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

 - Configure one or more additional subscription fields.
 - View the detail page for a subscription and confirm that the
   "Additional fields" section is clearly labeled.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 311fe87b31b9a65974e6020df301408251659e79)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21625: Fix wording and typo in SMSSendDriver system preference description
Katrin Fischer [Sun, 21 Oct 2018 02:34:25 +0000]
Bug 21625: Fix wording and typo in SMSSendDriver system preference description

SMSSendDriver was missing an S.
Koha is sending not receiving messages, so I think switching
that will be a little more clear.

To test:
Verify that the system preference description reads correctly.

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9d0fc26c4335fc9be7a01e3069c458e9397fc94f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21486: Only fetch the items' barcodes
Jonathan Druart [Wed, 17 Oct 2018 15:32:11 +0000]
Bug 21486: Only fetch the items' barcodes

and avoid unecessary processing

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Tested and found correct AU data is returned, and passes QA test tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 87c2b4644745b0333fc8211ce89899784dfa6a5e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21486: Fix 'AU' for SIP
Jonathan Druart [Fri, 12 Oct 2018 15:47:04 +0000]
Bug 21486: Fix 'AU' for SIP

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8746ca21a271daf78cb6f4b5062323885e538801)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21531: Subscription "New fields" button should read "New field"
Owen Leonard [Wed, 10 Oct 2018 12:10:45 +0000]
Bug 21531: Subscription "New fields" button should read "New field"

This patch changes the label of the "New fields" button on the
subscription add fields page to read "New field," making it consistent
with similar buttons in the staff client.

Also changed:

- Add missing id to <select> to make label clickable.
- Remove custom DataTables configuration in favor of defaults.

To test, apply the patch and go to Serials -> Add subscription fields.

- The button in the toolbar should read "New field."
- The DataTables' functionality of the table of existing custom fields
  should be correct.
- Click the "New field" button.
  - Cliking the "Authorised value category" label should put the focus
    on the dropdown.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bba0044e8ed4cf541d38781950773c1416422b0c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21590: change virtual shelf to list in send list email.
Barton Chittenden [Wed, 17 Oct 2018 19:29:22 +0000]
Bug 21590: change virtual shelf to list in send list email.

To test

1) Choose a public list from the 'lists' menu in the OPAC.
2) Click 'Send list'
3) Log in as necessary
4) Fill in your own email address
5) Click 'send'
6) Check your email, the sent email will contain the text
   "sent you from our online catalog, the virtual shelf called".

Apply patch, re-test. The email will now contain
   "sent you from our online catalog, the list called".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7c7300b2d93124f2158cc96c4b463f6fb08c3f04)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21005: Address QA tool failures on tabs
Mark Tompsett [Wed, 17 Oct 2018 01:39:41 +0000]
Bug 21005: Address QA tool failures on tabs

Only whitespace changes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b2070ef98b74908860556872cc08c0b2ce74b8b1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21005: Missing row/column defaults cause unexpected results in report wizards
David Cook [Fri, 10 Aug 2018 08:08:13 +0000]
Bug 21005: Missing row/column defaults cause unexpected results in report wizards

Some report wizards are missing row/column defaults, which sometimes return blank
pages (borrowers_stats.pl) or results always equalling 0, which a non-discerning
user may interpret incorrectly.

If the DEBUG environmental variable is enabled, missing row/column choices will
actually cause fatal software errors as well, which is also undesirable for users.

This patch adds default choices for row and column on
report wizards that had no radio buttons selected, so that a user
can't submit the form without choosing a row and column. This
prevents errors.

To test:
1) Apply patch
2) Visit /cgi-bin/koha/reports/issues_avg_stats.pl
3) Visit /cgi-bin/koha/reports/borrowers_stats.pl
4) Visit /cgi-bin/koha/reports/catalogue_stats.pl
5) Visit /cgi-bin/koha/reports/issues_stats.pl
6) Observe that default choices for row/column are there

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6a451360b8fd0a56dd07be050cdecf538d890612)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 20592: Return early in ModItem if nothing to update
Mark Tompsett [Tue, 17 Apr 2018 23:59:58 +0000]
Bug 20592: Return early in ModItem if nothing to update

Two lines of code and move them earlier.
Add a check to make sure there are changes.

Followed the test plan, both the _BEFORE_ and after do as described.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1f0064bbddb9d00529d5eac1c096e669732eb551)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 20592: Add tests
Jonathan Druart [Tue, 24 Apr 2018 18:53:02 +0000]
Bug 20592: Add tests

NOTE: It isn't really a test, but it does trigger
      the return line which was added to ModItem.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 619eca1c7aaebf4db6ed170a3cbd14065da79c9d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21277: fr-CA translation for notices in sample_notices.sql
Caroline Cyr La Rose [Mon, 27 Aug 2018 14:46:12 +0000]
Bug 21277: fr-CA translation for notices in sample_notices.sql

This patch adds fr-CA translations for the following sample notices:

- ACQORDER
- AR_CANCELED
- AR_COMPLETED
- AR_PENDING
- AR_PROCESSING
- AR_SLIP
- CANCEL_HOLD_ON_LOST
- CHECKOUT_NOTE
- MEMBERSHIP_EXPIRY
- PASSWORD_RESET

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bbd4f5821a9818074d07ade086e7881dc1bba195)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21617: DBRev 18.05.05.002
Nick Clemens [Fri, 19 Oct 2018 16:50:40 +0000]
Bug 21617: DBRev 18.05.05.002

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8150058b387b39469b64853a07d512bcc0a3741d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21617: statistics.ccode is not long enough (see also DBRev 18.05.04.001)
Marcel de Rooy [Fri, 19 Oct 2018 08:51:05 +0000]
Bug 21617: statistics.ccode is not long enough (see also DBRev 18.05.04.001)

Warn from a test:
DBD::mysql::st execute failed: Data too long for column 'ccode' at row 1 [for Statement "INSERT INTO statistics
        (datetime,
         branch,          type,        value,
         other,           itemnumber,  itemtype, location,
         borrowernumber,  proccode,    ccode)
         VALUES (now(),?,?,?,?,?,?,?,?,?,?)" with ParamValues: 0="z8LIyIV", 1='issue', 2=undef, 3='', 4='2584', 5='E_QkzaV5Ay', 6='oDnFRZyog2CS2_XoUB_MB2sBxyI3elbFPC_AekxLPrduGTXKnlNoLKEdQrXzpAw5zD1pGbZshV9ydZup', 7='2000005168', 8='', 9='j9ZDn74omZAoZrTOdC4a05SpWRSHPR2apfss7y5V6QJuQnBEk32XWXCfMp7'] at C4/Stats.pm line 138.

The dbrev 18.05.04.001 did not change it from 10 to 80 as in other tables.

We should either truncate to 10 chars in Stats.pm or increase to varchar(80). Since it is varchar and not char, we should not be afraid about size. I choose for the latter here.

Test plan:
Run db rev.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad20a30a831c5f3482f2eed80cc36269ebbef05f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21497: Correctly format dates for ILL requests in OPAC
Owen Leonard [Fri, 5 Oct 2018 12:50:26 +0000]
Bug 21497: Correctly format dates for ILL requests in OPAC

This patch updates the opac ILL template to use the $KohaDates plugin
for displaying dates. Also updated:

- Added "title-string" sorting to allow for correct sorting of dates in
  the table of requests.
- Corrected capitalization as per our capitalization rules.
- Added self-closing / to inputs as per coding guidelines.

To test, apply the patch and log in to the OPAC as a user who has
multiple outstanding ILL requests.

 - In the table of ILL requests, the "Request placed" and "Last updated"
   dates should be formatted according to your system's dateformat
   preference.
 - Sorting of those columns should work correctly.
 - View a request and confirm that "Request placed" and "Last updated"
   dates in this view are also formatted correctly.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a2418f743ce1e14d32229b5dd8d05aeb13f9e664)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 18959: Skip xt/author/Text_CSV_Various.t if Text::CSV::Unicode missing
Tomas Cohen Arazi [Sat, 13 Oct 2018 12:17:00 +0000]
Bug 18959: Skip xt/author/Text_CSV_Various.t if Text::CSV::Unicode missing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ca9a1b76d8d729b1c09dbedbd90bd3f748351c4b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 18959: Text::CSV::Unicode missing from dependencies
Tomas Cohen Arazi [Sat, 13 Oct 2018 12:15:52 +0000]
Bug 18959: Text::CSV::Unicode missing from dependencies

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eb3f78f82e8139739a17c11cc89f58865d7536b0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21600: Use str param instead of dt for output_pref
Jonathan Druart [Thu, 18 Oct 2018 19:36:45 +0000]
Bug 21600: Use str param instead of dt for output_pref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b9cb7086e74e9a6ea7a4eaac7c5053b6727bb3e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21600: /patrons should have timestamp/datetime values converted from rfc3339...
Tomas Cohen Arazi [Thu, 18 Oct 2018 18:50:27 +0000]
Bug 21600: /patrons should have timestamp/datetime values converted from rfc3339 into valid MySQL values

Bug 21597 enabled the option so set strict SQL modes in koha-conf.xml to
be able to improve Koha's comformance to current standards on DB
engines.

This causes lots of parts of Koha to fail because they rely on MySQL
fallbacks that are no longer default behaviours.

While we can workaround this by setting SQL modes on runtime, the
decision has been that this needs fixing.

This patch deals with the /patrons API failing to correctly convert
datetimes into valid SQL timestamps.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass
- Add <strict_sql_modes>1</strict_sql_modes> on your koha-conf.xml
  $ sudo vim /etc/koha/sites/kohadev/koha-conf.xml
- Restart memcached and Plack:
  $ restart_all
- Run:
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: Tests fail due to updated_on and/or lastseen fields wrong
format (MySQL error)
- Apply this patch
- Run:
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass! It all makes sense!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 13b8e95f218924cc1ec41e2570791980bd7bcf17)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21554: Add missing use statement in subscription-batchedit
Jonathan Druart [Fri, 12 Oct 2018 14:27:27 +0000]
Bug 21554: Add missing use statement in subscription-batchedit

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f0373fbdec152c9d766eb82d6af667d1da5cf042)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 20521: Use a specific config for strict sql modes
Jonathan Druart [Thu, 18 Oct 2018 14:07:02 +0000]
Bug 20521: Use a specific config for strict sql modes

To avoid disrupting testers and new developers it will be turned off by default.

We will turn it on for Jenkins so devs will have to take care of the
regressions they introduce (!)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 17e5691daaa0f6b73623198eded648c78e40056a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21597: Incorrect decimal value: 't_value_bib639' for column 'price'
Jonathan Druart [Wed, 17 Oct 2018 23:24:09 +0000]
Bug 21597: Incorrect decimal value: 't_value_bib639' for column 'price'

Fix t/db_dependent/selenium/basic_workflow.t

We want to send specific values depending on the data type in DB
For instance integer, or varchar(10)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b7da4f890b9d9a7b2a919ce8529198ab443115cd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21597: Incorrect date value: '0' for column 'onloan'
Jonathan Druart [Wed, 17 Oct 2018 22:21:56 +0000]
Bug 21597: Incorrect date value: '0' for column 'onloan'

Fix t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t

items.onloan
  `onloan` date DEFAULT NULL,

DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect date value: '0' for
column 'onloan' at row 1 at /home/vagrant/kohaclone/t/lib/TestBuilder.pm
line 288

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 489c636316209d4f4e7d8648cc5832347e792076)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21597: Data too long for column 'invitekey'
Jonathan Druart [Wed, 17 Oct 2018 22:18:58 +0000]
Bug 21597: Data too long for column 'invitekey'

Fix t/db_dependent/Virtualshelves.t

virtualshelfshares.invitekey
  `invitekey` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

We should not insert a longer string!

DBIx::Class::Storage::DBI::_dbh_execute(): Data too long for column
'invitekey' at row 1 at /home/vagrant/kohaclone/Koha/Object.pm line 125

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f19a99209528e85003cd56104640effe75e4f126)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21597: Field 'amount' doesn't have a default value
Jonathan Druart [Wed, 17 Oct 2018 22:11:29 +0000]
Bug 21597: Field 'amount' doesn't have a default value

Fix t/db_dependent/Accounts.t

Default value could be 0, or left as it.
It seems that the different initialisation we have in the code pass a
value for 'amount'

account_offsets.amount
  `amount` decimal(26,6) NOT NULL,

DBIx::Class::Storage::DBI::_dbh_execute(): Field 'amount' doesn't
have a default value at /home/vagrant/kohaclone/Koha/Object.pm line 125

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 82884b0bd81a79c9a0c700463f1fcc632314863c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21597: Column 'notforloan' cannot be null
Jonathan Druart [Wed, 17 Oct 2018 22:07:20 +0000]
Bug 21597: Column 'notforloan' cannot be null

Fix t/db_dependent/Circulation.t

items.notforloan:
  `notforloan` tinyint(1) NOT NULL DEFAULT '0',

t/db_dependent/Circulation.t .. 115/119 DBD::mysql::st execute failed: Column 'notforloan' cannot be null [for Statement "UPDATE `items` SET `notforloan` = ? WHERE ( `itemnumber` = ? )" with ParamValues: 0=undef, 1='1046'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.
        # No tests run!

    #   Failed test 'No tests run for subtest "item-level_itypes = 0"'
    #   at t/db_dependent/Circulation.t line 2356.
    # Looks like you failed 1 test of 2.

 #   Failed test 'CanBookBeIssued | notforloan'
 #   at t/db_dependent/Circulation.t line 2359.
Can't locate object method "rethrow" via package "DBD::mysql::st execute failed: Column 'notforloan' cannot be null [for Statement "UPDATE `items` SET `notforloan` = ? WHERE ( `itemnumber` = ? )" with ParamValues: 0=undef, 1='1046'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a40b8ebde788ac4082670e30b03fcbade2cc5544)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21599: Fix item type creation by defining default values
Jonathan Druart [Thu, 18 Oct 2018 11:32:59 +0000]
Bug 21599: Fix item type creation by defining default values

Same as what we have in Koha::Patron->new, empty strings should not be
inserted in integer or date column type

DBD::mysql::st execute failed: Incorrect decimal value: '' for column 'defaultreplacecost' at row 1 [for Statement "INSERT INTO `itemtypes` ( `checkinmsg`, `checkinmsgtype`, `defaultreplacecost`, `description`, `hideinopac`, `imageurl`, `itemtype`, `notforloan`, `processfee`, `rentalcharge`, `searchcategory`, `sip_media_type`, `summary`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0="", 1="message", 2="", 3="xx", 4=0, 5='', 6="XX", 7=0, 8="", 9="", 10="", 11=undef, 12=""] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

Test plan:
Create a new itemtype

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 33c142ba3b7cfd37dd90569de2a5802849b09ef5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21598: 'koha_kohadev.aqbudgets.budget_parent_id' isn't in GROUP BY
Jonathan Druart [Wed, 17 Oct 2018 22:31:14 +0000]
Bug 21598: 'koha_kohadev.aqbudgets.budget_parent_id' isn't in GROUP BY

DBD::mysql::db selectall_hashref failed:
'koha_kohadev.aqbudgets.budget_parent_id' isn't in GROUP BY [for
Statement "

    at /home/vagrant/kohaclone/C4/Budgets.pm line 558.
and
    at /home/vagrant/kohaclone/C4/Budgets.pm line 565.

Test plan:
hit /cgi-bin/koha/admin/aqbudgets.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 60e00a332e2a500746f12908042dd61250d1f79a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21593: Remove GROUP BY from GetAuthValueDropbox
Nick Clemens [Thu, 18 Oct 2018 10:05:38 +0000]
Bug 21593: Remove GROUP BY from GetAuthValueDropbox

With new MYSQL modes we are permitted only full group by.

In this case I don't think we need a GROUP BY at all

To test:
1 - Try to pay a fine or create a borrower
2 - Internal server error
3 - Apply patch
4 - Page should load
5 - Test various authorised values ot ensure they work
   e.g. Set bsort1 and bsort2 to have some authorised values with and
   without branch limits
   set PAYMENT_TYPE to have some values with and without branch limits

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 87c7e534f15aff14d6e82cbb67ecbb8e8715c2b7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 20351: Shortcut serials scripts if a blocking error appeared
Jonathan Druart [Tue, 8 May 2018 17:25:57 +0000]
Bug 20351: Shortcut serials scripts if a blocking error appeared

The idea of output_and_exit_if_error (added by bug 18403) is to make sure
parameters are valid before executing the script.
If not (old or broken URLs), we shortcut everything coming next to display a
generic error ("object does not exist", "you do not have permission to do that", etc.)

This bug report fixes the scripts under serials/*.

Test plan:
Hit the script under the serials directory with an invalid subscriptionid parameter
and confirm you get an error instead of the normal view with empty values.

The goal is not to be exhaustive during the first iteration, but at least to fix
the most common views.

For instance:
/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=XXX
/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=XXX
/cgi-bin/koha/serials/routing.pl?subscriptionid=XXX&op=new
/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=XXx
/cgi-bin/koha/serials/subscription-add.pl?op=dup&subscriptionid=XXX

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 62285d2de463811380262e4cc65c82937145d477)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save...
Andreas Roussos [Sun, 7 Oct 2018 18:00:09 +0000]
Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button

The authority editor (authorities/authorities.pl) does not have
a 'Cancel' button. Also, it has two 'Save' buttons.

This patch fixes that by:
a) adding a 'Cancel' button to the floating toolbar at the top
b) removing the 'Save' button from the bottom of the page

Test plan:
1) Go to Home > Authorities and launch the authority editor by
   clicking on 'New authority'. Notice how the editor doesn't
   have a 'Cancel' button. Also notice the two 'Save' buttons.
2) Apply the patch.
3) Re-launch the authority editor, and hit cancel; you should
   be taken back to Home > Authorities.
4) Edit an existing authority, and hit cancel; you should be
   taken back to the details page for the authority you chose.
5) Edit an authority as new (duplicate), and hit cancel; you
   should be taken back to Home > Authorities (this behaviour
   is mimicking the bibliographic editor: when duplicating a
   biblio the 'Cancel' button will take you back to Home >
   Cataloging).

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2cffe3a574e14d5f35ce7b1d9ffe28a153dcb37e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 14786: Use MARC istead of ISO2709 everywhere
Katrin Fischer [Sun, 12 Aug 2018 15:08:57 +0000]
Bug 14786: Use MARC istead of ISO2709 everywhere

This patch changes the term ISO2709 in the templates to use
MARC instead.

Test plan:
- The term was changed on the following pages in staff:
  - Advanced catalouging editor > Save to catalog
  - Patron account > Check out (Activate ExportCircHistory) > Format
  - Patron account > Check out > Help page
  - Lists > Download list
  - Acquisitions > Add order to basket > From a staged file (breadcrumbs)
  - Administration > System preferences > ExportRemoveFields
  - Cart > Download
  - Tools > Export data > Output format

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 81875ab282c1daa98dec2e0f5f20ba74f411ac32)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21456: (QA follow-up) Catch missed case in authorities merge
Martin Renvoize [Mon, 8 Oct 2018 14:25:50 +0000]
Bug 21456: (QA follow-up) Catch missed case in authorities merge

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 796e4e5d2be5ec87970f8b586f940e4abddb687d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21456: The 'New authority' button lists authority types inconsistently
Andreas Roussos [Sun, 30 Sep 2018 10:06:28 +0000]
Bug 21456: The 'New authority' button lists authority types inconsistently

The 'New authority' button does not always list the available
authority types in A-Z order based on their description.

This patch fixes that.

Test plan:
1) Go to Home > Authorities in the staff client; notice how the
   'New authority' button lists auth types sorted by description.
2) Go to an authority's detail page; notice how the same 'New
   authority' button will list auth types sorted by their code.
3) Apply the patch.
4) In an authority's detail page, the 'New authority' button will
   now list the available authority types sorted by description.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bf7c8303ca7f9e4955f25fc4d1f30d65d8c52dc9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21490: Disambiguation of 'Order' part 2
Caroline Cyr La Rose [Thu, 4 Oct 2018 18:52:53 +0000]
Bug 21490: Disambiguation of 'Order' part 2

This patch changes the 'Order' term in neworderbiblio.tt,
newordersubscription.tt, newordersuggestion.tt, and
z3950_search.tt for 'Place order'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 706d21ee53dd5072eec2234415fc5c8ff4b1ea17)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21490: Disambiguation of 'Order'
Caroline Cyr La Rose [Thu, 4 Oct 2018 18:38:25 +0000]
Bug 21490: Disambiguation of 'Order'

This patch changes the 'Order' term in marc_modification_template.tt
for 'Rank'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ca776d6e171de1b093163ab83ba589d5ae4d7cc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 16754: Use validation plugin in budgets, planning, and contracts
Owen Leonard [Thu, 16 Jun 2016 13:28:01 +0000]
Bug 16754: Use validation plugin in budgets, planning, and contracts

This patch removes the custom javascript form validation from three
templates: Budgets, budget planning, and contracts. Validation via the
validation plugin is done instead.

This patch also removes use of event attributes like onclick and
onchange. Also changed: I added the "Required" text next to required
fields as necessary.

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

- Test the budget creation process for adding, editing, and duplicating
  budgets. In all cases:
  - The start date and end date should be required
  - You should be warned if you enter an end date which falls before the
    start date.
  - The description should be required
  - The budget amount should be required to be a number

To test the budget planning page:

Note that much of the JS removed from this template was unused. It
looked for inputs by the name 'est_total' which don't exist.

- When viewing the table of funds for a budget, select a choice from the
  'planning' toolbar menu.
  - Verify that after entering a numeric value in any cell, the
    'remaning' value at the end of the row is correctly updated.
  - Verify that after entering non-numeric data an error is displayed.
  - Verify that clicking the 'auto-fill' button at the end of the row
    works to fill any empty or zero-value fields with the remaning funds
    available.

To test the vendor contracts page:

- Go to Acquisitions -> Vendor -> Contracts
- Add or edit a contract
  - Confirm that name, start date, and end date are required.
  - Confirm that you are warned if you enter an end date which falls
    before the start date.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 23265158fcab25f8f5188cea6f07af46812d41cc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21583: Don't use Asset.js for external script files
Nick Clemens [Tue, 16 Oct 2018 17:09:29 +0000]
Bug 21583: Don't use Asset.js for external script files

To test:
1 - Enable Novelist in staff client:
    NovelistSelectStaffEnabled: Add
    NovelistSelectStaffProfile: anything
    NovelistSelectPassword: anything
    ( these don't need to be valid, just not blank )
2 - Pull up a record detail page in staff client
3 - View page source - search for ns2init.js
4 - You won't find it
5 - Apply patch
6 - Reload details
7 - Search page source for ns2init.js
8 - It loaded! Huzzah!

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 55225ba10b824f7e881738a20c751200843d3ec9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21579: Make showdiffmarc.pl work for authorities and biblios
Nick Clemens [Tue, 16 Oct 2018 14:00:59 +0000]
Bug 21579: Make showdiffmarc.pl work for authorities and biblios

To test:
 1 - Have or make some authority records
 2 - Have or make an authority matching rule
 3 - Export your authrotities
 4 - Import them using the matching rule
 5 - On the 'Manage staged records' page view some diffs
 6 - The import record is correct, but the existing records pull form
 bibs
 7 - Apply patch
 8 - Repeat
 9 - Confirm you see the expected authority matches

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7f0207d2ad162a86cf5e09e437565b66b91c5004)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly
Jonathan Druart [Tue, 16 Oct 2018 13:27:37 +0000]
Bug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly

 #   Failed test 'The date_due should have been set depending on the circ
 rules when the on-site checkout has been switched'
 #   at t/db_dependent/Circulation/SwitchOnSiteCheckouts.t line 126.
 #          got: '2018-10-16T23:59:00'
 #     expected: '2018-10-21T23:59:00'

TestBuilder set date to today, so issuingrules.harduedate will be set to
today.
issuingrules.hardduedatecompare will be set to an integer.
If set to 0, $datedue will be reset to the hard due date

The call stack is: AddIssue > CalcDateDue > GetHardDueDate

In GetHardDueDate:
3509         if ( $hardduedatecompare == 0 || $hardduedatecompare == $cmp ) {
3510             $datedue = $hardduedate->clone;
3511         }

To fix this random failure we need to set issuingrules.harduedate to undef.

Test plan:
0. Do not apply this patch
1. Modify the test to set hardduedatecompare to 0 (search 'my $issuingrule = ')
2. Execute the test and confirm the failure
3. Apply this patch
4. Execute the test and confirm the it is no longer failing

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e6d9defc180204461f80477be287ade7fcfc11b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21552: Use raw filter for displaying RoutingListNote
Katrin Fischer [Tue, 9 Oct 2018 12:22:35 +0000]
Bug 21552: Use raw filter for displaying RoutingListNote

The RoutingListNote system preference works like other prefs
allowing you to insert your own content on the routling list
template using HTML. The default text even uses HTML, so it
looks broken without this patch.

To test:
- Add a subscription
- Add a new routing list to it
- Add some patrons to it
- Save
- preview routing list
- Verify that the note shows and is formatted correctly.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f902041e244cc35ecc99e3ca256ff24c843a8b04)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21351: Rename the Taiwanese language pack to use correct file name
Martin Renvoize [Fri, 26 Oct 2018 11:32:20 +0000]
Bug 21351: Rename the Taiwanese language pack to use correct file name

The words "Han (Simplified variant)" is appearing in the language name
because the file is titled "zh-Hans-TW" when it should be titled
"zh-Hant-TW". The database is set up to use "Hant" but it just
incorrectly named.

Test plan
1. Apply patch.
2. Install zh-Hant-TW on your Koha server.
3. Navagate to I18N/L10N preferences and confirm that the english text description states (Traditional variant).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Files on translate.kc.org have already been fixed by Bernardo.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

(cherry picked from commit fd0df2ad55f9a5ff180dc0dfa22fede5f0ad37cd)
Converted to removal of files rather than rename as translation merges
had already created the new files as expected.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21082: (RMaint follow-up) remove $raw filters
Martin Renvoize [Fri, 26 Oct 2018 11:27:15 +0000]
Bug 21082: (RMaint follow-up) remove $raw filters

The $raw filter plugin is not available in 18.05.x series

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21542: Use modal and password field for overdrive password
Nick Clemens [Wed, 10 Oct 2018 15:53:13 +0000]
Bug 21542: Use modal and password field for overdrive password

To test:
 1 - Enabled Overdrive and fill all preferences
 2 - Make sure OverDrivePasswordRequired is true
 3 - Go to opac account
 4 - Log in to overdrive
 5 - Note the input is shown
 6 - Apply patch
 7 - Repeat
 8 - Note popup is now a modal
 9 - Note password is now hidden
10 - Confirm overdrive integration works as before

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 32dc4a7bfaeebcff2be739fdf5f15e0f8bad4faa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21082: (RM follow-up) address QA issues
Nick Clemens [Tue, 9 Oct 2018 10:56:43 +0000]
Bug 21082: (RM follow-up) address QA issues

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d83d5ec5a4edfc4927a5f8e5ca3d1cde2942f5fe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21082: DBRev 18.05.05.001
Nick Clemens [Tue, 9 Oct 2018 10:41:03 +0000]
Bug 21082: DBRev 18.05.05.001

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 91790fdd90c8dc59b70f6defd63b088febf5b39d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21082: Update OverDrive authentication method
Nick Clemens [Tue, 17 Jul 2018 14:16:33 +0000]
Bug 21082: Update OverDrive authentication method

Testing will require an OverDrive account, you should be able to obtain a
developer account here:
https://developer.overdrive.com/

You will need to register a SIP connection for patron authentication

To test authentication:
 1 - Set authname default in OD prefs
 2 - Sign in as a patron whose branch matches authname
 3 - Verify the patron can sign into OverDrive
 4 - Set the patrons branch authname to be incorrect
 5 - Verify branch specific authname is used and patron cannot sign in
 6 - Set the default authname to be incorrect and patron's branch
 authname to be correct
 7 - Verofy patron can sign in

To test circulation:
 1 - Fill out all OD prefs and enable circulation
 2 - Sign in to opac
 3 - Verify you have an OverDrive tab
 4 - Click 'Login to Overdrive'
 5 - If password required you shoudl be prompted, otherwise you should be
signed in and see account info
 6 - Test logging out and in
 7 - Log-in, perform a search on the opac - you should see hold/checkout
buttons
 8 - Test the buttons
 9 - After holding/checking out items, check your account page
10 - Verify info is correct
11 - Log out of overdrive
12 - Search catalog click overdrive results
13 - Test "Login to Overdrive" link on OD results
14 - Verify page is reloaded, buttons show and work

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e762bdb9b2243070fd33e9aeb1bdfb88f2af2193)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21082: Add new admin page for overdrive
Nick Clemens [Tue, 17 Jul 2018 14:08:13 +0000]
Bug 21082: Add new admin page for overdrive

The 'authname' field required for OverDrive can differ per branch.
This patch adds Koha Objects for dealing with OD info and submitting
authnames per branch. The description is left open so future branch info
can be added.

To test:
1 - prove -v t/db_dependent/Koha/Library/OverDriveInfos.t
2 - visit cgi-bin/koha/admin/overdrive.pl
3 - Add some authnames for various branches
4 - Verify data saves correctly

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit df339d0372c633635bc63d87d7caa7807a540aed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoBug 21082: Database updates
Nick Clemens [Tue, 17 Jul 2018 13:50:43 +0000]
Bug 21082: Database updates

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 67d13dc5867e813efad430c6352657e459259bab)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

5 years agoUpdate release notes for 18.05.08 release v18.05.05
Martin Renvoize [Tue, 23 Oct 2018 15:04:20 +0000]
Update release notes for 18.05.08 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>