]> git.koha-community.org Git - koha.git/log
koha.git
3 years agoBug 26592: (Rmaint follow-up) add missing parenthesis to escapeHTML
Lucas Gass [Tue, 27 Oct 2020 20:09:58 +0000 (20:09 +0000)]
Bug 26592: (Rmaint follow-up) add missing parenthesis to escapeHTML

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 997a0fbec691b80fe77baf447c01c3db9456894b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f67bd64dee422f380824a5520e7a383e3888da97)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 26997: (QA follow-up) Fix Typo
Martin Renvoize [Fri, 19 Feb 2021 12:14:55 +0000 (12:14 +0000)]
Bug 26997: (QA follow-up) Fix Typo

Feel free to squash this ;)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 63e3311b109797a60bf6dcaf34e16abb8e3f9fda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit faec602d3ecf6379519a9499dea94a642cc7940b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 2fcda64855c89846c502e0c18c377359e981509f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 26997: CAST AS CHAR to prevent the error
Jonathan Druart [Fri, 19 Feb 2021 09:52:45 +0000 (10:52 +0100)]
Bug 26997: CAST AS CHAR to prevent the error

To prevent the DBMS to fail on 0000-00-00 we can cast it as a char and
compare.
This patch also moves to a subroutine, in case we need to adjust (or
reuse) it later.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0a40b4bb509c306794930ef734513a982e418af5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9327130853613d5518326fddcabb1ef153daacbd)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit d4a5f258b632fabda11ba3fb53d8dfd03af07ef2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 26997: Remove 0000-00-00 from aqorders.datecancellationprinted
Jonathan Druart [Fri, 13 Nov 2020 12:59:46 +0000 (13:59 +0100)]
Bug 26997: Remove 0000-00-00 from aqorders.datecancellationprinted

This patch remove the 0000-00-00 from the WHERE condition from
ordered.pl and spent.pl to prevent an error under MySQL 8

It also fixes the wrong values in DB (if possible, ie. under other DBMS
that MySQL 8)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0e0700a691621b2ef1de46fa0ea18ee771daadaf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e6aeb00c1059736c535a45d1a551eaa22c20b01f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 9a5927c322e2949f8b86461499bcc247a6572154)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 26997: Fix upgrade process under MySQL 8
Jonathan Druart [Wed, 11 Nov 2020 13:22:50 +0000 (14:22 +0100)]
Bug 26997: Fix upgrade process under MySQL 8

If you are coming from an old version of Koha, you may face an upgrade
error for the SQL query using 0000-00-00.
The idea was to fix it, but actually the DBMS will raise an error (not
blocking the upgrade process however).

We can hide them to not cause confusion

Errors are like:
DBD::mysql::db do failed: Incorrect date value: '0000-00-00' for column 'suggesteddate' at row 1 [for Statement "UPDATE suggestions SET suggesteddate = '1970-01-01' WHERE suggesteddate = '0000-00-00';"] at /kohadevbox/koha/installer/data/mysql/updatedatabase.pl line 23312.

Test plan:
Checkout an old version of Koha (3.20, not older)
Insert a dump, install Koha
Checkout a recent version of Koha, apply the patch (or use master)
Execute the upgrade process
You should not see the errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3c087bc216eeab8fe0d68a2d33407b554bc57074)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit da58f3e2c541bb617ba3ec5ef58d5cf1792caeb7)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit c720acc3c915b5c493edd66a65e5519a40e5486b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27569: Fix ODS export - take empty string into account
Jonathan Druart [Mon, 1 Feb 2021 14:57:24 +0000 (15:57 +0100)]
Bug 27569: Fix ODS export - take empty string into account

If a cell contains an empty string it was not taken into account.

Test plan:
Same as CSV but with ODS

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 93bc3af5a9b72d5d15a76648e9b9cd7a963bd05f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5dfc3942f6eb42f8201b8e4826c50fdc81fee3aa)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 7094c56ca6d4e75f72a6a25fc5aad8091948713a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27569: Change av for 100$2
Jonathan Druart [Mon, 1 Feb 2021 14:56:08 +0000 (15:56 +0100)]
Bug 27569: Change av for 100$2

Switch from "#" to ""

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f0f1d27dd2160a39bb76fd27ecd8b2b9c6056db5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0e825b548e92b27da3d25809d857f117efaaa4e7)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit f919eabb4cfb1ada5c303cdda1da030fa9613053)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27569: Add tests for ODS export
Jonathan Druart [Mon, 1 Feb 2021 14:27:53 +0000 (15:27 +0100)]
Bug 27569: Add tests for ODS export

Looks ok so far

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ce92a756a8e4058b29cf32ea016bac75f6228b9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 31d1d65d44418ace657f5915c97e4b9b773f89d5)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit df7b796cc90a23964df98ec703bfcb4a7be83634)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27569: Fix CSV export for biblio frameworks
Jonathan Druart [Mon, 1 Feb 2021 13:50:52 +0000 (14:50 +0100)]
Bug 27569: Fix CSV export for biblio frameworks

The CSV import of the biblio frameworks is broken.
A change in LibreOffice resulted in CSV not formatted how the
C4::ImportExportFramework code is expected.
This code is quite broken, it expects all the CSV cells to be quoted.

The "add tests" patch shows the different between what we expected
before this patch, and what is the new version generated by LibreOffice.

Test plan:
Export a biblio framework in CSV
Open it with LibreOffice and save it undef a different name
Create a new biblio framework and use the new file to construct it
Compare the 2 frameworks and make sure they are identical

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ad5de74cbc43e500c34ae6fa50958c6848d1586f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 69ff54b1945142da58f73a80bb3d2890339013b6)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit b8410536dcdbb772fe593b2c3cf7a3985437c977)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27569: Add tests
Jonathan Druart [Mon, 1 Feb 2021 13:54:15 +0000 (14:54 +0100)]
Bug 27569: Add tests

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7c11f056268195bac6c660182db97d4f2684b50a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 63e674c960464374bf3371d6802a0674665eb524)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 658533a7342aa78ef2191b9af1435f0ef7556683)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27569: Don't hide errors!
Jonathan Druart [Mon, 1 Feb 2021 14:27:19 +0000 (15:27 +0100)]
Bug 27569: Don't hide errors!

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0c0b2c09173ddf7a576b4373e831937e8370b159)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9095f56590ed1199c0084a6bf5dfb4003d6fbad9)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 38e0544d38684c4dd7053c8145017c970f275d00)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27569: Remove non mysql code
Jonathan Druart [Mon, 1 Feb 2021 14:59:37 +0000 (15:59 +0100)]
Bug 27569: Remove non mysql code

Remove a bit of the confusion by removing unless code (not related to
mysql)

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dfd42a4eb26a2ac00fe116f22409779047edd02b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit eac9e84792316872734133e23e2386f704feecff)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 959b76f77979af4b9e8d54cecd3ce389647f3325)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoUpdate release notes for 19.11.15 release v19.11.15
Victor Grousset/tuxayo [Tue, 23 Feb 2021 21:28:42 +0000 (22:28 +0100)]
Update release notes for 19.11.15 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoIncrement version for 19.11.15 release
Victor Grousset/tuxayo [Tue, 23 Feb 2021 21:04:55 +0000 (22:04 +0100)]
Increment version for 19.11.15 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoTranslation updates for Koha 19.11.15
Koha translators [Tue, 23 Feb 2021 19:56:43 +0000 (16:56 -0300)]
Translation updates for Koha 19.11.15

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27715: (QA follow-up) Remove conditional declaration
Marcel de Rooy [Sat, 20 Feb 2021 09:57:20 +0000 (09:57 +0000)]
Bug 27715: (QA follow-up) Remove conditional declaration

Resolves:
FAIL critic # Variables::ProhibitConditionalDeclarations: Got 1 violation(s).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27715: Use $dbh->quote_identifier to quote untrusted input
Joonas Kylmälä [Fri, 19 Feb 2021 12:18:15 +0000 (14:18 +0200)]
Bug 27715: Use $dbh->quote_identifier to quote untrusted input

