Commit Graph

32715 Commits

Author SHA1 Message Date
Liz Rea 4b47ac8b2d Database update for 18.05.14 2019-06-27 18:51:35 +00:00
Liz Rea df28fcb33f Bump version number for release
Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-27 18:51:23 +00:00
Katrin Fischer a84fcfe1b2 Bug 22886: Missing space between fields from Keyword to MARC mapping in cataloguing search
If you have multiple subfields mapped to the 'subtitle' keyword,
those fields will show up without separating space.

To test:
- Add 3 subtitle entries in Keyword to MARC mapping for a framework
  - 245 b
  - 245 c
  - 245 h
- Edit a record, make sure the framework matches, add:
  - 245 b, c, h
- Search for it in cataloguing search (not catalog!)
- Verify the subtitle fields show, but are all concatenated
- Apply patch
- Search again and verify the display is improved with a separating
  space

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

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

 Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt

Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-18 18:19:37 +00:00
Jonathan Druart e3463082a1 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 97ec0a2e4b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-18 16:49:51 +00:00
Jonathan Druart ddca212bd4 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 5410186f68)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-18 15:54:29 +00:00
Jonathan Druart 96e2d9cbcb 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 ecb12104ff)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

 Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt

Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-18 15:33:07 +00:00
Jonathan Druart 855dbb44c2 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 35d00030ce)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

 Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt

Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-18 15:29:57 +00:00
Jonathan Druart 41f52e2d29 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 3a3057545c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

 Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt

Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-18 15:15:12 +00:00
Jonathan Druart 7b4c6e2189 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 6e8ecb8c6c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-18 15:15:01 +00:00
Jonathan Druart f3e12af72e 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 8d53fae949)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-18 15:14:49 +00:00
Jonathan Druart bde475c055 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 9f18afa7b3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-18 15:14:35 +00:00
Aleisha Amohia 09280ec598 Bug 7862: Preventing warns when creating a notice
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 700b7dfa09)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Liz Rea <liz@bywatersolutions.com>
2019-06-18 15:14:15 +00:00
Lucas Gass f50c9a9572 Increment version for 18.05.13 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 18:22:09 +00:00
Koha translators e3d16dc294 Translation updates for Koha 18.05.13
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-31 10:43:03 -03:00
Owen Leonard b0af03361f 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 6d1b7ff27e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b95682f735)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 13:52:55 +00:00
Jonathan Druart a0f05fe3ed 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 9fa97774ae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3c0718c7a7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 13:27:21 +00:00
Liz Rea 2b25d27cc0 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 604c7b818b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 32761305d3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 13:05:30 +00:00
Marcel de Rooy a0066c9452 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 88b37330ab)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b3af8f9363)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 12:58:33 +00:00
Marcel de Rooy 7d29b1c7a8 Bug 21036: Fix warnings from C4/Biblio
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 295e9b1054)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6413f40738)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 12:58:20 +00:00
Marcel de Rooy 51d7f8114b 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 4560d96236)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ffae11293a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 12:57:54 +00:00
Nick Clemens c7e6cb333d Bug 22527: (RM follow-up) Add filter
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d38d78bcf4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5f46508f81)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 12:52:59 +00:00
Liz Rea 8b81c39069 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 abd4445cd2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e98714dc87)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 12:52:38 +00:00
Josef Moravec d6a42d1df3 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 d57239ca78)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 006fa1a497)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 12:37:20 +00:00
Jonathan Druart 8ba9c4947c 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 914f23970d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3f99fb0c4c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 12:26:38 +00:00
Tomas Cohen Arazi 8e7bd44f94 Bug 22813: (follow-up) Add missing condition
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 45b1ff8dfa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 12:23:01 +00:00
Tomas Cohen Arazi 88af22a44a 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 10efe4e3f2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 738aafb92d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-26 12:22:47 +00:00
Mirko Tietgen 2f3be3095c Bug 22808: Move Cache.t to db_dependent
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 6509d73d79)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3653df7715)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-24 17:44:27 +00:00
Jonathan Druart 3e48b16f00 Bug 22621: Fix filters on subscription search results
Caused by
  commit 4e698f7b47
  Bug 18426: Allow to edit subscriptions in batch

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 1d6e9ff44c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b61c41f0ef)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-24 17:29:18 +00:00
Kyle M Hall bfb5fb46cc 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 20496bc78b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 07fc6e0c53)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-23 22:04:45 +00:00
Nick Clemens 05db4abd2c 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 7e85754083)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 310330590a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-23 21:55:57 +00:00
Kyle M Hall 011d467bb2 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 6e641c5bcb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 57a7cea720)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-23 21:55:35 +00:00
Mark Tompsett 7258095dec Bug 20692: Extreme toggle checking for plack
TEST PLAN
---------
sudo koha-plack --disable
sudo koha-plack --disable
sudo koha-plack --enable

