]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 26162: Make Selenium click action more robust
Jonathan Druart [Thu, 6 Aug 2020 13:08:48 +0000 (15:08 +0200)]
Bug 26162: Make Selenium click action more robust

See
https://stackoverflow.com/questions/12967541/how-to-avoid-staleelementreferenceexception-in-selenium
https://www.selenium.dev/exceptions/
https://developer.mozilla.org/en-US/docs/Web/WebDriver/Errors/StaleElementReference

This patch will fix the following failure we get under D11:
18:47:07 selenium_1   | 09:47:07.478 WARN - Exception: Element not found in the cache - perhaps the page has changed since it was looked up
18:47:07 selenium_1   | For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
18:47:07 selenium_1   | Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
18:47:07 selenium_1   | System info: host: '78b9a07f51f2', ip: '192.168.16.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-9-amd64', java.version: '1.8.0_91'
18:47:07 selenium_1   | Driver info: driver.version: unknown
18:47:07 koha_1       |
18:47:07 koha_1       | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...}
18:47:07 koha_1       |  /usr/local/share/perl/5.26.1/Selenium/Remote/Driver.pm:353 in Try::Tiny::try
18:47:07 koha_1       |  (eval 1571):1 in Selenium::Remote::Driver::__ANON__
18:47:07 koha_1       |  (eval 1573):2 in Selenium::Remote::Driver::__ANON__
18:47:07 koha_1       |  (eval 1546):17 in Selenium::Remote::Driver::_execute_command
18:47:07 koha_1       |  /usr/local/share/perl/5.26.1/Selenium/Remote/WebElement.pm:63 in Selenium::Remote::WebElement::_execute_command
18:47:07 koha_1       |  /kohadevbox/koha/t/lib/Selenium.pm:184 in Selenium::Remote::WebElement::click
18:47:07 koha_1       |  /kohadevbox/koha/t/lib/Selenium.pm:172 in t::lib::Selenium::click_when_visible
18:47:07 koha_1       |  t/db_dependent/selenium/administration_tasks.t:131 in t::lib::Selenium::click

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 a96433446e87c03ac6e253a54eb067ac93a33575)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 0e46a19225dfb97b120b197500df6dccd7f16fe8)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoRevert "Bug 25762: Typo in linkitem.tt"
Victor Grousset/tuxayo [Sun, 20 Sep 2020 12:22:29 +0000 (14:22 +0200)]
Revert "Bug 25762: Typo in linkitem.tt"

Due to string freeze

This reverts commit f9eed86f7bf9eda16293ee1a283278ecaa295357.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 26043: Fix random failure from Holds.t
Jonathan Druart [Wed, 22 Jul 2020 12:11:03 +0000 (14:11 +0200)]
Bug 26043: Fix random failure from Holds.t

 #   Failed test 'Test ModReserveMinusPriority()'
 #   at t/db_dependent/Holds.t line 202.
 #          got: undef
 #     expected: '1605'
 # Looks like you failed 1 test of 66.

It is coming from Koha::Patron->holds that is ordering by reservedate,
so "sometimes" they are ordered in reverse (at least it's my
understanding of the problem).

Test plan:
Run the test file several times (from 20 to 60x), it must never fail
with this patch

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 80a611797bf67b263b6b84a6e931833ea336b6a5)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit c106d5a29d32572276489b5b1f3b8941ab17c778)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25762: Typo in linkitem.tt
Owen Leonard [Wed, 29 Jul 2020 12:21:29 +0000 (12:21 +0000)]
Bug 25762: Typo in linkitem.tt

This patch corrects the same typo in two different templates:

&rsquo; -> &rsaquo;

If you want to test beyond examining the patch, apply the patch
and go to Tools -> Rotating collections.