The sanitization using regex and \w class of characters might be
enough but given the vast number of unicode characters in \w and
possibility of in the future the database engines interpreting some of
those characters with special meaning it is better to wrap the column
identifier to quotes using $dbh->quote_identifier so it is only
interpreted as identifier and nothing else.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27715: Add a deprecation notice
Jonathan Druart [Thu, 18 Feb 2021 14:54:56 +0000 (15:54 +0100)]
Bug 27715: Add a deprecation notice

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27715: Sanitize order by DT params
Jonathan Druart [Thu, 18 Feb 2021 14:49:40 +0000 (15:49 +0100)]
Bug 27715: Sanitize order by DT params

We are not on the safe side when we build the ORDER BY clause from the
DataTables parameters.

I've started to limit the columns by using Koha::Objects->columns, but
for instance for the patron search we need (at least) the columns from
the branches, categories and members tables.
It seems easier, and still safe, to use a regex.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27715: Add tests
Jonathan Druart [Thu, 18 Feb 2021 14:42:48 +0000 (15:42 +0100)]
Bug 27715: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Amended: chmod 755.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27715: Remove unused dt_build_having
Jonathan Druart [Thu, 18 Feb 2021 13:49:02 +0000 (14:49 +0100)]
Bug 27715: Remove unused dt_build_having

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Amended: removed warn.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27715: Remove unused build_dt_query
Jonathan Druart [Thu, 18 Feb 2021 13:47:03 +0000 (14:47 +0100)]
Bug 27715: Remove unused build_dt_query

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27604: [19.11] Make sure PatronSelfRegistrationLibraryList is used
Jonathan Druart [Wed, 3 Feb 2021 15:14:12 +0000 (16:14 +0100)]
Bug 27604: [19.11] Make sure PatronSelfRegistrationLibraryList is used

The value of PatronSelfRegistrationLibraryList is used to display the dropdown
list of the libraries, but not after the form is submitted.

Test plan:
1. Empty PatronSelfRegistrationLibraryList
2. Self register a new patron
=> Confirm the dropdown list with the libraries contain all the
libraries
3. Fill in PatronSelfRegistrationLibraryList with branchcodes (eg. "CPL|MPL")
4. Self register a new patron
5. Edit the HTML form and replace the option's value with another
branchcode (FPL)
6. Save
=> Without this patch the branchcode FPL is used
=> With this patch applied an ugly 500 is returned

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
https://bugs.koha-community.org/show_bug.cgi?id=11983

Bug 27604: (QA follow-up) Limit the libraries during the query

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
https://bugs.koha-community.org/show_bug.cgi?id=11983

Bug 27604: Init to {}

Bug 27604: Deal with empty pref

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27707: (bug 26639 follow-up) Fix renewals when RenewalSendNotice is set
Jonathan Druart [Tue, 16 Feb 2021 08:06:03 +0000 (09:06 +0100)]
Bug 27707: (bug 26639 follow-up) Fix renewals when RenewalSendNotice is set

Since bug 26639 we have auto savepoint enabled and the LOCK TABLE query
in C4::Circulation::SendCirculationAlert is not correctly handled.
From the MySQL doc that is copied few lines before, "LOCK TABLE will
commit any transactions", but here we don't have a savepoint and the
release for a non-existent savepoint will throw a DBI exception.

This patch removes the unecessary transaction and prevent the following
error when a renewal is done:
> DBIx::Class::Storage::DBI::mysql::_exec_svp_release(): DBI Exception: DBD::mysql::db do failed: SAVEPOINT savepoint_0 does not exist [for Statement "RELEASE SAVEPOINT savepoint_0"] at /usr/share/koha/lib/C4/Circulation.pm line 3590

Test plan:
1. Enable RenewalSendNotice
2. Add some email address to patron and select the email box from the message preference "Item checkout and renewal" in order to receive renewal emails.
3. Check 1 item out to a patron
4. Renew it

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 76c38d10d06dfcc377ab82cd312b12b8457a2dc8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d641561125d861236157d8b6f7edc6870a96a866)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit e7d9ef4116657ecc8e1b6dfcdac713f60d3e6474)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 26958: Move Elasticsearch mapping template JS to the footer
Owen Leonard [Fri, 6 Nov 2020 16:18:07 +0000 (16:18 +0000)]
Bug 26958: Move Elasticsearch mapping template JS to the footer

This patch moves inclusion of JavaScript to the footer of the
Elasticsearch mapping template. It also moves the JS into a separate
file.

To test you should have SearchEngine system preference set to
"Elasticsearch."

 - Apply the patch and go to Administration -> Search engine
   configuration (Elasticsearch).
 - Confirm that JavaScript dependent interactions work correctly:
   - Tabs
   - Under the bibliographic records and authorities tabs, table row
     drag-and-drop
   - Under the bibliographic records and authorities tabs, test the
     "Add" line at the bottom of the table.
   - Under the bibliographic records and authorities tabs, test the
     "Delete" button.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3cfa9b1e993481defd6e7ec796031ec31279bf71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7421e4c3caf97e7cc0cd02e0d644aa7045eb06ea)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 9f2714afc8f23a956378c9e439d6bc3dde60ddc2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27422: YouTube videos are HTTPS only
Tomas Cohen Arazi [Wed, 3 Feb 2021 22:50:29 +0000 (19:50 -0300)]
Bug 27422: YouTube videos are HTTPS only

This patch hardcodes HTTPS as the protocol to use when generating
YouTube content embedding. It is the supported protocol and without this
patch it falls back to 'http', or it can be 'ftp' depending on the first
indicator of the 856 field. They are all not supported so hardcoding it.

To test:
1. Have a record with 856 $uhttps://youtu.be/sMNkDPFycNU
2. Enable the HTML5MediaYouTube and HTML5Media sysprefs
3. Open the OPAC detailed view of the record
4. Open the Multimedia tab
=> FAIL: There's no embedded video
5. Apply this patch
6. Restart all
7. Repeat 4
=> SUCCESS: There's a live performance of Heroes del Silencio!
8. Sign off :-D

Sponsored-by: Banco Central de la República Argentina
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ca5efc9aa45c3c7893a09cf0067718fdaab63507)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ed2765ddc38c7c19461806b996319aed147c188f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit c0135fdbe3678e39c61a4b8ca258fa675dde8d3a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27676: Correct finesMode ne off condition
Jonathan Druart [Thu, 11 Feb 2021 10:21:43 +0000 (11:21 +0100)]
Bug 27676: Correct finesMode ne off condition

finesMode is 'off' by default (sysprefs.sql), but if you modify its value from
the UI and set it to 'production' then back to 'off', the DB value becomes an
empty string '', because of $YAML::Syck::ImplicitTyping

This has been found when working on on removing YAML::Syck (bug 22824),
so it's not perfect but the situation will be cleared in the follow-up
bug report.

Test plan:
0. Don't apply the patch
1. reset_all
=> finesMode eq 'off' in DB
2. Set the pref's value to production
3. Switch it back to 'off'
4. Value is '' in DB
5. Check an item in that should generate overdue charges
=> Charges are not generated
6. Apply the patch
7. Check an item in that should generate overdue charges
=> Charges are generated

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f831130525c62f799c831dd7eb1b36065b60c172)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d22780d917fa48ffe39aa08a736a3124df9023d2)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit f463569b31fc0338beee198fc7adbbc814dcfc83)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27586: Rollback should be before return statement
Kyle M Hall [Fri, 5 Feb 2021 11:15:06 +0000 (06:15 -0500)]
Bug 27586: Rollback should be before return statement

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 48e56b320a0dc2d096b19bc0bab62d3bad92d25c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8d117c6eba117a8a3fc8e4ac5ad6814cf0f6a6f5)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit fa0aff41acb39dbcff6db8fa51dce72947bac16f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27586: Import patrons script has a confirm switch that doesn't nothing!
Kyle M Hall [Mon, 1 Feb 2021 18:22:58 +0000 (13:22 -0500)]
Bug 27586: Import patrons script has a confirm switch that doesn't nothing!

If the script misc/import_patrons.pl is run without "--confirm" it reports
that it is "running in dry-run mode" but it is not!

