Commit Graph

31045 Commits

Author SHA1 Message Date
Nightly Build Bot 6b7f6d668c Bug 20952 - Automatic debian/control updates (oldoldstable/17.11.x)
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 17:17:41 +01:00
Jonathan Druart 061ce3bf0d Bug 21955: Remove Cache::Memory as fallback for L2 cache
If Plack is running with several workers we must not use Cache::Memory
as L2 cache.

If a value is set from a worker, it will not be available from other
workers as the Cache::Memory instance is not shared (of course!)

Moreover we now have Koha::Cache::Memory::Lite that does the same job,
so we should not expect performance regressions by removing it.

See also the email sent to koha-devel for more info
http://lists.koha-community.org/pipermail/koha-devel/2018-December/045004.html

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4bf033c6d6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6039f64e53)
(cherry picked from commit 7ffd1602a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 14:09:23 +01:00
Jesse Maseto 7cb565d360 Bug 21730: DBRev 18.05.06.001
Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit bdbb3103f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 13:51:42 +01:00
Jonathan Druart 04187ee909 Bug 21730: Add missing PA_CLASS authorized values categories
PA_CLASS is missing from the list of AV category

Test plan:
Execute the update DB entry
Confirm that you now have PA_CLASS in the AV category list

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

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

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

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 6ed6c341a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 13:49:38 +01:00
Fridolin Somers bd07cbd7dd Bug 21644: better UNIMARC XSLT display of 210 in intranet
In intranet default UNIMARC XSLT display of 210 is tricky.
It tests each subfield with a complex conditional prefix.
In OPAC default UNIMARC XSLT display 210 is simply displayed with a loop on all subfields.

I propose to use the same code as OPAC in intranet.
It allows to display $f and removes strange middle-score character.

Test plan:
1) Doni't apply patch
2) Use an UNIMARC database
3) Use default XSLT in all displays
4) Configure a framework to allow 210 subfields from 'a' to 'h'
5) Edit a record with this framework
6) In each 210 subfield enter its letter : $a a, $b b ...
7) Save record
8) Look at record in OPAC, you see : "Publication: a, b : c, d, e, f : g, h"
9) Look at record in intranet
10) You see : ""Publication: a, b : c, d - e : g, h
11) Apply patch
12) Look at record in intranet
13) You see : "Publication: a, b : c, d, e, f : g, h"

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch makes intranet consistent with staff again on this area.
Note that we loose some punctuation like "- e".

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7b16603b31)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit d6838df1cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 13:47:09 +01:00
Marcel de Rooy 7b67ac6ce5 Bug 21874: (QA follow-up) Fix intranet sendshelf
Move encode line below regex line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c1ec452e5c)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 22b4729180)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 13:45:44 +01:00
Katrin Fischer ed654e9a89 Bug 21874: Fix encoding of cart and list email subjects
The subject of the cart and list emails is not correctly
encoded and displays incorrectly in some email clients.

To test:

Lists:
- Create a list, name it using umlauts or other diacritics
  Example:  Jugendbücher (books for youths in German)
- Add some items to your list
- Email yourself the list
- Verify that the email subject is broken

Cart:
- Install another language with non-latin characters like Greek
- Fill the cart with some titles
- Send yourself the cart
- Verify that the email subject is broken

Note: Some email clients display correctly, others not.
      It's known to be incorrect in Outlook and web.de,
      displaying nicely in Thunderbird.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested all four scripts by manipulating the cart text too in templates.
Follow-up handles intranet sendshelf.

Note: I asked Katrin to remove the encode UTF-8 statements, since we
convert to MIME and the subject line should never be UTF-8.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e40bb00ab8)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit c58f6e5a12)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 13:45:31 +01:00
Andreas Roussos aaa26d83a9 Bug 21861: (follow-up) replace onchange() with jQuery equivalent
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1280bace7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 10:58:33 +01:00
Andreas Roussos 727830e5ad Bug 21861: The MARC modification template actions editor does not always validate user input
The MARC modification template actions editor does not validate
user input when adding a conditional clause, making it possible
to save a modification action without filling in all necessary
fields.

This patch fixes that.

