Kyle M Hall [Fri, 16 Nov 2018 14:54:39 +0000 (09:54 -0500)]
Bug 21849: Add unit tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2dbaaa300877ff6d96ae84b5a703753d97b6c340) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aa565b8e9919ee414d0693f391b141985ebacb93)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test Plan:
1) Apply this patch
2) Set up 2 items with overdue fines
3) Return one with dropbox mode
4) Note the dropbox account offset is created
5) Return one with full fine forgiveness
6) Note the forgiven account offset is created
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a2b5407ba5c74f826c1665c1a2ef1ff6d52689fd) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ff3d3776a4d9b52da49b6ad4b2a1dde1da9425ee)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The new plugin hook intranet_catalog_biblio_enhancements_toolbar_button is rendered useless due to the outputted html being escaped using the html filter. It should be using the raw filter instead.
Test Plan:
1) Enable plugins
2) Download and install the latest version of the Kitchen Sink plugin
https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/download/v2.1.21/koha-plugin-kitchen-sink-v2.1.21.kpz
3) Browse to catalogue/detail.pl for a record
4) Note you see the raw html of the plugin output in the toolbar
5) Apply this patch
6) Restart all the things
7) Reload the page
8) Note the html is now correctly rendered as a button
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ed22c5fc0f65cc3736a8dbabb159b6b4b9b2f7c4) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 55e807c287f2da9f5c031847ccecc7a9554f60d7)
Nick Clemens [Wed, 7 Nov 2018 01:32:26 +0000 (01:32 +0000)]
Bug 21778: Sort user list by surname,firstname unless user cannot manage patron lists OR edit patrons
To test:
1 - Create four users:
1 superlibrarian (or with both edit patrons and manage patron
lists)
1 with only edit patrons and catalogue
1 with only add to list and catalogue
1 with catalogue but neither edit patrons or manage patron lists
2 - Search patrons signed in as each user
3 - Note different sorting
4 - Apply patch
5 - Try searching with each patron
6 - Results should always be sorted by surname, firstname
7 - Only in the case of neither extra permission should the checkboxes
be absent
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 96b3889390f8efe9851aaa9c2cafa9e20bda3f43) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f228847155bc46433cbad4f834c2df89734b9c5c)
Nick Clemens [Thu, 6 Dec 2018 12:42:45 +0000 (12:42 +0000)]
Bug 21962: Fix authority search using 'all'
To test:
1 - Set search engine to Zebra
2 - Have some authorities and indexes up to date
3 - Search authorities with option 'search entire record'
4 - No results
5 - Apply patch
6 - Run unit tests, they pass!
7 - Repeat search
8 - Results!
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 3adf7708d544338250703165fe7e87f2690d8639) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a110125338202f30cec0bc061141d82c80652f30)
Nick Clemens [Thu, 6 Dec 2018 12:41:41 +0000 (12:41 +0000)]
Bug 21962: Unit tests
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 39c93e87f648978ec7907220710efaf64e556ea0) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d6b7e00b9cd04e15c472b2f7b075d85886ffa3e5)
Nick Clemens [Mon, 3 Dec 2018 13:05:49 +0000 (13:05 +0000)]
Bug 21405: Fix authorities pagination for Zebra and ES
Bug 20261 introduced an error because search_auth_compat responded
differently for ES and Zebra, now bug 19365 fixed the underlying
difference. This patch restores previous code to fix pagination.
Additionally we add a fix for 10000+ results in ES and remove a double
import of C4::Auth
To test:
1 - Perform an authorities search with 1+ pages using Zebra
2 - Page through results, note you are only offseeting by 1 each time
3 - Perform an authorities search with 10,000+ results in ES
4 - Click on the last page and get an error
5 - Apply patch
6 - Retry Zebra search
7 - Results should paginate correctly
8 - Clicking on last page should return last results
9 - Retry ES results
10 - Results should paginate correct
11 - Clicking on last page should return last results
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 06e6378899631da162d57d477381782f3764ec89) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fb5dd96552e84380fd30575880effd0d116309b3)
Josef Moravec [Fri, 30 Nov 2018 07:09:23 +0000 (07:09 +0000)]
Bug 21911: Regression test
This tests usuall cases, but note, that administrator could make a
branch with code "%%%" or so, which this test does not cover, and some
functionalities will not work in that case: opac limit override,
holdinbranch facet
Nick Clemens [Thu, 29 Nov 2018 14:17:37 +0000 (14:17 +0000)]
Bug 21911: Fix OPAC scoping to work with new group system
To test:
0 - Apply patch
1 - Create a library group enabled for opac search limits and add some
libraries
2 - Check the DB (or advanced search dropdown) to get the id of the
group (using 7 as example below)
3 - Add to apache configuration (OPAC virtualhost)
SetEnv OPAC_SEARCH_LIMIT branch:multibranchlimit-7
SetEnv OPAC_LIMIT_OVERRIDE 1
RequestHeader add X-Koha-SetEnv "OPAC_SEARCH_LIMIT
branch:multibranchlimit-7"
RequestHeader add X-Koha-SetEnv "OPAC_LIMIT_OVERRIDE 1"
4 - Ensure OpacAddMastheadLibraryPulldown is disabled
5 - Restart all the things
6 - Visit the opac
7 - Perform a search, confirm it is scoped to the branches in the group
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4c0682f5598d53992b6966a217b10f71a9cdaebb) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 647b853073bde006c0477c886a5cce727c3035a1)
Jonathan Druart [Thu, 6 Dec 2018 15:53:24 +0000 (12:53 -0300)]
Bug 21910: Does not deal with call context, ->search does already
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 21372f78f825c0ec439ea4a7cfe7dff6656467b9) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7b849d70e7acf818d33d0602401dd613b8787535)
Jonathan Druart [Thu, 6 Dec 2018 15:52:54 +0000 (12:52 -0300)]
Bug 21910: Remove duplicated lines in tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ee96d18b2cee07aa64d5e68078bc898d36e22146) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5ab531818003874635d842a59ec3234370b200c3)
Nick Clemens [Thu, 29 Nov 2018 14:11:36 +0000 (14:11 +0000)]
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups
To test:
1 - Add a library group (Admin->Library groups)
2 - Enable use as an opac and staff search limit
3 - Add some libraries to the group
4 - Visit advanced search on staff and opac
5 - Note the dropdown has as many empty rows as there are libraries
in the group
6 - Apply patch, restart all the things
7 - Visit staff and opac advanced search
8 - Confirm the group dropdowns are correct
9 - Enable OpacMastheadLibraryPulldown
10 - Ensure the dropdown on opac shows groups correctly
11 - Confirm earchign groups works from all three locations
12 - prove -v t/db_dependent/LibraryGroups.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@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 f3b8c66392098d69bca48bbf04b7e93fa2100280) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e9ab97390b8cad111bbe9853dc0e27172719c27)
Jonathan Druart [Wed, 5 Dec 2018 19:39:02 +0000 (16:39 -0300)]
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 4bf033c6d6b2a8bf4d5597b3fdf6355fb7060b60) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6039f64e53172a046c5b579271df7cf434b20e81)
Nick Clemens [Mon, 26 Nov 2018 13:08:05 +0000 (13:08 +0000)]
Bug 21869: Fix incorrect value setting in DB update
To test:
1 - Set some value for MarkLostAsReturned syspref
2 - Set your db version to 17.12.00.035 (or load an older db)
3 - updatedatabase
4 - Note your values are lost and db is incorrectly set
5 - Apply patch
6 - Reset values
7 - Reset DB version
8 - Run updatedatabase
9 - Original values are retained
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>
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>
Fridolin Somers [Wed, 24 Oct 2018 12:23:02 +0000 (14:23 +0200)]
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".
Marcel de Rooy [Fri, 23 Nov 2018 11:02:51 +0000 (12:02 +0100)]
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 c1ec452e5ce454b99433972a34ec1154e81a19a3)
Katrin Fischer [Fri, 23 Nov 2018 10:30:49 +0000 (11:30 +0100)]
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 e40bb00ab8da87c8c5d6e660de928d24b887df17)
Andreas Roussos [Sat, 17 Nov 2018 18:03:36 +0000 (20:03 +0200)]
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.
Nick Clemens [Mon, 26 Nov 2018 13:08:05 +0000 (13:08 +0000)]
Bug 21869: Fix incorrect value setting in DB update
To test:
1 - Set some value for MarkLostAsReturned syspref
2 - Set your db version to 17.12.00.035 (or load an older db)
3 - updatedatabase
4 - Note your values are lost and db is incorrectly set
5 - Apply patch
6 - Reset values
7 - Reset DB version
8 - Run updatedatabase
9 - Original values are retained
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>
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>
Fridolin Somers [Wed, 24 Oct 2018 12:23:02 +0000 (14:23 +0200)]
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".
Marcel de Rooy [Fri, 23 Nov 2018 11:02:51 +0000 (12:02 +0100)]
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 c1ec452e5ce454b99433972a34ec1154e81a19a3)
Katrin Fischer [Fri, 23 Nov 2018 10:30:49 +0000 (11:30 +0100)]
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 e40bb00ab8da87c8c5d6e660de928d24b887df17)
Marcel de Rooy [Thu, 8 Nov 2018 13:49:10 +0000 (14:49 +0100)]
Bug 21774: Cloned item subfields disappear when editing an item
Bug 10306 changed behavior on cloning item subfields by no longer splitting
constructions like 'A | B' in item fields like ccode.
If it is really recommended to clone item subfields, I am not so sure
about. But this patch at least restores the possibility to do so while
we discuss if we should ;)
Test plan:
[1] Run Items.t
[2] Make an item subfield repeatable in framework. And test edit items.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. Also fixes the display of collections on the items
table (on editing items).
Nick Clemens [Mon, 19 Nov 2018 14:47:04 +0000 (14:47 +0000)]
Bug 21649: [18.05.X] Pass guarantee info to template when adding child
To test:
1 - Find an adult patron
2 - Click 'Add child'
3 - Note address/phone info does not carry over
4 - Apply patch
5 - Repeat
6 - Note information populates
Marcel de Rooy [Thu, 8 Nov 2018 13:49:10 +0000 (14:49 +0100)]
Bug 21774: Cloned item subfields disappear when editing an item
Bug 10306 changed behavior on cloning item subfields by no longer splitting
constructions like 'A | B' in item fields like ccode.
If it is really recommended to clone item subfields, I am not so sure
about. But this patch at least restores the possibility to do so while
we discuss if we should ;)
Test plan:
[1] Run Items.t
[2] Make an item subfield repeatable in framework. And test edit items.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. Also fixes the display of collections on the items
table (on editing items).
Marcel de Rooy [Tue, 20 Nov 2018 15:45:17 +0000 (16:45 +0100)]
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 be78d3177e8b9bbf90c7071dc6b6e3385674d106)
Marcel de Rooy [Tue, 20 Nov 2018 15:32:46 +0000 (16:32 +0100)]
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 aeaf74b7cc6608d7b81aaba10defdca6decdaa1d)
Andreas Roussos [Sat, 17 Nov 2018 09:35:00 +0000 (11:35 +0200)]
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 a9fc00db03a8210b3edb69a922209a4e8f6df9a1)
Nick Clemens [Fri, 16 Nov 2018 17:23:14 +0000 (17:23 +0000)]
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 df68391a5ec2eac05a88373dc10c136c8d057e98)
Nick Clemens [Wed, 14 Nov 2018 19:08:09 +0000 (19:08 +0000)]
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 81ac96abec1226b6635022c0a3f69697d13c7d62)
Jonathan Druart [Mon, 22 Oct 2018 20:52:46 +0000 (17:52 -0300)]
Bug 21529: (bug 13618 follow-up) Display print notices with HTML tags
Replace a wrong html filter with raw.
Test plan:
Define a HOLD or DISCHARGE notice template, with html tags.
Generate them and confirm that html tags are displayed (which restore
the existing behaviour prior to bug 13618)
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b704a1adfc3fcee739194d7d6cb79800ba991e51)
Andrew Isherwood [Mon, 29 Oct 2018 14:10:42 +0000 (14:10 +0000)]
Bug 21529: (follow-up) USE raw filter
In order to be able to make use of the $raw filter, we need to USE it
first
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a1d24a2b61359552942fc2420fe18c093c169191)
Mark Tompsett [Sun, 18 Nov 2018 05:36:44 +0000 (05:36 +0000)]
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..
Julian Maurice [Sat, 17 Nov 2018 10:58:02 +0000 (11:58 +0100)]
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 3c18d4c18fad5a0d470c7bdf1ac746a640f25099)
Mirko Tietgen [Thu, 15 Nov 2018 23:07:14 +0000 (00:07 +0100)]
Bug 21567: Move Koha_ExternalContent_OverDrive.t to db_dependent
This tests pass on the build step only because they are skipped, due to
the absense of Test::DBIx::Class library.
It makes sense for them to be in the db_dependent directory, as they are
not completely mocked (re: external world interactions).
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e78070b80a24410de57e7b0c6da4db6bd2e3a7e)
Makes it a little easier to translate, also fixes whitespace and capitalization.
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 43d8946d5934151d38dc95b7162674dc7e95efb4)
Marcel de Rooy [Fri, 16 Nov 2018 09:37:55 +0000 (10:37 +0100)]
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 867f88076eb47c434c3edf6f7903238b5a465cdb)
Kyle M Hall [Mon, 5 Nov 2018 13:31:40 +0000 (13:31 +0000)]
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 b9ed7699e3da4966681a21c85bc78d99123d1681)
Kyle M Hall [Tue, 17 Apr 2018 18:11:41 +0000 (14:11 -0400)]
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 461a6f53b85becbefb18c0cb9356384a479aa9f1)
Jonathan Druart [Thu, 1 Nov 2018 14:47:47 +0000 (11:47 -0300)]
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 3475670881e75f47bc6b7e21f0563162e428b831)
Jonathan Druart [Thu, 1 Nov 2018 14:47:16 +0000 (11:47 -0300)]
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 cd250dae36b8dd03cbfa1b2ab691202a51daa58b)
Kyle M Hall [Wed, 11 Apr 2018 18:08:57 +0000 (14:08 -0400)]
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 cde7a8e72c04ad31bdda66908e5e0482276bdcb8)
Katrin Fischer [Thu, 1 Nov 2018 13:01:48 +0000 (13:01 +0000)]
Bug 21796: Don't unlock checkouts if restriction exists but fines are below limit
The checkout form will be removed if various conditions are
met: Restrictions, a fine above noissuescharge etc.
Bug 19933 changed the conditions, so a restriction will no longer
block checkouts, if the fines are below the set limit.
To test:
- Add a restriction
- Confirm the checkouts form is replaced by a message
- Add a fine below the noissuescharge limit
- Confirm that the form reappears
- Apply the patch
- Check that the checkout form is gone now
- Remove restriction - form should reappear
- Add to the fine, so it's above the limit
- Form should disappear
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 99013d6896fc591a7733568bcb7044cad399a7c5) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Thu, 15 Nov 2018 12:37:22 +0000 (12:37 +0000)]
Bug 7143: Update about page for new dev Thatcher Leoonard
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 505e10585ce8683af0862027aca8177b5facf3df) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 21749: (QA follow-up) Add more tests for ImportFramework
This patch adds tests for:
- Output of ImportFramework on fields removal and error conditions (file
not found)
- Different file format behaviour (csv, xml and ods are tested).
To test:
- Run
$ kshell
k$ prove t/db_dependent/ImportExportFramework.t
=> SUCCESS: All green :-D
- Sign off :-D
Note: the biblio_framework* files are based on the original one on the
patchset, and exported in 17.11 with different formats.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ecf68132b7e2eafff0d0dc8991b8ebc52534f75e) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 12 Nov 2018 16:14:19 +0000 (13:14 -0300)]
Bug 21749: Fix import of CSV biblio framework
Bug 9701 added 2 new columns to the table marc_tag_structure which broke
the import of biblio frameworks if the CSV file was generated with a
previous version.
Test plan:
- Export a biblio framework from 17.11
- Import it into 18.05+
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=21740
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2d1b80d216b2bdf4eefc05f773d85f9cf14823b3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 12 Nov 2018 16:11:42 +0000 (13:11 -0300)]
Bug 21749: Add tests for ImportFramework
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cbb90000fd21d16aa23077dd061d15954bd1955c) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 e3e2afd88d090b68ece1ae7445c10cf58d139b24) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 446142cd2ba6b9ace602d918e5ef83b0b0ccfa6a) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 29 Aug 2018 20:26:14 +0000 (17:26 -0300)]
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 9d595e36a7844f99fa5d74aad418717d12eeae37) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 21777: (QA follow-up) Fix colspan in the footer
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ea800323b70aceaa55df5b0fa96cdae8ebbc9579) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 7 Nov 2018 12:16:08 +0000 (12:16 +0000)]
Bug 21777: Fix circulation table alignment
TO test:
1 - Check out an item to a patron
2 - Note the columns are misaligned
3 - Apply patch
4 - Updatedatabase
5 - Reload the patron
6 - Note the table is fixed
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8d4136c7663d351268e8647da7189acacfc1b050) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 7 Nov 2018 17:23:27 +0000 (14:23 -0300)]
Bug 21777: Add a regression test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4290426251bc805cdbfbe263ec0e6510d6010bbf) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 8 Nov 2018 14:21:59 +0000 (11:21 -0300)]
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 fa7b2ad08befb88866e850f2b7bba34841ff30b7) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Mon, 5 Nov 2018 16:34:00 +0000 (16:34 +0000)]
Bug 21766: Correct filtering on AUDIO_ALERT_PATH js
I managed to introduce a bad filter whilst backporting bug 15734 to the
18.05.x series. This patch attempts to correct that.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 12 Nov 2018 20:05:29 +0000 (17:05 -0300)]
Bug 21775: Logout before trying to login
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7f78d4a1485c0cf68021ed426192d3f1e5cbd80f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 17 Oct 2018 18:47:29 +0000 (15:47 -0300)]
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 9fb827d59d0421b1f3e2de36239cef4c7411c666) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Joonas Kylmälä [Fri, 29 Jun 2018 08:09:41 +0000 (11:09 +0300)]
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 83e0765f448c35c6f387d41fe39feb94b9bc64f3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Thu, 1 Nov 2018 12:11:35 +0000 (13:11 +0100)]
Bug 12258: (QA follow-up) Add some missing rrrrrrs
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21158
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a83bc8ca4c15200c7d66a578f37d02095541018f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test, check the above mentioned system preferences to make sure the sentence is there and it is correct.
Followed test plan and patch is as described Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=12258
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 380f1dcbf8d3b8e65a733cc3174b9d0c0a46ab7d) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Josef Moravec [Mon, 29 Oct 2018 23:36:11 +0000 (23:36 +0000)]
Bug 21719: Fix typos
This patch was generated using codespell
Test plan:
Read through changes and confirm they make sense
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21706
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 543630b3c47322f071875627ea028a187928cdfc) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
David Cook [Thu, 25 Oct 2018 23:52:45 +0000 (10:52 +1100)]
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 a08e72c5e72ebbd17cc088584d097ecfa6b1e4d2) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 19 Oct 2018 11:49:05 +0000 (12:49 +0100)]
Bug 21619: Expand tax abreviations in acquisitions form hints
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@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 dec84e08208b16ea0d6c1423b8d0b724a5c3a777) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 21 Sep 2018 10:42:28 +0000 (11:42 +0100)]
Bug 21387: Receive items from - form should include tax hints
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@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 702ca8e9a341ea8350bb69596be5ce8c29596b45) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Tue, 6 Nov 2018 14:02:47 +0000 (15:02 +0100)]
Bug 21771: (follow-up) Revert the shift statement
Obviously you should never shift an items from an array if you need that
item later on :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with entering userid as well as entering email..
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1885e6a2146dfab4784e3d9560161d5f097cfcae) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 e520d699109958712212ead8b8935a63402e5b37) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Andrew Isherwood [Fri, 29 Jun 2018 08:23:38 +0000 (09:23 +0100)]
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 9783773ada4dec115342a4f8f16b29eb5b98cc2f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Wed, 27 Jun 2018 17:21:53 +0000 (13:21 -0400)]
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 e87fa069dc3d10284a2bd31b7c7913132fed5d06) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Wed, 27 Jun 2018 17:13:37 +0000 (17:13 +0000)]
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 60ca17c616e6026fbd271fb3f99473f3ef7edf00) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Andrew Isherwood [Wed, 27 Jun 2018 16:13:27 +0000 (17:13 +0100)]
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 7910a530b85b6ee42307d41cba57b95ced2aca27) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Andrew Isherwood [Wed, 20 Jun 2018 11:47:10 +0000 (12:47 +0100)]
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"
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 741f17e916a3f64d71b55fd87065136307e3bae7) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 24 Oct 2018 01:17:51 +0000 (01:17 +0000)]
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 12ed04eabb32cb957acd9f88d94ccada0ac09d07) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 18 Oct 2018 22:27:21 +0000 (19:27 -0300)]
Bug 21606: [sql_modes] Fix matching rules insert
Fix:
Incorrect integer value: '' for column 'offset'
Incorrect integer value: '' for column 'score'
Test plan:
Add/edit matching rules
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 32c4dbfd6814f01ae2b430e88f13b89bd374f34f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 18 Oct 2018 21:10:19 +0000 (18:10 -0300)]
Bug 21604: Fix add/edit fund/budget
[Strict SQL modes context]
For insert aqbudgetperiods:
Incorrect integer value: '' for column 'budget_period_id'
For insert/update aqbudgets
Incorrect integer value: '' for column 'budget_owner_id'
Incorrect decimal value: '' for column 'budget_encumb'
Test plan:
Add/edit budgets and funds
A good example of why we should use Koha::Object for all our objects
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7085772e8de25fe49b77555e318cc03ab6bcb33b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 2 Nov 2018 06:44:34 +0000 (07:44 +0100)]
Bug 21604: Add two trivial test cases
Adding an id in AddBudgetPeriod and an empty string in AddBudget for
budget_encumb.
Test plan:
Run Budgets.t with/without this patch in strict sql mode.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 433fc3f120cfa08fda1dd55a7db721bdf3bf1e9b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Magnus Enger [Tue, 16 Oct 2018 19:25:43 +0000 (21:25 +0200)]
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>
Jonathan Druart [Mon, 29 Oct 2018 21:16:19 +0000 (18:16 -0300)]
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>
Jonathan Druart [Tue, 16 Oct 2018 17:52:25 +0000 (14:52 -0300)]
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>
David Cook [Fri, 12 Oct 2018 01:53:22 +0000 (01:53 +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>