Test Plan:
1) Import a CSV of patrons using import_patrons.pm *without* the --confirm parameter
2) Note that it does actually import the patrons
3) Apply this patch
4) Note that this time the patrons are not actually imported
5) Import again with --confirm
6) Note that the patrons were actually imported this time!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d3005a2a4c493c624ffd6204f6fccc83ea350361)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 19e0b91e12b520387938bb9c20bd605b757d3211)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit c0a7f53a62b6c90c87234288fc0cee910a7f6bd0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27395: Add a warning to PatronSelfRegistrationDefaultCategory
Eden Bacani [Tue, 19 Jan 2021 21:21:51 +0000 (21:21 +0000)]
Bug 27395: Add a warning to PatronSelfRegistrationDefaultCategory

This patch adds a warning to the PatronSelfRegistrationDefaultCategory system
preference to not use a regular patron category for self registration.

If a regular patron category code is used and the cleanup_database cronjob is setup
to delete unverified and unfinished OPAC self registrations, it permanently and
and unrecoverably deletes all patrons that have registered more than
PatronSelfRegistrationExpireTemporaryAccountsDelay days ago.

It also removes unnecessary apostrophes at the end of two self registration
and modification system preference descriptions.

Test plan:
1. Apply the patch.
2. Check that the warning message for the PatronSelfRegistrationDefaultCategory
   system preference is clear and makes sense.
3. Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 065c955cc67b6f113c9fb5d5ed918ba1400b5af9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aea5a5800a6a4aead6e8fa61fd8a12d2e9b5f1e4)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit c01dd7a8fb3cf82226a9ca525f49ad0d12e05d68)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27549: "use of uninitialized value" warning on renew.pl
Petro Vashchuk [Mon, 25 Jan 2021 15:37:37 +0000 (17:37 +0200)]
Bug 27549: "use of uninitialized value" warning on renew.pl

On the beginning we have empty "barcode" parameter for this form, but that not taken into account in regular expression  warning emitted: "Use of uninitialized value $barcode in substitution (s///) at /usr/share/koha/intranet/cgi-bin/circ/renew.pl line 47." in renew.pl
Fixed by making $barcode to become an empty string by default.

To reproduce:
    1) Head over to the "Circulation -> Renew" page.
    2) Check intranet-error.log there will be a warning "Use of uninitialized value $barcode in substitution (s///) at /usr/share/koha/intranet/cgi-bin/circ/renew.pl line 47".
    3) Apply the patch, refresh the "Renew" page.
    4) Ensure that the new "use of uninitialized value" warnings didn't appear in the console.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1af07787032275813e1e458cfed8504b482cd1c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fa472369c034cbcda80f6025ab3fbdbed58bda7c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit b3a2e405a4ff7330771b7bc81f724e2992e0d904)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27548: "use of uninitialized value" warning on branchoverdues.pl
Petro Vashchuk [Mon, 25 Jan 2021 15:35:18 +0000 (17:35 +0200)]
Bug 27548: "use of uninitialized value" warning on branchoverdues.pl

On the beginning we have empty "location" parameter for this form,
but that not taken into account in comparison and undef warning emitted:
"Use of uninitialized value $location in string eq at
/usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72" in branchoverdues.pl

Fixed by adding pre-check for $location.

To reproduce:
    1) Head over to "Circulation ->Overdues with fines" page. Check
       intranet-error.log where there will be many warnings
       "Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72".
    2) Apply the patch, refresh the "Overdues with fines" page.
    3) Ensure that the new "use of uninitialized value" warnings didn't appear in the console.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c3d22687568640930bad9ffbb426033423e7efe9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 44d1675aaf1e602e12ccd669dad50a299654f89d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit d766debe2c80bf991145e413308ef1a8b298286e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27576: Don't show import recordds table after cleaning a batch
Nick Clemens [Fri, 29 Jan 2021 11:06:34 +0000 (11:06 +0000)]
Bug 27576: Don't show import recordds table after cleaning a batch

Currently if you clean a batch from the manage marc records page, the import records table appears with no items  at the bottom of the screen

This is because we test for import_batch_id, we should also make sure we didn't just clean a batch

To recreate:
1 - Stage a batch for import
2 - Go to 'Manage staged records'
3 - 'Clean' the batch you just imported
4 - Note the empty table that appears at the bottom of the page
5 - Apply patch
6 - Repeat 1-3
7 - Note the table no longer appears

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dc072ee4ba9361d35d92efd46b2935ff1b608b0d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 329d5797b3c6fc28814dc9f73717eb9f6eba0066)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 7dd3a5cd1a3280dae395561f4d44c6ab264cc486)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 26298: Don't set too_many_items_to_process if equal to limit
Nick Clemens [Thu, 28 Jan 2021 18:56:39 +0000 (18:56 +0000)]
Bug 26298: Don't set too_many_items_to_process if equal to limit

In the code we prepare items for display if less than or equal to the pref, but we don't allow
the edit if greater than or equal to the pref. The second case should be only 'greater than'

To test:
 1- Set MaxItemsToProcessForBatchMod to 1000
 2- Go to Reports
 3- Make a report for itemnumbers that will give you at least 1000 items (ex. SELECT itemnumber FROM items)
 4- Save and run the report
 5- In "Rows per page", choose 1000
 6- Click on "Batch operations with 1000 visible records" > Batch item modification
 7- Notice that the item modification form isn't there and that the message says "Too many items (1000): You are not allowed to edit more than 1000 items in a batch."
 8- Apply patch
 9- Restart all the things
10- Run the report again and display 1000 rows
11- Click on "Batch operations with 1000 visible records" > Batch item modification
12 - Sucess!

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ae76d7626b0a23830b0269c00cbc2be73720d9ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7a8a166bd1e5a55062857a481bb543b0450cf2e1)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit f83f0f75c27e1f4a3ccea8fb69036133031aaaf9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27450: Remove password from the mandatory fields when editing details
Jonathan Druart [Wed, 20 Jan 2021 11:09:30 +0000 (12:09 +0100)]
Bug 27450: Remove password from the mandatory fields when editing details

When a patron edit their personal details at the OPAC, the password must
be removed from the mandatory fields

Test plan:
0 - Don't apply the patch
1 - Set PatronSelfRegistrationBorrowerMandatoryField to require password
2 - Create or sign in as a patron on the opac
3 - Click 'Your personal details'
4 - Attempt to edit
5 - Save changes
=> They are rejected because not all required fields are populated
6 - Apply the patch
7 - Repeat 3 to 5
=> details are saved successfully
8 - Test the self registration feature and confirm that the password is
required

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4b2c284092eda3f70eaeaa1b136e9c0ae8f17f82)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 06c47d8f5b923ea3eba23b9127c201dd8d780693)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit af56d2bd590c6433c919f30bba34bb9d40d87b0c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27554: Clarify and add tests for update_category_to
Nick Clemens [Thu, 28 Jan 2021 13:58:14 +0000 (13:58 +0000)]
Bug 27554: Clarify and add tests for update_category_to

This patch adds a comment to the existing tests, clarifying what they test, and verifying the expected patron is affected. The
original test should be broken by 26307 when the behvaiour is prevented

I additionally add a test for 'too old'

To test:
1 - Apply patch
2 - Prove tests, they should pass
3 - Verify the comments make sense

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: behvaiour ==> behaviour
and add more info to the commit title

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ecb6703d7a627060fc7e21a149e5226262c97e8d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1a71d411964897482be26c0760b3e2061d42ec57)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 1a5fdef579a053ed8434c3d9eff6ce579423ee5f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27580: Handle NULL values correctly in Koha::Items->filter_by_visible_in_opac
Tomas Cohen Arazi [Fri, 29 Jan 2021 19:43:06 +0000 (16:43 -0300)]
Bug 27580: Handle NULL values correctly in Koha::Items->filter_by_visible_in_opac

This patch fixes the internally used query so it doesn't consider NULL
values as IN the set.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> FAIL: Tests fail :-/
3. Apply this patch
4. Repeat 2
=> SUCCESS: tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b60ff6452ef2212a02f16ddc5c46edeb3d83a5e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 606f47b2e91dcc51b1348356d672e95f8943ab8a)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 53811a1700f9e7083e24ab65f5b7291a2fa090be)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27580: Regression tests
Tomas Cohen Arazi [Fri, 29 Jan 2021 19:40:27 +0000 (16:40 -0300)]
Bug 27580: Regression tests