Test plan:
1) Create a MARC modification template and add a new action,
   e.g. "Copy All field(s) 200$a to field 600$a".
   Add a condition ("if" or "unless") but leave the relevant
   field and subfield textboxes empty.
   Add "matches" or "doesn't match" as a comparison operator.
   Check the "RegEx" checkbox, leave the regex textbox empty.
2) Click on "Add action" and notice how it accepts your input.
   Also notice the extra space in the Action column RegEx.
3) Edit your modification action and notice the missing "m/"
   before the conditional RegEx.

4) Apply the patch and hit CTRL-F5 to reload the relevant JS.

5) Edit the modification action you added previously (or add
   a new one). Try leaving the textboxes mentioned above empty
   and then submit your changes. You should get pop-up windows
   informing you about missing fields.
6) Now try typing a value in the conditional regex textbox and
   Update your action. In the Action column, there should be
   no spaces between the delimiters of the matching operator
   and the value you just entered.
7) Edit your action: notice how the "m/" before the regular
   expression and the "/" after it are now showing correctly.

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

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

Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4baf83a09a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 10:55:54 +01:00
Marcel de Rooy d31d563751 Bug 21867: Replace remaining document.element.onchange calls in marc_modification_templates.js
Replace onchange() by jQuery change().

Test plan:
Go to marc mod templates. Add, edit and delete. Check if works and no js
errors.
git grep -l -E "onchange\(" should not have occurrences outside lib.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit be78d3177e)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 99436fa499)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 10:51:05 +01:00
Marcel de Rooy 14a71ef32d Bug 21819: (QA follow-up) Replace onchange() in touched code
AFAIK we should not call document...onchange() and assume that it works.
Apparently, it does at least in some browsers. But we are not sure.
We could easily replace them here by the documented jQuery counterpart.

Note: If you try git grep -l -E "onchange\(" you will find some
occurrences in two libraries and only in one js file (this one).
We should replace all occurrences here; will open a new report for that.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Verified that the change event was triggered: span should expand/collapse.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit aeaf74b7cc)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 45b7f17038)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 10:48:12 +01:00
Andreas Roussos ea47f28398 Bug 21819: Marc modification templates action always checks Regexp checkbox
When editing a MARC modification template action, the 'RegEx'
checkbox to the right of the 'to field' textboxes will always
appear checked, even if no regular expression has been added.

This patch fixes that.

Test plan (steps 1-5 are copied from the original report -- thanks Pasi!):
1) Go to Tools > Marc modification templates, and create a new template
2) Add a new action to the template
3) Edit the action so it's "Move" field to another field.
   Do not check the RegEx checkbox after the "To" field.
4) Save the action.
5) Edit the same action again. The checkbox is now checked.
6) Apply the patch and hit Ctrl-F5 to do a hard refresh in your browser.
7) Edit the action you saved in 4): this time the 'RegEx' checkbox
   should be unchecked.
8) For completeness, add a regular expression to the "Move" action
   created in 3) and click on 'Update action'. When you re-edit this
   action the 'RegEx' checkbox should be checked.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a9fc00db03)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 57e031929d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 10:47:52 +01:00
Nick Clemens 54e1078dec Bug 21854: Use template plugin to display category description
Rather than getting the description in the script and passing, we should
just use the tmeplate plugin to get the description from the category
code.

To test:
1 - Find a patron, note their category
2 - Visit Tools - Batch patron modification
3 - Enter barcode of patron above
4 - Note category does not show in the display of patrons to be modified
5 - Apply patch
6 - Reload the page, note the patron category displays
7 - Modify the patron (anything but category)
8 - Check that category still diplays correctly in results

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit df68391a5e)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 391e7f7188)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 10:18:15 +01:00
Nick Clemens 128b073685 Bug 21837: Don't set holdingbranch filter using selected homebranch filter
To recreate:
1 - Open the overdues report (don't worry if you don't have results)
2 - Choose to filter by homebranch
3 - Note the holdingbranch filter is set to the selected homebranch
4 - Apply patch
5 - Clear filters
6 - repeat
7 - only homebranch is set

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 81ac96abec)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit cf8a03db2c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 10:02:17 +01:00
Nightly Build Bot 4e7e41f2a9 Bug 20952 - Automatic debian/control updates (oldoldstable/17.11.x)
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 09:09:04 +01:00
Mark Tompsett 8e15f71daf Bug 21853: (follow-up) to solve printpdf error
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Theoretically this follow-up makes no difference. All modules only export
printpdf and now we are just asking explicitly for printpdf. But if it
resolves some exception on the rule..

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b62714e47)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 21536e3314)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 08:11:20 +01:00
Julian Maurice e47d9fd8b6 Bug 21853: Fix PDF export of basketgroups
In recent versions of Perl, '.' is not included by default in @INC. This
breaks PDF export of basketgroups.

