Jonathan Druart [Sat, 11 May 2019 15:23:28 +0000 (10:23 -0500)]
Bug 20514: Use streetnumber when searching for patrons by address
The streetnumber field was ignored from the search.
Test plan:
Create a patron with streetnumber="12", address="rue des cerisiers"
Search for patrons using the search field "street address"
using: 12 rue des cerisiers
=> Without this patch the patron will not be returned
=> With this patch applied it will!
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 97ec0a2e4bf76cf2e67a7ddbd463d9942a4fe383) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 2 May 2019 01:05:30 +0000 (21:05 -0400)]
Bug 22781: Correctly filter the emails
Ho, another bug!
The email was not correctly filtered.
Test plan:
Use the evil string for an email, do a search.
=> Notice that without this patch the results never show up
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5410186f6829fc4b74a845e8954bd7eea3f19862) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 2 May 2019 00:54:02 +0000 (20:54 -0400)]
Bug 22781: Does not double filter address
Ho, a bug!
Some fields in the address where double filtered.
Test plan:
Use the evil strings in the address field and do a search, you will see
double html encoded characters without this patch.
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ecb12104ffc7284089a1c8134ca8811e99e7419c) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 2 May 2019 00:29:05 +0000 (20:29 -0400)]
Bug 22781: Test patron's info filtering
The patron's data was not correctly escaped actually.
Test plan:
This is a good value for the whole patchset: <strong>fir's"tname</strong> \123 ❤
use it for a patron's firstname, then do a search
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 35d00030ceb572822979300a5291356a32427a16) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 2 May 2019 00:28:04 +0000 (20:28 -0400)]
Bug 22781: Escape cardnumber, category's description, library's name and dateexpiry
This will fix the previous failure. Note that other fields like
borrowernumber, Price escaped values, integers, etc. could be escaped
the same way but will be useless (save polar bears).
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3a3057545c56f4f1a41fcd7643265204844cd2d3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 2 May 2019 00:28:55 +0000 (20:28 -0400)]
Bug 22781: Add tests
Test plan:
Apply only this patch
=> The tests will fail, the library's name is not correctly escaped.
Note:
This applies for the whole patchset, when the tests fail you will need
to remove the patrons added by the tests with the following SQL query:
delete from borrowers where surname like "test_patron_%";
We are expecting END to be called even if something goes wrong, but
DESTROY must be used instead. This will be fixed separately, on its own
bug report.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6e8ecb8c6c8cf5d5188d2ad138e4fdbd8f395b3e) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Mon, 11 Feb 2019 14:04:01 +0000 (14:04 +0000)]
Bug 22225: Correctly use invoiceincgst over listincgst
Mistakenly, we were looking at listincgst in the templates but using
invoiceincgst in the scripts. This patch rectifies that by switching to
use invoiceincgst in the templates too.
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 43047ee734e2b6b650e43710a712390433cbb2bd) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 10 May 2019 17:27:40 +0000 (12:27 -0500)]
Bug 22878: Do not pass layout_id on creating a layout
Attempting to create a patron card layout with mysql strict mode on gives the following error:
DBD::mysql::st execute failed: Incorrect integer value: '' for column 'layout_id' at row 1
Test plan:
- Turn on sql_strict_modes
- Create a new patron card
=> Must success with this patch applied
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8d53fae9494b50c0cf2dcc98b18982b0d8fc416f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 10 May 2019 17:27:34 +0000 (12:27 -0500)]
Bug 22878: Add tests
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9f18afa7b34574cd872c94ee366a8d3e75085413) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To reproduce warns:
1) Go to Tools -> Notices & slips
2) Create a new notice of any module
Notice these warns:
Use of uninitialized value $code in regexp compilation at
/home/vagrant/kohaclone/tools/letter.pl line 265.
Use of uninitialized value $code in regexp compilation at
/home/vagrant/kohaclone/tools/letter.pl line 265.
Use of uninitialized value $code in regexp compilation at
/home/vagrant/kohaclone/tools/letter.pl line 265.
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_svc_letters_get line 50, this
can lead to vulnerabilities. See the warning in "Fetching the value or
values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_svc_letters_get line 50, this
can lead to vulnerabilities. See the warning in "Fetching the value or
values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.
3) Create a new notice of the Circulation module
Notice this additional warn:
Use of uninitialized value $code in pattern match (m//) at
/home/vagrant/kohaclone/tools/letter.pl line 258.
To test:
4) Apply patch and refresh page
5) Run steps 1-3 again and confirm no warns show
Sponsored-by: Catalyst IT Signed-off-by: Maryse Simard <maryse.simard@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 700b7dfa09e38c074cebbbb5caac64e031d5c0d5) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 15 May 2019 12:10:15 +0000 (12:10 +0000)]
Bug 22836: (follow-up) improve test message
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 92ab7f66eb5371596d8c46e56f4fdb503ed5d81c) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 3 May 2019 01:04:54 +0000 (21:04 -0400)]
Bug 22836: (follow-up) Bug 22478: (QA follow-up) Make test consistent with variable name
One occurrence was missing.
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 7799f4ddd1f1fe111081dc3695c9038fa500e961) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
https://bugs.koha-community.org/show_bug.cgi?id=22836 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 7bed2a3fe61ff605b636e292e73b96947de23b29) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
https://bugs.koha-community.org/show_bug.cgi?id=22836 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 c265fcc476bc4d4fc74d5a23c0d5ef8ef21650b2) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 10 May 2019 16:11:14 +0000 (11:11 -0500)]
Bug 22812: Use Koha::Subscription in NewSubscription
Starting to write tests I realize that we are going to add too much
specific logic which is already handled in Koha::Object->store.
The easiest and safe way is to use it :)
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b41f215bfedbae0898a9291d2f14e2a3dd560049) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 6 May 2019 18:50:54 +0000 (13:50 -0500)]
Bug 22812: Fix GROUP BY in checkrouting
On the way, let fix this error
DBD::mysql::st execute failed: Mixing of GROUP columns
(MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is
no GROUP BY clause [for Statement "SELECT count(routingid) routingids
FROM subscription LEFT JOIN subscriptionroutinglist
Test plan:
Create a routing list, search for subscriptions
In the action list you should see "Edit routing list (1)" or "New
routing list"
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 256b134a94e83b7072b5891a2d60f0e08e813583) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 6 May 2019 18:50:26 +0000 (13:50 -0500)]
Bug 22812: Add tests for checkrouting
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0759811ab629e8215ee270b4ec920f71d9bc0d25) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 6 May 2019 18:34:19 +0000 (13:34 -0500)]
Bug 22812: Fix new subscription with strict sql modes
With sql_strict_modes turned on, if you try to create a new subscription
you will get:
Incorrect integer value: '' for column '$INT_COLUMN' at row 1
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e8e7ea352ef237555ee4d47c98feb879f3eb9e31) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 6 May 2019 16:55:32 +0000 (11:55 -0500)]
Bug 22713: Remove unecessary $replacementprice var
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3b877cc240eb44acafaef1ed5f287eae3dfb7baa) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Thu, 25 Apr 2019 16:23:22 +0000 (16:23 +0000)]
Bug 22713: Pass replacement price in to order if defined by MarcItemFieldsToOrder
To test:
1 - Have AcqCreateItems set to 'On ordering' (or set in a basket)
2 - Define MARCItemFieldsToOrder
homebranch: 975$a
holdingbranch: 975$b
itype: 975$y
nonpublic_note: 975$x
public_note: 975$z
loc: 975$c
ccode: 970$c
notforloan: 975$7
uri: 975$u
copyno: 975$n
quantity: 975$q
budget_code: 975$h
price: 975$g
replacementprice: 975$p
3 - Have a marc record with some order info defined as above, including a replacementprice
4 - Add to basket - > from a new file
5 - Don't check for duplicates, add the order
6 - Note the order has no replacementprice, but the item does
7 - Close basket, receive order, do not enter a new replacement price
8 - Note the items replacement price is clear
9 - Apply patch
10 - Repeat
11 - Note when order added to basket it has a replacement price
12 - Note when order is received the replacement price is populated and passed into item correctly
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 57b027734e3c1a315cd11fedbf94771fa8381a30) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 8 May 2019 21:37:40 +0000 (16:37 -0500)]
Bug 11853: Add tests
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 735d23c299669b40d3e3e2a4fe21b88fc6cca00f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 8 May 2019 21:37:50 +0000 (16:37 -0500)]
Bug 11853: Allow to clear the date of birth at the OPAC
A patron is not able to clear their date of birth.
When cleared tt is set to NULL in DB which means, for the patron's
modifications feature, that nothing has been changed.
Test plan:
0/ Do not apply the patch
1/ Edit your personal details at the OPAC
2/ Add a date of birth
3/ On the staff interface, approve the modification request
=> OK it is updated
4/ Edit your personal details and clear the date of birth
5/ On the staff interface
=> KO the table display is wrong, nothing is marked has changed
6/ Approve the modification requiest
=> KO it has not been cleared
7/ Apply the patch and repeat 1 to 6 and confirm that the behaviors are
now correct.
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6692800794cbf403e8be8c8062608b60148c0d56) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Fri, 10 May 2019 13:24:39 +0000 (13:24 +0000)]
Bug 22881: Trying to clear search history via the navbar X doesn't clear any searches
This patch undoes a mistake introduced in my patch for Bug 21479. A
"preventDefault()" was added to the search history clear button by
mistake. The "confirmDelete" function only works if the default action
of the link is allowed to complete.
To test you must have the EnableOpacSearchHistory system preference
enabled. Apply the patch and log into the OPAC as a patron who has a
search history.
Click the "X" link in the header next to the "Search history" link.
Confirm that you want to clear your search history. The page should
refresh. Navigate to your account -> Your search history to confirm that
your search history has been cleared.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6d1b7ff27eb2d53d637c169c7132a66d546c0124) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 14 May 2019 18:15:54 +0000 (18:15 +0000)]
Bug 22899: DBRev 18.11.05.001
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b90bbc125969dc0048dde2ec37531a6ef6cd2b36) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Tue, 14 May 2019 12:21:55 +0000 (13:21 +0100)]
Bug 22899: (QA follow-up) Change accessor name
This patch changes pending_hold to has_pending_hold to signify that
we're returning a boolean and not a Koha::Hold object.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5c81d986212b480d9b491e46b3fb4498c0eb2c2c) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Tue, 14 May 2019 12:17:01 +0000 (13:17 +0100)]
Bug 22899: (QA follow-up) Ensure constraint is created
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 49a6aac8b6d8fd13999638f5a6ae4d4481dbf304) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 13 May 2019 20:09:05 +0000 (20:09 +0000)]
Bug 22899: Add pending_hold method to Koha::Item
To test:
1 - Enable course reserves
2 - Create a course
3 - Add an item to the course
4 - Attempt to view the course on the OPAC
5 - Internal Server Error
6 - Apply patch
7 - Add an item to the holds queue by placing a hold and running holds queue builder or:
INSERT INTO tmp_holdsqueue (itemnumber) VALUES (###);
8 - View the course page, note item appears 'Pending hold'
9 - Remove the holdsqueue line
10 - View the course page, note item appears 'Available'
11 - prove -v t/db_dependent/Koha/Item.t
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
I see Jonathan's comments about small improvements, but will sign off as
everything works as expected here. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f21ebad7d298f25e44771e5833d1d1d4d6d8f777) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 13 May 2019 20:08:06 +0000 (20:08 +0000)]
Bug 22899: Database update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit af1067f3d466cf3bd32c4747c4a00dd7542c1fe0) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 10 May 2019 17:32:23 +0000 (12:32 -0500)]
Bug 22433: Use Data::Dumper instead of Data::Printer
Data::Printer is not in our deps
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b5b64e7900fd61bd525409ee869deafde7b8c50a) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 9 May 2019 18:04:38 +0000 (13:04 -0500)]
Bug 22433: Add debug statement to Transaction.t
Hard to know what's going on here without more info. Adding this output
may help to investigate more.
Test plan:
Make sure the tests still pass
If it fails, please paste the output!!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 63a8e27f2e087b698e986e026dc9fa511b2afbfe) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 1 Nov 2018 16:31:31 +0000 (13:31 -0300)]
Bug 21709: Replace 'no popup' plugin links with a span
Test plan:
Edit a bibliographic record
Notice that the icons next to fields linked with a plugin can be a link
or not. The browser displays a pointer or not.
It will remove the ambiguity to display an icon that is clickable but
does nothing when clicked.
We could also have another icon to disociate both behaviors.
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 9fa97774ae6b3c84028b15f8c768460a012320ea) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 10 May 2019 12:10:42 +0000 (12:10 +0000)]
Bug 22782: DBIC update for SocialData
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ecbe281aff13e53d4fbc5064714de9209410358) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Liz Rea [Wed, 1 May 2019 00:31:15 +0000 (00:31 +0000)]
Bug 22816: OPAC detail holdings table should now look a bit better
This patch sets the "autowidth" option to "false" for the OPAC
holdings DataTable on opac-detail.pl. This gives the table a fluid
width rather than having the width be "hard-coded" by DataTables upon
first page render.
To test, apply the patch and view the detail page for a bibliographic
record with some items. Under the "Holdings" tab, the table of
holdings should fill the width of the tab container.
Resize the browser window and confirm that the table width adjusts
accordingly.
Signed-off-by: Bin Wen <bin.wen@inlibro.com> Signed-off-by: arthur <arthur.bousquet@inlibro.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 604c7b818b63b93c66bb751ceb9d99bc1c109be9) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm
Like this one (16.11 line number):
Odd number of elements in anonymous hash at C4/AuthoritiesMarc.pm line 1070.
We need to add a scalar to some MARC::Field::subfield calls. In list context
an empty list returned affects the hash built around it.
Test plan:
Could reproduce this warning easily from OPAC authority search.
opac-authorities-home.pl calling BuildSummary.
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 88b37330abaee6372ec999c1a81fd216d66a1379) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Use of uninitialized value $isbn in string ne at /usr/share/koha/prodclone/C4/Biblio.pm line 1794. (16.11 line number)
Trivial edit.
And these warnings from TransformHtmlToXml (with 16.11 line numbers):
Use of uninitialized value in substr at /usr/share/koha/prodclone/C4/Biblio.pm line 2527.
Use of uninitialized value in substr at /usr/share/koha/prodclone/C4/Biblio.pm line 2528.
substr outside of string at /usr/share/koha/prodclone/C4/Biblio.pm line 2528.
Indicator in 952 is empty at /usr/share/koha/prodclone/C4/Biblio.pm line 2534.
The last warning is not needed and can be removed.
Note that the code used the construct @$indicator[$j] for $$indicator[$j].
The first is an array slice. This worked in list context. But apparently
the second was meant to be used. And can be rewritten as $indicator->[$j]
which generally is considered more readable.
The code around indicator1/2 and ind1/2 is simplified. This change is applied
twice in the same sub.
Test plan:
Read the changes.
Run t/Biblio/TransformHtmlToXml.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 295e9b1054386cf188c5fc1eb4fd590e5c451513) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 21036: Fix uninitialized value within @itemnumber in string ne
Line from 16.11 log:
Use of uninitialized value within @itemnumber in string ne at /usr/share/koha/prodclone/reserve/modrequest.pl line 70.
Test plan:
Read the change. Not 100% identical (numeric zero) but should be enough.
This line is probably not needed at all.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4560d9623663e9fd0b60f9a39ec53082cdd90f24) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 29 Apr 2019 02:09:39 +0000 (22:09 -0400)]
Bug 22800: (bug 22550 follow-up) Do not raw filter when not necessary (OPAC suggestions)
This is a follow-up for bug 22550, we do not need to use the $raw
filter.
Test plan:
Same as bug 22550:
Test plan:
Test plan:
1. OPAC->login->your purchase suggestions->New purchase suggestion
2. Click button "Submit your suggestion" directly without filling in any field.
Empty suggestion record was added succeffully.
3. Apply the patch.
4. Click button "Submit your suggestion" directly without filling in any field.
The required fields should be labeled in red.
(you can change the mandatory fields by preference
'OPACSuggestionMandatoryFields')
Signed-off-by: Bin Wen <bin.wen@inlibro.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b9bff787ca863a45128cbd3a05a109e8f66d4fdf) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 26 Apr 2019 19:58:05 +0000 (19:58 +0000)]
Bug 22791: Unify calculation between aqui-home and ordered.pl
To test:
1 - Enable order price rounding
2 - Order an example with 8 * 16,99 and 42% discount, 19.45% tax.
3 - Check ordered page - 94.17 is total
4 - Check aqui-home - 94.16 is total
5 - Apply patch
6 - Verify numbers now match
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 100b1e3eecb4de27f6a85095196019f6b36251c0) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 7 May 2019 15:57:35 +0000 (15:57 +0000)]
Bug 22527: (RM follow-up) Add filter
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d38d78bcf4cc62d34aa953864cf6da87bef93c80) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Liz Rea [Tue, 16 Apr 2019 06:55:36 +0000 (06:55 +0000)]
Bug 22527: web installer links to outdated DB manual
To reproduce:
1. Use MySQL or MariaDB for your Koha installation
2. Create an empty database and point $KOHA_CONF to this database name.
3. Grant SELECT privilege to your database user, e.g.
grant select on koha3.* to 'koha'@'%' identified by 'koha';
4. Go to step 2 of web installer where it checks database
connection
5. Observe the following message
User koha doesn't have enough privilege on database koha.
Ask for or make a change in the user's privileges. User koha must
have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on
database koha2.
Need help? See manual for PostgreSQL
6. Note "See manual for PostgreSQL" is wrong. Should now read Need help?
For help with granting permissions, please search online for "[%
dbms %] manual grant permissions" of course the dbms should be the dbms
you are using.
7. Apply patch, restart all
8. Refresh page and observe it now displays correct link
Test plan and original patchset by Lari Taskula <lari.taskula@hypernova.fi>
Sponsored-by: Hypernova Oy Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 22527: Remove extra space after '?'
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit abd4445cd2b86fe601de20b403bb621115b27c83) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Josef Moravec [Mon, 29 Apr 2019 12:18:43 +0000 (14:18 +0200)]
Bug 22787: Add mapping of letters "ů" and "Ů" to zebra definitions
Test plan:
0) Do not apply the patch
1) Add some word with character "ů" into metadata, for example author "Martinů, Bohuslav"
2) Try to search it with "Martinu" and you'll see you can't find it
3) Apply the patch
4) Copy file etc/zebradb/etc/word-phrase-utf.chr to your /etc/koha directory
sudo cp etc/zebradb/etc/word-phrase-utf.chr /etc/koha/zebradb/etc/
5) koha-zebra --restart kohadev
6) koha-rebuild-zebra -f kohadev
6) try to search "Martinu" again - you should be able to find your record
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d57239ca78e7719f4c04865e8c493919c6362c15) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 12 Nov 2018 18:20:33 +0000 (15:20 -0300)]
Bug 21671: Prevent Modifications.t to fail randomly
If repeatable is set to 0 by TestBuilder, the tests will fail with:
t/db_dependent/Koha/Patron/Modifications.t .. 1/6 # Looks like you planned 20 tests but ran 9.
# Failed test 'approve tests'
# at t/db_dependent/Koha/Patron/Modifications.t line 259.
[repeatable not set for attribute type and tried to add a new attribute for the same code]# Looks like your test exited with 255 just after 5.
Signed-off-by: Liz Rea <wizzyrea@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 914f23970de536df3972ebd75b280ee8eec98955) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch restores a missing condition. $patron gets renamed to make
it obvious that it related to the logged in user.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 45b1ff8dfa1054590544caff200b307144bd02cf) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22813: remove repetitive queries inside two nested loops in searchResults
This patch moves a query on Koha::Patrons and then the related
Koha::Patron::Category that needlessly happens inside two nested loops
(all items of all MARC records in the resultset).
The Koha::Patron and Koha::Patron::Category are always the same as it is
fetched from C4::Context->userenv each time.
To test:
- Run:
$ kshell
k$ prove t/db_dependent/Search.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
k$ prove t/db_dependent/Search.t
=> SUCCESS: Tests still pass!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 10efe4e3f239c47b847c53f06f82245e07d54759) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 4 Mar 2019 21:12:56 +0000 (18:12 -0300)]
Bug 22453: Make TestBuilder generates dates taking into account the timezone
I have no idea why this only appears today but TestBuilder generates dates using DateTime->now,
which does not take into account the timezone.
It has been highlights by a failing test today on U18.
Why today whereas this patch was pushed few weeks ago?
Why U18 and not D9?
The output of the test is:
koha_1 | # Failed test 'With BorrowerLogs and TrackLastPatronActivity we should not spam the logs'
koha_1 | # at t/db_dependent/Koha/Patrons.t line 1421.
koha_1 | # got: '2'
koha_1 | # expected: '1'
koha_1 | # Looks like you failed 1 test of 4.
koha_1 |
koha_1 | # Failed test 'BorrowersLog tests'
koha_1 | # at t/db_dependent/Koha/Patrons.t line 1422.
koha_1 | # Looks like you failed 1 test of 33.
koha_1 | [19:51:44] t/db_dependent/Koha/Patrons.t
Actually there are 2 logs, one for the cardnumber that is expected, and on for updated_on:
"updated_on" : {
"after" : "2019-03-04 21:10:00",
"before" : "2019-03-04 18:10:00"
}
Apart from the fact that we may want to remove this updated_on field from MODIFY,
the before/after dates differ from 3 hours.
Here it's currently 18:10 and in UTC-3
To prevent such behaviors in tests (create stuffs in the future...), we should
use our Koha::DateUtils::dt_from_string method that takes care of the timezone
used in other places of Koha.
Test plan:
prove t/db_dependent/Koha/Patrons.t
May fail without this patch.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch is fine in itself, but there may still be an issue around
the failing test for TrackLastPatronActivity. Reopened bug 22741.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c1513a10c35f721e3c519d5ab3c38c7154b7fa1c) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Cache.t fails during package build. Moving it to db_dependent fixes
the problem.
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6509d73d7925fe5d317d6f2baa1d1565d8d36220) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
After the introduced 'filtering', we loose the information about the
term weight!:
\ [
[0] {
approved 1,
author "Heylin, Clinton.",
biblionumber 1,
borrowernumber 51,
date_created "2019-02-26 15:36:37",
language undef,
subtitle [],
tag_id 1,
term "word",
time_created_display "15:36:37",
title "E Street shuffle :",
visible 1,
XSLTBloc "
<<<BUNCH OF GENERATED HTML HERE>>>
...
The code even calls GetMarcBiblio. This needs to be reverted as it is
plain wrong. If it was worth removing *some* biblios from the
weight_total value, then this calculation should be done somewhere else,
without fetching the MARC data again.
Signed-off-by: Claudio <costalc@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 28bcc5aa68733e41d50a6a801088b06857968f42) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 17 Dec 2018 13:35:09 +0000 (13:35 +0000)]
Bug 22010: Check preferences for ebook integration
To test:
1 - Enable OverDrive and RecordedBooks (you can put anything in the
prefs)
2 - Search on the opac - verify you get results (or search error) on
first page of results'
3 - Go to second page of results - OD and RB are not searched
4 - Apply patch
5 - Verify nothing has changed
If you have valid credentials:
1 - Enable RB prefs
2 - Sign in with an account that has an email matching your registered
account for recordedbooks
3 - Confirm you RB account loads on opac-user.pl
Otherwise:
Read the patches, verify it all makes sense
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7a44c9edb969cd92db4de0223a2c9db06d576451) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 29 Apr 2019 01:40:21 +0000 (21:40 -0400)]
Bug 22357: Do not duplicate report rows if several reports exist
At the moment every time you run runreport.pl with the --store-results
option another line will appear for your report in the saved
reports table. This is not a data, but a display problem as the
report is still only stored once.
1) Create a report and note the report number
2) Run from command line (replace X by report number) :
misc/cronjobs/runreport.pl X --format=csv --csv-header --store-results
3) Go to saved reports table
4) Look at the table, each run of the cronjob will create a new row
in the table instead of just updating the saved results column.
5) Apply patch
6) Veriy the table displays correctly again and there are no regressions
QA: Run t/db_dependent/Reports/Guided.t
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4ca1d8e3b3f60722321f9f4b5f1f0caa461beecb) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 59b740613e7a72bf6e5283c2876bad9444a7ef6a) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 21 Mar 2019 17:45:37 +0000 (14:45 -0300)]
Bug 22542: Force back button to display personal data
This is a follow-up of bug 5371
The following command must not return anything:
grep ^output_html_with_http_headers `git grep -l -P "authnotrequired\s*=>\s*0" opac`|grep -v force_no_caching
This must be a test somehwere to prevent further regressions.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22478: (QA follow-up) Handle category in opac-shelves like a boolean
The category parameter should be restricted to 1 or 2 (private/public). In
order to keep same behavior, no parameter means 1 (private).
Note: Adding the same line in intranet counterpart.
Test plan
[1] Check for category empty, '1a', '11' etc. And with script ;)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Wed, 10 Apr 2019 02:06:37 +0000 (02:06 +0000)]
Bug 22478: Fix POD
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 15 Mar 2019 16:41:27 +0000 (13:41 -0300)]
Bug 22478: Add tests
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 14 Mar 2019 22:42:50 +0000 (19:42 -0300)]
Bug 22478: Prevent XSS vulnerabilities when pagination appears
This is a bad one as we thought we were XSS safe since bug 13618.
The html code generated in C4::Output::pagination_bar must escape the
variables and values correctly.
This patch needs to be widely tested, everywhere the pagination appears,
to make sure we will not introduce regressions.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 12 Apr 2019 01:23:34 +0000 (01:23 +0000)]
Bug 22692: Check for patron using cardnumber and userid
TO test:
1 - Set failed login attempts to 1
2 - Attempt a login with a userid and bad password, no success
3 - Attempt a login with userid and correct password, prevented because
locked
4 - Attempt a login with cardnumber and right password, you are logged
in
5 - Log out, try again with userid and correct password, prevented
because locked?
6 - Apply patch
7 - Repeat 1-3 to lock account
8 - Attempt logging in with cardnumber, you are prevented
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 12 Apr 2019 01:11:19 +0000 (01:11 +0000)]
Bug 22692: Unit tests
1 - Apply just this patch
2 - prove -v t/db_dependent/Auth.t
3 - Failure
4 - Apply second patch
5 - prove -v t/db_dependent/Auth.t
6 - Success
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch ensures that parameters that are present are passed forward
when accepting the copyright notice.
Test plan:
- Clone the latest version of the FreeForm backend from:
https://github.com/PTFS-Europe/koha-ill-freeform
- Ensure the ILLModuleCopyrightClearance syspref is populated
- Create an OpenURL in order to pre-populate the FreeForm form, a suitable URL would be:
- Log in
- Accept the copyright notice
=> TEST: Observe that the FreeForm form is pre-filled with the metadata
supplied in the OpenURL
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5e20e438e80465fcd6f1c2af5e6138a639dec5f3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
There is a shift caused by a hidden column, which make the filters
searching on the previous column.
Test plan:
- Add 1+ searchable additional field for subscription
- Create a new subscription
- Search for subscriptions
- Use the column filters to filter the results
=> The results must be filtered accordingly
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1d6e9ff44c19379a41e9ce688685a24788583e0c) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Wed, 17 Oct 2018 18:43:11 +0000 (14:43 -0400)]
Bug 21589: Series link formed from 830 field is incorrect
Bug 13692 corrected the series link for records using a 490/800 combination
When a record has a 490/830 conbination for series, the link is malformed (title is used as author, title is blank)
Test Plan:
1) Catalog two or more records with 830 fields
2) Note the series links are broken
3) Apply this patch
4) Reload the record details page
5) The series link should now work
6) Repeat for the OPAC
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 20496bc78b7830d812fda454a0fe243fae9c465c) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Thu, 25 Apr 2019 17:47:14 +0000 (17:47 +0000)]
Bug 22715: Remove extraneous html filter
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7e85754083bd66f45009f55a01e9dec9eda81504) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Tue, 16 Apr 2019 14:34:56 +0000 (10:34 -0400)]
Bug 22715: Searching for patrons with "" in the circulation note hangs patron search
To replicate:
Edit a patron to have a circ note, include quoted text in it, such as "this is quoted string"
Go to the patron search, search for a set of results that would include the patron with the quotes in the note
Enjoy looking at "Processing" for forever.
Test Plan:
1) Apply this patch
2) Attempt to replicate using the steps above
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
I took this a step further and used <script>"something in
quotes"</script> for my test note and this worked just fine. YAY.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6e641c5bcb7370556326fb64838fce1eefbc2c18) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
git bz apply 20692
sudo perl ~/misc4dev/cp_debian_files.pl
then repeat the test.
It should also be noted, because the enable
and disable are now split, if for some reason
they become out of sync, an enable or disable
should correct them.
Because these are bash scripts, the test tool
(/home/vagrant/qa-test-tools/koha-qa.pl)
does not apply.
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit de20398db303a1ee45b62f9aa51f124597ed0cd8) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22551: Stray "//" appears at bottom of opac-detail.tt
Removes a couple stray "//<![CDATA[" like comments which are artifacts of other
code that since been removed. One of the comments causes two forward slashes to
appear at the bottom of each OPAC detail page.
Testing plan:
- enable SocialNetworks
- visit any OPAC detail page, observe "//" at bottom of page
- apply patch
- revisit page, slashes should be gone
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eb8f5c86fe5f3e1e20bea73fa8b646cdc092513a) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Ere Maijala [Tue, 5 Mar 2019 09:04:55 +0000 (11:04 +0200)]
Bug 22413: Improve query string and desc creation for Elasticsearch
Test plan:
After each of the following steps, verify that the results and query description looks ok.
1. Do a simple keyword query
2. Change sort order
3. Click a facet
4. Do an advanced search with title and author
5. Change sort order
6. Click a facet
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit aba8b130f8b96e5000e8a1eccecfb53d7b371c30) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Thu, 25 Apr 2019 10:36:36 +0000 (10:36 +0000)]
Bug 22339: DBRev 18.11.04.004
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ed6228de83dc57e624c3b3dc30632775df972277) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Ere Maijala [Thu, 14 Mar 2019 11:31:34 +0000 (13:31 +0200)]
Bug 22339: Fix search field mappings of MARC fixed fields
Fixes handling of /0 selector in addition to several fixed field positions. Note that ff7-01-02 is in fact 00-01 in Zebra and that has been replicated here.
Test plan:
1. Before applying a patch, check from Elasticsearch (e.g. localhost:9200/koha_biblios/_search?q=_id:123) what is indexed in Elasticsearch for a record for date-entered-on-file, ff7-00, ff7-01, ff7-02 and lleader.
2. Apply the patch, update database and save the record again.
3. Verify that the contents of the forementioned fields is now correct in Elasticsearch.
4. Verify that tests pass: prove -v t/Koha/SearchEngine/Elasticsearch.t
Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0047ede37e46a3334c9c47d7ebaed848907b6890) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 8 Jun 2018 15:19:41 +0000 (12:19 -0300)]
Bug 20891: Escape html then JSON
To my understanding we need to escape first html chars then to JSON.
If this patch works we will need to rethink the 'To' TT plugin.
It was originally designed to have several escape methods, but with
these changes it will not make sense to name it 'To' if used only to
escape JSON
IIRC we should keep the 2 different ways to use it:
* [% To.json( string ) %]
* [% string | $To %]
otherwise it will be hard to use it when called in argument of
patron-title.inc (`git grep To.json`)
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bdf0d85c1de9cbb37cc8a40b0b4a2e86633d3aaf) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 7 Jun 2018 15:17:26 +0000 (12:17 -0300)]
Bug 20891: Escape list's names in JSON
When someone uses \ in the description of a list, the datatable in staff
won't load and keeps processing.
Test plan:
- Create a list named "<script>alert('hola');</script>"
- Create another list named "k\o\h\a"
- Hit /cgi-bin/koha/virtualshelves/shelves.pl
=> Without this patch the lists will not be displayed, JSON is
malformated
=> With this patch everything is ok
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2be0195895628ec491ee1f25368e60181c4f1eb2) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 24 Apr 2019 15:12:17 +0000 (15:12 +0000)]
Bug 22650: Prevent multiple holds on individual items
This patch corrects a missing id on the holds_to_place field and adds code to disable the box when an item is checked
Additionally script login now places a single hold if an itemnumebr is passed and checks for holdability of the specific item
To test:
1 - Allow multiple holds per record in circ rules
2 - In staff client, go to place a hold on a record
3 - Select a patron
4 - Increase the number of holds
5 - Then select a specific item to hold
6 - Patron now has multiple holds on a single item
7 - Apply patch
8 - Repeat, notice that count is disabled when item checked
9 - Confirm count is enabled when 'Hold next available item' is checked
10 - Set number to more than 1
11 - Check an item and submit
12 - Confirm only one item is reserved
13 - Hit the script directly (with valid info):
http://localhost:8081/cgi-bin/koha/reserve/placerequest.pl?biblionumber=1&checkitem=1&holds_to_place_count=2&borrowernumber=5
14 - Confirm only one hold is placed
15 - Confirm multiple hits of the url do not generate further holds
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ef5adaff5ac045000b90c4b2b121d8c2ce2d5c59) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 16 Apr 2019 17:21:01 +0000 (17:21 +0000)]
Bug 19241: Waiting items show as available in the cart
The cart uses the same item-status.inc that the details page uses, however, we don't
set the waiting or reserved flags. This patch adds those flags to the script
To test:
1 - Find an item on the opac
2 - Place a hold on the item
3 - Check in the item to confirm the hold
4 - Note the details page on OPAC shows 'On hold'
5 - Add the item to a basket
6 - Note the basket shows 'Available'
7 - Apply patch
8 - Check the cart, should show as 'On hold'
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e2fa6d97ef45efb902086aa3a3d232137c054afa) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 19 Apr 2019 11:25:43 +0000 (11:25 +0000)]
Bug 22743: Add password modal to overdrive results page
This patch also removes a line abotu ratings which was throwing an error.
Confirm stars rating for OD results are still shown as expected
To test:
1 - Enable overdrive circulation with password required
2 - Sign in to OPAC but not overdrive
3 - Perform a search that returns overdrive results
4 - Click in to results page
http://localhost:8080/cgi-bin/koha/opac-overdrive-search.pl?q=cats
5 - Note 'Login to OverDrive account' link
6 - Click it
7 - Nothing happens!
8 - Apply patch
9 - Repeat
10 - Success!
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7be176cf1da5adb5f264bb9668667dfeb1d9a2ae) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22739: Test SelfCheckInTimeout <> 0, not just defined
On sci-main.pl the preference value is tested for 'defined'. This patch
tests it is different than empty string too. This was causing a
JavaScript syntax error, that made it display a wrong message.
To test:
1 - Blank the syspref SelfCheckInTimeout
2 - Attempt to checkin something via sci
=> FAIL: The 'Your request included no check-ins.' message is printed.
3 - Apply this patch, reload the sci-main.pl page
4 - Attempt to checkin something via sci
=> SUCCESS: The UI correctly stacks the scanned barcodes
5 - Sign off :-D
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c1949cda9b2847bc6ecf7e1dbc07990c4055b69a) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When you edit a biblio as new, and you have enabled advanced editor,
current record was opened, and was overwritten when saved. This patch
effectively opens a new record based on the one selected.
To test:
1) Enable "EnableAdvancedCatalogingEditor" preference
2) Go to cataloguing and click on advanced editor to save preference to the cookie
3) Search for an item in catalog
4) Click in "Edit as new (duplicate)"
5) Advanced editor should appear.
CHECK => browser url ends with #catalog/{original biblionumber}
=> Title above toolbar is "Editing catalog record #{original biblionumber}"
6) Apply this patch
7) Repeat steps 3 to 5
SUCCESS => browser url ends with #duplicate/{original biblionumber}
=> Title above toolbar is "Editing duplicate record of #{original biblionumber}"
8) Save
SUCCESS => browser url ends with #catalog/{new biblionumber}
=> Title above toolbar is "Editing catalog record #{new biblionumber}"
9) Sign off
Sponsored-by: Carnegie Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 680dd7f340ef445820864045127da9c65b3be0e2) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22723: Correct syntax error on confess call in Koha/MetadataRecord/Authority.pm
In Koha/MetadataRecord/Authority.pm the call to confess is missing string quotes.
It may generates this error :
Can't locate object method "confess" via package "Empty String at /usr/share/perl5/MARC/File/XML.pm line 448.
" (perhaps you forgot to load "Empty String at /usr/share/perl5/MARC/File/XML.pm line 448.
"?) at /home/koha/src/Koha/MetadataRecord/Authority.pm line 186.
Simply missing double quotes.
Also missing use Carp to call confess.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e2c74fced685db861a78fc1aa151dd35ad0d5f2) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Wed, 24 Apr 2019 06:55:12 +0000 (06:55 +0000)]
Bug 22753: Fix tabs pointed out by QA script
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 40cf22ab5f9dbdcaa37f46977fe5386a6303a42e) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 23 Apr 2019 18:03:33 +0000 (18:03 +0000)]
Bug 22753: Fix hold priority adjustment, move to top
Since the holds table can be split we need to calculate the
first priority for each table. However, currently we use the
first in the loop, not taking into account the waiting status.
This patchset sets the first_priority to the first non-found hold
Additionally, some clean-up is done to not display the alter
priority arrows for waiting holds.
To test:
1 - Place several holds on a title
2 - Confirm one of the holds to be waiting
3 - Attempt to move the last hold to the top
4 - Nothing happens
5 - Apply patch
6 - Note that the waiting hold has no options to move in the list
7 - Attempt to move the last hold to the top
8 - It moves as expected!
9 - Split the holds queue by pickup library
10 - PLace some holds for pickup at another branch
11 - Confirm moving these holds works within their own table
12 - Unsplit the queue
13 - Ensure the holds end where you expect (moving in a split
table didn't move above holds form another table)
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eb956eb4cf3d44f45ad54be58fe95d7355a2b8bf) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The log says: The method Koha::Item->collection is not covered by tests!
It has highlighted an older problem:
Since
commit bb1e9c500c810402c64436c53bcc00ffb9a0b857
Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib
the "Collection code" is not filled correctly (items.collection vs items.ccode).
Test plan:
- Set acqcreateitem to "when placing an order"
- Receive an order with items
=> The "Collection code" column must be filled with the items.ccode value
- Edit an item
- Change the collection code value
=> The "Collection code" column must be filled with the new value
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22735: Resolve internal server error on missing item type
Trivial fix, similar to opac-detail, applied to ISBD and MARC detail.
Test plan:
Enable ArticleRequests pref.
Make sure you have a biblio with no item type in 942c. (Perhaps you need to
make 942c not mandatory temporarily and save a biblio record without this
field being filled.)
If you are logged in, log out.
Go to MARC or ISBD detail page. No crash anymore?
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b78bd2faec703bb7d7c750dbc1070ba2449f29a9) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Thu, 18 Apr 2019 16:35:03 +0000 (16:35 +0000)]
Bug 22501: (follow-up) Use raw filter for course note on details page
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 22deca9445cb02320a04abb69febc9ef83d4d58f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 11 Apr 2019 09:32:52 +0000 (10:32 +0100)]
Bug 22687: Typo correction for Portuguese manual link
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 38d68299ce7405823c50a6a41ac0f5d18b0b9044) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Tue, 12 Mar 2019 11:19:35 +0000 (11:19 +0000)]
Bug 22174: Add link to help page for API key management
Makes the help link on the API key management page point
to the proper section in the Koha manual.
To test:
- Activate RESTOAuth2ClientCredentials system preference
- Go to any patron account
- Go to More > Manage API keys
- Click on the Help link in top right corner
- Verify that the right section of the Koha manual displays
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b969ccbf97c218da2bf6e22ab7773baf36c4fa71) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch fix the barcode annual builder. The test should pass.
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 31ace6a9347a8260532f6cc50d55fc36f87f1b44) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 21937: Add test to show autoBarcode annual increment bug
This patch show the issue. If the DB contains a barcode (not auto attributed
by Koha) which begin with the year used to generate automatically a new one,
there may be a 'collision'.
prove -v t/db_dependent/Barcodes_ValueBuilder.t
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7262bc066784247b12ce7f25c390498086e1d72b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 27 Dec 2016 17:07:20 +0000 (17:07 +0000)]
Bug 15505: Mark Hold Items 'On hold' instead of 'Available'
This patch adds a 'pending hold' column to C4::Items:GetItemsInfo to
allow for displaying status of an item when it has been selected for a
hold by the holdsqueue and AllowItemsOnHoldCheckout is set to 'Don't
allow'
To test:
00 - Set AllowItemsOnHoldCheckout to 'Allow'
01 - Place a hold on an item
02 - Build the holdsqueue (kohadevbox example below)
sudo koha-shell kohadev
perl misc/cronjobs/holds/build_holds_queue.pl
03 - Search for the item on the OPAC
04 - Note item shows as 'Available' in results and details
05 - Toggle AllowItemsOnHOldCheckout to 'Don't allow'
06 - Repeat search, note there is no change
06 - Apply Patch
07 - Search for the item on the OPAC
08 - Note that item now shows as 'Pending hold'
09 - Toggle AllowItemsOnHoldCheckout to Allow
10 - Note item shows as available
11 - prove -v t/db_dependent/Items.t
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 170085397b23d9b688628a56039f5e485fade6a5) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Aleisha Amohia [Tue, 19 Feb 2019 01:36:14 +0000 (01:36 +0000)]
Bug 22365: Removing warn when accessing Log Viewer
To test:
Go to Tools -> Log Viewer and confirm the warn no longer shows after
applying the patch.
Sponsored-by: Catalyst IT Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8adb2f8003e25f6fe8cc78506a823a618a837fa1) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Tue, 18 Dec 2018 23:19:07 +0000 (00:19 +0100)]
Bug 21545: Translate new ACCOUNT_PAYMENT and ACCOUNT_WRITEOFF notices to German
To test:
- Apply patch
- Run the German web installer
- Verify the sample notices installs without error
- Verify it looks 'German' in the GUI :)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6b610497ffba5008f4e2541dc6cb07727ac5a63a) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Tue, 18 Dec 2018 23:06:55 +0000 (00:06 +0100)]
Bug 21545: Translate 'Stock rotation slip'
Throwing in some capitalization fixes for the English
version of the notice as well.
To test:
- Verify the changes make sense and the SQL is still valid
and executes
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bc1a21ec65377c8e7b331b89b45ebcddf9a7e4c7) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 5 Dec 2018 21:05:32 +0000 (21:05 +0000)]
Bug 21957: Add a flag to ModBiblio to avoid linking auths if called from linker
To test:
1 - prove -v t/db_dependent/Biblio.t
2 - Set BiblioAddsAuthoorities and AutoCreateAuthorities
3 - Modify a biblio to add a heading with no existing auth record
4 - Ensure the record was created on saving
5 - Ensure that editing works as normal otherwise
6 - Run link_bibs_to_authorities
7 - Ensure results are as expected
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e600ae6c4b125ee40ce80346ce15f954a1fa424d) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22139: Fields of ACCTDETAILS email not populating
To test:
* Make sure AutoEmailOpacUser is set to "send"
* Create a new patron with a username and password, and an email address
* In Kohadevbox, check the mail (usually you can type "mail" and go down
to the last message) - these do not go into the message queue and they
are processed immediately.
notice that the email does not have
<<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>
Apply this patch, restart the things, retest as above.
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 086a0007d2d484ecbd6ae6d60317ed4f0d3434b1) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 26 Apr 2019 13:35:18 +0000 (14:35 +0100)]
Bug 22461: (follow-up) Use `exists` not `defined`
Prior to this patch there is a regression in the LDAP replication
functionality such that clearing a field become impossible. This patch
restores that functionality.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>