This test makes all the generated sample items have undef copynumber,
and all rules are added copynumber => [ 2 ] on the tests as
suggested by Andrew on his failing example.

The tests are expected to pass. i.e. copynumber is clearly not equal to
2, so those items shouldn't be hidden.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> FAIL: Tests fail! undef is considered in [ 2 ]

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 00ea18282e622805321425789209ed9e0f8f7ea0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d767dc54a60e233afa9d295798eacc8cbc28a5f1)
(cherry picked from commit 27bc87fed72a7e5499445a35278b76526f1a4a28)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 20238: Display description of ITEMTYPECAT in search category
Amy King [Thu, 21 Jan 2021 22:41:09 +0000 (22:41 +0000)]
Bug 20238: Display description of ITEMTYPECAT in search category

When adding or editing item types (Koha administration > Basic
parameters > Item types) the drop down list currently displays
the ITEMTYPECAT authorized value description. However, on the
item types page the authorized value is displayed in the search
category column.

This enhancement changes the item types page so that the search
category column displays the authorized value's description
instead of the authorized value code.

Test plan:
1. Go to Staff interface home page > Koha administration > Basic
   parameters > Authorized values.
2. Find ITEMTYPECAT and add a new authorized value - make sure it
   has a description.
3. Go to the Basic parameters > Item types page.
4. Edit an item type.
5. For the search category, select the new authorized value you
   created. The desciption should be shown in the dropdown list.
6. Save the changes.
7. In the search category column for the item type you edited, it
   should now display the description instead of the code.
8. Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d1e12c95e1d1ec907f6ed4465270569aa6c5a40d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7333d95a3f12f95f8ef00f9138a57d9dd72d7eb8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 33047b9f38683aee24ff59256ffab4e9a9d38f36)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 14004: Set the syspref's value to an empty string
Jonathan Druart [Wed, 27 Jan 2021 11:03:33 +0000 (12:03 +0100)]
Bug 14004: Set the syspref's value to an empty string

It's tested with "defined" in C4::Context->preference

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6b23c0634b43a60f0a434d4c43a3e57718ad0806)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit efdf8bb303d0fd37a80150f41193b34173e23d3f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 1ec05c1c3225c9baaec2011831dc6f69fc94caac)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 14004: Add OpacAdditionalStylesheet and opaclayoutstylesheet
Fridolin Somers [Thu, 21 Jan 2021 16:09:27 +0000 (17:09 +0100)]
Bug 14004: Add OpacAdditionalStylesheet and opaclayoutstylesheet

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c009eeafed32f0da9ef3c81e5b3e748745c9f900)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 404155fbffd3b7052f7eae04a2d5e62a14a84eee)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 9a6344c7ee151676e9c0b083a69e98d5994d5cf0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 14004: Add ability to temporarily disable JS/CSS sysprefs
Fridolin Somers [Tue, 12 Jan 2021 10:15:25 +0000 (11:15 +0100)]
Bug 14004: Add ability to temporarily disable JS/CSS sysprefs

It would be *super* handy if intranetuserjs and/or opacuserjs could be
temporarily disabled via a check-box or syspref.
Right now, debugging issues in intranetuserjs usuaally starts with
copying the contents into a text file, blanking the syspref and re-testing.

This patch adds this feature by setting syspref via ENV
OVERRIDE_SYSPREF like override via Apache config.

Implemented only for preferences :
OPACUserCSS OPACUserJS IntranetUserCSS IntranetUserJS
=> replaced with ' '
intranetcolorstylesheet intranetstylesheet
=> replaced with 0

Test plan :
1) Set some CSS in IntranetUserCSS like : #breadcrumbs{color:red}
2) Go to staff interface home page like : /cgi-bin/koha/mainpage.pl
3) See CSS impact is visible
4) Edit URL : /cgi-bin/koha/mainpage.pl?DISABLE_SYSPREF_IntranetUserCSS=1
5) See CSS impact is not visible
6) Check with the other preferences

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 180db2f63b83dc4052b42e3073be9893e7495a1f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7a622302aae6ec8b4f4a4accaad8e37f5a8f9c0b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit ee9ac246697756def229033a19c69be4044e27e1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27547: Typo in parcel.tt
Caroline Cyr La Rose [Mon, 25 Jan 2021 14:59:57 +0000 (09:59 -0500)]
Bug 27547: Typo in parcel.tt

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 43c475bc96214109af78d2aae4e87809c802e8dc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 87dc9bf1846c59966f94b601ecd1bd965382ac69)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 2758cb905f943dafc2e1f1a96044eaad49e50753)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27531: Remove type attribute from script tags: Cataloging plugins
Owen Leonard [Fri, 22 Jan 2021 16:43:58 +0000 (16:43 +0000)]
Bug 27531: Remove type attribute from script tags: Cataloging plugins

This patch removes the no-longer-valid "type" attribute from script tags
found in cataloging plugin templates.

I don't think testing each plugin individually is a reasonable thing to
ask for a test. I think a visual verification of the changes in the
patch should be enough.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 32d482130749fdb17cb33e2ee48b0ae0acce835a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f656ab418d6f181052b0a17eadbb6eb2baa9668d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 316b36f57401c2823dc0bff10cc551adbcbf0227)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 11344: (QA follow-up) Fix empty section warning
Marcel de Rooy [Fri, 22 Jan 2021 09:04:07 +0000 (09:04 +0000)]
Bug 11344: (QA follow-up) Fix empty section warning

*** WARNING: empty section in previous paragraph at line 28 in file misc/cronjobs/advance_notices.pl

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c117df8e30c2067dd70a4573989d24e354145adc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c3858bd4b8284ee14152fe76185f48901244c089)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 2709549851d0c6ee9b73a7c001d41ca7bedf1c24)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 11344: Perldoc issues in misc/cronjobs/advance_notices.pl
James O'Keeffe [Tue, 19 Jan 2021 21:16:49 +0000 (21:16 +0000)]
Bug 11344: Perldoc issues in misc/cronjobs/advance_notices.pl

This patch removes the double ups in the perldoc of the above file,
     deleting the less clear double ups. The missing "-c" in OPTIONS
     appears to have been fixed in an earlier patch (it is there
             already).

Task Plan:
1. Run perldoc misc/cronjobs/advance_notices.pl in the terminal. Note
the double ups of NAME, SYNOPSIS, and DESCRIPTION
2. Apply the patch
3. Run the command again. The double ups should be gone, with the more
clear version of each of NAME, SYNOPSIS, and DESCRIPTION remaining.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5cb6927458dfd9195a7f9cb536b2ca386f7ffb88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ecad2b444134fce35c05d54e69c54f09464dd1f3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 826236d2b730fe5d4d976dd667bbf967f3ef95cf)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27333: Throw the right exceptions
Tomas Cohen Arazi [Mon, 4 Jan 2021 14:10:12 +0000 (11:10 -0300)]
Bug 27333: Throw the right exceptions

If parameters are missing, we need to throw
Koha::Exceptions::MissingParameter exceptions.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Club/Hold.t
=> FAIL: Tests fail because the method doesn't throw the right
exceptions
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c5f3fdcc15bc5d1a013321944c90ce49f5c58e6c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8bbc4514b7dc5757758c8a8e235b563d3fadd2b0)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 7a611d3ba3eeb7ae972ce9d16eac0e0190fb15b3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27333: Regression tests
Tomas Cohen Arazi [Mon, 4 Jan 2021 14:09:54 +0000 (11:09 -0300)]
Bug 27333: Regression tests

Test for the right exceptions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3ece5964861577185d96e2834f04f42bcc68d40e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 388ad3f1982f7372f1efdd838a00b17c456b47e1)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit c3418816b9ef4133ae5d7565f8bf246040c028d9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27327: Get rid of indirect object notation in Koha::Club::Hold
Tomas Cohen Arazi [Mon, 4 Jan 2021 13:35:37 +0000 (10:35 -0300)]
Bug 27327: Get rid of indirect object notation in Koha::Club::Hold