This patch moves acqui/pdfformat/*.pm files in Koha namespace so that
they can be 'require'd without manipulating @INC

Test plan:
1. Turn off Plack/Starman and test PDF export for every value of
   OrderPdfFormat system preference
2. Turn on Plack/Starman and test PDF export for every value of
   OrderPdfFormat system preference
3. Test on a dev install and a standard/package install

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3c18d4c18f)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 320f9bf3d2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-19 08:10:55 +01:00
Nick Clemens 516f58008c Bug 20598: Update number of tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 119653a3a1)

Conflicts:
	t/db_dependent/Circulation.t
(cherry picked from commit 1d797a8e5c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-05 09:14:39 +01:00
Marcel de Rooy 7e259683c8 Bug 20598: (QA follow-up) Tiny fixes
[1] Correct POD for _FixOverduesOnReturn
Is called by AddReturn, AddRenewal and LostItem.
Also tested in Circulation.t btw

[2] $dbh is not used in _FixOverduesOnReturn
[3] Moving all parameters to the first line.
[4] Variable $uquery is not used too.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 867f88076e)
(cherry picked from commit 2c77175467)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-05 09:14:03 +01:00
Kyle M Hall 0eedb1580c Bug 20598: Unit test
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b9ed7699e3)
(cherry picked from commit 25ea817edf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-05 09:13:09 +01:00
Kyle M Hall 5c42c2686c Bug 20598: Accruing fines not closed out by longoverdue.pl if WhenLostForgiveFine is not enabled
Test Plan:
1) Ensure WhenLostForgiveFine is disabled
2) Create an overdue with a fine
3) Mark it lost with longoverdue.pl
4) Note it is still marked as an accruing fine
5) Apply this patch
6) Repeat steps 1-3
7) Note it is no longer an accruing fine!

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 461a6f53b8)
(cherry picked from commit 180909e7a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-05 09:12:25 +01:00
Marcel de Rooy aaae83d1bf Bug 18677: (QA follow-up) Trivial fixes to Chargelostitem.t
Kind of funny that we did not touch this test here. But it passed!
Trivial fixes:
[1] Typo precessfee
[2] Typo the linked
[3] Add rollback

Test plan:
Run t/db_dependent/Circulation/Chargelostitem.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fab9936ddb)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 2d1332938c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-05 09:00:41 +01:00
Jonathan Druart 7c9b946994 Bug 18677: Remove new issue_id param from charlostitem
We have the itemnumber no need to pass the issue_id, we can retrieve it
from chargelostitem

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3475670881)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 8b02c6c3a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-05 09:00:10 +01:00
Jonathan Druart dc86427ca4 Bug 18677: Make the tests pass
Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cd250dae36)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 6adfbd33f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-05 08:59:24 +01:00
Kyle M Hall 5a4f634784 Bug 18677: issue_id is not added to accountlines for lost item fees
Test Plan:
1) Apply this patch
2) prove t/db_dependent/Accounts.t

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

[EDIT:]
Patch should have increased the number of tests obviously.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cde7a8e72c)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit b876d09e35)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-12-05 08:58:58 +01:00
Fridolin Somers 93dc736ee2 Bug 21116: (RMaint follow-up) do not use Koha::Exceptions::Exception 2018-11-29 14:56:38 +01:00
Fridolin Somers bdb94784a9 Bug 21116: (RMaint follow-up) do not use Koha::Exceptions::Exception 2018-11-29 14:43:09 +01:00
Tomas Cohen Arazi 16e0a19daf Bug 21116: Add API routes through plugins
This patch adds plugins the capability of injecting new routes on the
API.

The plugins should provide the following methods to be considered valid API-generating plugins:

- 'api_routes': returning the 'path' component of the OpenAPI specification corresponding to the routes served by the plugin
- 'api_namespace': it should return a namespace to be used for grouping the endpoints provided by the plugin

otherwise, they will be just skipped.

All plugin-generated routes will be added the 'contrib' namespace, and
will end up placed inside /contrib/<namespace>, where <namespace> is what the 'api_namespace' returns.

A sample endpoint will be added to the Kitchen Sink plugin, and tests
are being written.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/REST/Plugin/PluginRoutes.t
=> SUCCESS: Tests pass!
- Install the (latest) KitchenSink plugin
- Point your browser to the API like this:
  http://koha-intra.myDNSname.org:8081/api/v1/.html
=> SUCCESS: The /contrib/kitchensink/patrons/:patron_id/bother endpoint
implemented by the plugin has been merged!
- Sign off! :-D

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@deichman.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3fedae85f2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ab79f3fc67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-29 13:26:14 +01:00
Tomas Cohen Arazi 8a5f84725f Bug 21116: Unit tests
This path implements unit tests for the route-from-plugin development.
It adds the required methods to the Koha::Plugin::Test plugin
distributed along with the tests. A second plugin implementing invalid
OpenAPI specs is added (Koha::Plugin::BadAPIRoute).

Edit: I made terminology changes to make it less rude.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 46c992948e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f243f8f012)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-29 13:25:16 +01:00
Owen Leonard bfc7877185 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 b943991316)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5f7a2c9213)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-29 11:47:00 +01:00
Owen Leonard e6c6dff9f9 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 7b6107beaf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5d6eb1f67b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-29 11:44:41 +01:00
Andrew Isherwood 5b4e7813cd Bug 20968: (follow-up) Replace tabs with spaces
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9783773ada)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6b4410d967)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-29 11:12:51 +01:00
Kyle M Hall fb5bc30637 Bug 20968: Rename method get_intranet_catalog_toolbar_button to intranet_catalog_biblio_enhancements_toolbar_button
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e87fa069dc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2a899edbcc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-29 11:12:41 +01:00
Kyle M Hall 636bd0f195 Bug 20968: Add unit tests
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 60ca17c616)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit db0c642d9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-29 11:11:35 +01:00
Andrew Isherwood 76edb4d9ae Bug 20968: (follow-up) Respond to feedback
This patch:

- Removes the unecessary testing for
intranet_catalog_biblio_enhancements method in detail.pl
- Renames get_toolbar_button to get_intranet_catalog_toolbar_button

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7910a530b8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cd3af66cd4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-29 11:11:30 +01:00
Andrew Isherwood 2f1b848a5e Bug 20968: Add hooks into cat-toolbar.inc to display buttons
This commit adds hooks into cat-toolbar.inc to allow the display of
arbitrary buttons as supplied by plugins within the
intranet_catalog_biblio_enhancements class that provide the method
get_toolbar_button

To test:

1) Download the plugin from
https://github.com/PTFS-Europe/cla-permissions-check-plugin
2) Follow the installation instructions from:
https://github.com/PTFS-Europe/cla-permissions-check-plugin
3) TEST: Observe that the "CLA Check Permissions" button takes the user
to the Check Permissions page and a modal displays containing the
results of the query
4) Remove the API key from the plugin "Configuration" page
5) TEST: Ensure that the "CLA Check Permissions" button takes the user
to the Check Permissions page and message displays informing the user
that "Did not receive required request parameters"

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

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 741f17e916)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2c7724f3bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-29 11:11:25 +01:00
Fridolin Somers 42f56d918a Revert "Bug 21479: Add regression tests"
This reverts commit 37c5a82953.
2018-11-28 16:25:13 +01:00
Fridolin Somers 7ae75370ec Revert "Bug 21479: Remove the trace if the node does not exist"
This reverts commit 5eaf5b69d1.
2018-11-28 16:25:12 +01:00
Fridolin Somers 6ca6d881f8 Revert "Bug 21479: Zebra index can return different result"
This reverts commit 1504147070.
2018-11-28 16:25:10 +01:00
Fridolin Somers 6204d2df1d Revert "Bug 21479: "Mock" SearchEngine to use Zebra"
This reverts commit 22772e1a09.
2018-11-28 16:25:08 +01:00
Jonathan Druart b87adeb5aa Bug 21282: Sync ordered and spent values with acqui home
The order list for each fund calculates using the ecost tax excl., but
it should be tax incl.
At the moment this means that the sum on the start page table and the
order list don't match up.

Test plan:
- Create and receive orders
- Values on acqui home and ordered/spent should be the same

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 9d595e36a7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a9aec18538)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 16:16:33 +01:00
Thatcher Leonard 8a33fa85d8 Bug 18584: Our legacy code contains trailing-spaces
This patch removes trailing spaces from acquisitions-search.inc

Mentored-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@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 e3e2afd88d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 121ba294c4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 16:12:34 +01:00
Dimitris Antonakis 405a10c244 Bug 17597: Outdated translation credits
Updated translation credits for the Greek language.

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Works as expected, hyperlink to openhub tested OK.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 446142cd2b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5c04130720)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 15:51:13 +01:00
Jonathan Druart c0cfa62ecc Bug 21787: Remove unecessary test from GetHardDueDate.t
See description on the bug report for more info.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fa7b2ad08b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 25fa542479)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 15:43:13 +01:00
Jonathan Druart 4cdab45880 Bug 21015: Remove unecessary 'use Koha::Schema' statements in t/
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 9fb827d59d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 26b9c4abac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 15:37:41 +01:00
Joonas Kylmälä f504fbfcbc Bug 21015: fix performance issue with C4::Members
loading Koha::Schema ("use Koha::Schema;") takes significantly time as
it loads almost a couple hundred classes. Koha::Database has done that
already once and we can use it to get the ResultSet "Borrower" as
well, so let's use that. This also make the code more unified because
Koha::Database is used throughout the code instead of Koha::Schema.

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 83e0765f44)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f130fd6ec9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 15:37:16 +01:00
David Cook aac9f41bc3 Bug 21666: Replace unsupported use attribute with more widely supported attribute
search.js uses the 1=1004
author personal attribute which isn't supported by libraries like
Seattle Public Library.

This patch aligns search.js
with C4/Breeding.pm which uses the more widely supported 1=1003
author attribute.

To test:
1. Set up Seattle Public Library as a Z39.50 target
2. Try to search author using the Advanced Editor advanced search
3. Observe failure
4. Apply the patch
5. Try to search again
6. Observe successful retrieval of records

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a08e72c5e7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8a166e2e29)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 15:30:49 +01:00
Tomas Cohen Arazi 717dc940fa Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks
This is a consistency issue: we store '@' as the subfield for
fixed-lenght fields, yet on editing '_' is displayed (on the form and
the tab). This was probably done to avoid URI encoding problems in the
past.

This patch restores the '@' everywhere.

To test:
- Open the MARC structure for any bibliographic MARC framework
- Choose Actions > Subfields on any fixed-length field
=> ERROR: Notice the tab has an underscore (_) and the subfield code is '_' as well.
- Cancel
=> SUCCESS: '@' is displayed on the list
- Apply this patch
- Restart all the things:
  $ restart_all
- Choose Actions > Subfields on any fixed-length field
=> SUCCESS: '@' is displayed in the tab title, and on the 'Subfield
code' form field.
- Save some changes
=> SUCCESS: Things work correctly.
- Sign off :-D

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e520d69910)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fc04b4b1bc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 15:19:18 +01:00
Nick Clemens 6cac87dc9f Bug 21640: Enable output to STDOUT for Itiva outbound script
To test:
 1 - Enable the TalkingTechItivaPhoneNotification
 2 - Copy 'HOLD' notice 'email' transport to the phone section
 3 - Enable EnhancedMessagingPreferences
 4 - Find a patron and enable 'phone' for the 'Hold filled' notice
    Note: You might not be able to do this straightaway, bug 21639
    If the phone box has a '-' and not a checkbox:
    sudo koha-mysql kohadev
    INSERT INTO message_transports (message_attribute_id,message_transport_type,is_digest,letter_module,letter_code) VALUES (4,'phone',0,'reserves','HOLD');
 5 - Place a hold for the patron
 6 - Check it in and confirm the hold to set it waiting
 7 - sudo koha-shell kohadev
 8 - perl misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type=RESERVE -w 0 -v
 9 - Note the Output says it will be on STDOUT, but nothing is output
10 - Apply patch
11 - repeat
12 - Hold info is output to command line

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 12ed04eabb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c3243e912f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 15:09:19 +01:00
Magnus Enger 8bf9d17a38 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 5ea877f6cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit da971a81da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 15:06:31 +01:00