sudo koha-plack --disable
echo $?
sudo koha-plack --disable
echo $?
sudo koha-list --noplack
echo $?
sudo koha-plack --enable
echo $?
sudo koha-plack --enable
echo $?
sudo koha-list --plack
echo $?

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 de20398db3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 84adcb4017)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-23 21:40:20 +00:00
Jonathan Druart 713784ff0b 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 bdf0d85c1d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6bf436065e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-23 21:27:05 +00:00
Jonathan Druart a53d1a733c 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 2be0195895)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 05ffb6c6af)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-23 21:26:44 +00:00
Nick Clemens d39787147c 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 7be176cf1d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 461c717673)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-23 20:53:16 +00:00
Tomas Cohen Arazi aacb4e6bb9 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 c1949cda9b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1269f7d6c7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-13 20:34:43 +00:00
Fridolin Somers 377af593c4 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 4e2c74fced)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4863e59c57)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-13 20:29:51 +00:00
Jonathan Druart c0c0303fcc Bug 22762: Fix items.collection display on receiving
Caused by
  commit 31c29fd31f
  Bug 21206: Replace C4::Items::GetItem

The log says: The method Koha::Item->collection is not covered by tests!

It has highlighted an older problem:
Since
  commit bb1e9c500c
  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>
(cherry picked from commit 49c99ced88)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-13 20:22:45 +00:00
Marcel de Rooy a2d45b1cb4 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 b78bd2faec)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b99fbdd8fc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-13 08:10:59 +00:00
Frédéric Demians ce7cb18847 Bug 21937: Syspref autoBarcode annual doesn't increment properly barcode
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 31ace6a934)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9109d862a0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-13 07:50:29 +00:00
Frédéric Demians e4a7a7f05d 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 7262bc0667)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a85edfb2be)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-13 07:49:39 +00:00
Aleisha Amohia 3662049d14 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 8adb2f8003)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8bd2636014)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-12 22:24:12 +00:00
Owen Leonard 34a3077a14 Bug 22716: Use gender-neutral pronouns in system preference descriptions
This patch makes a few corrections to the .pref files which provide
descriptions for system preferences. Language like "him or her" is
replaced with "they/them" pronouns.

To test, apply the patch and check the following preferences:

 - OPACFineNoRenewalsBlockAutoRenew
 - ExpireReservesMaxPickUpDelayCharge
 - PatronSelfRegistrationVerifyByEmail

Signed-off-by: Lisette <lisettes@latahlibrary.org>

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-10 21:04:29 +00:00
Katrin Fischer 370168d209 Bug 21172: Remove obsolete framework parameter from GetMarcFromKohaField
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2a9b9a526b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b1d1d5ab91)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-10 20:59:07 +00:00
Jonathan Druart 76fb884310 Bug 21172: Remove warning from addbiblio.pl
Argument "01e" isn't numeric in numeric ne (!=) at
/home/vagrant/kohaclone/cataloguing/addbiblio.pl line 507.

A tagfield can be 01e and so raise a warning is compared with == or !=

This patch also fixes few inconsistencies:
- tagfield for items.itemnumber must be retrieved with GetMarcFromKohaField
(to support other marcflavours)
- do not use $_
- loop only once on $usedTagsLib

Test plan:
For devs only, read the code and confirm the changes make sense.

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 f3afec0587)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1ed01089db)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-10 20:51:31 +00:00
Katrin Fischer 9e4ac5634a Bug 22154: Fix search for Braille from Advanced search page
When you do an advanced search and choose the Format subtype
Braille, it looks for l-format:fk, but that is not the right
code for Braille.

fk does not exist. It should be fb for Tactile material/Braille
OR tc for Text/Braille

To test:
0) Catalog 2 records, one with 007 tc and another with fb
   Use value builder to verify both are for Braille.
1) In Administration > System preferences, make sure 'Subtypes'
   is checked in either OpacAdvSearchMoreOptions or OpacAdvSearchOptions
2) Go to Advanced search
3) If necessary, click on 'More options'
4) In the 'Subtype limits' section, choose 'Braille' from the 'Format'
   drop-down menu
5) Click on 'Search'
6) Verify both records were found

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-10 20:41:47 +00:00
Owen Leonard 1e8c73b933 Bug 18011: Enrollment period date on patron category can be set in the past without any error/warning messages
This patch modifies the patron category edit form so that the enrollment
period datepicker widget cannot be used to select a date in the past.

The <input> element had a "datepicker" class, which triggers a default
datepicker configuration. This was overriding the configuration in the
page-specific JavaScript file.

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

Click the "Enrollment period -> Until date" field and verify that dates
before today are disabled.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-10 20:13:06 +00:00
Katrin Fischer f9001c9bdb Bug 22090: Add missing information to cash register CSV file
Some information was missing from the CSV export file
of the Cash register report: manager surname, patron surname
and payment notes.

Also pretties up the column headers a bit and makes the
sequence between GUI and CSV export match.

To test:
- Make sure you have some fines and fees and payments in
  your system
- Make a search with the Cash register report
- Export results as CSV
- Proof read hader line and make sure contents match headings
- Verify first name and surname are shown for manager and patron
- Verify notes show up

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-10 20:02:04 +00:00
Lucas Gass 81bb1b55c2 Bug 22692: (RMaint Follow-up) fix tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-02 01:39:50 +00:00
root b82656ed06 Bug 22478: (follow-up) [18.05.X ONLY] Fix rebase and fix selenium opac_auth
We missed a case or two in the backport, also picked changes from
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76414&action=diff
in order to fix opac auth in selenium

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-05-01 22:14:28 +00:00