This patch makes the code follow the PERL29 coding guideline. Period.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 17a3476d7e45fae092fdd20ce78df8b0945d1fb1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f3f1366d7ec18c8990a1577e87a6bf0da8bfa40)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 8cd6017020b4a9e4b4252b95e5055b37cf2a5be0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27179: Misspelling of Method in REST API files
Mazen Khallaf [Tue, 19 Jan 2021 02:01:43 +0000 (02:01 +0000)]
Bug 27179: Misspelling of Method in REST API files

Test Plan:
1. Run "git grep -i mehtod" (which should return 2 files)
2. Apply patch
3. Rerun grep command (should return no files)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a22b3bb504b0a9a77aa9ce3e9f326cc71fcf8d96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 252564ebd74bef4a0f6c902b82ecb902c8905986)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 1653117d2044c0c507be5eb0190a172efbec87e1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27210: Typo in patron-attr-types.tt
Mazen Khallaf [Tue, 19 Jan 2021 01:49:43 +0000 (01:49 +0000)]
Bug 27210: Typo in patron-attr-types.tt

Test Plan:
1. Make sure the ExtendedPatronAttributes syspref is active
2. Go to Administration > Patron attribute types
3. Click New patron attribute type
4. Check the sentence next to the Editable in OPAC checkbox (Should say
        "Requires above, does not work during self-registration if
        PatronSelfRegistrationVerifyByEmail if set." - Notice the use of
        'if set')
5. Apply Patch
6. Repeat steps 2-4 (Should now say "Requires above, does not work
        during self-registration if PatronSelfRegistrationVerifyByEmail
        is set." - Notice the use of 'is set')
7. If it says 'is set', the patch works as expected.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c5170f8ee1b6ce3007787d2415aba7794dbaded3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a9cbacb822073ded7317630ae0c7931baf3070ac)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit d91cec26ca0ef94582591cebb83a1024430148b9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24811: French SQL files "news" link fixed
ava li [Tue, 19 Jan 2021 21:01:15 +0000 (21:01 +0000)]
Bug 24811: French SQL files "news" link fixed

This fixes a broken link in the sample news items for fr-FR and fr-CA.

Test plan:

1) Apply the patch.

2) Install the French language files - see
https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client

3) When Koha is in French, from the home page of the staff interface go to Tools/Outils > News/Annonces, and make sure the two news items are there.
    -If not, try importing the two files into your database or reset and install Koha in French (fr-FR or fr-CA).

4) There should be a news item with the heading Et maintenant ?, click the 5th link "proposez des correctifs et des améliorations".

5) If should take you to
https://wiki.koha-community.org/wiki/Version_Control_Using_Git
and there is no 404 error, the patch has worked!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c6009f32205c7b6c19a4dfe0346a1ebed0c05a71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4ba318f8a8d1566fd36f09f0cdbbfd9da2f49fd2)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit e765ed64ba9c7dd9aa63a22875b308b4008de604)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24810: French SQL files for "news" removed "3"
ava li [Tue, 19 Jan 2021 03:44:44 +0000 (03:44 +0000)]
Bug 24810: French SQL files for "news" removed "3"

TEST PLAN
Follow https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client in order to install french.
When koha is in french, from home go to tools/outils, then
news/Annonces, make sure the two files are there.
Preview them there or view them from the homepage and check that the 3
is gone.
If the files are not there, try importing the two files into your
database.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 42aac43290dbcb8cb1cfecbe685e738c8a95ee67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 35e723fc5323ef62f672c917f040134428b5ba24)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 604eaee854507e5dd2e2ba064cdce008e5e6916b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 20527: (QA follow-up) Fix type 'Wiriteoff'
Nick Clemens [Thu, 21 Jan 2021 16:09:58 +0000 (16:09 +0000)]
Bug 20527: (QA follow-up) Fix type 'Wiriteoff'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c706b8aa13edd39769324ad2d5937d9d4d5ae583)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 49f01ce2985794e1e7a2e503be7fa27c6a8a36b8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 3dd41b3d44b8ffa49e32249decace29ed3a3ba98)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 20527: Corrected paid to amountwrittenoff
Eden Bacani [Thu, 21 Jan 2021 02:54:30 +0000 (02:54 +0000)]
Bug 20527: Corrected paid to amountwrittenoff

Test Plan
1. Go to My account and go into accounting
2.Create manual invoice (If you already have invoices skip this step)
3.On the Make a payment tab click on Write off under actions of an
invoice
4. Click on Writeoff amount label and make sure that the amount written
is highlighted in green.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f3992816b20bf97de904d485e775c32b93df0726)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 21a1fb0cc239f24ee14f8659e96033f66314a226)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit a280fbd5eb14cbbe5ae0f030ff8eb3231b4a43ba)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24447: Changing 'DUE' to example in database that exists.
Eden Bacani [Thu, 21 Jan 2021 01:20:49 +0000 (01:20 +0000)]
Bug 24447: Changing 'DUE' to example in database that exists.

Test Plan:
1.Using  perldoc C4/Members/Messaging.pm check that message_name
attribute name example  is Item_Due and not DUE.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0a0ff7c5ceab836631be060a4571681ff40e275c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9c4aeca752210bbb504a84d84dbe49a9394ff0a3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit fa13840b5fad1fde76d45591a8ad7c629ace01e4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 7143: Update about page for new devs
Jonathan Druart [Fri, 22 Jan 2021 13:52:07 +0000 (14:52 +0100)]
Bug 7143: Update about page for new devs

Eden Bacani
Ella Wipatene
Ava Li

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4b7aecb00634e2fe4c8358dd99cef880916a5fc4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c9764b5fe75553459dd34d7cbc87620128dbd1a8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit b9bf7eef0d88e0f7b08d401d3c0f4e6695992e22)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 7143: Update about page for new devs
Jonathan Druart [Thu, 21 Jan 2021 15:01:19 +0000 (16:01 +0100)]
Bug 7143: Update about page for new devs

Mazen Khallaf
Amy King
Catherine Ma
James O'Keeffe
Victoria Faafia

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a57278f39b8c5b7a82b21671f266dbf32e2d41a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9016c317f5cb1c5ce36b9dee66564336f0fec220)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 816e6d14cad68a0b031b0b9936f47e8072139407)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27457: Set focus for cursor to Debit type code field
Catherine Ma [Tue, 19 Jan 2021 01:08:28 +0000 (01:08 +0000)]
Bug 27457: Set focus for cursor to Debit type code field

Test Plan:
1.Click administration
2.Click debit types
3.Click new debit type
4.Check if the cursor is in the first form field (it shouldn't)
5.Add patch
6.Repeat steps 1-3
7.Check if the cursor is in the first form field (it should)

Sponsored by Catalyst IT
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 958a91dc4ec3965956bfbdb8d4cdae5db07c7a0f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1868aa3a735288e98909aa9f97fefa73d92ea642)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 9910cf3f02fdeb2eb15dcf505bda5a42dcf85bfe)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoRevert "Bug 27299: Remove tokenization for phrase register/index with ICU"
Victor Grousset/tuxayo [Wed, 3 Feb 2021 19:11:42 +0000 (20:11 +0100)]
Revert "Bug 27299: Remove tokenization for phrase register/index with ICU"

This reverts commit d446cb427cb02a0ca0ea3e08bf1c81f8f2a42242.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27011: Remove unused $name variable
Amy King [Tue, 19 Jan 2021 03:27:27 +0000 (03:27 +0000)]
Bug 27011: Remove unused $name variable

The variable is no longer used in the template, it has been removed by:

  commit 76eb3a0549efe4c1f1557071a6cb4b33d4bd3e4d
  Bug 18789: (follow-up) Pass a Koha::Patron object from returns.pl

-            <td>[% name %]</td>
+            <td>[% INCLUDE 'patron-title.inc' patron=patron %]</td>

We can simply remove the $name variable from the controller script.

Test Plan:
1. Check out a book
2. Check in a book
3. Note what happens
4. Apply patch
5. Repeat step 1-2
6. Note that it doesn't break and everything still works