- Add an item to a rotating collection.
- In the browser's title bar (or the tab title if the title bar isn't
  shown) the separator between the rotating collection name and "Add or
  remove items" should be ">" instead of "`"
- Enable the EasyAnalyticalRecords system preference.
- View the detail page for a bibliographic record.
- From the "Edit" menu, choose "Link to host record"
- Check the title bar as you did previously.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 19f9bc0528ec0f5cdf000b5120138652b3ece57c)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 22809514f581dde652f2ab96dad1dc7cdfb5d1ac)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25873: Ignore malformed data for Elasticsearch integer fields
Julian Maurice [Thu, 25 Jun 2020 07:25:41 +0000 (11:25 +0400)]
Bug 25873: Ignore malformed data for Elasticsearch integer fields

If we try to put malformed data into an integer field, Elasticsearch
rejects the whole document.
Setting 'ignore_malformed' to true allows to ignore malformed data and
process the other fields of the document normally

https://www.elastic.co/guide/en/elasticsearch/reference/7.8/ignore-malformed.html

Test plan:
* Without the patch
  1. In search engine configuration, change the type of a text field to
  'Number' (for instance 'title')
  2. misc/search_tools/rebuild_elasticsearch.pl -d -b
  3. See that the index is empty (unless you have titles consisting only
  of digits)
* With the patch
  1. misc/search_tools/rebuild_elasticsearch.pl -d -b
  2. Now records are correctly indexed

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cb5acdc6702cef4668921ccf2537797358981fff)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 9b9c56c3b28e4e5e1592b3a0102114d88418d958)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25852: Improve C4::Creators::Lib reliability under plack
Jonathan Druart [Thu, 30 Jul 2020 10:00:03 +0000 (12:00 +0200)]
Bug 25852: Improve C4::Creators::Lib reliability under plack

This is certainly a major issue that leads to many side-effects.
Under plack, the structure of the default values are not handled
correctly.
Package variables are used to store stuff like the "layout type". They
are complex structures (arrays of hashes) and returned without being
copied.
When the caller (the controller script) retrieve them then modify the
returned structures, it actually modifies the package's variables.

One of the issue is:
Create a new layout
The script retrieve a structure with all "selected" flags are set to 0
It select the first one as default (BAR as selected => 1)
The user creates the new layout and will selected BIBBAR (for instance)
If you then edit this new layout, the script will retrieve the
"label_types" and set "selected" for BIBBAR. However BAR is still
selected!
The UI receives 2 selected and display the first selected one that has
the selected option.

Test plan:
1. Create a layout type for Barcode/Biblio
2. Choose fields to print and size of font
3. Save
4. Edit existing Layout
=> Withtout this patch "Barcode" is the preselected option
=> With this patch applied, the correct "Barcode/Biblio" option is
selected

Signed-off-by: Kelly McElligott <kelly@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 0a9d3f17d9e44b5326a42d14420d30243031629d)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 0471bd6843974b473d266ced3c50b1c95f6695ea)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25852: Add tests
Jonathan Druart [Thu, 30 Jul 2020 09:59:44 +0000 (11:59 +0200)]
Bug 25852: Add tests

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 e330e4ec222f8ac3a04339a020509e30aa0bf3ab)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 6f7e48d75f7161a4c34f3bf8ececff94b74fbc0b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25982: OPAC shelves RSS link output is xml
Didier Gautheron [Sun, 12 Jul 2020 12:09:15 +0000 (14:09 +0200)]
Bug 25982: OPAC shelves RSS link output is xml

Output rss feed as text/xml

Test plan:
1) have books entered
2) log in create a list
3) add books to list
4) display list in OPAC
5) click the RSS link button.
   -- output is displayed as html text
6) apply patch
7) repeat steps 4&5
   -- output is displayed as xml tree

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.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 3d0da68d5ada37b40099fbc11b63202ccf7a48b2)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 5cc580332c359a630aece3158fde1d71c70e2dd2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24379: Fix failing tests (19.05: fix warnings)
Jonathan Druart [Mon, 20 Jul 2020 13:16:29 +0000 (15:16 +0200)]
Bug 24379: Fix failing tests (19.05: fix warnings)

19.05: The warning fix wasn't in 19.05 so not it was introduced in it's
   2nd version.

kohadev-koha@kohadevbox:/kohadevbox/koha$ prove t/db_dependent/Koha/Patrons/Import.t
t/db_dependent/Koha/Patrons/Import.t .. 2/159
 #   Failed test 'No warning raised by import_patrons'
 #   at t/db_dependent/Koha/Patrons/Import.t line 171.
 # found warning: Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018, <$handle_3a> line 2.
 # found warning: Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018, <$handle_3a> line 2.
 # didn't expect to find a warning
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018, <$handle_2> line 2.
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018, <$handle_2> line 2.
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018, <$handle_3> line 2.
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018, <$handle_3> line 2.
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018, <$handle_4> line 2.
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018, <$handle_4> line 2.
t/db_dependent/Koha/Patrons/Import.t .. 152/159 # Looks like you failed 1 test of 159.
t/db_dependent/Koha/Patrons/Import.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/159 subtests

Test Summary Report
-------------------
t/db_dependent/Koha/Patrons/Import.t (Wstat: 256 Tests: 159 Failed: 1)
  Failed test:  39
  Non-zero exit status: 1
Files=1, Tests=159,  3 wallclock secs ( 0.04 usr  0.01 sys +  2.11 cusr  0.24 csys =  2.40 CPU)
Result: FAIL

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 545e03c173c789241eb21773a939b4ab7dcc6da4)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 493a0f2d540361ed4fef2157a9b852a1a57e126e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24379: DBIC
Victor Grousset/tuxayo [Fri, 18 Sep 2020 23:28:54 +0000 (01:28 +0200)]
Bug 24379: DBIC

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24379: DBRev 19.05.14.002
Aleisha Amohia [Wed, 5 Aug 2020 00:07:40 +0000 (12:07 +1200)]
Bug 24379: DBRev 19.05.14.002

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit a2139daaa53acfa90d855a5e0df76b47fb964139)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24379: Make login_attempts not nullable
Nick Clemens [Wed, 8 Jan 2020 20:59:38 +0000 (20:59 +0000)]
Bug 24379: Make login_attempts not nullable

While the column defaults to 0 in Koha::Object->store we set to NULL if NULLABLE

When trying to reset a patrons password we check that the account is not administratively locked:
login_attempts != -1

This query does not return rows where login_attempts IS NULL. It will return accounts where login_attempts = 0

Let's default to 0 like we intend

To test:
1 - Create a new patron
2 - Note their login_attempts is NULL
    SELECT login_attempts FROM borrowers ORDER BY borrowernumber DESC LIMIT 1
3 - Enable  OpacResetPassword
4 - Attempt to reset password before logging in, you cannot
5 - Apply patch, updatedatabase, restart_all, update schema
6 - Create another patron
7 - Their login attempts should be 0
8 - Attempt to reset password, it works!

Bug 24379: Fix the test

First we create a patron using TestBuilder to get a hashref of valid
info. Then we delete it and create a new patron using Koha::Patron->new
Once stored, we should call discard_changes to make the calculated
values available in the currenct object.

Bug 24379: Don't drop default of 0 for login attempts

When moving the column we drop the default, this means that DBs upgraded form earlier versions
get the wrong values set

To test:
1 - Checkout 16.11.x
2 - Reset all
3 - Checkout master
4 - updatedatabase
5 - SHOW CREATE TABLE borrowers;
6 - Note the column login_attempts defaults to NULL
7 - Apply patch(es)
8 - Repeat
9 - Now it defaults ot 0 (and has NOT NULL if applied all)

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 7bb31cffae27dc398a7b4a4decf3623ec65478ac)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit f4899bafe35ad8e0c2e9af55068e6ee7f4a7e36e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25709: DBRev 19.05.14.001
Aleisha Amohia [Thu, 30 Jul 2020 15:39:32 +0000 (03:39 +1200)]
Bug 25709: DBRev 19.05.14.001

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 54f653d2707a19b58aa0b6065e98f1280769afcd)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25709: Rename systempreference to NotesToHide
Nick Clemens [Mon, 6 Jul 2020 17:56:35 +0000 (17:56 +0000)]
Bug 25709: Rename systempreference to NotesToHide

In an effort to use more inclusive language we have added a new coding guideline:
https://wiki.koha-community.org/wiki/Coding_Guidelines#TERM3:_Inclusive_Language

This patchset renames a syspref to be clearer and follow the guideline

To test:
1 - Apply patch and updatedatabase
2 - git grep NotesBlacklist
3 - Note all remaining occurrences are translations, db updates, and release notes
4 - Add a field (e.g. '520' ) to the NotesToHide systempreference
5 - View a record with a 520 field on the opac
6 - Confirm the field does not show in the 'Title notes' tab

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 5e45076c00b2f72537ba9c81c4535253f1aaadfb)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit aeb39a61bdef62a0cef6413b9cebcd60b83196f9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23086: Search for collection is broken
Kyle M Hall [Wed, 18 Sep 2019 14:28:33 +0000 (10:28 -0400)]
Bug 23086: Search for collection is broken

It appears that we are quoting the ccode values deep in the search code.
Under ICU chains this breaks searching by limits

To recreate
 1 - Setup Koha using Zebra and icuchains
 2 - Add ccode to AdvancedSearchTypes
 3 - In koha-conf.xml set zebra debug level to include request
  <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 4 - Set some items into different ccodes
 5 - On opac perform a search for:
    ccode:NFIC
 6 - It works
 7 - tail -n 50 /var/log/koha/kohadev/zebra-output.log
 8 - Note search request like:
    Search biblios OK 26 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC
 9 - On opac go to advanced search, select Collection, and limit to smae code a s above
10 - No results
11 - Check the zebra-output.log:
    Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 'NFIC'
12 - Apply patch
13 - Restart all
14 - Repeat search by collection limit
15 - Success!
16 - Check the zebra-output.log:
    Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC
17 - Add a new ccode value: N)N
18 - Set some items to that ccode
19 - Confirm searching by that ccode works

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bc1b76be4a35403239fbce6f349ee343435cc8a0)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit fa08592991a875b81f5cc3c6bec555b0e5f866b8)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23086: Unit test
Nick Clemens [Wed, 15 Jul 2020 15:33:18 +0000 (15:33 +0000)]
Bug 23086: Unit test

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 40b6e1b8a1a6e74cb4e9a1c422ffa4faa0bdefc0)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit df53ab009445f9ed96b2ef99dc5f0d046d16a96c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25729: Prevent Charges/Fees.t to fail on slow server
Jonathan Druart [Mon, 27 Jul 2020 13:15:44 +0000 (15:15 +0200)]
Bug 25729: Prevent Charges/Fees.t to fail on slow server

We must use t::lib::Dates::compare to compare dates

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fcd659b2d4cf62df48113567c59392e8dff9696f)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit e1df84e9ecae7d48e91f2e08333b664de39ce912)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25244: Add specific aria-label to search results
Martin Renvoize [Mon, 29 Jun 2020 14:55:17 +0000 (15:55 +0100)]
Bug 25244: Add specific aria-label to search results

This patch adds an arai-lebel to the select checkboxes on the search
results page of the OPAC.

Test plan
1/ Perform a search that will yield some results
2/ Inspect the 'checkbox' on the left side of the results table
3/ Note that there is no arai-label
4/ Apply patch
5/ Refresh the search results page
6/ Inspect the 'checkbox' on the left side of the results table
7/ Note that the aria-label now appears and contains relavant
information
8/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 25244: (follow-up) QA corrections

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d1a7112a9054305ead325daedd6bb106a31b346f)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 922df35371b4644aa5b729c2fff687ce1ec12a38)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25155: (follow-up) Increase headings levels by 1
Martin Renvoize [Thu, 11 Jun 2020 09:14:03 +0000 (10:14 +0100)]
Bug 25155: (follow-up) Increase headings levels by 1

In the previous patch we reduced the headings levels by 2, but this was
one level too many as we already have an H1 in the navbar and so all
other heading sets should start at level 2 to semantically follow the
title heading.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 c9a0243f3abf407e1a89d7bfc125911cc153b3cc)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit ca7607af5cdfcf96833d5b883a61e1d629a38056)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25155: Fixing semantic headings login modal
Martin Renvoize [Thu, 11 Jun 2020 08:32:45 +0000 (09:32 +0100)]
Bug 25155: Fixing semantic headings login modal

The login modal headings were semantically incorrect prior to this
patch.

Test plan:
1) Click the 'Log in to your account' option to expose the modal
2) Use a headings inspector and note we jump from H1 (Page Title) -> H3
   (Modal Title)
3) Apply the patch and reload the page.
4) Click the 'Log in to your account' option to expose the modal
5) The modal should still appear well formed
6) Use a headings inspector and note we jump from H1 (Page Title) -> H2
   (Modal Title) -> H3 (Shibboleth title if enabled)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 513b226873759ba3df6765dce635fe96cf5a51f3)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 68f16bb3401ee825425fc115d8ace5b525af37c9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25155: Fixing semantic headings in opac-auth.tt
Hayley Mapley [Thu, 11 Jun 2020 01:13:30 +0000 (13:13 +1200)]
Bug 25155: Fixing semantic headings in opac-auth.tt

Test plan:
1) Follow test plan from comment #1
2) Apply the patch
3) Reload the page, and note that is still displays fine
4) Check that the main heading is now an h1, and that the other headings
on the page make sense

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0bc47b5302fba91c1315acee5533ec5917df5761)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 832076f727b12bb0b93173275845cea60096e337)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25726: make holds to pull ignore holds where found is not null and itemnumber...
Andrew Fuerste-Henry [Fri, 12 Jun 2020 13:51:16 +0000 (13:51 +0000)]
Bug 25726: make holds to pull ignore holds where found is not null and itemnumber is null

To test:
1- place 2 bib-level holds on available items
2- confirm they both show on Holds to Pull
3- edit one hold from the database to set found='T'
4- reload Holds to Pull, confirm it is now empty
5- apply patch
6- Reload Holds to Pull
7- confirm it now shows the hold you did not edit

Signed-off-by: donnab <donna@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Using capitals for SQL reserved words; added a FIXME
Tested with:
    update reserves set found='T', itemnumber=NULL where reserve_id=...
This should be a workaround while we fix the underlying problem.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 56220d211d7b5c4e2622787f9ea38ab12c8868f5)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 39547a6279e418823a23809c813dc198a07eca75)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 26253: (bug 22857 follow-up) Remove duplicated mana_config in etc/koha-conf.xml
Jonathan Druart [Thu, 20 Aug 2020 08:10:14 +0000 (10:10 +0200)]
Bug 26253: (bug 22857 follow-up) Remove duplicated mana_config in etc/koha-conf.xml

It was there already but not at the same place!

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.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 a4998b7d5758b0bee682fa7485d66390a3657a20)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8305f582aafe348f5f2697fe5432e162989296b5)
(cherry picked from commit 53c99fcb46b5486ff244cc2b07ba5fad28a3940d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 1e487927fc03a9f555005e35a0f0d5ad71558c44)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25944: Schema fix for illrequests route
Martin Renvoize [Tue, 7 Jul 2020 08:27:48 +0000 (09:27 +0100)]
Bug 25944: Schema fix for illrequests route

The illrequests path was missing the `comments` and `status_alias`
embedable relations in the path specification.

Test plan:
1/ Ensure you have the latest Mojolicious + OpenAPI modules installed.
2/ Navigate to the ill requests page and note that the table is empty.
3/ Note that under the networking tab in your browsers developer tools
that the api call fails with a 400 error.
4/ Apply the patch
5/ Refresh the page
6/ The table should now load and the api route should return a proper
200 response.
7/ Signoff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Applied the patch to a production server that was having the 400
error on the main ILL page, and the error was gone.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 40ab030060d6cbacb0be9df981fb28a6ade705ea)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit f4c2d263ae0136e1a2d6ef0fb3dc1eed3a0a6266)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 17084: Automatic debian/control updates
Mason James [Mon, 1 Jun 2020 05:20:17 +0000 (17:20 +1200)]
Bug 17084: Automatic debian/control updates

update for 20.05 release cycle

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b5626ab3f886ee7dd35af6d4f591bb532a2a9d86)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 3a86cc90816f27c9041fe051a870c0f14276a6fe)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25591: Update list-deps for Debian 10 and Ubuntu 20.04
Mason James [Sun, 24 May 2020 03:16:20 +0000 (15:16 +1200)]
Bug 25591: Update list-deps for Debian 10 and Ubuntu 20.04

This patch removes version-specific packages from the debian/control file,
which fixes a bug where koha-common can only be installed on the debian
version that the package was built on

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5d9a51332d0cc932a4f23d757bbd6f5c38282df6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0639627c3234aad5ee2d45b933c43d9a10ed20c2)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 248978bc6249b6a290f2ca1f76edebdac9348996)

4 years agoBug 26033: Use pic.infini.fr instead of framapic
Jonathan Druart [Tue, 21 Jul 2020 10:36:17 +0000 (12:36 +0200)]
Bug 26033: Use pic.infini.fr instead of framapic

https://framapic.org/ is closing
"""
Framapic will be closing its doors on Tuesday, January 12, 2021. You will find a similar service on this page.
Uploading images is now disabled, but you can still retrieve your images on the My images page.
"""

https://framablog.org/2019/09/26/lets-de-frama-tify-the-internet/
https://framablog.org/2020/03/03/10-bonnes-raisons-de-fermer-certains-services-framasoft-la-5e-est-un-peu-bizarre/
(French)

We can still use another service. However we may think about hosting the
service ourself!

Test plan:
Modify a selenium script to make it fail (for instance modify the path
for a find_element call)
Run it
Confirm that the screenshot has been uploaded correctly and that the
link works

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8aa907379eb54d360746c3e15051327a1e6cc1fe)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 63e28d62bdeb3e37f82974c83ce8057574d13e3a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25566: Add option to ignore found holds and use it when checking high holds
Nick Clemens [Thu, 21 May 2020 13:41:23 +0000 (13:41 +0000)]
Bug 25566: Add option to ignore found holds and use it when checking high holds

To test:
 1 - Find or create a record with 10 items
 2 - Set sysprefs:
     decreaseLoanHighHolds - enable
     decreaseLoanHighHoldsDuration - 2
     decreaseLoanHighHoldsValue - 2
     decreaseLoanHighHoldsControl  - 'over the number of holdable items'/dynamic
 3 - Set circ rules to allow 1 hold per record on the relevant record
 4 - Place 3 holds on the record
 5 - Check one item in and confirm hold to set to waiting
 6 - Issue to the patron with the waiting hold
 7 - Get a notice that loan period is decreased
 8 - Don't confirm the checkout
 9 - Apply patch
10 - Restart all the things
11 - Repeat checkout, no decrease this time!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 96a871035043c7ffd93c61e756ee1ff89e3da0f0)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit fe86de90479a4f6a6a52277490a83cf8e133dbba)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 26270: Fix ThingISBN after a change in behaviour
Jonathan Druart [Fri, 21 Aug 2020 12:00:51 +0000 (14:00 +0200)]
Bug 26270: Fix ThingISBN after a change in behaviour

This is just a guess! One of our tests is failing since today and we
don't modify anything in this area.
My guess is that the service is now returning the normalized version of
the ISBN

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 7a34b88885c13a89cd713bb76eadef11472c1960)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoUpdate release notes for 19.05.14 release v19.05.14
Victor Grousset/tuxayo [Tue, 25 Aug 2020 13:03:58 +0000 (15:03 +0200)]
Update release notes for 19.05.14 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoIncrement version for 19.05.14 release
Victor Grousset/tuxayo [Tue, 25 Aug 2020 11:33:00 +0000 (13:33 +0200)]
Increment version for 19.05.14 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoFix translations for Koha 19.05.14
Victor Grousset/tuxayo [Tue, 25 Aug 2020 11:29:41 +0000 (13:29 +0200)]
Fix translations for Koha 19.05.14

Marked as fuzzy the errors found by junitmsgfmt

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoTranslation updates for Koha 19.05.14
Koha translators [Tue, 25 Aug 2020 08:51:22 +0000 (05:51 -0300)]
Translation updates for Koha 19.05.14

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23634: (QA follow-up) Our PUT is really a PATCH
Tomas Cohen Arazi [Mon, 13 Jul 2020 15:25:13 +0000 (12:25 -0300)]
Bug 23634: (QA follow-up) Our PUT is really a PATCH

This patch makes the controller not expect that there will always be all
the email fields. So it now checks if an email field was passed, and
changed, and renders the error if that stands.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: Tests written by Nick highlight a problem
2. Apply this patch
3. Repeat 1
=> SUCCESS: Problems solved
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit cc1e2ae3b73c7bc45f4cc2a05a3836e295453e0b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23634: (QA follow-up) Catch all email cases in API
Martin Renvoize [Fri, 10 Jul 2020 08:38:31 +0000 (09:38 +0100)]
Bug 23634: (QA follow-up) Catch all email cases in API

The API was only catching the primary email change case, but we need to
catch email, emailpro and B_email.

We were also not accounting for any of the emails (on PUT or from the
DB) being undefined.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 0a6f3e285ed2e792f1e49dfe85ff82bf12e61ded)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23634: (follow-up) Prevent updates on POST
Martin Renvoize [Tue, 19 Nov 2019 16:59:06 +0000 (16:59 +0000)]
Bug 23634: (follow-up) Prevent updates on POST

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 32c1f27c74b17a7d22a1a95cccffbe320810b6df)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23634: Secure the email on the API
Tomas Cohen Arazi [Tue, 19 Nov 2019 16:16:16 +0000 (13:16 -0300)]
Bug 23634: Secure the email on the API

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 05b6ac7bc97a4d1ef4a4d1e4c41fe0b99de86aa8)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23634: Prevent non-superlibrarians from editing superlibarian emails
Martin Renvoize [Tue, 19 Nov 2019 14:51:50 +0000 (14:51 +0000)]
Bug 23634: Prevent non-superlibrarians from editing superlibarian emails

This patchset prevents a non-superlibrarian user from editing a
superlibrarians email address via memberentry.  This is to prevent a
privilege escalation vulnerability whereby a user could update a
superlibrarians contact details to match their own and then request a
password reset via the OPAC.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit e707fdf7b6ca155ec9abd47e2e8aef1549f01f10)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23634: Add tests for is_superlibrarian
Tomas Cohen Arazi [Tue, 19 Nov 2019 16:22:18 +0000 (13:22 -0300)]
Bug 23634: Add tests for is_superlibrarian

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 6cbe60e25de95b81b11766764846864a46b8b88b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23634: Add is_superlibrarian method to Koha::Patron
Martin Renvoize [Tue, 19 Nov 2019 14:11:34 +0000 (14:11 +0000)]
Bug 23634: Add is_superlibrarian method to Koha::Patron

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit c19855ca5ecf58f0dfb2068172bd6dda6c5b6c1c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25360: (follow-up) Remove the https FIXME in Auth.pm
Marcel de Rooy [Wed, 5 Aug 2020 13:48:59 +0000 (13:48 +0000)]
Bug 25360: (follow-up) Remove the https FIXME in Auth.pm

The FIXME is no longer valid since we fixed the X-Forwarded headers
for Plack. And since we do not even use using_https anymore in
the templates (see bug 21094).

Test plan:
Run Auth.t
Git grep for using_https

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit b219dcc283a4e3c9aad9070ca67037405086c9b9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25360: Use secure flag for CGISESSID cookie when using HTTPS
David Cook [Mon, 4 May 2020 01:12:26 +0000 (11:12 +1000)]
Bug 25360: Use secure flag for CGISESSID cookie when using HTTPS

This patch adds the secure flag to the CGISESSID cookie when using HTTPS.
This prevents the cookie being used again over a normal HTTP
request.

Bug 25360: [Follow-up] Test for "on" or "ON" value for HTTPS env var

This patch tests for HTTPS "on" or "ON" before setting the secure
cookie.

Bug 25360: [Follow-up] Fix typo in C4/InstallAuth.pm

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Amended number of tests in Context.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit b9d92bdc6c43e8d242c274682b16b6f45af35f86)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24663: [19.05.x] Handle special cases for recovery password and selfreg
Jonathan Druart [Mon, 17 Feb 2020 15:44:37 +0000 (16:44 +0100)]
Bug 24663: [19.05.x] Handle special cases for recovery password and selfreg

The password recovery and self-registration features need to be
accessible at the OPAC even if not public.

Test plan:
Self register a new account, then ask for a new password with OpacPublic
turned off

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24663: [19.05.x] Force authentication in svc/records/preview (?)
Jonathan Druart [Mon, 17 Feb 2020 12:31:38 +0000 (13:31 +0100)]
Bug 24663: [19.05.x] Force authentication in svc/records/preview (?)

Was this wrong?

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24663: [19.05.x] Force auth in adveditorshortcuts.pl
Jonathan Druart [Mon, 17 Feb 2020 12:31:17 +0000 (13:31 +0100)]
Bug 24663: [19.05.x] Force auth in adveditorshortcuts.pl

This was wrong!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24663: [19.05.x] Remove authnotrequired if set to 0
Jonathan Druart [Mon, 17 Feb 2020 12:20:48 +0000 (13:20 +0100)]
Bug 24663: [19.05.x] Remove authnotrequired if set to 0

It defaults to 0 in get_template_and_user

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24663: [19.05.x] Test OpacPublic for all OPAC scripts
Jonathan Druart [Mon, 17 Feb 2020 12:16:48 +0000 (13:16 +0100)]
Bug 24663: [19.05.x] Test OpacPublic for all OPAC scripts

Prior to this patchset there were 3 different calls to
get_template_and_user (or checkauth) with the authnotrequired param:
 * authnotrequired => 0
 * authnotrequired => 1
 * authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 )

The first one says that an unauthenticated user can access the page, the
second that the user has to be authenticated, and the last one that it
depends on the OpacPublic syspref.
Actually we must replace the first one with the third one, if the OPAC
is not public, the authentication must be forced.

To do so we are going to remove the "authnotrequired => 0" occurrences,
and check the OpacPublic syspref's value in C4::Auth

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25875: Move check for module_bit and code to the JOIN
Nick Clemens [Thu, 25 Jun 2020 10:38:26 +0000 (10:38 +0000)]
Bug 25875: Move check for module_bit and code to the JOIN

If we limit the JOIN to rows with the correct subpermission we won't
duplicate the returned patrons

To test:
 1 - Give a patron full acquisitions permissions
 2 - Also give them several subpermissions on other areas
 3 - Go to Acquisitions
 4 - Edit a fund
 5 - Add a user to the fund
 6 - Search for user above
 7 - They return multiple times in results
 8 - Apply patch
 9 - Restart all the things
10 - Repeat search
11 - Patron appears once

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 721876785142fea84f02c7dbe4f325e2a605bd0f)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 0cb156cba54e8433a3ea351a322f93c807a934e5)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25875: Unit test
Nick Clemens [Thu, 25 Jun 2020 10:38:16 +0000 (10:38 +0000)]
Bug 25875: Unit test

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 a804d4be437a5df3641f854a506642afe3501046)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 512d0bfbd417e9e2d7f2e0e46882979138091e96)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25491: Fix for "Use of uninitialized value" in InstallAuth.pm
Slava Shishkin [Wed, 13 May 2020 17:20:27 +0000 (20:20 +0300)]
Bug 25491: Fix for "Use of uninitialized value" in InstallAuth.pm

This warning was thrown:
    Use of uninitialized value $info{"invalid_username_or_password"}
    in numeric eq (==) at /home/vagrant/kohaclone/C4/InstallAuth.pm
    line 387.

There is the case when hash key can be undefined in numeric comparison.

Fixed by adding additional precheck for
$info{"invalid_username_or_password"} being Perl's "true".

To test:
    1) Go to the first page of the web-installer where it asks to login.
    2) Observe the warning in the log file.
    3) Apply patch.
    4) Repeat step 1.
    7) Check that previous warning suppressed.

Mentored-by: Andrew Nugged <nugged@gmail.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 d81438e143273a538c09cd16e7f92a83beed4027)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 0d9ea88b86ea48142aabdb4eea6efb4b98eae3f1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25805: Return empty strings instead of undef in C4::SIP::ILS::Item::hold_patron_name
Kyle M Hall [Thu, 18 Jun 2020 13:01:36 +0000 (09:01 -0400)]
Bug 25805: Return empty strings instead of undef in C4::SIP::ILS::Item::hold_patron_name

This bug is basically the same as bug 24966, but for hold_patron_name instead of hold_patron_bcode.
The subroutine hold_patron_bcode should always return an empty string, not undef.

Test Plan:
1) Using the SIP cli emulator, checkin an item that is not checked out
2) Note the DA field contains someting like "C4::SIP::SIPServer=HASH(0x88175c8)"
   The hex number will almost certainly be different from this example
3) Apply this patch
4) Restart the SIP server
5) Run the SIP checkin again
6) Note the DA field is no longer present!

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 017b67e6c52ab7b79a0187b1ca9fea220117f7ef)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit f22bded52404114572988e445e1ca0398fa3227d)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25805: Regression tests
Tomas Cohen Arazi [Thu, 18 Jun 2020 19:54:42 +0000 (16:54 -0300)]
Bug 25805: Regression tests

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 115eeada2b6f959997d21d0e0dd73606f1ca7324)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 4a3486a7bcc06b05b664a69ba5e977988e7897e6)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 4985: Fix Plack scope errors
Emmi Takkinen [Thu, 19 Mar 2020 07:12:19 +0000 (09:12 +0200)]
Bug 4985: Fix Plack scope errors

This patch 'ours' several variables to fix Plack scope errors
in exceptionHolidays.pl.

This also adds '@holidays_list' as parameter to 'edit_holidays'.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 ee3f5d5a85d93dc36d6bdeab5f092c0098d604e1)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 760f1eaad5a426c5bd2436c072a2df401202e8e4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 4985: Edit a calendar entry for all branches
Emmi Takkinen [Fri, 7 Feb 2020 10:43:54 +0000 (12:43 +0200)]
Bug 4985: Edit a calendar entry for all branches

This patch adds functionality to calendar tool to
make edits or deletes to all branches at once.

To test:
-Apply patch
-Add holiday for a library and copy it to all or some
libraries
-Edit previosly made holiday (edit, delete etc.) and
check out "Copy changes to all libraries." checkbox
=> Changes are made to all libraries sharing changed
holiday

Sponsored by: Koha-Suomi Oy

Signed-off-by: Christofer <christofer.zorn@ajaxlibrary.ca>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 ce2219425d9b97952f5904024fb7575a0809487b)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit dbb2717123362bf620184f3ac548d90918d6c1ce)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25151: Fixing semantic headings in opac-basket.tt
Hayley Mapley [Wed, 10 Jun 2020 23:48:54 +0000 (11:48 +1200)]
Bug 25151: Fixing semantic headings in opac-basket.tt

Test plan:
1) Apply the patch
2) Add items to your cart/folder/basket
3) Open up the basket and check that the main heading is now an h1
4) Check that the page looks fine

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 f002bd17105bab2d16aee8db8ed4f6d688192fc3)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 9c3412747c9a118345690a69feb4c15a7c757195)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25239: Fix semantic heading for opac-reserve.tt
Martin Renvoize [Thu, 11 Jun 2020 12:05:31 +0000 (13:05 +0100)]
Bug 25239: Fix semantic heading for opac-reserve.tt

Prior to this patch, the opac-reserve contained semantically incorrect headings.

Test plan
1/ Perform a search which yields some results in the OPAC
2/ Attempt to place a hold on an item.
3/ On the resulting screen, note that the headings are:
   H1 (Koha page title) > H3 (Confirm holds for) > H5 (Hold levels)
4/ Apply this patch and reload the page
5/ Re-inspect the elements in question note the heading semantics are now:
   H1 (Title of page) > H2 (Confirm holds for) > H3 (Hold levels)
6/ Note the appearance of the box is still reasonable
7/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 1a96ede5f114bd90fe1735702ca4bab77dfed9d4)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 94688f92512cb69812f558b74e283f0ae585dfea)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25154: Add heading where content is introduced in opac-results.tt
Martin Renvoize [Thu, 11 Jun 2020 12:23:32 +0000 (13:23 +0100)]
Bug 25154: Add heading where content is introduced in opac-results.tt

Prior to this patch, the search results page did not contain a
semantically accurate heading to introduce he main content of the page.

Test plan
1/ Perform a search in the OPAC that yields results
2/ Inspect the page and note that the 'title' stating how many results
   are found is not semantically marked up as a heading to introduce the
   content.
3/ Apply the patch
4/ Reload the page
5/ Inspect the page and note that the 'title' stating how many results
   are found is now properly marked up as a second level heading and
   appropriately designated as the start of the 'maincontent' block with an
   associated '.maincontent' class.
6/ Perform a search which yields zero results
7/ Note that the 'No results found' title is properly marked up as a
   second level heading.
8/ Signoff

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 972aeaa0143dcdedc7ae23314a72991d5e4a6490)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit feff61b027eea1b1eccb0814dc69ec107ada48ad)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25236: Compile CSS
Victor Grousset/tuxayo [Fri, 24 Jul 2020 09:52:51 +0000 (11:52 +0200)]
Bug 25236: Compile CSS

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25236: Fix semantic heading for opac-full-serial-issues.tt
Martin Renvoize [Thu, 11 Jun 2020 10:54:22 +0000 (11:54 +0100)]
Bug 25236: Fix semantic heading for opac-full-serial-issues.tt

Prior to this patch, the opac-full-serial-issues side navigation box contained
semantically incorrect headings.

Test plan
1/ Search for a serial with many linked issues
2/ Navigate to the detailed view of that serial
3/ Click on the 'More details' link after all the listed issues
4/ Inspect the 'Refine your search' elements on the left side of the screen.
   Note that the headings are H1 (Koha page title) > H4 (Refine your search)
3/ Apply this patch
4/ Reload the page
5/ Re-inspect the 'Refine your search' elements and note the heading
   semantics are now H1 (Title of page) > H2 (Refine your search)
6/ Note the appearance of the box is improved and consistent with elsewhere
7/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 0550e0b7f788b65b50ed4689d677600be3f9c7c2)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 9b39c1ec253eb8bf00e31cbed6467f42844e2e31)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25236: Fix semantic heading for opac-topissues.inc
Martin Renvoize [Thu, 11 Jun 2020 10:44:53 +0000 (11:44 +0100)]
Bug 25236: Fix semantic heading for opac-topissues.inc

Prior to this patch, the opac-topissues side navigation box contained
semantically incorrect headings.

Test plan
0/ Enable 'OpacTopIssues'
1/ Navigate to the top issues page via the 'Most popular' link
2/ Inspect the 'Refine your search' elements on the left side of the screen.
   Note that the headings are H1 (Koha page title) > H4 (Refine your search)
3/ Apply this patch
4/ Reload the page
5/ Re-inspect the 'Refine your search' elements and note the heading
   semantics are now H1 (Title of page) > H2 (Refine your search)
6/ Note the appearance of the box is still reasonable
7/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 62795521eedc02e11bef520c8b980d480b7e02ae)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 35e1f053f9fa0d62b004526e7d55a3481b8be7ea)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25236: Fix semantic heading for opac-facets.inc
Martin Renvoize [Thu, 11 Jun 2020 10:37:26 +0000 (11:37 +0100)]
Bug 25236: Fix semantic heading for opac-facets.inc

Prior to this patch, the opac-facets side navigation box contained
semantically incorrect headings.

Test plan
1/ Perform a search which yields some results in the OPAC
2/ Inspect the 'Refine your search' elements on the left side of the
screen. Note that the headings are H1 (Koha page title) > H4 (Refine
your search) > H5 (Headings within 'Refine your search' box)
3/ Apply this patch and follow
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client
4/ Reload the page (Flushing the cache to ensure the CSS change load)
5/ Re-inspect the 'Refine your search' elements and note the heading
semantics are now H1 (Title of page) > H2 (Refine your search) > H3
(Headings within 'Refine your search')
6/ Note the appearance of the box is still reasonable
7/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 f88d56f689e514b47930d617049358fdf9b68608)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 3bb05edced373175227d4c2fb704db75519ae78c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25238: Fix semantic heading for opac-details
Martin Renvoize [Thu, 11 Jun 2020 11:15:21 +0000 (12:15 +0100)]
Bug 25238: Fix semantic heading for opac-details

Prior to this patch the opac-details view contained multiple h1 level
headings.

Test plan
1/ Perform a search in the OPAC that will yield results
2/ Navigate to any results detailed view
3/ Inspect the page and note that two H1 level headings are present
(Page title + Item title)
4/ Apply the patch
5/ Reload the page
6/ Inspect the page and ntoe that the 'Item title' is now a level 2
heading
7/ Note the page still appears nicely
8/ Signoff

Bonus points: Check with XSLT views enabled and disabled, MARC21,
UNIMARC and NORMARC variations.

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 3e18402c240814d7f00a62c3f2359bd9b9d0a098)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 7519f4d065d258653a08cf46a8b142e702ca5af0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25756: remove erroneous hyphen
Andreas Roussos [Mon, 15 Jun 2020 14:58:38 +0000 (16:58 +0200)]
Bug 25756: remove erroneous hyphen

In the Staff Client, the OPAC "Appearance" preferences table has an
extra, empty HTML table row at the end.

Test plan:
0) Observe the empty HTML table row at the end of the table that lists
   OPAC "Appearance" system preferences.
1) Apply this patch.
2) Observe that the empty table row is now gone.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 251197ad73ba2be88ac2154db46748b58a0597f8)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 0425f6702f3b5d1e368e1fd557fd1d1c14993e93)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25611: Use selected vendor when creating a basket
Jonathan Druart [Fri, 5 Jun 2020 09:15:33 +0000 (11:15 +0200)]
Bug 25611: Use selected vendor when creating a basket

We did not take into account the vendor selected.

Test plan:
1. Choose Vendor
2. Create Basket
3. Assign a new vendor
Without the patch this new vendor is not changed
With the patch applied the vendor is changed

4. Edit the basket, change the vendor

Reported-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cd716269a7b2b1b6165154ea7e85844201402a8d)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit c260c6c6ffd74151c08f85b5bf53da9095e0a324)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 11994: (follow-up) Make things work when LibraryName is empty
Katrin Fischer [Fri, 1 May 2020 20:11:29 +0000 (20:11 +0000)]
Bug 11994: (follow-up) Make things work when LibraryName is empty

When LibraryName system preference was not set, the installation
of the plugin would fail with:

Firefox could not download the search plugin from: ...

Now if the pref is empty, the description 'Library catalog'
will be used instead.

To test:
- Empty your LibraryName pref
- Verify the search plugin can still be installed
  (see first patch for further instructions)

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 1e0dd6d0783a66514fc92cc0a34ca0882a5ce62f)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit da97436614ce8b1ddb9aa2e7f1861d1e82deea84)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 11994: OpenSearch plugins needs to be delivered with Content-Type application...
Katrin Fischer [Fri, 1 May 2020 17:20:43 +0000 (17:20 +0000)]
Bug 11994: OpenSearch plugins needs to be delivered with Content-Type application/opensearchdescription+xml

https://developer.mozilla.org/en-US/docs/Web/OpenSearch
Your server should serve OpenSearch plugins using
Content-Type: application/opensearchdescription+xml.

To test:
- Verify the Content-Type the file is delivered with
  is correct, for example using wget
  http://127.0.0.1:8080/cgi-bin/koha/opac-search.pl?format=opensearchdescription

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 f090c1d2cb9253d77c5bac3b8fa03c775af2f0f6)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit c1ef8a49de0dab37cfb94de9c3e13410989a2de7)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 11994: Fix OpenSearch discovery in the OPAC
Owen Leonard [Tue, 28 Apr 2020 14:41:47 +0000 (14:41 +0000)]
Bug 11994: Fix OpenSearch discovery in the OPAC

This patch corrects the markup for the OpenSearchDescription XML
document and adds (back) the link in the OPAC header which points to it.
This will enable compatible browsers to offer the addition of the OPAC's
keyword search as a search engine option.

I've found documentation suggesting this feature is available (or at
least was at one time) in Chrome and Safari, but in my test it only
works in Firefox.

To test, apply the patch and make sure the OPACBaseURL preference is
set correctly.

 - Open the OPAC in Firefox (these instructions assume the latest
   version, currently v.75).
 - On the right side of the address bar you should see ". . ." Click it
   to trigger the menu.
 - You should see an "Add search engine" entry with your OPAC's icon.
 - Click to add the search engine.

 - Type a keyword to search in the address bar
 - A box should pop up below the address bar showing icons at the bottom
   for performing a search in various search engines. One of these icons
   should be the icon for your Koha OPAC.
 - Click the Koha OPAC icon and confirm that it triggers a keyword
   search in your OPAC.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 0ef7b3db4cab73797ba3386b4951c0d86addf871)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 8019711adf319483f4baa4b4bc3b78972d9715ec)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24352: Correct location and collection labels in OPAC search results
Owen Leonard [Tue, 16 Jun 2020 19:48:48 +0000 (19:48 +0000)]
Bug 24352: Correct location and collection labels in OPAC search results

This patch modifies the OPAC's MARC21 search results XSLT so that
OPAC search result information is correctly labeled
based on the OpacItemLocation preference.

Previously, search results showed the label "Location(s)" whether the
setting was "collection code" or "location."

To test, apply the patch and set the OPACXSLTResultsDisplay system
preference to 'default.'

On the OPAC search results page, each result with items should show
information in this format:

   With the OpacItemLocation preference set to 'call number only,'
    - "Availability: Items available for loan: {library} [Call number:
      {call number} ]

   With the OpacItemLocation preference set to 'collection code,'
     - "Availability: Items available for loan: {library}
        Collection(s): {collection description} [{ call number }]"

   With the OpacItemLocation preference set to 'location,'
     - "Availability: Items available for loan: {library}
        Location(s): {shelving location} [{ call number }]"

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 897948cff5812a67144355829cf8915af17465d0)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit fa610981b7ef4f3c59527c7d40d84c84167f62a2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25509: Remove useless libjs-jquery dependency
David Cook [Fri, 15 May 2020 04:55:49 +0000 (14:55 +1000)]
Bug 25509: Remove useless libjs-jquery dependency

We don't use the libjs-jquery package, so we should remove
the dependency.

To Test:
1) Build package (out of scope of test plan)
2) Install package
3) Note that libjs-jquery is marked by apt as no longer required
4) Remove libjs-jquery package from system and note how it
doesn't take koha-common with it

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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 9e923e57ed18a104c33cc10a4704450ec4c71c28)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 46b96996c1643e62f77c62aa12d0f62310498a2e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25509: Remove useless libjs-jquery dependency
David Cook [Fri, 15 May 2020 04:55:49 +0000 (14:55 +1000)]
Bug 25509: Remove useless libjs-jquery dependency

We don't use the libjs-jquery package, so we should remove
the dependency.

To Test:
1) Build package (out of scope of test plan)
2) Install package
3) Note that libjs-jquery is marked by apt as no longer required
4) Remove libjs-jquery package from system and note how it
doesn't take koha-common with it

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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 9e923e57ed18a104c33cc10a4704450ec4c71c28)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 46b96996c1643e62f77c62aa12d0f62310498a2e)

4 years agoBug 25570: Paginate results by default in objects->search
Tomas Cohen Arazi [Thu, 21 May 2020 21:23:01 +0000 (18:23 -0300)]
Bug 25570: Paginate results by default in objects->search

This patch makes the helper paginate the resultsif no pagination
parameters are passed.

Page number defaults to 1, and the page size to the RESTdefaultPageSize
syspref value.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Pagination is not enforced by default
3. Apply this patch
4. Repeat 2
=> SUCCESS: Results are paginated
5. Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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 451ae76431d3d580494f917ed397f259cd96a876)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 55fba122759a85ea5b45a36908d67c310af1ea0c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25570: (follow-up) Fix tests
Tomas Cohen Arazi [Thu, 21 May 2020 21:25:46 +0000 (18:25 -0300)]
Bug 25570: (follow-up) Fix tests

This patch fixes the libraries tests, that expected the old behaviour

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/libraries.t
=> FAIL: Tests fail
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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 b115dfeca649f2f35e0290ead85f2626eabd0829)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit afcd1902c03f72ef61846d3a034c7b5086b3c812)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25570: Regression tests
Tomas Cohen Arazi [Thu, 21 May 2020 20:48:21 +0000 (17:48 -0300)]
Bug 25570: Regression tests

This tests verify that the default behaviour is to paginate the results.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: $c->objects->search doesn't paginate results by default

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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 2220ce4d50998bef1dcea787d212a287a802b0aa)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 429d56d3894cffb4febe45616a3073e95191af67)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25553: Make date columns sortable on the edit items table
Jonathan Druart [Fri, 22 May 2020 09:02:39 +0000 (11:02 +0200)]
Bug 25553: Make date columns sortable on the edit items table

When editing items, the table at the top contain several columns that
have date values, but they cannot be sorted by dates correctly.

Test plan:
Have several items with different dates in columns that contain dates,
like items.dateaccessioned, items.datelastseen)
Sort the column and confirm that with this patch the lines are sorted
correctly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 31800ba46b2ed03cc2e4431c4d3c56fce678a0ec)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 99a27050d84281643f40bbdb5d0adb4edbf32e15)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25447: Terminology: Fix button text "Edit biblio"
Owen Leonard [Mon, 11 May 2020 19:17:57 +0000 (19:17 +0000)]
Bug 25447: Terminology: Fix button text "Edit biblio"

This patch changes the cataloging main page so that in the menu for
reach search result the "Edit biblio" link is now "Edit record."

To test, apply the patch and do a search in cataloging. In the list of
search results verify that the "Actions" menu contains a link labeled
"Edit record."

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 679dcd1574de88cb8b7002c5020e0b4488233943)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f918bee5f612b3eef54bd81999373ed023e737b4)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit f208817b13636e0b4746b1bfe5d5e5a13de39b88)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoUpdate release notes for 19.05.13 release v19.05.13
Victor Grousset/tuxayo [Thu, 23 Jul 2020 02:41:14 +0000 (04:41 +0200)]
Update release notes for 19.05.13 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoIncrement version for 19.05.13 release
Victor Grousset/tuxayo [Mon, 22 Jun 2020 13:10:35 +0000 (15:10 +0200)]
Increment version for 19.05.13 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoFix translations for Koha 19.05.13
Victor Grousset/tuxayo [Thu, 23 Jul 2020 01:06:08 +0000 (03:06 +0200)]
Fix translations for Koha 19.05.13

Marked as fuzzy the errors found by junitmsgfmt

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoTranslation updates for Koha 19.05.13
Koha translators [Wed, 22 Jul 2020 23:36:18 +0000 (20:36 -0300)]
Translation updates for Koha 19.05.13

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 22672: Change <i> to <em> and <b> to <strong> in templates, includes, xslt
Lucas Gass [Wed, 27 May 2020 21:35:16 +0000 (21:35 +0000)]
Bug 22672: Change <i> to <em> and <b> to <strong> in templates, includes, xslt

This patch attempts to replace <i> with <em> AND <b> with <strong> in
order to more accessible to screen readers. This patch makes no attempt
to change Font Awesome icons which typically use <i>. I found templates,
includes and XSLT by using 'git grep ‘<b>’
koha-tmpl/opac-tmpl/bootstrap/en/' and git grep ‘<i>’
koha-tmpl/opac-tmpl/bootstrap/en/

TEST PLAN:
There should be no visible difference on the changed pages. The files
changed are:
koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/enroll.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl
koha-tmpl/opac-tmpl/xslt/OAI.xslt

Read the changes and make sure everything looks correct, try to visit as
many pages as possible and confirm that everything looks as it should.
grep around for cases of <b> or <i> that I could have missed.

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d3036d46ba4b26df040a25f960c3bc3081734c26)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit eb9650bb1aa01abb8cf6721f35b077f8421313aa)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25858: Use bitwise OR for setting a bit in borrowers.flag
Aleisha Amohia [Thu, 16 Jul 2020 04:24:38 +0000 (16:24 +1200)]
Bug 25858: Use bitwise OR for setting a bit in borrowers.flag

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 4f6b3c4a6173810bba24b89d82eb223226278b9c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25858: Don't attempt to set flag if already set
Aleisha Amohia [Thu, 16 Jul 2020 04:23:07 +0000 (16:23 +1200)]
Bug 25858: Don't attempt to set flag if already set

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 6d6132777bc1dfd35e990ac469799ece679e4899)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24986: DBIC Schema files + fix of bug 23081 backport
Victor Grousset/tuxayo [Wed, 22 Jul 2020 19:23:00 +0000 (21:23 +0200)]
Bug 24986: DBIC Schema files + fix of bug 23081 backport

Bug 23081 backported the DBIC changes instead of regenerating the files.
Thus the checksum weren't matching because 19.05 also had other changes
to the schema so the same changes result in a different checksum.
The small changes were manually undone and the DBIC were regenerated.
So this commit contains the changes for both patchsets.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24986: DBRev 19.05.12.001
Aleisha Amohia [Thu, 16 Jul 2020 04:14:40 +0000 (16:14 +1200)]
Bug 24986: DBRev 19.05.12.001

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 7efb135dfb3d16c8046877de1a47cd1a835bf5d9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24986: Modify some borrowers DB fields to (TINY|MEDIUM)TEXT
Jonathan Druart [Thu, 4 Jun 2020 10:12:23 +0000 (12:12 +0200)]
Bug 24986: Modify some borrowers DB fields to (TINY|MEDIUM)TEXT

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16a5197aa9f96ee8a7fb6c63e15a6c7f9342f773)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 36ded4c66cca20c2464e79fc31cd6c6867bbfc3a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25769: Patron self modification triggers change request for date of birth to...
Kyle M Hall [Tue, 16 Jun 2020 12:00:45 +0000 (08:00 -0400)]
Bug 25769: Patron self modification triggers change request for date of birth to null

If PatronSelfModificationBorrowerUnwantedField contains dateofbirth, all
patron self modification requests will attempt to set dateofbirth to
null instead of ignoring the field.

Test Plan:
1) Add dateofbirth to PatronSelfModificationBorrowerUnwantedField
2) Run a patron self modification
3) Note the request sets dateofbirth to null on the staff side
4) Apply this patch
5) Restart all the things!
6) Run another self-modification
7) Note of the staff side that dateofbirth is unaffected

Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.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 73c421a5164a3af4b2b8e1001b49f29213a94e3a)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit c21ae5e5177ec9180f07fd5639b7e9912aadfdc1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24353: [19.05] Correct display of privacy_guarantor_checkouts on moremember.pl
Katrin Fischer [Sat, 23 May 2020 04:41:59 +0000 (04:41 +0000)]
Bug 24353: [19.05] Correct display of privacy_guarantor_checkouts on moremember.pl

The variable for 'Show checkouts to guarantor' was incorrect so
it would always show as 'No' on the Details tab in the patron
account in staff.

To test:
- find/create a patron with a guarantor
- Set AllowStaffToSetCheckoutsVisibilityForGuarantor and AllowPatronToSetCheckoutsVisibilityForGuarantor to Allow
- Edit patron to set Show Checkouts to Guarantor to Yes
- Confirm patron incorrectly shows "No" on moremember.pl (Details tab)
- Apply patch
- Confirm the display changes to "Yes"
- Change the value to "No" in the patron record
- Verify that the display changed accordingly

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
RMaint: pushed to 19.05.x
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 22470: Missing the table name on misc/migration_tools/switch_marc21_series_info.pl
David Roberts [Sat, 9 May 2020 16:07:03 +0000 (16:07 +0000)]
Bug 22470: Missing the table name on misc/migration_tools/switch_marc21_series_info.pl

This patch adds the table name to the SQL update statements.

To test:

1) Apply the patch
2) Run the script. Check that there are no errors, and that the script
behaves as expected.

Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>
Created a test record with values in field 440. Applied the patch, ran the
script with the -c -f flags and observed that the values were moved to field
490. Also, the relevant Koha to MARC mappings were changed accordingly.

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 051b0b8d2fb3dc3593147e5ac80bc394dcf48e58)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit bcf40fe9721eec418bf415334aeec50a67d64914)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25394: Cronjob path in the AuthorityMergeLimit syspref description is wrong
Caroline Cyr La Rose [Wed, 6 May 2020 20:22:57 +0000 (16:22 -0400)]
Bug 25394: Cronjob path in the AuthorityMergeLimit syspref description is wrong

Test plan:
1- Apply patch
2- Go to Administration > Global system preferences > Authorities
3- The path to merge_authorities.pl in the AuthorityMergeLimit
description should now read misc/cronjobs/merge_authorities.pl

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 772205bab5c7d6720ca6d25244c04cdf7649a96f)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit b10e9ce6ab675067d8b78600ebe86d2a4735deb4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25537: Page reload at branchtransfers.pl loses destination branch
Kyle M Hall [Thu, 21 May 2020 17:52:32 +0000 (13:52 -0400)]
Bug 25537: Page reload at branchtransfers.pl loses destination branch

At branchtransfers.pl, one selects a destination branch and scans in any
number of items to generate transfers to that branch. However, anything
that makes the page reload causes your branch selection to be lost,
reverting you back to whichever branch comes first alphabetically.

This is an invitation to error when one has a stack of books to
send all to the same branch. Could that error handling get moved
into a modal or something that won't reload the page?

Test Plan:
1) Place a hold on an item and set it to waiting
2) Initiate a branch transfer from branchtransfers.pl for any branch but
   the first in the pulldown branch selector
3) Choose to cancel the hold and transfer
4) Note the pulldown reverts to the first option
5) Apply this patch
6) Repeat steps 1-3
7) Note the pulldown retains your preveiously selected branch!

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 8ab8df3866352568509ed34f02a5566e750dee21)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 9402b7c24cac53003f5ddb22b021d10016e4f2c1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25576: Add link to the manual for the ILL module
Jonathan Druart [Fri, 22 May 2020 08:23:55 +0000 (10:23 +0200)]
Bug 25576: Add link to the manual for the ILL module

Test plan:
Enable ILLModule system preference.
Go to ILL requests
Click Help

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 50b6e447735ee31a2fbba5b116959cdb6d451c19)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 0bc4e414593b4d57576d2f9615ed3146b4acb6b3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25587: fix for "clear" button to reset all selects
Petro Vashchuk [Fri, 22 May 2020 15:11:28 +0000 (18:11 +0300)]
Bug 25587: fix for "clear" button to reset all selects

Button "clear" on cgi-bin/koha/admin/smart-rules.pl did not reset fields
with a dropdown selector except the first one.

This happens because jQuery selector .find("select option:first")
in koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
selects only single first element in the whole group, as from jquery
doc:
> The :first pseudo-class is equivalent to :eq( 0 ). It could also be
> written as :lt( 1 ). While this matches only a single element,
> :first-child can match more than one: One for each parent.
> (https://api.jquery.com/first-selector/)

And it works if replaced by: .find("select option:first-child")

To reproduce:
    1) Go to /cgi-bin/koha/admin/smart-rules.pl
    2) Start editing one of existing rules or filling a new one, change
       all selects to have non-first option selected. Fill text input
       fields with sample data.
    3) Reset all fields with the "clear" button.
    4) Observe that only the first dropdown field was reset to the first
       option while all others still contain previously given values,
       meanwhile all text input fields are cleared as expected.
    5) Apply the patch.
    6) Repeat steps 1, 2 and 3.
    7) Check that all dropdown fields were reset to first option, as
       expected.

Mentored-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 58c389bf279ca6ffdea199ada8d65ce92baaf952)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 26ebfc32721474b89a8e970b5cd6277c94c7c276)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25615: Remove empty entries in the filter dropdowns of "holds to pull"
Jonathan Druart [Thu, 28 May 2020 10:11:37 +0000 (12:11 +0200)]
Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"

On the "Holds to pull" view there are filters that are built on the
value of the cells.
Bug 22536 improved the ergonomic by adding a ul list, but the filters
are now broken, the ul and li tags are retrieved and put in the filter
list.

The idea of this patch is to remove the HTML tags and skip if the value
is then empty.

Test plan:
Place a hold on an item
Go to Home › Circulation › Holds to pull
Open the "libraries" filter
=> Without this patch you see empty entries
=> With this patch the filter contain only the libraries

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 4f70682c56dddd42f24c62d7634f5cd3b7119702)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit d680ae35f39c0eb413b45339aadfa9148a58ed55)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25623: Make sure oauth.t rolls back the db
Tomas Cohen Arazi [Fri, 29 May 2020 17:41:25 +0000 (14:41 -0300)]
Bug 25623: Make sure oauth.t rolls back the db

This patch adds a missing transaction wrapping one of the subtests. This
is probably an oversight when refactoring this file.

To test:
1. Open the patron categories page
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests pass
3. Reload the patron categories page
=> FAIL: There's random data in there
4. Apply this patch and repeat 2
5. Reload the patron categories page
=> SUCCESS: The random data from the previous tests is still there, but
no new random data
=> SUCCESS: Tests still pass
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f898cef4f4b5a9f424f968a58b96898f26f80035)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 4c536ffbcecfeeb9e6d6473e7c7c4cddfe4c5006)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25675: Reword and reorganize sysprefs related to patron self modification
Andrew Fuerste-Henry [Thu, 4 Jun 2020 16:21:27 +0000 (16:21 +0000)]
Bug 25675: Reword and reorganize sysprefs related to patron self modification

To Test:
1: apply patch
2: restart all
3: go to System Preferences > OPAC
4: confirm "Self registration" section is now labeled "Self registration and modification"
5: confirm OPACPatronDetails is now in the "Self registration and modification" section
6: confirm PatronSelfRegistration now reads "(Allow / Don't allow)  library patrons to register for an account via the OPAC."
7: set OPACPatronDetails to Don't allow
8: set PatronSelfRegistration to Allow
9: log into the opac and verify you're not able to edit your patron details on an existing account

Signed-off-by: DonnaB <donna@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 3e4b92d84c50bee27b2f331e5fbbc04813e469bb)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 083ce15dee7b7108a3103c2d4c90fca8df28230b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25696: Correct "Test prediction pattern" HTML button
David Cook [Tue, 9 Jun 2020 05:38:27 +0000 (15:38 +1000)]
Bug 25696: Correct "Test prediction pattern" HTML button

This patch corrects the closing tag for the "Test prediction pattern"
button from "</a>" to "</button>"

Test plan:
1. Apply the patch
2. Create a serial subscription from a new or existing bib record
3. Choose any frequency, numbering pattern, and subscription start
date you choose (ie fill out all mandatory subscription fields)
4. Click "Test prediction pattern"
5. Note that the prediction pattern appears on the right of the screen

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 4116ca4097732977d7b954a881f191174c28d651)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 7c0b9d9108b5e63d0c1ee6a6438f453fec136656)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23276: Do not display tag if pref TagsEnabled is off
Jonathan Druart [Wed, 20 Nov 2019 14:40:10 +0000 (15:40 +0100)]
Bug 23276: Do not display tag if pref TagsEnabled is off

If the pref TagsEnabled is off we should not display the tags at the
OPAC.
There is a message to tell that tags system is disabled, but the tags
are displayed.

We should redirect to 404 like we do in opac-topissues.pl and
opac-suggestions.pl.

Test plan:
- Turn TagsEnabled on
- Add some tags
- Turn TagsEnabled off
- Hit /cgi-bin/koha/opac-tags.pl
=> Without this patch you see a warning messaging saying that the tag
system is disabled, but the tags are displayed
=> With this patch you get a 404 redirect

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 6fc316d2eef5945b20a14bec81e2daa57696dd81)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit d0336378897e33bdd31975c2c126a4ce36ac79a9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24862: Handle annonymous sessions gracefuly
Tomas Cohen Arazi [Fri, 13 Mar 2020 15:03:03 +0000 (12:03 -0300)]
Bug 24862: Handle annonymous sessions gracefuly

This patch introduces code to detect (cookie) annonymous sessions and
act as expected.

Right now, as check_cookie_auth is not passed the required permissions
(because there aren't always required permissions, and the code to check
permissions is shared with other authentication mechanisms) it returns
'ok' and the session id. This use case was overlooked when this was
coded, and yeilds unexpected error codes (500) when the user logs out
and the annonymous session cookie is used to hit the API. The end result
doesn't pose any security issue (i.e. the resource access is rejected)
but the returned error code is not correct and should be fixed.

This patch verifies for an anonymous session (and avoids querying the
corresponding patron) and then verifies if there is an authorization
config on the route and if the patron object is defined.

To test:
1. Apply the tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail, 500 instead of the expected 401
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Repeat the original 'steps to reproduce' from the bug report using
   the browser
=> SUCCESS: Problem solved!
6. Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit de07356028d5b98af3a7cd7cbae02a7ad6402a43)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 99a3d1193ebfcb1ae5046bf36d60b1e53f8c2e93)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24862: Regression tests
Tomas Cohen Arazi [Fri, 13 Mar 2020 14:44:03 +0000 (11:44 -0300)]
Bug 24862: Regression tests

This patch introduces tests for the expected behaviour on API routes
that expect a logged in user, but the request is made with an anonymous
session cookie.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail because the situation is not handled correctly in
the code

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0547ad34dfe01ca7d7660df59e29bc30fdf3cf1d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 8d2255bddcdfad75d8b40daf47bb24c0fd13a9ed)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoUpdate release notes for 19.05.12 release v19.05.12
Victor Grousset/tuxayo [Tue, 23 Jun 2020 15:58:17 +0000 (17:58 +0200)]
Update release notes for 19.05.12 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>