Nick Clemens [Mon, 24 Jun 2019 11:54:56 +0000 (11:54 +0000)]
Bug 23192: Correct tab input on waiting_holds.inc
To test:
1 - Place 2 holds
2 - Confirm the holds
3 - In the db change the expiration date:
UPDATE reserves SET expirationdate = '2019-01-01';
4 - Go to Home->Circulation->Holds awaiting pickup
5 - View your holds on the 'Holds waiting over' tab
6 - Inspect the cancel button for one of the holds, note tab = "holdswaiting"
7 - Apply patch
8 - Refresh the page
9 - Inspect the buttton, note tab = "holdsover"
10 - Cancel the hold
11 - Note you return to the holds over tab
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f45516e73ab6ac8c2240f206bd11a88e4935359c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Remove some duplicate functionality between opac-bottom and opac-shelves.
Test plan:
[1] Before this patch, add to cart from a shelf page. Observe that the
basket count is incremented with 2.
[2] After this patch, it should be incremented with 1.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 076d5be767d0b6667ce8aab0ae7b56116e48d48f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Tue, 25 Jun 2019 11:44:12 +0000 (11:44 +0000)]
Bug 23194: Fix other occurences
Throughout staff client and course reserves we also show the field with HTML filter, maybe we shouldn't?
The items lost report also included the note as a title element on title and barcode links, I removed this
as the note displays in that table
To test:
1 - Add a link to publicnotes for an item
<a href="www.google.com">Cats!</a>
2 - View opac details, confirm the note is a link
3 - Same for staff side
4 - Add item to a course reserve
UseCourseReserves preference must be set to 'Use'
From the course reserves module you will need to add a course (and possibly a department first)
Adding should be intuitive
5 - Confirm note is a link in course details on staff and opac
6 - Perform a batch checkout, confirm the itemnote shows as a link
You will need to enable the system preference: BatchCheckouts and add a patron category to: BatchCheckoutsValidCategories
Then a link should be available from checkout for a patron in that category
7 - Mark the item as lost
8 - Go to Reports->Items lost
9 - Confirm the note is a URL and that title and barcode links don't show the note
10 - Click the barcode to go to moredetails for the item - in this case note should display as editable text, not a link
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: frederik chenier <frederik.chenier@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f447658f850bca5ebcdb6f29a5572c1c1707f942) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 27 Jun 2019 13:38:50 +0000 (13:38 +0000)]
Bug 23227: Remove type attribute from script tags: Reports
This patch removes the "type" attribute from <script> tags in two
reports templates.
To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:
- Reports -> Dictionary
- Delete
- Specifying a date range for a date column
- Reports -> Items lost
- Report results
-> Datatables functionality
-> Selection tools for export
Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: frederik chenier <frederik.chenier@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d88709ec2d45df6f2a8e90ae7a94f9724b7e8e7e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Wed, 26 Jun 2019 12:39:59 +0000 (12:39 +0000)]
Bug 22951: (follow-up) Fix indentation
This patch fixes indentation related to the markup corrections in the
previous patch. It contains no textual changes.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: frederik chenier <frederik.chenier@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 178a805a5d3055dd17050111c1227a9d5cef1b96) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Wed, 26 Jun 2019 12:43:36 +0000 (12:43 +0000)]
Bug 22951: Markup error in OPAC holds template
This patch makes minor markup changes to the OPAC holds template in
order to fix validation errors.
To test, apply the patch and go through the process of placing a
hold in the OPAC. Test various aspects of the process, including cases
where the hold is blocked and an error message is displayed (for
instance, when there are no items to be placed on hold).
The page should work correctly and validating the source should
return no relevant errors.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Frederik Chenier <frederik.chenier@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e0991ae2358224a15b6880c96b8472a3cd814b1b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mark Tompsett [Fri, 28 Jun 2019 00:45:27 +0000 (20:45 -0400)]
Bug 21000: Force case sensitivity on Getopt::Long
Before patch: -D and -d are mistaken for --debug
$ sudo DEB_BUILD_OPTIONS=nocheck ./debian/build-git-snapshot -r ~/debian -v 19.06~git --autoversion -d -D="stretch"
Option d does not take an argument
git status --porcelain -unormal
git rev-parse --short=8 HEAD
dch --force-distribution -D "squeeze-dev" -v "19.06~git+20190627205913.466f99e4-1" "Building git snapshot."
dch warning: Recognised distributions are:
experimental, unstable, testing, stable, oldstable, oldoldstable,
{bullseye,buster,stretch,jessie,wheezy}-proposed-updates,
{testing,stable,oldstable,oldoldstable}-proposed-updates,
{bullseye,buster,stretch,jessie,wheezy}-security,
{testing,stable,oldstable,oldoldstable}}-security, jessie-backports, stretch-backports and UNRELEASED.
Using your request anyway.
NOTE: squeeze-dev in the first dch line and warning about Option d.
Apply patch: -D and -d are differentiated correctly.
$ sudo DEB_BUILD_OPTIONS=nocheck ./debian/build-git-snapshot -r ~/debian -v 19.06~git --autoversion -d -D="stretch"
git status --porcelain -unormal
git rev-parse --short=8 HEAD
dch --force-distribution -D "stretch" -v "19.06~git+20190627210316.b3f919a7-1" "Building git snapshot."
dch warning: Previous package version was Debian native whilst new version is not
dch -r "Building git snapshot."
NOTE: No more 'Option d' error, and "stretch" in the first dch line. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5c5d158b1bc37c63196be9ae405e4a2563315dbc) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 30 May 2019 18:15:52 +0000 (14:15 -0400)]
Bug 23018: Refunding a lost item fee may trigger error if any fee has been written off related to that item
If a lost item fee is written off, it creates a writeoff with the same itemnumber but the amount column is a negative number.
Now, when the lost item is returned, it calls _FixAccountForLostAndReturned which searchs for all accountlines with an account type of 'L' or 'W'.
Then, if the *first* of those lines has an outstanding balance, a credit is created and *all* the lines found are passed to $credit->apply. The apply method then calls is_debit on each line and when it hits the writeoff, it throws an exception ( Koha::Exceptions::Account::IsNotDebit ).
When this happens, the credit is creating but not applied the the outstanding lost item fee, and the librarian is presented with an error page.
It seems like the solution is to only fetch the first result since it seems like that is the only one we should be operating on.
Test Plan:
1) Create a lost item with a fee
2) Create a manual debit using the barcode of the item
3) Write off that manual debit
4) Check in the item, note the error
5) Apply this patch
6) Repeat steps 1-3
7) Check in the item, no error!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d4f41cc8aafbb9854b20d1de7115a81e1eb73b9c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Arthur Suzuki [Tue, 25 Jun 2019 09:17:24 +0000 (11:17 +0200)]
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref
Test plan:
1/ set uppercasesurname to 'Do'
2/ register a new patron using the REST API with lowercase surname
3/ verify the surname is not saved in uppercase
4/ apply patch
5/ repeat 2
6/ verify the surname now is saved to uppercase
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fa390ca232a0979c6786a0e00eca8d458f644f3e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 7 Jun 2019 12:19:28 +0000 (12:19 +0000)]
Bug 23077: Don't fill cardnumber with empty string
To test:
1 - Apply unit test patch only
2 - prove the tests, they fail
3 - Attempt to import the attached sample file
4 - First patron may be imported, second will give error (or both will error)
5 - If only one error, import agian, now both have error
6 - Apply this patch
7 - Prove tests, they pass!
8 - Import the sample file
9 - It succeeds!
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cc60770c4eed3ab8144acd2382e2894f7b63fb37) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 23248: Avoid opac-ISBDdetail.pl breaking on invalid biblionumber
This patch makes opac-ISBDdetail.pl redirect to a 404 page (as it
should) in the event of a bad biblionumber passed.
To test:
- Open your browser on a known record detail page (OPAC)
- Switch to the ISBD view
=> SUCCESS: It shows
- Alter the biblionumber on the URL into an obviously non-existent
biblionumber (e.g. very high value)
=> FAIL: Internal errors are shown
- Apply this patch
- Reload the bad biblionumber ISBD view
=> SUCCESS: Browser is redirected to the 404 page as it should
- Sign off :-=> FAIL: Internal errors are shown
- Apply this patch
- Reload the bad biblionumber ISBD view
=> SUCCESS: Browser is redirected to the 404 page as it should
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c3f0732eb72dfb3c4c6000a8602424772bd46b61) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 20 Jun 2019 01:08:04 +0000 (20:08 -0500)]
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED
Test plan:
0: Do not apply the patches
1: Create an item with itype, ccode, location, and holding branch set
2: Create a course
3: Add item to course, changing the values for itype, ccode, and location
4: Click Edit for that item on course-details.pl
5: Assign new values for itype, ccode, and location but leave the holding library dropdown set to LEAVE UNCHANGED
6: Hit Save
7: Back on course-details.pl, observe that the item is still showing the values set in step 3
8: Apply this patch
9: Repeat 4 to 6
10: Back on course-details.pl, observe that the item is now showing the correct values
11: Edit the course reserve again, setting new values for itype, ccode, and location and setting the holding library dropdown to whatever the holding library for the item is currently
12: hit save
13: On course-details.pl, see that the change actually happened, the item is now showing the values set in step 9
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e4ee3636304d06a0492fee6a1fcd9e4c65a17be6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mark Tompsett [Wed, 3 Jul 2019 02:35:16 +0000 (02:35 +0000)]
Bug 23230: (follow-up) Fix broken tests
Before patch, the new tests don't run.
After patch, they do.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 288cc505557fdcb167737f1894cee581526b4741) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
On using _version_compare in plugins development, it would be nice if it
was able to be called as an object method. This way we don't need to
fully qualify it like this:
Koha::Plugins::Base::_version_compare
and we can do
$self->_version_compare
instead.
This patch implements this behavior change. It is backwards compatible
so plugins using the 'old way' don't break.
To test:
- Apply the unit tests patch
- Run:
$ kshell
k$ prove t/db_dependent/Plugins.t
=> FAIL: Tests fail
- Apply this patch
- Run:
k$ prove t/db_dependent/Plugins.t
=> SUCCESS: Tests pass!
- Sign off :-D
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 90acef7a9b860e70631ff243c21b435a7d081a16) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2ff5f9fb633e6f3786b093d2a2f202a66db7b3d0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 28 Jun 2019 15:27:27 +0000 (15:27 +0000)]
Bug 17003: (QA follow-up) Fix the number of tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 162ea12db99e3ad2face427548a1f4e6f469ef77) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Josef Moravec [Fri, 29 Mar 2019 07:53:27 +0000 (07:53 +0000)]
Bug 17003: (follow-up) Update definitions according to voted RFC
Test plan:
1) Have some patrons with checkouts, some renewable and some not
renewable
2) Use your favorite API tester and access GET
http://koha.url/api/v1/checkouts/{checkout_id}/allows_renewal
3) Check the response is OK according to voted RFC:
https://wiki.koha-community.org/wiki/Checkouts_endpoint_RFC#Checkout_renewability_2
4) prove t/db_dependent/api/v1/checkouts.t
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0619aab9971c7f4d4859620abbac7ad2bfe93364) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Josef Moravec [Thu, 21 Feb 2019 02:30:00 +0000 (02:30 +0000)]
Bug 17003: Adapt to OpenAPI
Test plan:
prove t/db_dependent/api/v1/checkouts.t
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0404ecec4b619ebe14ac262332870004bb88878c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lari Taskula [Mon, 22 Aug 2016 14:35:44 +0000 (17:35 +0300)]
Bug 17003: Add API route to get checkout's renewability
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 563458f20e413388d11cf92ea36d2867f488416f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 7 Jun 2019 10:14:36 +0000 (10:14 +0000)]
Bug 23045: Return record along with errors
We don't seem to directly handle the errors in most cases, let's always return the record
To test:
1 - Add some blank lines to editor, previous patch is okay with this
2 - Add a line with just 'e' or some other incomplete field
3 - Try to save
4 - Note JS leader error
5 - Apply this patch
6 - No errors
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f927d801121f9d7b291516649cf3b55be49b8e3d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Tue, 4 Jun 2019 14:25:53 +0000 (14:25 +0000)]
Bug 23045: TextMarc errors on blank lines
Since bug 16251 we use TextMarc to get some record fields, however, it throws an error when
processing blank lines.
We should just pass on these rather then erroring
To test:
1 - Define a new macro that delete more fields than it adds
delete 245
2 - Run it
3 - Note an error in JS console, and helpers will not load
4 - Apply patch
5 - Reload, try again
6 - No error
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 545f38d13c210e4cb173e67d2578d825a9ffeb47) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 28 Jun 2019 19:01:04 +0000 (14:01 -0500)]
Bug 23225: Do not hide a biblio if there is no item
This patch fixes a 404 redirect from the OPAC ISBD view if the
bibliographic record does not have item attached.
Signed-off-by: Luis F. Lopez <lflfalagan@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f317d384f657bb8341a1a641343e18ed9598240d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 28 Jun 2019 19:00:53 +0000 (14:00 -0500)]
Bug 23225: Add a test
Signed-off-by: Luis F. Lopez <lflfalagan@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f5d3dec2e4ddfa20006cd9f81e28616b36230685) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch re-indents the template for batch record modifications. It
makes only whitespace changes. It should have no effect on the behavior
of the page.
To test, apply the patch and perform a diff against master using the
'-w' flag:
git diff -w origin/master
There should be no changes reported.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1693c2e01d6eb001a35caf3bb31b9d057c2136fe) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Fri, 21 Jun 2019 14:07:49 +0000 (14:07 +0000)]
Bug 23183: Reindent cataloging.js
This patch makes some very minor corrections to indentation in
cataloging.js, a JavaScript file used by the bibliographic and item
records editors.
To test, apply the patch and perform a diff against master using the
'-w' flag:
git diff -w origin/master
There should be no changes reported.
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Bin Wen <bin.wen@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f50afc1fc0b9044c21564b45f44687993ebc07e3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d5fd85da18e7e3c548cc9d56689b09fd34615aed) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mark Tompsett [Tue, 11 Jun 2019 13:39:48 +0000 (13:39 +0000)]
Bug 22128: Removed outdated comment
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 787b86f9d4d3aa83502f9b2afdc98d9ff6761b8e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Rudolf Byker [Fri, 24 May 2019 18:25:45 +0000 (13:25 -0500)]
Bug 22128: Use DROP USER IF EXISTS instead of GRANT USAGE before DROP USAGE
MySQL 5.7 is old, and the latest versions fail on "GRANT USAGE" if the
user does not exist. "DROP USER IF EXISTS" has been with us since 5.7,
so all users should have it by now. This patch fixes the issue.
To test:
Try to koha_remove a site, and if it works with no errors, all good!
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e9bb407f62a208d42aefb03d16decd87bae228e7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 26 Jun 2019 12:49:14 +0000 (12:49 +0000)]
Bug 23220: Prevent form submission before redirect
To test:
1 - Check in an item to generate a transfer (form another library, no floating)
2 - Check it in again, click 'Cancel transfer'
3 - It may or may not work
4 - To highlight the issue edit return.tt to add the delay line as below:
$('.cancel-transfer').on("click",function(e){
delay(5000);
window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber | html %]&canceltransfer=1'
});
5 - Check in the item repeatedly, click 'Cancel transfer'
6 - View the item in the staff or opac and verify it remains in transit
7 - Undo changes above, apply patch
8 - Test 'Cancel transfer', note it works
9 - Add the delay back in, confirm it still works
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4dcf416dc9547fd28e6ed846d08d6bbecb144552) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Fri, 21 Jun 2019 01:25:02 +0000 (01:25 +0000)]
Bug 23126: Remove more unnecessary linebreak processing from serial collection
This should have no visible effect on the templates as the
information the grep changes is not used in the template.
It's also strange, that these lines existed, as
GetSubscriptionsFromBiblionumber contained the same changes.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2455286da42b73fa3efc29ac1a51ca81a0017a8e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Tue, 18 Jun 2019 06:06:10 +0000 (08:06 +0200)]
Bug 23126: Display multi-line entries in subscrpitions correctly
There are several notes and other fields in a subscription that
can be entered as multi-line input with breaks. We should display
them as they were entered with keeping the line breaks intact.
To test:
- Add a subscription
- Add comments including line breaks in internal and OPAC note
- Check the manual history checkbox
- Go to the subscription detail page, tab 'Planning'
- Use the 'Edit history' link to edit the history
- Enter content with line breaks in all the input fields where
it's possible
- Go to the OPAC detail page for your subscription record
- Go to tab 'Subscriptions' > More details > Brief history
- Verify the line breaks show there as <br>
- Apply patch
- Relaod page, verify all information displays correctly now
- Go back to the detail page, subscription tab - verify same there
- Go back to the subscription detail page in staff
- Check editing the history works as expected
- Verify information on all tabs displays correctly
- Receive a serial issue - verify note on top displays right
- Go to the serial collection page of the subscription - same there
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 316eda1036fd08f9c78578b27e85fd79c6895237) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Julian Maurice [Wed, 19 Jun 2019 10:07:58 +0000 (12:07 +0200)]
Bug 23156: Add pagination to checkouts in ILS-DI GetPatronInfo service
When patrons have a lot of checkouts, GetPatronInfo can take a lot of
time. This patch introduces two new parameters to allow pagination of
this list of checkouts
Also, fix a warning in C4::ILSDI::Services::GetPatronInfo
Test plan:
1. Go to /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X&show_loans=1
where X is a borrowernumber of a patron who has several checkouts
Verify that all checkouts are listed
2. Add '&loans_per_page=1&loans_page=1' to the URL. Verify that you have
now only one checkout listed, and that there is a new element
<total_loans> which contain the total number of checkouts
3. Increase the page number in the URL until you have seen all checkouts
4. prove t/db_dependent/ILSDI_Services.t
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2351693b61db83e0405157fd75951abee8df0116) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Tue, 18 Jun 2019 13:29:02 +0000 (14:29 +0100)]
Bug 22566: Add 'branch' key to GetPreparedLetter
The branch key was missing from the subsitution call to
GetPreparedLetter.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b3795df8012545af4134d7402e9609e2d89f7be9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Tue, 18 Jun 2019 13:24:27 +0000 (14:24 +0100)]
Bug 22566: Clarify intent of reports and add warnings
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4e4f0b637c66ca04a07473c347cc741d456c20c5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Tue, 18 Jun 2019 12:38:43 +0000 (13:38 +0100)]
Bug 22566: Rename 'report_email' to 'report_by_branch'
To clarify the intention of this routine, lets rename it
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e226ba3c018a890c823f10365dbe2b3d1d22d23) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Tue, 18 Jun 2019 11:57:07 +0000 (12:57 +0100)]
Bug 22566: Accept 'all' in the branch params
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2b392a6db231c8069d57be88ebf4f2960af199fa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 7 Jun 2019 11:50:32 +0000 (12:50 +0100)]
Bug 22566: Fix some more issues
1) Fix warning for undefined value in sprintf when no items have the
indemand flag set.
2) Corrections to report_full for bad ternary in string construction
3) Perldoc corrections
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4f3413f0d2688017f6a35b43d0d1d4a9d7295c5a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 22 Mar 2019 17:23:35 +0000 (13:23 -0400)]
Bug 22566: Fix some problems
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b62473d192abaf9371bffb0ec4d73267a0070447) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Tue, 21 May 2019 14:45:06 +0000 (14:45 +0000)]
Bug 22949: Markup error in OPAC course reserves template
This patch adds a missing "=" in opac-course-reserves.tt in order to
quiet errors returned by the HTML validator.
To reproduce the problem you should have one or more course reserves
available in the OPAC. Go to the course reserves page. Run the page
through the W3C validation service: https://validator.w3.org. Either by
pasting in the URL for the search results (if web accessible) or by
viewing source, copying, and pasting into "Validate by Direct Input."
This patch addresses these errors:
- 'Quote " in attribute name. Probable cause: Matching quote missing
somewhere earlier.'
- 'Attribute class"inst_surname" not allowed on element span at this
point.'
To test, apply the patch and try again to reproduce the validation
errors. Those errors should no longer be present. There should be no
visible change to the page.
Signed-off-by: Frederik Chenier <frederik@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35fe9cf40bb1472799db0f7596d33f1bd184fb9b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Wed, 19 Jun 2019 11:42:16 +0000 (13:42 +0200)]
Bug 23158: keep on-site checkout info when using itemBarcodeFallbackSearch
When using preference itemBarcodeFallbackSearch one can enter a search term instead of a barcode in checkout form.
If on-site is selected this should be transmitted to itemBarcodeFallbackSearch form.
Test plan :
1) Enable system preferences "itemBarcodeFallbackSearch" and "OnSiteCheckouts"
2) Disable system preference "ConsiderOnSiteCheckoutsAsNormalCheckouts"
3) Go to a patron circulation page
4) Check "On-site checkout" in "Checkout settings"
5) Enter a barcode in checkout form and click on "Check out"
6) You see the checkout in table with red "(On-site checkout)"
7) Check "On-site checkout" in "Checkout settings"
8) Enter the title of a record in in checkout form and click on "Check out"
9) Click on "Checkout" on a line
10) You see the checkout in table with red "(On-site checkout)"
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 12ef157d757431520d63ab154b9572a855acf317) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Julian Maurice [Wed, 19 Jun 2019 09:10:14 +0000 (11:10 +0200)]
Bug 23154: Add pagination to /api/v1/checkouts
Allow to use _page and _per_page query parameters for
/api/v1/checkouts
Also fix a timezone problem in t/db_dependent/api/v1/checkouts.t
Test plan:
1. With your favorite REST tester tool, or directly in the browser,
fetch http://koha/api/v1/checkouts and check that you have results
2. Fetch /api/v1/checkouts?_per_page=1&_page=1 and check that only the
first result is returned. Check that response contains headers
X-Total-Count and Link
3. Fetch /api/v1/checkouts?_per_page=1&_page=2 and check that only the
second result is returned. Check that response contains headers
X-Total-Count and Link
4. prove t/db_dependent/api/v1/checkouts.t
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 088522032f33b6a5931cbea1b928537e7fe33fd0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Tue, 7 May 2019 18:53:29 +0000 (14:53 -0400)]
Bug 22862: Normalize SMS messaging numbers before validating them
Librarians often copy and paste patron data, including phone numbers. SMS phone numbers are now being validated to conform to the E.164 specification. It would be nice to try to normalize that data by stripping non-numeric data from the paste (i.e. dashes, parens, etc ).
Test Plan:
1) Apply this patch
2) On the staff side, Attempt to enter invalid characters the SMS number field
3) Note you cannot enter invalid characters
4) Attempt to paste a phone number with invalid characters
5) Note those characters are removed on paste
6) Repeat these steps on the OPAC
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 115f4f2045a6c695d1eed47cd401b7759630ac4d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 18 Dec 2017 15:41:33 +0000 (15:41 +0000)]
Bug 15704: Split up Zebra indexing of RDA 264 information
To test:
1 - Add a record with a unique publisher "Supercalifragilistic" in the
264 b field
2 - Search for the value
3 - Record not found
4 - Apply patch (may need ot copy the .xml file into koha install)
5 - Reindex all the things
6 - Search for the value
7 - Success!
Signed-off-by: Felicia Martin <felicia.martin@dncr.nh.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3599e57bf67a1357c13903fbf07f07cb2c94e756) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Thu, 13 Jun 2019 10:42:02 +0000 (11:42 +0100)]
Bug 23115: Tweak display of totals on 'Fines and charges' page
This patch tweaks the display of totals on the OPAC 'Fines and charges'
page to clarify between the totals before and after applying credits.
Test Plan:
1) Add some debts and credits to a patrons account
2) Look at the 'Fines and charges' page before applying the patch
3) Look at the 'Fines and charges' page after applying the patch
4) Varify the new layout is an improvment or not
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 49275f27d43990746b4af5c6335d4fe7f38de7b4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Thu, 13 Jun 2019 09:02:35 +0000 (10:02 +0100)]
Bug 23106: Tweak display of totals on payment page
This patch tweaks the display of totals on the fines payments page to
clarify between the totals before and after applying credits.
Test Plan:
1) Add some debts and credits to a patrons account
2) Look at the pay page before applying the patch
3) Look at the pay page after applying the patch
4) Verify the new layout is an improvment or not
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7c5e7ca9c47ac6c8a8b7d89da46e7354d8fea69d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Mon, 17 Jun 2019 21:20:41 +0000 (23:20 +0200)]
Bug 23098: Reword success message of KOC upload process
When uploading KOC files the processing of transactions needs
to happen in a separate second step. This is why the success
message "Your file was processed" was found to be misleading.
This patch changes it to the wording suggested by Benjamin
Daeuber in the original bug report. Thx!
To test:
- Create a KOC file either manually or by downloading it
from the plugin
- Upload the KOC file into Koha using Circulation >
Upload offline circulation file (.koc)
- Verify the new message is clear and has no typos :)
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 286f151009f778d6d4d0890b1a8bead1a6e62bde) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 28 Jun 2019 14:15:40 +0000 (10:15 -0400)]
Bug 23151: (QA follow-up) Fix atomic update
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4f90d7ecc7d07551c2115ed0c564dc918735d428) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mark Tompsett [Wed, 19 Jun 2019 16:31:17 +0000 (16:31 +0000)]
Bug 23151: (follow-up) tweaked tests
This forces the tests to use the new changed_fields
field.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5c5a261e4ed9880723ce782a2c85677d2e1d0e05) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 19 Jun 2019 03:54:27 +0000 (22:54 -0500)]
Bug 23151: Add tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 286ffd5f2f255e77aac1099f31b9c418827d842e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mark Tompsett [Wed, 19 Jun 2019 16:29:59 +0000 (16:29 +0000)]
Bug 23151: Tweak to use the new database structure
This will use changed_fields to know whether a
borrower field is actually modified.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 30fd4eb1a59fd480406261f30daa40692f16bc10) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mark Tompsett [Wed, 19 Jun 2019 16:32:10 +0000 (16:32 +0000)]
Bug 23151: Schema changes
It is best to regenerate these from scratch.
On a kohadevbox:
$ misc/devel/update_dbix_class_files.pl --db_name=koha_kohadev --db_user=koha_kohadev --db_passwd=password
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1af2698b84e21c11f80ed5c080430596ee712709) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mark Tompsett [Wed, 19 Jun 2019 16:28:44 +0000 (16:28 +0000)]
Bug 23151: Modifiy database structure
This modifies a fresh install structure, and provides
an atomic update.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d102165f8de3b808e2f555df2c97e8864b5445aa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mark Tompsett [Thu, 4 Jul 2019 00:29:01 +0000 (00:29 +0000)]
Bug 23250: Just use an @ in the password
Rather than try to use -y and symbols, since
older versions of pwgen don't have the -y,
Purposefully just shorten the generated
password to 15 characters and put @ on the end.
This avoids nasty shell globbing, fixes the
MySQL requiring a symbol by default in the
newer versions.
While @ at the end is less secure, the
password portion providing security is
still 15 characters long.
Before patch, password should have potentially
multiple ugly symbols in it.
After patch, when creating an instance, the
password will have an @ at the end of it.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a6866afa343e3b53ad77a36552e19404ac7afab) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 13 Jun 2019 10:34:38 +0000 (06:34 -0400)]
Bug 23116: AllowHoldPolicyOverride allows a librarian to almost place a hold on an item already on hold
A library appears to be able to place a second item level hold on an item a patron already has on hold if
A) AllowHoldPolicyOverride is enabled
and
B) the circ rule allow for multple item level holds.
Once the patron submits the hold requests though, the hold does not get stored in the database.
Because allowing two item level holds for the same item makes no sense, we should not allow
this attempt to take place, even if AllowHoldPolicyOverride is enabled.
Test Plan:
1) Enable AllowHoldPolicyOverride
2) Set up circ rules to allow for multiple item level holds on one record
3) Place an item level hold on a record
4) Note you can force placing a second item hold on that reocrd
5) Attempt to do so, it will not actually work
6) Apply this patch
7) Note you can no longer place another item level hold for the same item
you just placed an item-level hold on
8) Note you can still force holds that contravene the circ rules for
any and all other reasons
9) Test with record level holds
10) Test by placing multiple holds from search results
Signed-off-by: Martha Fuerst <mfurest@hmcpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Simple fix for a regression. Works as expected. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2c5e9bed7de83d01be755475b96a3cf439e0126c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
David Cook [Thu, 6 Jun 2019 00:31:13 +0000 (10:31 +1000)]
Bug 23057: If checked_in_ok is set and item is not checked out, alert flag is supressed for *any* reason
This patch fixes a bug from Bug 15221 and hopefully also makes it so that the alert flag
is suppressed when checked_in_ok is set and an item is not checked out.
To test:
0) Create patron in web interface with a cardnumber and userid of "staff" with a password
that matches the account in SIPconfig.xml. Also set their branch to CPL
(also matching SIPconfig.xml).
1) Create an item with a barcode of 'test'
2) Choose a patron to check out to and record their borrowernumber
In one terminal:
3) cd to your git directory (e.g. /home/koha/koha)
4) perl ./C4/SIP/SIPServer.pm ~/koha-dev/etc/SIPconfig.xml
In another terminal:
5) cd to your git directory (e.g. /home/koha/koha)
6) perl ./misc/sip_cli_emulator.pl -l CPL -su staff -sp <password> --port=6001 --address=localhost --item test -m checkin --patron <borrowernumber>
NOTE: You need to replace <borrowernumber> with the borrowernumber from Step 2, and <password> with the password from Step 0.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 97af85525f8a828551ff30d1522308f9efe2be54) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Joonas Kylmälä [Mon, 3 Jun 2019 14:58:34 +0000 (14:58 +0000)]
Bug 23034: Remove uninitialized value warning in Mana KB settings
This gets rid of the warning "Use of uninitialized value $auto_share
in string ne at [...]" by initializing the variable with empty string.
Test plan:
1) Go to page cgi-bin/koha/admin/share_content.pl and unselect "Auto
subscription sharing". Click "Save".
2) Check plack-error.log and notice the warning "Use of uninitialized
value $auto_share [...]"
3) Apply the patch and repeat the previous steps but now this time the
warning is gone in plack-error.log.
4) Make sure the AutoShareWithMana syspref with and without the patch
is in unselected state after clicking "Save".
Sponsored-by: The National Library of Finland Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0df3fc3dae575ceb16b85de6c201f5e82d01059c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Tue, 11 Jun 2019 13:31:45 +0000 (15:31 +0200)]
Bug 22944: remove obsolete unit test
Test 'AnonymiseIssueHistory should not return any error if success' is obsolete,
previous statement will explode if something went wrong.
Test plan :
Run t/db_dependent/Koha/Patrons.t
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ed7b3760965ec5a52783efe64bcba13b45b3725a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Tue, 21 May 2019 09:55:40 +0000 (11:55 +0200)]
Bug 22944: avoid AnonymousPatron in search_patrons_to_anonymise
In Koha::Patrons::search_patrons_to_anonymise() old issues already affected to the anonymous patron should be avoided. It is useless and can impact performance.
It is already working if AnymousPatron is not defined or 0 because of :
'old_issues.borrowernumber' => { 'not' => undef }
In theory the anymous patron should have privacy=0 but in case its not it should be explicitly avoided.
Test plan :
Run t/db_dependent/Koha/Patrons.t
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 66975364b672ea5f362d49f6e5fca8c9a0e8326c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Tue, 21 May 2019 09:17:11 +0000 (11:17 +0200)]
Bug 22944: change unit tests
Add a dedicated UT and correct a test return value
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 48e5713e6ff78d7aad7eff9e239ec8779d62655c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mark Tompsett [Mon, 17 Jun 2019 17:57:46 +0000 (17:57 +0000)]
Bug 22571: (follow up) fix Donald cut-&-paste error
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d08e776cf1e25ffa407bb3a5d668c1b140be6ec2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Sun, 5 May 2019 17:41:46 +0000 (12:41 -0500)]
Bug 22571: Handle control fields in MMT for conditionals
Control fields are not handled correctly by Koha::SimpleMARC when
comparaison (with or without regex) is done.
Which means we did not support something like:
Do something if control field 008 equals or matches "a string"
Test plan:
Create a new MARC modification template and a new action, like:
Add new field 100$a with value "foo bar" if 008 (or any other control
fields) matches (or equals) a regex
Then use the record mofication tool and confirm that the new field is
create if the regex matches 008 of the bib record
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c59586aebe1d8eab56d3cd32b5156fc1a61f11ec) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Sun, 5 May 2019 17:41:43 +0000 (12:41 -0500)]
Bug 22571: Add tests
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f6009342a95575dc6b1157c953f5e6e8c249b6d0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Fri, 14 Jun 2019 08:43:15 +0000 (10:43 +0200)]
Bug 22617: Fix checkout notes typo in manage_checkout_notes permission usage
When logged into the staff client with an account with full circulate permissions (and therefore including the manage_checkout_notes permission) an error occurs when clicking on the Checkout notes pending link. The account is logged out automatically with the message: "Error: you do not have permission to view this page. Log in as a different user".
The same error occurs for both the link on the home page dashboard and from the Circulation module button. Works as expected if Superlibrarian permission is set.
This is just a typo in perl script : circulation instead of circulate
Test plan :
1) Set preference "AllowCheckoutNotes" to "Allow"
2) Create a user with only permissions "catalogue" and "circulate > manage_checkout_notes"
3) Loggin with this user
4) Go to "Circulation" home page
5) Click on "Checkout notes"
6) You should be allowed to access
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 206498dc5585fbd555181a1b241d5049632870df) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 21 Jun 2019 11:02:43 +0000 (11:02 +0000)]
Bug 23179: Add 'edit subfields' button to framework management
To test:
1) Go to Administration > MARC bibliographic framework
2) On a line click Actions > MARC structure
3) Note the dropdowns for each tag are: Edit, Subfields, Delete
4) Apply patch
5) Reload and note dropdowns are: Edit tag, View subfields, Edit subfields, Delete
6) Confirm options do what is selected
Signed-off-by: Bin Wen <bin.wen@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6b6dc7bc791853d4dafb7f9ab02d3767c926ff08) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Wed, 19 Jun 2019 05:04:25 +0000 (07:04 +0200)]
Bug 23153: In framework management action subfields must not go directly to edition
Since 18.11, when viewing a framework field clicking on Actions >
Subfields goes to subfields edition instead of subfields table view.
This is because link contains op=add_form.
This is is also missing /cgi-bin/koha/admin.
Test plan :
1) Go to Administration > MARC bibliographic framework
2) On a line click Actions > MARC structure
3) On a line click Actions > Subfields
4) You see subfields table
5) Click on Edit subfields
6) You see subfields edition tabs
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 49e0384f10f659e337fac1b08e6bdd2c163151ae) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 18 Jun 2019 01:07:29 +0000 (20:07 -0500)]
Bug 15814: Add missing filters
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 12a9dfb6593c4d5ccc6936b85c82479c12337309) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 30 May 2019 02:28:23 +0000 (21:28 -0500)]
Bug 15814: Handle correctly MMTA edit button
The MARC modification template action edit buton does not correctly
handle variable escaping.
Assigning a JS variable containing the JSON representation of the
hashref will make the processing much more easier.
Test plan:
Create a MARC Modification Template with several actions.
In the description you should use the following characters, to try to
break this patch: \ ' " \n \r
(not sure what we handled \n and \r)
Then edit the action, modify and save again.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7a80483a1358a7bc3e516a8fbc92d34b6559dcac) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>