JD Amended patch: fix commit message

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 113992e620095aac59253cf653acfa47f1ec7768)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6a4541776e4b8f6176de7ba85e2f2011574ddd5c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 5f21cda35b9ad7ed21d2521b7384f7e7256d49de)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27192: Automatically set focus to the item type input box
Andreas Roussos [Fri, 8 Jan 2021 14:45:32 +0000 (15:45 +0100)]
Bug 27192: Automatically set focus to the item type input box

When adding a new item type, you have to click inside the
"Ιtem type:" input box before you can start entering text.

This patch fixes that by adding the "focus" class to the relevant
<input> element so that cursor focus is set when the page loads.

Test plan:

1) Try to add a new item type: notice how you have to manually
   click inside the "Item type:" input box before you start typing.
2) Apply this patch.
3) Repeat step 1) -- this time the "Item type:" input box should
   gain focus automatically.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a219a78239049245768ae3abd781136745f9a01f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 791bd8803115691b0f8567eec6d99ef9509455bf)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit f7a2fe0e60f24a165b019687ace546f5cebc5267)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24272: Correctly encode output to prevent 'Wide character in say'
Jonathan Druart [Wed, 20 Jan 2021 09:02:45 +0000 (10:02 +0100)]
Bug 24272: Correctly encode output to prevent 'Wide character in say'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 67b1b20e33f5d73ea515ea3b4d244dde73576448)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3fd8e4a13c361ad33d4cb02a7d77155f752b9f06)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit fb5974f7886413d316e1a2c2d0b6afe9f42dcdda)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24272: Use Pod2Usage and surround values with ''
Jonathan Druart [Wed, 20 Jan 2021 09:02:10 +0000 (10:02 +0100)]
Bug 24272: Use Pod2Usage and surround values with ''

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b1915293441b7f61d0e61c6b7dd105de1bbd5d8e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1601911977dc427e11428190bf62f416023c381b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 3cdc534a398eb24ccd113a55abd19d2c58ca1a01)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24272: (follow-up) Test defined not true
Nick Clemens [Fri, 15 Jan 2021 11:00:39 +0000 (11:00 +0000)]
Bug 24272: (follow-up) Test defined not true

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a9ea5d1ba42d8d0bbf3f8ad01e22521f20efdd38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a8f2eaa7958f595e549b91d162ee6d8320ff12ed)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit da8aae4d65716f066af784cd60e9c8784d954dbe)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24272: add check_sysprefs_cache.pl
Nick [Thu, 19 Dec 2019 03:20:36 +0000 (03:20 +0000)]
Bug 24272: add check_sysprefs_cache.pl

This script ensure that no sysprefs have been changed directly in the database and/or
that the cache has not become corrupted. We have occasionally seen this happen on production sites

To test:
1 - In the staff interface go to Administration
2 - Search for system preference 'IntranetUserJS'
3 - Add content to the syspref:
    console.log('Hi!');
4 - On the command line launch mysql
    sudo koha-mysql kohadev
5 - Alter the syspref directly
    UPDATE systempreferences SET value = "console.log('Bye!');" WHERE variable = 'IntranetUserJS';
6 - run the script
    perl misc/maintenance/check_syspref_cache.pl
7 - You are warned about the altered system preference

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit de5527f37d898e756cac4d8ed9de63c6576c1241)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5a1e18efd87c34ef9f158c4a6f663d30ab3a4e43)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit ff6951e83bd9eeb2bfd2ec4794ce6c8b3e72a33c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27416: Make "Modify tag" and "Add tag" translatable
Jonathan Druart [Wed, 13 Jan 2021 10:11:36 +0000 (11:11 +0100)]
Bug 27416: Make "Modify tag" and "Add tag" translatable

Those two strings are not translatable as they are passed from the
controller.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4491cdd803226c22c585f3a23f6aa77000841bed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 054428a57d4b810bc3278d625de573a66cb5d076)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit ae21f41f4840182f7812f03d3d70ee2d7ae637f7)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 17429: document the --plack/--noplack options of koha-list
Andreas Roussos [Tue, 29 Dec 2020 09:41:38 +0000 (10:41 +0100)]
Bug 17429: document the --plack/--noplack options of koha-list

The man page of koha-list does not list the --plack and --noplack
options.

This patch fixes that.

Test plan:

1) View the current man page for `koha-list` (with `man koha-list`)
   and notice how the --plack and --noplack options are missing.

2) Apply this patch.

3) Run the following command to re-generate the man page:

   xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
   debian/docs/koha-list.xml

   View the manual page again (with `man -l koha-list.8`), the
   two options are now displayed under SYNOPSIS and OPTIONS.

4) Make sure this test passes:
   prove -v xt/verify-debian-docbook.t

Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 920d3efcdfe1efc79e81017f8340227063ae2973)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dd2489c17544becb33bff1193c35875a14abad6a)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 756a61450289a506f0d2ab1fe2700c4100c5750f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 15448: Remove items fetch
Jonathan Druart [Thu, 14 Jan 2021 09:44:46 +0000 (10:44 +0100)]
Bug 15448: Remove items fetch

We fetch them already too many times.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6cd68dd05bdac2787fa0b67b7f90a5836c57745c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 54a9ef09bfe7fe8eff67a173dc7b79a278aba88f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit bcb997bda846b589c29bb54c0ee3484989bd56c4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 15448: Fix ISE
Jonathan Druart [Thu, 14 Jan 2021 09:42:53 +0000 (10:42 +0100)]
Bug 15448: Fix ISE

The method Koha::Items->itemnumber is not covered by tests!

Trace begun at /kohadevbox/koha/Koha/Objects.pm line 592
Koha::Objects::AUTOLOAD('Koha::Items=HASH(0x55981fd94790)') called at /kohadevbox/koha/opac/opac-reserve.pl line 465

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9790b5ca3a1b8a92d56a14207d6245c02dfe7fd6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 60e08d51bb814eb1dae834afa0c259539eaf2c61)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 6906be6c69a8603881bd1425024d8cdeb177e33b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 15448: (follow-up) Adapt to changes on bug 24254
Tomas Cohen Arazi [Mon, 21 Dec 2020 19:30:31 +0000 (16:30 -0300)]
Bug 15448: (follow-up) Adapt to changes on bug 24254

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8af3ecdd538f22bfbf4d99bda629283fe856f3de)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 655c4427c7d2c9e4d05c016fa52833feb9c59892)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 7f297d7f51486e3403197b53a5c0687d376000fb)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 15448: (follow-up) Fetch the patron category once
Tomas Cohen Arazi [Fri, 4 Dec 2020 11:33:43 +0000 (08:33 -0300)]
Bug 15448: (follow-up) Fetch the patron category once

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c9f66f5e6b5360a57885c26436c7eb3f2747bd28)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cdfea7001131055c8d91459d4c48dbc4adb4741e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit bbf2348bf070609ad876ccb4e82d4b98a9b3774b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 15448: Filter out items hidden in OPAC on placing hold
Tomas Cohen Arazi [Fri, 4 Dec 2020 11:21:36 +0000 (08:21 -0300)]
Bug 15448: Filter out items hidden in OPAC on placing hold

This patch leverages on bug 24254's
Koha::Items->filter_by_visible_in_opac to filter out items that
shouldn't be presented to the end user in the OPAC interface.

To test:
1. Circulation and Fine rules for item-level holds are set to allow.
2. Setting the OpacHiddenItems preference to "ccode: [SUPPRESS]"
3. An item with collection Code Suppress is set.
4. Search for the title in the OPAC.
=> SUCCESS: The Suppress ccode item isn't shown.
5. View the detail page for the title.
=> SUCCESS: The suppress ccode item isn't shown.
6. Place a hold on the item:
  -- Click "Show more options"
  -- Select "A specific item"
=> FAIL: the ccode with the opachiddenitems rule has an item that appear in the list to place a hold
7. Apply this patch and repeat 6
=> SUCCESS: The item doesn't show!
8. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 051f5519861cb2365ddd06d08a9047648af2318b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 284b2da589aabb2475b1292b1cf843be818b384e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 41605172eaebee255876abc21e1607a92cf21b4b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27299: Remove tokenization for phrase register/index with ICU
David Cook [Tue, 22 Dec 2020 22:57:38 +0000 (09:57 +1100)]
Bug 27299: Remove tokenization for phrase register/index with ICU

This patch removes tokenization for phrase register/index when
using ICU.

This should cause "exact" searches to work the same way with ICU
as they do with CHR.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7f9c909d5a603c40125064e7e32f24e595d596e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3a841a3a74a6165af996f8ca9c8affe8c5192f9e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 83716bc4ac3676a151845e2e507d6aef90dd1e13)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24254: (QA follow-up) Inlines opachiddenitems handling
Martin Renvoize [Thu, 14 Jan 2021 11:28:35 +0000 (11:28 +0000)]
Bug 24254: (QA follow-up) Inlines opachiddenitems handling

We decided to inline the opachiddenitems filter as we don't believe it
will be used exclusively.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 67f5a2607798f19a7bcd5e5f006f72bf196edd9e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24254: Implement separate filters and add patron param
Tomas Cohen Arazi [Mon, 21 Dec 2020 18:50:13 +0000 (15:50 -0300)]
Bug 24254: Implement separate filters and add patron param

This patch introduces two new methods for stacking filters on
Koha::Items:

- filter_out_lost
_ filter_out_opachiddenitems

This two filters are what actually happened inside the
filter_by_visible_in_opac. Everything is covered by tests.

In the process I added a Koha::Patron param to the method that is
internally used to decide if the OPACHiddenItems syspref needs to be
honoured or not. This *could* be better done with a fallback to
C4::Context->userenv if no param is passed.

I decided to leave that part for later, if we really find it would help
(e.g. if bug 10589 gets some action and we really need something here to
 handle that).

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 172747f9adc0c39440dfe3f7930e2ad87b387d75)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24254: Read the OpacHiddenItems preference internally
Tomas Cohen Arazi [Sat, 19 Dec 2020 13:21:18 +0000 (10:21 -0300)]
Bug 24254: Read the OpacHiddenItems preference internally

After discussing the 'rules' parameter usefulness we decided it was not
the best idea, and the gains in terms of 'performance' would me
meaningless (in-memory caching of sysprefs). This patch makes a really
minor tweak to the tests so they mock the C4::Context->yaml_preference
method, but keeping the same original rules to highlight no behaviour
change takes place.

Then the rules parameter is removed from the calls, and the tests should
keep passing.

A minor change to make $rules = undef is made to highlight the // {}
behaviour when reading the syspref..

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 2369428d7049f9847ed4ac578684a81fe03df4d0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24254: Compare itemlost with 0
Tomas Cohen Arazi [Sat, 19 Dec 2020 13:05:16 +0000 (10:05 -0300)]
Bug 24254: Compare itemlost with 0

On C4::Search and C4::Circulation the uses of the items.itemlost field
highlight the fact that the comparisson itemlost <= 0 was wrong, as it
is evaluated as a Perl boolean.

The column can only be an int and NOT NULL, so we need to check if it is
0 to ponder if not hidden.

This patch changes the tests to reflect this, and adjust the
Koha::Items->filter_by_visible_in_opac implementation to adapt to this.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 4ffe7ddac04b0240b8007df6521fe6e65e403241)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24254: Add Koha::Items->filter_by_visible_in_opac
Tomas Cohen Arazi [Thu, 3 Dec 2020 18:11:14 +0000 (15:11 -0300)]
Bug 24254: Add Koha::Items->filter_by_visible_in_opac

This patch adds a method based on the original idea from Nick, but on
Koha::Items.

The idea is to build a proper filter, based on the current rules for
hiding things, directly on the DBIC query. The caller takes care of
knowing if the filtering should apply (i.e. checking the patron category
exceptions) and then it would do something like:

    my @items;
    if ( <patron_category_does_not_have_exception> ) {
        @items = $biblio->items->filter_by_visible_in_opac(
            {
                rules => $rules
            }
        );
    }
    else {
        # still want to enforce 'hidelostitems'
        @items = $biblio->items->filter_by_visible_in_opac;
    }

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Look at the use cases on the tests, read the code
=> SUCCESS: It all makes sense
4. Compare with Koha::Item->hidden_in_opac
=> SUCCESS: It all makes sense
5. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 11bdc847a38fa3631e39fbc19c05ea7e5e64afd3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24254: Unit tests
Tomas Cohen Arazi [Thu, 3 Dec 2020 18:11:00 +0000 (15:11 -0300)]
Bug 24254: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit ff6d138fafc51d5d94bc46f665436dede1d52133)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 26713: Add pagination to bottom of saved SQL reports table
Owen Leonard [Thu, 3 Dec 2020 12:06:46 +0000 (12:06 +0000)]
Bug 26713: Add pagination to bottom of saved SQL reports table

This patch adds a second pagination menu to the bottom of the report
results table.

To test, apply the patch and go to Reports.

- Run a report which will return multiple pages of results (greater
  than 20).
- The results should display with a pagination bar at the top and bottom
  of the table.
- Confirm that both pagination menus work correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dbc74154754c4d5d03baa7c96b8511e0c2e0d036)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 544b4c44930053a8c173eaafb304fa8b362de572)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit fd9d8ff6030b69e8d887cfba7cba628747305ada)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27196: [19.11.x] Don't explode if item that is waiting if checked in by SIP
Jonathan Druart [Mon, 14 Dec 2020 14:54:54 +0000 (15:54 +0100)]
Bug 27196: [19.11.x] Don't explode if item that is waiting if checked in by SIP

AddReserve doesn't take a hash in 19.11 - amended the call in the tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 24863: QueryFuzzy syspref says it requires Zebra but ElasticSearch has some support.
Lisette Scheer [Sat, 24 Oct 2020 19:09:59 +0000 (19:09 +0000)]
Bug 24863: QueryFuzzy syspref says it requires Zebra but ElasticSearch has some support.

This patch updates the description of the QueryFuzzy system preference
to make it more clear how it works with Zebra and how Elasticsearch has
some amount of fuzzy available for searches.

To test:
1. Go to administration
2. Search for QueryFuzzy
3. Observe the current description, which only includes Zebra.
4. Apply patch
5. Repeat steps 1-2
6. Observe the updated description.
7. Sign off

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 137cf586551be4affb112eba3a61bc49b0099342)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c0466fd4425739e464f697687cd9b0639a0bf16c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit db65e8ff873020214ae339e8efad29b5f4179834)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27308: Skip blank lines when inserting new
Nick Clemens [Thu, 24 Dec 2020 13:35:28 +0000 (13:35 +0000)]
Bug 27308: Skip blank lines when inserting new

The intent of the macro insert new function is to add a new field at the correct numerical place in the record. If you have a blank line while editing, however, the new line will be inserted at the blank line, rather than checking the rest of the record.

To test:
1 - Create a macro like
    new 690=‡aLOCAL SUBJECT
2 - Insert a blank line into your record somewhere before where the 690 should be inserted
3 - Run the macro
4 - Line is inserted before the blank line
5 - Apply patch
6 - Reload (ensure cache is cleared and JS files are reloaded)
7 - Remove the previously created field, but leave the blank
8 - Run the macro
9 - Field is created at correct position

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 27308: (QA follow-up) Remove commented line

I don't think we need to keep the original line as a comment.. this
patch simply cleans it up.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3b0f86b53173d30da5dbb42710a7c9bf9edaa3bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d27b1018a96667c6fce8fc746e968e9a206858a0)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 79618eb5a654dc3c01119372e8e7fbc0fd3c7340)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoUpdate release notes to remove reverted patch v19.11.14
Victor Grousset/tuxayo [Sat, 23 Jan 2021 01:54:36 +0000 (02:54 +0100)]
Update release notes to remove reverted patch

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoRevert "Bug 27196: [20.05.x] Don't explode if item that is waiting if checked in...
Victor Grousset/tuxayo [Sat, 23 Jan 2021 01:02:57 +0000 (02:02 +0100)]
Revert "Bug 27196: [20.05.x] Don't explode if item that is waiting if checked in by SIP"

Patch not working, forgot to undo the backport before pushing.

This reverts commit e8ea682d492f029811d503dc2788a54a29a0bd35.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoUpdate release notes for 19.11.14 release
Victor Grousset/tuxayo [Sat, 23 Jan 2021 00:08:57 +0000 (01:08 +0100)]
Update release notes for 19.11.14 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoIncrement version for 19.11.14 release
Victor Grousset/tuxayo [Fri, 22 Jan 2021 23:04:06 +0000 (00:04 +0100)]
Increment version for 19.11.14 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoFix translations for Koha 19.11.14
Victor Grousset/tuxayo [Fri, 22 Jan 2021 22:51:05 +0000 (23:51 +0100)]
Fix translations for Koha 19.11.14

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoTranslation updates for Koha 19.11.14
Koha translators [Fri, 22 Jan 2021 21:43:11 +0000 (18:43 -0300)]
Translation updates for Koha 19.11.14

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27196: [20.05.x] Don't explode if item that is waiting if checked in by SIP
Jonathan Druart [Mon, 14 Dec 2020 14:54:54 +0000 (15:54 +0100)]
Bug 27196: [20.05.x] Don't explode if item that is waiting if checked in by SIP

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 5f1bcdf49a99f995c8cc00c45bc30498c066c9e3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27090: Opac basket: fix the 'In transit from' and 'to'
Christophe Croullebois [Wed, 25 Nov 2020 10:29:40 +0000 (11:29 +0100)]
Bug 27090: Opac basket: fix the 'In transit from' and 'to'

To see the 'In  transit from' and 'to' fields in an Opac basket we have :

<span class="item-status intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %]
    to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>

But in koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc we have no :

[% USE Branches %]

This patch just corrects this lack

Test plan:
1° find an item in a transit status or create one with this status
2° put it in an Opac basket
3° note that in the location column of the Opac basket the 'In transit from' and 'to' fields are empty.
4° apply the patch
5° check again and validate that the 2 fields are now filled

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7be57c66085071fea763a572ac2a6ceb82641297)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0b9750c8f94c4b35eb1a7ef75512b7e6a70ec7b8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 0c9ce94c25f41f070f66fbfeb0ab5982553fb289)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27245: Replace AutoCommit=0 with txn_begin in bulkmarcimport.pl
Jonathan Druart [Fri, 18 Dec 2020 13:41:12 +0000 (14:41 +0100)]
Bug 27245: Replace AutoCommit=0 with txn_begin in bulkmarcimport.pl

To prevent
DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1588, <GEN45> line 1.

Test plan:
1 - Export more than 100 records
2 - Use bulkmarcimport (with -commit=10) to import them
    perl misc/migration_tools/bulkmarcimport.pl -b -file testbmi.xml -v -m=MARCXML --commit=10
3 - Modify a record to make the import fail (for instance having a too long
lccn)
4 - Use bulkmarcimport (with -commit=10) to import them
    perl misc/migration_tools/bulkmarcimport.pl -b -file testbmi.xml -v -m=MARCXML --commit=10
5 - Notice that the import stops but that the imported record are imported (apart from the last batch of 10)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4a90c0b647fdfdb0a39b43f6b10adba3bca53215)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f0dadd169b08f3b486ea387cdbb7f93c13b8d3db)
(cherry picked from commit d26a4df948456b6d001b87458791686b0898323e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27137: Correctly show biblio title after successfully moving item
Aleisha Amohia [Thu, 3 Dec 2020 02:50:15 +0000 (15:50 +1300)]
Bug 27137: Correctly show biblio title after successfully moving item

In Bug 11529 we changed the variable that was passed to the template but
missed updating the template.

This patch ensures we correctly access the variable to show the title of
the biblio.

To test:
1) Create two biblios (Biblio A and Biblio B)
2) Add an item to Biblio A (Item A)
3) Go to Biblio B
4) In the cataloguing toolbar, click Edit, then Attach item
5) Enter the barcode for Item A and submit
6) Notice the item has successfully moved by Biblio B's title does not
show
7) Apply patch
8) Go to Biblio A
9) In the cataloguing toolbar, click Edit, then Attach item
10) Enter the barcode for Item A and submit
11) Confirm Biblio A's title shows correctly

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 4817f8ee4f7fa50a4f60d54e1827ecc91cf9ee49)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 25826: fix failing test
Jonathan Druart [Mon, 10 Aug 2020 08:00:34 +0000 (10:00 +0200)]
Bug 25826: fix failing test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 5cef1d0cd80e271c579e3ae2c5eb7eb44a9a8349)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 25826: (QA follow-up) Add filters
Nick Clemens [Thu, 6 Aug 2020 12:40:20 +0000 (12:40 +0000)]
Bug 25826: (QA follow-up) Add filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit e50c54d8129c6342dc37006669c4f42261e07dd6)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 25826: Forbid changing the hidden attributes for biblionumber
Tomas Cohen Arazi [Mon, 27 Jul 2020 15:18:36 +0000 (12:18 -0300)]
Bug 25826: Forbid changing the hidden attributes for biblionumber

This patch tweaks the UI so it forbids changing the hidden values when
they are correct (i.e. when they are not hidden in OPAC and intranet).

To test:
1. Apply the first patch
2. Play with the hidden values of the subfield you have mapped to
   biblio.biblionumber in your picked framework. This is usually 999$c
   in MARC21, and 001 in UNIMARC.
=> SUCCESS: When you verify the about.pl, it mentions issues when you
hide in some of the interfaces
3. Apply this patch and reload everything
4. Repeat 2
=> SUCCESS: If your framework is 'ok', it prevents you from editing this
values, otherwise you can change them.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 155b2f65e04c2b3b8e9120308ee6603d44a9c01e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 25826: Add a warning to the about page
Jonathan Druart [Wed, 22 Jul 2020 14:43:38 +0000 (16:43 +0200)]
Bug 25826: Add a warning to the about page

This patch adds a warning to the about page if the biblionumber field is
hidden at the OPAC or staff interface.

Test plan:
Hide the biblionumber to some framework
Confirm that there is a warning on the about page

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 6b8748248b6ef27783a222bbed83da9e5207fd7a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27085: Corrections in overdue_notices.pl help text
Timothy Alexis Vass [Wed, 25 Nov 2020 07:45:39 +0000 (07:45 +0000)]
Bug 27085: Corrections in overdue_notices.pl help text

-library      <branchname>     only deal with overdues from this library (repeatable : several libraries can be given)
Should be <branchcode>

Help text should also be proper sentences.

To test:
0) Run misc/cronjobs/overdue_notices.pl -h
1) Check that the text is now:
   -library      <branchcode>     Only deal with overdues from this library.
2) Check that the rest of the help text are proper sentences,
   with leading capital letter and punctuation.
3) Sign off.

Sponsored-by: Lunds Universitetsbibliotek
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1ad7d034e65d0b518335086345f2f533d1898c56)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 00cf5afd52fbe0679b87d4f1ba0d76d3892f5069)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 49246b7a2028344103bc249312a0f2619a192dfe)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27043: Add to number_of_replicas and number_of_shards to index config
Fridolin Somers [Tue, 17 Nov 2020 13:49:58 +0000 (14:49 +0100)]
Bug 27043: Add to number_of_replicas and number_of_shards to index config

With Elasticsearch 6 (>6.4), we have a warning on index creation :
  the default number of shards will change from [5] to [1] in 7.0.0

See https://github.com/elastic/elasticsearch/pull/30587

I propose to add number_of_shards in index config.

Also add number_of_replicas that is better explicit.
In case on only one node, it must be 0.

Test plan :
1) Use Elasticsearch
2) Apply patch and flush memcached
3) Rebuild indexes : misc/search_tools/rebuild_elasticsearch.pl -v -b -d
4) Check you dont have a warning about number of shards
5) Check the settings of index :
   curl '<cluster>:9200/<myindex>_biblios/_settings?pretty&filter_path=**.number_of_*'
6) You should see :
   "number_of_shards" : "5",
   "number_of_replicas" : "1"

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3dc90c66c7e3e53c6fab1792ebac65767e770c5e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 31b3763546e6fb5b55572e49786d0583b3abfa1a)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit ce3d0ff93e2898147c38271c2ab847b6ce4fce31)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>