]> git.koha-community.org Git - koha.git/log
koha.git
3 years agoBug 27422: YouTube videos are HTTPS only
Tomas Cohen Arazi [Wed, 3 Feb 2021 22:50:29 +0000 (19:50 -0300)]
Bug 27422: YouTube videos are HTTPS only

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

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

Sponsored-by: Banco Central de la República Argentina
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ca5efc9aa45c3c7893a09cf0067718fdaab63507)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27582: Fix breadcrumb for POS > Library details page
Martin Renvoize [Mon, 1 Feb 2021 12:13:03 +0000 (12:13 +0000)]
Bug 27582: Fix breadcrumb for POS > Library details page

This patch adds a link back to the top level 'Point of sale' page in the
breadcrumb for the 'Library details' summary page.

Test plan
1/ Enable 'UseCashRegisters' and 'EnablePointOfSale'
2/ Navigate to 'Point of sale' > 'Library details'
3/ Note the breadcrumb now includes the unlinked' Library details' page
title and a linked 'Point of sale' in the list.
4/ 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 05bfbe629f9e34b75fac641a461cf93574c1964d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27606: Add link back to vendor in breadcrumbs for parcel.tt
Lucas Gass [Thu, 4 Feb 2021 20:56:11 +0000 (20:56 +0000)]
Bug 27606: Add link back to vendor in breadcrumbs for parcel.tt

To Test:
1. recieve an order:
When receiving, we get these breadcrumbs:
Home › Acquisitions › Receive orders from My Vendor

2. apply patch
Now we get these breadcrumbs:
Home › Acquisitions › My Vendor› Receive orders from My Vendor

3. Make sure the link sends you back to the correct vendor

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 670f00cbaf74653f84353285cea3dda5c3ed82ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 26943: Add notforloan statuses to catalog search
Lucas Gass [Tue, 10 Nov 2020 21:21:17 +0000 (21:21 +0000)]
Bug 26943: Add notforloan statuses to catalog search

- create a positive value and a description of "Positive"
- set an item to your "Positive" value
- pull up the related bib in a cataloging search
- confirm it shows "Not for loan" in the Location column
- create a negative value and a description of "Negative"
- set an item to your "Negative" value
- pull up the related bib in a cataloging search
- confirm it shows "On order" in the Location column
- Apply patch
- re-do the cataloing search, instead of 'Not for loan' or 'On order' you should instead see the actual nfl description

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Telishia Mickens <tmickens@gc.edu>
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 6932e05569aa6be0ed165a28ddc2a4213a3a263e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 12260: Compiled CSS
Fridolin Somers [Fri, 12 Feb 2021 13:50:39 +0000 (14:50 +0100)]
Bug 12260: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 12260: Hide unnecessary links when printing
ava li [Tue, 19 Jan 2021 02:21:01 +0000 (02:21 +0000)]
Bug 12260: Hide unnecessary links when printing

TEST PLAN:
try printing every page in the opac and confirm these sections don't
show

  #cartmenulink { display: none; }
  #listsmenu { display: none; }
  #koha_url { display:none; }
  .breadcrumb { display:none; }
  a[href]:after { display:none; }
  #social_networks { display:none; }
  a.tag_add { display:none; }
  .results_summary.online_resources { display:none; }
  a#Normalview,
  a#MARCview,
  a#ISBDview { display:none; }
  .ui-tabs-panel { border:none !important; }
  #addcomment { display:none; }
  #ulactioncontainer { display:none; }
  #usermenu { display:none; }
  #didyoumean { display:none; }
  #top-pages, #bottom-pages { display:none; }
  #selections-toolbar { display: none; }
  .actions-menu { display: none; }
  #numresults a { display:none; }
  #numresults { float:left; }

Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se>
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 8205f0d859bf190b10a52c29a59f253c6bf761c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27454: Pass the arrayref
Jonathan Druart [Wed, 3 Feb 2021 12:54:27 +0000 (13:54 +0100)]
Bug 27454: Pass the arrayref

Otherwise you mess with the following hash elements :)

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 e9195d166e8175044f6f76ff24ecc9399cf0abbe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27454: Add sorting of patron attributes
Martin Renvoize [Mon, 18 Jan 2021 10:21:28 +0000 (10:21 +0000)]
Bug 27454: Add sorting of patron attributes

This patch adds sorting on class code for the patrons attributes forms
on the memberentry page.

Test plan
1) Create a couple of different patron attributes
2) Go to the patron add page
3) Note the order in which the patron attributes load at the bottom of
   the page.
4) Reload the page and note the order of those attribues may change (if
   it doesn't, try reloading again.. it's random)
5) Apply the patch
6) Reload the page a few times and confirm the attributes are now
   ordered.
7) Signoff

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 0821a5890d98d17b58ffecaebbb02d673a864714)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27398: Made values in number patterns subscription length translatable
ava li [Wed, 20 Jan 2021 22:37:36 +0000 (22:37 +0000)]
Bug 27398: Made values in number patterns subscription length translatable

TEST PLAN:
Check that the subscription length options when editing or adding a
numbering pattern in the serials module are translatable. check that
the hard coded values are gone.

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 a9df4daab1f780f14fed1fba9f4afad8c4c73d30)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25632: Update MARC21 frameworks to update Nr. 30 (May 2020)
Bernardo Gonzalez Kriegel [Sun, 31 May 2020 23:43:38 +0000 (20:43 -0300)]
Bug 25632: Update MARC21 frameworks to update Nr. 30 (May 2020)

New
subfields 0 1 2 in 310 and 321

Changes
310 change to repeatable
883 renamed
883 a d q renamed

To test:
1) Remove bibliographic frameworks
2) Check mandatory bibliographic fw load without problem
misc/load_yaml.pl --load --file=installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml
3) Check new/renamed fields/subfields

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f259298fd4f7b20ccd458af923e6d57a87df32dd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27608: Corrects 'accepted by' inconsistency in suggestion.tt
Blou [Wed, 3 Feb 2021 16:46:33 +0000 (11:46 -0500)]
Bug 27608: Corrects 'accepted by' inconsistency in suggestion.tt

When looking at an accepted suggestion in suggestion.pl, under 'Suggestion management', the displayed cardnumber in parenthesis is the wrong one.  It displays the "suggestedby"'s cardnumber instead of the acceptedby.

Test:
- create a suggestion in OPAC or staff client with user A.
- In staff client, go to accept it with User B.
- Click Edit
- Under section "Suggestion management", you have a "Accepted on".
- In the By column, the cardnumber in parenthsis is not the B one.
- Apply patch, refresh.

Looking at the code patch is self-explanatory.

Sponsored-by: Collecto
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD Amended patch: Add sponsor line

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bb692e83ea97a32eb16eb1b1336a67f41c66d0de)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27628: Compiled CSS
Fridolin Somers [Fri, 12 Feb 2021 13:23:18 +0000 (14:23 +0100)]
Bug 27628: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27628: Fix minor HTML markup errors in OPAC search results templates
Owen Leonard [Thu, 4 Feb 2021 17:40:24 +0000 (17:40 +0000)]
Bug 27628: Fix minor HTML markup errors in OPAC search results templates

This patch makes a couple of minor corrections to templates related to
OPAC search results: An errant quote, and invalidly repeating ids.

The #login4tags id is changed to a class, and CSS related to this id
(which was not used) is removed. For consistency, the id is changed to a
class on the detail page as well.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Perform a search in the OPAC. Confirm that the "Log in to add tags"
   link still looks correct at various browser widths.
 - Confirm that it works to trigger the login modal.
 - Validate the source of the page. There should be no errors.

 - View the detail page for a bibliographic record.
 - The "Log in to add tags" link should look correct and work correctly.

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 15c3be55afbcff1d5f149f53273bfb25009582a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27290: Clean up validation
Martin Renvoize [Mon, 21 Dec 2020 16:25:47 +0000 (16:25 +0000)]
Bug 27290: Clean up validation

It seems we had the validator instantiated twice and we used a mix of
validation of required at form element level and in JS instantiator.

This patch moves the rules to consistently apply at the instantiation
and removes the duplicate lines.

To test:
1 - Enable 'useCashRegisters' and 'EnablePointofSale'
2 - Add a cash register
3 - Add a debit type that can be sold
4 - Go to point of sale and sell the item multiple times
5 - Enter 'Amount tendered' less than amount being paid
6 - Click confirm
7 - Transaction is processed as if full funds received
8 - Try with a negative number - goes through again

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 01fc41ca593ee030a77c2462acda0dc59dfe7ec0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27289: (follow-up) Update payment type too.
Martin Renvoize [Fri, 5 Feb 2021 11:06:25 +0000 (11:06 +0000)]
Bug 27289: (follow-up) Update payment type too.

The payment type field is also required when using cash registers, this
patch updates the formatting to work as expected in that case too.

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 4904abf1c323c6d1c4d41108e3e2eb283f008676)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27289: Template tweaks for point of sale page
Owen Leonard [Mon, 21 Dec 2020 13:22:15 +0000 (13:22 +0000)]
Bug 27289: Template tweaks for point of sale page

This patch makes a couple of minor changes to the point of sale page in
order to make it consistent with other pages in the staff interface:

- Buttons inside table cells should have the "btn-xs" class.
- Required fields should have a "required" class and should have a
  "Required" label.

Also changed: Replaced <input type="number"> according to coding
guidelines.

To test, apply the patch and enable the EnablePointOfSale and
UseCashRegisters system preferences if necessary.

- On the Point of Sale page, add some items to purchase. Confirm that
  the "Add" buttons in the "Items for purchase" table and the "Remove"
  buttons in the "This sale" table are correctly sized.

- In the "Collect payment" form, confirm that "Amount tendered" and
  "Cash register" fields are styled red with "Required" text after them.
- Confirm that the "Amount tendered" field will only accept numeric
  input.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 f27e91f1ad4a0048e360e67e6bd0c6723a981577)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27633: (bug 15436 follow-up) Fix duplicate of 440$v at the OPAC
Jonathan Druart [Fri, 5 Feb 2021 14:41:34 +0000 (15:41 +0100)]
Bug 27633: (bug 15436 follow-up) Fix duplicate of 440$v at the OPAC

Only display a in link, not v that is displayed later.

It has been fixed in different other places by
  commit 81f71d45fe4fee92596ea8d8edb57c602490e9b1
  Bug 15436: Use semicolon between series name and volume

but missed one occurrence.

Test plan:
Add a 440$a and $v and confirm that the display at the OPAC is now the
same as the staff interface.

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 b3c58aafcf249efdfe91b00d4da9c66472c4a141)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27154: Fix test if the cache is populated already
Jonathan Druart [Tue, 9 Feb 2021 08:20:40 +0000 (09:20 +0100)]
Bug 27154: Fix test if the cache is populated already

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 05a3d926f00d8b8f8b0d14bb91f23290e8684c18)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27154: Remove Koha::Util::SystemPreferences
Jonathan Druart [Fri, 5 Feb 2021 11:01:38 +0000 (12:01 +0100)]
Bug 27154: Remove Koha::Util::SystemPreferences

On bug 15494, the same method "get_yaml_pref_hash" has been added to two modules,
Koha/Config/SysPref.pm and Koha/Util/SystemPreferences.pm

We only need the one from Koha::Config::SysPref and remove the whole
Koha::Util::SystemPreferences module.

Test plan:
 prove t/db_dependent/Circulation/issue.t
must return green

Signed-off-by: Kyle M Hall <kyle@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 ac11405321ae3e5fdd72701ddb41b62675e42c97)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 26602: (QA follow-up) Cleanup datatables settings
Nick Clemens [Fri, 5 Feb 2021 17:45:34 +0000 (17:45 +0000)]
Bug 26602: (QA follow-up) Cleanup datatables settings

On letter.tt we had nosort and set things via settings that are default in KohaTable so removed
those from letter.js. Also made the last updated column exportable

On upload.tt the noExport didn't do anything, because we couldn't export, so moved to used KohaTable

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6118d24904297c3b4bc44bf13e5e354b60feb33d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 26602: Don't export "actions" column
Jonathan Druart [Mon, 18 Jan 2021 10:26:22 +0000 (11:26 +0100)]
Bug 26602: Don't export "actions" column

This patch add the noExport class to all "Actions" columns in the
codebase.
It's a stupid search and replace, maybe the class is added to table
where there is no export button.

Test plan:
Search tables where the export button is available. Confirm that the
"Actions" columns is not exported.
Example: /admin/branches.pl, /admin/cities.pl

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 655f11fd60ddf2a7ae690de340ed9945070ef3e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27589: Access item fields as hash
Nick Clemens [Thu, 4 Feb 2021 12:00:10 +0000 (12:00 +0000)]
Bug 27589: Access item fields as hash

SIP item stores the item unblessed so field must be accessed as a hashref

This patch changes the code in handle_item_information to match the code in
handle_checkin

To test:
1 - In sip config set the cr_item_field='itype' for a sip account
2 - Restart SIP
3 - Attempt an item information requests using the sip_cli_emulator
     perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m item_information --item 39999000011791
4 - It fails!
5 - Apply patch and restart
6 - It succeeds!

Signed-off-by: Kyle M Hall <kyle@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 18368d6a0c6b35d91ad80a832435e57144d32b6d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27589: Unit test
Nick Clemens [Thu, 4 Feb 2021 11:59:11 +0000 (11:59 +0000)]
Bug 27589: Unit test

Previous tests only covered CHECKIN, this adds a test for ITEM_INFORMATION

Signed-off-by: Kyle M Hall <kyle@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 48e306f5d2bc4c49329e082823cbf85c67089a0d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27586: Rollback should be before return statement
Kyle M Hall [Fri, 5 Feb 2021 11:15:06 +0000 (06:15 -0500)]
Bug 27586: Rollback should be before return statement

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 48e56b320a0dc2d096b19bc0bab62d3bad92d25c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27586: Import patrons script has a confirm switch that doesn't nothing!
Kyle M Hall [Mon, 1 Feb 2021 18:22:58 +0000 (13:22 -0500)]
Bug 27586: Import patrons script has a confirm switch that doesn't nothing!

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d3005a2a4c493c624ffd6204f6fccc83ea350361)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27466: Don't use set_preference from updatedatabase.pl
Jonathan Druart [Wed, 20 Jan 2021 10:16:48 +0000 (11:16 +0100)]
Bug 27466: Don't use set_preference from updatedatabase.pl

We must never use subroutines or methods from updatedatabase.pl!

Having it using C4::Context->set_preference will call
Koha::Config::Syspref->store then C4::Log::logaction and finally
Koha::Logger->get which will need the log4perl configured correctly
(which is not necessary the case when you upgrade).

Test plan:
git checkout ed3e4540d73c1c3009375ad339e09a2e676fa1bd (20.06.00.022)
reset_all
Set the value of QuoteOfTheDay to 0
git checkout bug_27466 (master + this patch)
updatedatabase
=> QuoteOfTheDay is an empty string
git checkout ed3e4540d73c1c3009375ad339e09a2e676fa1bd (20.06.00.022)
reset_all
Set the value of QuoteOfTheDay to 1
git checkout bug_27466 (master + this patch)
updatedatabase
=> QuoteOfTheDay is set to "opac"

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 bab6a08ac98c1e6a72b346d554f020c0943e243d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27395: Add a warning to PatronSelfRegistrationDefaultCategory
Eden Bacani [Tue, 19 Jan 2021 21:21:51 +0000 (21:21 +0000)]
Bug 27395: Add a warning to PatronSelfRegistrationDefaultCategory

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

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 065c955cc67b6f113c9fb5d5ed918ba1400b5af9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25552: DBRev 20.11.02.001
Jonathan Druart [Mon, 1 Feb 2021 16:18:57 +0000 (16:18 +0000)]
Bug 25552: DBRev 20.11.02.001

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 940c0e319a1df9fb2d218d816079b5f5034972f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25552: Simplify tests using build_sample_item
Jonathan Druart [Mon, 1 Feb 2021 16:24:37 +0000 (17:24 +0100)]
Bug 25552: Simplify tests using build_sample_item

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 527c8cd28842429a4715f8e64aaada92de6ca9c2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25552: (QA follow-up) Fix spelling mistake
Martin Renvoize [Fri, 22 Jan 2021 13:00:59 +0000 (13:00 +0000)]
Bug 25552: (QA follow-up) Fix spelling mistake

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 7c6cbabaedab05c1b36d6ac3303e51a354dbfe1a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25552: (QA follow-up) Improve claim_returned POD
Martin Renvoize [Fri, 22 Jan 2021 12:56:02 +0000 (12:56 +0000)]
Bug 25552: (QA follow-up) Improve claim_returned POD

The POD for the Koha::Checkout->claim_returned method was somewhat
lacking; This patch attempts to explain what the code appears to
achieve.

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 8c09123197bc4bf8997ba4cd1b727c80eef9077e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25552: Unit tests
Kyle M Hall [Mon, 8 Jun 2020 13:16:00 +0000 (09:16 -0400)]
Bug 25552: Unit tests

Signed-off-by: Marti Fyerst <mfuerst@hmcpl.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 cd7a3e6ccbe1e9731b9baf0a8cbd2bd85d44cc69)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25552: Mark issue as returned if MarkLostItemsAsReturned, even if not charging...
Kyle M Hall [Thu, 4 Jun 2020 15:17:35 +0000 (11:17 -0400)]
Bug 25552: Mark issue as returned if MarkLostItemsAsReturned, even if not charging a lost fee

Signed-off-by: Marti Fyerst <mfuerst@hmcpl.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 0e46d4017f310d6011ef66eb2611b6524dc4044c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25552: Add missing Claims Returned option to MarkLostItemsAsReturned
Kyle M Hall [Wed, 20 May 2020 13:30:45 +0000 (09:30 -0400)]
Bug 25552: Add missing Claims Returned option to MarkLostItemsAsReturned

Marking an item as a return claim checks MarkLostItemsAsReturned to see if claim_returned is a value in MarkLostItemsAsReturned.
However, this option was never added to MarkLostItemsAsReturned so an a return claim can never be automatically removed from the patron record, even if they wanted such behavior.

Test Plan:
1) Apply this patch
2) Restart all the things
3) Note the new return claims option on MarkLostItemsAsReturned in the system preferences

Signed-off-by: Marti Fyerst <mfuerst@hmcpl.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 e53d559f4212fa4b25412fdd6325ae469328f26a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27549: "use of uninitialized value" warning on renew.pl
Petro Vashchuk [Mon, 25 Jan 2021 15:37:37 +0000 (17:37 +0200)]
Bug 27549: "use of uninitialized value" warning on renew.pl

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1af07787032275813e1e458cfed8504b482cd1c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27548: "use of uninitialized value" warning on branchoverdues.pl
Petro Vashchuk [Mon, 25 Jan 2021 15:35:18 +0000 (17:35 +0200)]
Bug 27548: "use of uninitialized value" warning on branchoverdues.pl

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

Fixed by adding pre-check for $location.

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c3d22687568640930bad9ffbb426033423e7efe9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27538: fix correlation of fields in Holds to Pull table
Petro Vashchuk [Sun, 24 Jan 2021 19:42:10 +0000 (21:42 +0200)]
Bug 27538: fix correlation of fields in Holds to Pull table

Bottom filtering row of "Holds to pull" table do not correlate to other
ones, columns diverged from "Call numbers" cell: it should be under
"Available call numbers" while it's under "Available barcodes", and so
on to the last cell (while number of cells still adjusted).

To reproduce:
   1) Head to the Holds to Pull page, check that bottom filtering row
      shifted to the left by one, starting from the "Call number"
      column and don't correlate to the upper table (for example, "Call
      numbers" cell should be under "Available call numbers" while it's
      under "Available barcodes"), and so on for all cells till the end
      of the filtering row.
   2) Apply patch.
   3) Refresh Holds to Pull page and ensure that all filtering row
      columns correlate to other rows columns correctly.

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 65d09dc52097a6630d54ae45e3df1086b55a59ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27576: Don't show import recordds table after cleaning a batch
Nick Clemens [Fri, 29 Jan 2021 11:06:34 +0000 (11:06 +0000)]
Bug 27576: Don't show import recordds table after cleaning a batch

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

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

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

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dc072ee4ba9361d35d92efd46b2935ff1b608b0d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27321: Compiled CSS
Fridolin Somers [Fri, 5 Feb 2021 16:01:35 +0000 (17:01 +0100)]
Bug 27321: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27321: Make disabled DB columns clearly disabled visually
Lucas Gass [Tue, 12 Jan 2021 23:42:27 +0000 (23:42 +0000)]
Bug 27321: Make disabled DB columns clearly disabled visually

To test:
1. Apply patch and its dependency (bug 17364)
2. Rebuild the CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)
3. Go the system pref BorroweUnwantedFields
4. branchcode should cleary stand out as disabled (#cccccc)

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 814bb1cf41f4de6ac1b6a5f93f1a7b6413ff13ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27571: "Add to lists" on MARC and ISBD view of OPAC detail page doesn't open...
Owen Leonard [Fri, 29 Jan 2021 13:19:12 +0000 (13:19 +0000)]
Bug 27571: "Add to lists" on MARC and ISBD view of OPAC detail page doesn't open in new window

This page corrects the global click handler in the OPAC so that all
"addtoshelf" links will work correctly to trigger the popup window for
adding titles to a list.

To test, apply the patch and test the process of adding a title to a
list in the OPAC from various places:

- Search results
- Bibliographic detail page (normal)
- Bibliographic detail page (MARC view)
- Bibliographic detail page (ISBD view)

Test both adding to an existing list and adding to a new list.
Everything should work correctly.

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 1cc252c145ff20cc01756a5aa3dbeb16cfb90e77)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27561: Remove type attribute from script tags: Various templates
Owen Leonard [Wed, 27 Jan 2021 12:48:57 +0000 (12:48 +0000)]
Bug 27561: Remove type attribute from script tags: Various templates

This patch replaces remaining instances of <script type="javascript"> in
templates with "<script>."

To test, apply the patch and check the changes to the template. Verify
that the changes look correct.

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 5c686091100d5451de0eb9a8e09b2aaa095152ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27430: Change password minimum value hint when patron category is changed
Emmi Takkinen [Mon, 18 Jan 2021 09:20:06 +0000 (11:20 +0200)]
Bug 27430: Change password minimum value hint when patron category is changed

If patrons category is changed during add or edit password
minimum value doesn't change. This patch adds ajax call to
fix this.

To test:
1. Add password minimum length for patron
categories A and B.
2. Create a new patron with category A.
3. Change patrons category to B.
4. Note that password minimum value doesn't change
on hint text.
5. Apply patch.
6. Repeat patron creation, password minimum value
should now change correctly.

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 ef5ec1731a971cfcf562f0744ef3a78ac0e75058)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27430: Use password minimum length for patron category on password hint
Emmi Takkinen [Thu, 14 Jan 2021 12:39:08 +0000 (14:39 +0200)]
Bug 27430: Use password minimum length for patron category on password hint

Hint for password minimum length should use minimum length
set for patron category  not "minPasswordLength" value.

To test:
1. Set "minPasswordLength" e.g. 6
2. Set "Patron" category minimum password length e.g. 4
3. Create new a patron.
4. Note that hint after password input field reads "Minimum
   password length: 6"
5. Apply patch.
6. Hint should now read "Minimum password length: 4".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 545c384205534fc52557bbe0eb4990405a44c7f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 26578: Clean overdrive searches before passing to OD
Nick Clemens [Wed, 30 Sep 2020 12:52:28 +0000 (12:52 +0000)]
Bug 26578: Clean overdrive searches before passing to OD

This patch copies regex used in buildQuery to detect ccl code in queries, but here we adapt
it to remove any ccl signifiers to ensure correct results from OD

To test:
1 - Have OverDrive enabled and configured
2 - set UseAuthoritiesForTracings to "Don't use"
3 - Search in the catalog for a record
4 - From the details page for a record click on an author link
5 - Note the query in catalog is like 'au:&quot;Whitford, Bradley.&quot;'
6 - Some overdrive catalogs will return records matching 'au:'
7 - Apply patch
8 - Reload the page, if there were spurious results before, they should now be gone
9 - Perform a search that returns overdrive results
10 - For a title in overdrive search koha with:
    au:{Author} AND ti:{Title}
11 - Confirm overdrive results are returned
12 - Check the link to overdrive results and note query section is:
    q=Author AND Title

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4a8b1b904eb05fec95834bcba0336e9d975f5d32)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 26298: Don't set too_many_items_to_process if equal to limit
Nick Clemens [Thu, 28 Jan 2021 18:56:39 +0000 (18:56 +0000)]
Bug 26298: Don't set too_many_items_to_process if equal to limit

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

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

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ae76d7626b0a23830b0269c00cbc2be73720d9ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27261: exlude branchcode from PatronSelfRegistrationBorrowerUnwantedField
Lucas Gass [Thu, 17 Dec 2020 15:52:52 +0000 (15:52 +0000)]
Bug 27261: exlude branchcode from PatronSelfRegistrationBorrowerUnwantedField

To test:
1 - Alter PatronSelfRegistrationBorrowerUnwantedFieldand select branchcode
2 - Attempt to self register via the OPAC
3 - Kabloom, internal server error
4 - Apply patche
5 - Alter the preference again
6 - Note that branchcode is unchecked and disabled
7 - Save the pref
8 - Attempt to self register again
9 - It succeeds

Signed-off-by: Fridolin Somers <fridolin.somers@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 05724721d6c8677d62048bd733d9d2d108dd8b3a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 17364: (follow-up) Do not check excluded fields
Fridolin Somers [Thu, 17 Dec 2020 08:05:25 +0000 (09:05 +0100)]
Bug 17364: (follow-up) Do not check excluded fields

When clicking on "Select all" excluded fields are selected.
Even if they are not saved into preference, this is disturbing.

Test plan :
1) Edit BorroweUnwantedFields system preference
2) Click "Select all"
3) See that branchcode is not selected

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 92f1c60a0e94f5ef16ce13e8f5f05c432503a0a5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 17364: Add ability to exclude some columns from selection for system preferences
Nick Clemens [Fri, 6 Nov 2020 11:17:56 +0000 (11:17 +0000)]
Bug 17364: Add ability to exclude some columns from selection for system preferences

Bug 22844 Added the option to provide a modal for selecting database columns for system preferences

Some system preferences are limited to a subset of the columns allowed. For instance, setting branchcode
in BorrowerUnwantedFields prevents adding new patrons

This patch allows for defining exclusions in the .pref file

To test:
1 - Alter BorroweUnwantedFields and select branchcode
2 - Attempt to add a new patron
3 - Get a message like "Something went wrong. Check the logs"
4 - Apply patches
5 - Alter the preference again
6 - Note that branchcode is unchecked and disabled
7 - Save the pref
8 - Add a patron
9 - It succeeds

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 17364: (follow-up) Add missing filter

Signed-off-by: Fridolin Somers <fridolin.somers@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 b986a8419b2012565e5bf2d4f942b06901c7ad74)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27204: Fix end boundary index, never return results for non-existant accountlines
Kyle M Hall [Fri, 11 Dec 2020 12:13:12 +0000 (07:13 -0500)]
Bug 27204: Fix end boundary index, never return results for non-existant accountlines

There are two primary issues I've identified with requesting line items
for fees via SIP:

1) The end boundary is incorrect. For example, if send a request with a
BP ( starting item) of 1, and a BQ (end item) of 1, I should get just
the first item. Instead I will get two items

2) Our SIP server does not check bounds. For example, if I have 3 fines,
but I send a BP of 1 and a BQ of 5, I will get back 5 AVs, two of
them being "empty" because the patron only has 3 accountlines!

Test Plan:
1) Apply the unit test patch
2) prove t/db_dependent/SIP/Patron.t
3) Note the failures
4) Apply the second patch
5) prove t/db_dependent/SIP/Patron.t
6) All tests should pass!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 0a5232412fee9a9811b7354c8ea98ee889eaee3c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27204: Add unit tests for fine_items
Kyle M Hall [Fri, 11 Dec 2020 12:13:06 +0000 (07:13 -0500)]
Bug 27204: Add unit tests for fine_items

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 cb9b72b783c2951c348934dfa8358ccd2a65f986)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27530: Set correct dateofbirth for 'C'
Jonathan Druart [Wed, 27 Jan 2021 09:22:27 +0000 (10:22 +0100)]
Bug 27530: Set correct dateofbirth for 'C'

Categories B, J, K and YA have a upper age limit of 17 years.
We are setting the dateofbirth to today - 15 years to prevent juvenils
to be 70!

Note that DATE_SUB is a MySQLism, but there is no way to be portable
here.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b647aff01d504533a5a3720c66e6adcf0067792f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27530: Set dateexpiry to 2099 in sample patrons
Jonathan Druart [Wed, 27 Jan 2021 09:17:57 +0000 (10:17 +0100)]
Bug 27530: Set dateexpiry to 2099 in sample patrons

To prevent them to be expired.

Note that the last patron is kept expired.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e3205b4c41497d83084a8a216eefa6dd377788b1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27450: Remove password from the mandatory fields when editing details
Jonathan Druart [Wed, 20 Jan 2021 11:09:30 +0000 (12:09 +0100)]
Bug 27450: Remove password from the mandatory fields when editing details

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4b2c284092eda3f70eaeaa1b136e9c0ae8f17f82)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27554: Clarify and add tests for update_category_to
Nick Clemens [Thu, 28 Jan 2021 13:58:14 +0000 (13:58 +0000)]
Bug 27554: Clarify and add tests for update_category_to

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

I additionally add a test for 'too old'

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ecb6703d7a627060fc7e21a149e5226262c97e8d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27580: Handle NULL values correctly in Koha::Items->filter_by_visible_in_opac
Tomas Cohen Arazi [Fri, 29 Jan 2021 19:43:06 +0000 (16:43 -0300)]
Bug 27580: Handle NULL values correctly in Koha::Items->filter_by_visible_in_opac

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

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b60ff6452ef2212a02f16ddc5c46edeb3d83a5e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27580: Regression tests
Tomas Cohen Arazi [Fri, 29 Jan 2021 19:40:27 +0000 (16:40 -0300)]
Bug 27580: Regression tests

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

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

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 00ea18282e622805321425789209ed9e0f8f7ea0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 26755: Make the guarantor search popup taller
Owen Leonard [Fri, 22 Jan 2021 15:20:00 +0000 (15:20 +0000)]
Bug 26755: Make the guarantor search popup taller

This patch changes the dimensions of the popup window in which
guarantors are chosen during the patron edit process.

The patch also removes an obsolete function delcaration for "Dopop"
which is unused.

To test, apply the patch and open a "child" type patron account for
editing.

Click the "Add guarantor" button. This should trigger a popup window.
Eyeball the size of the window, you'll be able to tell that it is
exactly 800 pixels wide.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5fbfecdb2f9dc690eec4a03569edef624fd6f452)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 20238: Display description of ITEMTYPECAT in search category
Amy King [Thu, 21 Jan 2021 22:41:09 +0000 (22:41 +0000)]
Bug 20238: Display description of ITEMTYPECAT in search category

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d1e12c95e1d1ec907f6ed4465270569aa6c5a40d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 14004: Set the syspref's value to an empty string
Jonathan Druart [Wed, 27 Jan 2021 11:03:33 +0000 (12:03 +0100)]
Bug 14004: Set the syspref's value to an empty string

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

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6b23c0634b43a60f0a434d4c43a3e57718ad0806)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 14004: Add OpacAdditionalStylesheet and opaclayoutstylesheet
Fridolin Somers [Thu, 21 Jan 2021 16:09:27 +0000 (17:09 +0100)]
Bug 14004: Add OpacAdditionalStylesheet and opaclayoutstylesheet

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c009eeafed32f0da9ef3c81e5b3e748745c9f900)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 14004: Add ability to temporarily disable JS/CSS sysprefs
Fridolin Somers [Tue, 12 Jan 2021 10:15:25 +0000 (11:15 +0100)]
Bug 14004: Add ability to temporarily disable JS/CSS sysprefs

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

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

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 180db2f63b83dc4052b42e3073be9893e7495a1f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 11257: (QA follow-up) Add thank you
Katrin Fischer [Thu, 21 Jan 2021 22:38:57 +0000 (22:38 +0000)]
Bug 11257: (QA follow-up) Add thank you

Even if we are grumpy because they still have not returned the items,
we should be nice :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ff494ecbadfadf568ce0c06426d993b36c0991e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 11257: (followup) Document <<items.content>> for DUEDGST and PREDUEDGST and updat...
James O'Keeffe [Thu, 21 Jan 2021 05:53:46 +0000 (05:53 +0000)]
Bug 11257: (followup) Document <<items.content>> for DUEDGST and PREDUEDGST and update sample notices

This patch changes the default text for the DUEDGST sample notice to the
following:
    Dear <<borrowers.firstname>> <<borrowers.surname>>,
    The following item(s) are due:
    <<items.content>>
(it does not include an atomic update)

Test plan:
1. Select "edit" on DUEDGST in the notices and slips page (Home ->
        tools -> Notices and slips)
2. Open "email", and note the default text.
3. Apply the patch, and peform a fresh install of Koha.
4. Navigate to the same page. The default text should have changed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 99888359533b3643d7634fb4b599d6bb8301f7d3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 11257: PREDUEDST should have more useful default text
James O'Keeffe [Tue, 19 Jan 2021 22:47:53 +0000 (22:47 +0000)]
Bug 11257: PREDUEDST should have more useful default text

This patch changes the default text of PEDUEDST to the following:
    Dear <<borrowers.firstname>> <<borrowers.surname>>,
    The following item(s) will be due soon:
    <<items.content>>

Note: I dont beleive ive done everything requesting in the bug, ie there
was a request to add  <<items.content>> to the documentation of
sample_notices.yml, but I couldn't find documentation for it. If there's
things I missed, please tell me so I can make the appropraite changes,
or feel free to make the changes yourself.

Test plan:
1. Select "edit" on PREDUEDST in the notices and slips page (Home -> tools
        -> Notices and slips)
2. Open "email", and note the default text.
3. Apply the patch, and peform a fresh install of Koha.
4. Navigate to the same page. The default text should have changed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD amended patch: Remove double spaces in PREDUEDST

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6d7a91654cf3e30afe48303cc66aac7bdd1dcb9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27029: Add a selenium regression test
Jonathan Druart [Wed, 27 Jan 2021 10:35:35 +0000 (11:35 +0100)]
Bug 27029: Add a selenium regression test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 03dea5f51e3859090f563f72475cffa1da9c7645)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27029: (QA follow-up) Adding html filter
Marcel de Rooy [Fri, 22 Jan 2021 10:58:06 +0000 (10:58 +0000)]
Bug 27029: (QA follow-up) Adding html filter

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0e60ab4f032642200b8a3c19ad2ff05d98641460)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27029: Add data-biblionumber attribute to OPAC detail page
David Cook [Mon, 16 Nov 2020 00:31:21 +0000 (00:31 +0000)]
Bug 27029: Add data-biblionumber attribute to OPAC detail page

This patch adds a data-biblionumber attribute to the
div#catalogue_detail_biblio elements on opac-detail.pl, so that
Javascript running on the page can easily fetch and use the
record's biblionumber.

Signed-off-by: Mark Hofstetter <mark@hofstetter.at>, <koha@trust-box.at>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f17a631d873f971ac139534fc2867c7ac86b7bd5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27525: Replace "wich" with "with" in batch delete template
Owen Leonard [Fri, 22 Jan 2021 11:22:30 +0000 (11:22 +0000)]
Bug 27525: Replace "wich" with "with" in batch delete template

This patch corrects two typos: "wich" -> "with."

To test, apply the patch and check the batch delete template
(batchMod-del.tt) and confirm that the two instances of this sentence
are correct:

"Last item for bibliographic record with biblio-level hold on it"

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 e063bd4f5909f0f9babb328bbecce3354d75d20b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27547: Typo in parcel.tt
Caroline Cyr La Rose [Mon, 25 Jan 2021 14:59:57 +0000 (09:59 -0500)]
Bug 27547: Typo in parcel.tt

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 43c475bc96214109af78d2aae4e87809c802e8dc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27446: (QA follow-up) Add missing filters
Katrin Fischer [Sun, 24 Jan 2021 02:30:29 +0000 (02:30 +0000)]
Bug 27446: (QA follow-up) Add missing filters

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 52b3ff7258a0d2c0809decce0e72cd488fb0ad07)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27446: Markup errors in suggestion/suggestion.tt
Owen Leonard [Mon, 25 Jan 2021 11:30:30 +0000 (11:30 +0000)]
Bug 27446: Markup errors in suggestion/suggestion.tt

This patch makes various corrections to the suggestions template in the
staff interface:

 - Correct indentation
 - Fix unclosed tags
 - Fix non-unique IDs
 - Add comments to highlight markup structure

To test, apply the patch and test the suggestions interface in the staff
client:

 - Viewing the list of suggestions
 - Viewing the details of a single suggestion
 - Filtering suggestions
 - Organizing suggestions

Test that labels on form controls work correctly, including under each
tab.

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 42419de5e33c5d8f01c380213db8969f0f6b1cf3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27508: do nothing if tag label elements don't exist
Petro Vashchuk [Thu, 21 Jan 2021 12:11:24 +0000 (14:11 +0200)]
Bug 27508: do nothing if tag label elements don't exist

When JavaScript make copy of DOM set for MARC tag, it tries to reassign
label elements to another id, the problem is there is no check for
existence of that label element, so in case when option
"advancedMARCeditor" is set to "Don't display", labels were absent
which caused JavaScript to crush in the middle of process with uncaught
exception.

This patch wraps this label assignment in try/catch hook like it's done
in the code around for other elements, to allow the script to proceed
when description labels are not present.

To test:
1) Check in the system preferences interface subsection that
   "advancedMARCeditor" is set to "Display".
2) Go to the "Add MARC record" cataloguing section and press "Repeat
   this tag" button near the MARC tag record to ensure that it makes
   duplicate in the interface as expected.
3) Then again in the system preferences interface subsection change
   "advancedMARCeditor" to "Don't display".
4) Return back to the "Add MARC record" interface, refresh the page to
   have no MARC field labels displayed, and try duplicating the tag
   again.
5) Ensure that it doesn't work, also you can notice a JavaScript error
   "Cannot read property "setAttribute" of undefined..." in the
   JavaScript console of your browser.
6) Apply the patch.
7) Repeat the test sequence (changes will be in the step 5), ensure that
   the tag gets duplicated even when description labels are not present.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 43f9758c3d3fe660cff464e1b575bb3e99cb73da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27531: Remove type attribute from script tags: Cataloging plugins
Owen Leonard [Fri, 22 Jan 2021 16:43:58 +0000 (16:43 +0000)]
Bug 27531: Remove type attribute from script tags: Cataloging plugins

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 32d482130749fdb17cb33e2ee48b0ae0acce835a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25614: Move ILL request keyword filter to sidebar
Owen Leonard [Tue, 27 Oct 2020 12:23:45 +0000 (12:23 +0000)]
Bug 25614: Move ILL request keyword filter to sidebar

On the ILL request list page there are two filters for the table: One in
the sidebar and one configured automatically by the DataTables plugin. I
think these two systems are conflicting somehow to prevent the "clear
filter" button in the table toolbar from working correctly.

This patch doesn't fix the bug but avoids it: Since the filter field in
the table toolbar is duplicating the functionality of the form in the
sidebar, we could hide it and rely on the sidebar filter instead.

To test, apply the patch and go to the ILL requests page in the staff
interface.

 - The table of requests should display without a search form or "clear
   filter" button at the top.
 - The left-hand sidebar form should now have a "keyword" filter option
   which searches any column in the table.
 - Other filter fields should work as before.

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 6c5ad42eddce1c357bf6dc64301f774f93a06e0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 11344: (QA follow-up) Fix empty section warning
Marcel de Rooy [Fri, 22 Jan 2021 09:04:07 +0000 (09:04 +0000)]
Bug 11344: (QA follow-up) Fix empty section warning

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c117df8e30c2067dd70a4573989d24e354145adc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 11344: Perldoc issues in misc/cronjobs/advance_notices.pl
James O'Keeffe [Tue, 19 Jan 2021 21:16:49 +0000 (21:16 +0000)]
Bug 11344: Perldoc issues in misc/cronjobs/advance_notices.pl

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5cb6927458dfd9195a7f9cb536b2ca386f7ffb88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27333: Throw the right exceptions
Tomas Cohen Arazi [Mon, 4 Jan 2021 14:10:12 +0000 (11:10 -0300)]
Bug 27333: Throw the right exceptions

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

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c5f3fdcc15bc5d1a013321944c90ce49f5c58e6c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27333: Regression tests
Tomas Cohen Arazi [Mon, 4 Jan 2021 14:09:54 +0000 (11:09 -0300)]
Bug 27333: Regression tests

Test for the right exceptions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3ece5964861577185d96e2834f04f42bcc68d40e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27327: Get rid of indirect object notation in Koha::Club::Hold
Tomas Cohen Arazi [Mon, 4 Jan 2021 13:35:37 +0000 (10:35 -0300)]
Bug 27327: Get rid of indirect object notation in Koha::Club::Hold

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 17a3476d7e45fae092fdd20ce78df8b0945d1fb1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27543: Compiled CSS
Fridolin Somers [Fri, 29 Jan 2021 14:12:09 +0000 (15:12 +0100)]
Bug 27543: Compiled CSS

3 years agoBug 27543: Tooltip on opac-messaging.pl obscured by table headers
Owen Leonard [Mon, 25 Jan 2021 12:30:55 +0000 (12:30 +0000)]
Bug 27543: Tooltip on opac-messaging.pl obscured by table headers

This patch corrects which Bootstrap assets are compiled with the OPAC
CSS -- The file for Bootstrap tooltips should be included.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

1)  Log into the OPAC.
2)  Go to 'your messaging' (opac-messaging.pl).
3)  Hover over the Digests only tooltip.
4)  Note that the tooltip looks correct.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4fad566dbccd669f5119fc978d01850d1e8080f2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27098: Renames Relatives fines to Relative charges
Eden Bacani [Tue, 19 Jan 2021 02:21:32 +0000 (02:21 +0000)]
Bug 27098: Renames Relatives fines to Relative charges

1. Check on website that users that are guarantor see charges under
Relative charges instead of Relatives' fines

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1b3b3f5d78abd1acd3c7bde6c9f993e2e44c62a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 22152: Hide tools navigation when printing reports
Eden Bacani [Tue, 19 Jan 2021 20:14:32 +0000 (20:14 +0000)]
Bug 22152: Hide tools navigation when printing reports

1. Go to reports and print any report
2. Check that navigation does not show up when report is printed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 214ff006e1fd230c95c43da60804b72a92238079)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27022: Publisher number 028 does not display according to framework settings
Catherine Ma [Thu, 21 Jan 2021 02:23:22 +0000 (02:23 +0000)]
Bug 27022: Publisher number 028 does not display according to framework settings

Test plan:
1. search the catalogue for an item
2. check if you can see the publisher number below the item title (you shouldn't)
3. click on the item and check if you can see the publisher number on
this page (you shouldn't)
4. in a new browser, repeat steps 1-3 on the OPAC
5. apply patch
6. repeat steps 1-4, however this time the publisher number SHOULD
display under the item titles

Sponsored by Catalyst IT

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9f7eb070cc7baadd305b3546f36c40b434504abf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27179: Misspelling of Method in REST API files
Mazen Khallaf [Tue, 19 Jan 2021 02:01:43 +0000 (02:01 +0000)]
Bug 27179: Misspelling of Method in REST API files

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a22b3bb504b0a9a77aa9ce3e9f326cc71fcf8d96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27210: Typo in patron-attr-types.tt
Mazen Khallaf [Tue, 19 Jan 2021 01:49:43 +0000 (01:49 +0000)]
Bug 27210: Typo in patron-attr-types.tt

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

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c5170f8ee1b6ce3007787d2415aba7794dbaded3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 24811: French SQL files "news" link fixed
ava li [Tue, 19 Jan 2021 21:01:15 +0000 (21:01 +0000)]
Bug 24811: French SQL files "news" link fixed

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

Test plan:

1) Apply the patch.

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

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c6009f32205c7b6c19a4dfe0346a1ebed0c05a71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 24810: French SQL files for "news" removed "3"
ava li [Tue, 19 Jan 2021 03:44:44 +0000 (03:44 +0000)]
Bug 24810: French SQL files for "news" removed "3"

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 42aac43290dbcb8cb1cfecbe685e738c8a95ee67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 24055: (follow-up) Description of PayPalReturnURL system preference
Ella Wipatene [Thu, 21 Jan 2021 02:45:07 +0000 (02:45 +0000)]
Bug 24055: (follow-up) Description of PayPalReturnURL system preference

Have rephrased it as 'configured return URL' as this is what they call
it on the PayPal website.

To test:
- Go to Administration/ System preferences
- Search for PayPalReturnURL
- Verify description has changed to 'configured return URL' as one of
the options.

Sponsored.by: Catalyst IT

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 297d93ec449c08430c13ba75659f48e6a3f563c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 24055: Rephrase description of PayPalReturnURL slightly
Katrin Fischer [Sat, 11 Apr 2020 20:05:14 +0000 (20:05 +0000)]
Bug 24055: Rephrase description of PayPalReturnURL slightly

changes 'OPAC's alias' to 'specified URL' as suggested by
Tomas on comment#2.

To test:
- Go to Administration / System preferences
- Search for PayPalReturnURL
- Verify description has changed to "specified URL" as
  one of the options

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4b31073af292e391cd1df1be3894029460fa6040)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 20527: (QA follow-up) Fix type 'Wiriteoff'
Nick Clemens [Thu, 21 Jan 2021 16:09:58 +0000 (16:09 +0000)]
Bug 20527: (QA follow-up) Fix type 'Wiriteoff'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c706b8aa13edd39769324ad2d5937d9d4d5ae583)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 20527: Corrected paid to amountwrittenoff
Eden Bacani [Thu, 21 Jan 2021 02:54:30 +0000 (02:54 +0000)]
Bug 20527: Corrected paid to amountwrittenoff

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f3992816b20bf97de904d485e775c32b93df0726)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27027: Fixed typo - extra dot removed
Amy King [Tue, 19 Jan 2021 01:55:00 +0000 (01:55 +0000)]
Bug 27027: Fixed typo - extra dot removed

Test Plan
Before applying patch
1. Open koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt
2. Note how in line 125 "has successfully been modified.." has two full
stops
3. Apply patch
4. Repeat step 1
5. Note how there is only now one full stop in line 125 "has been
successfully ben modified."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 040d79a02c8bb9a860e2c431e1c3ade8732a607a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 11996: (follow-up) Updating the uk-UA currency
Ella Wipatene [Thu, 21 Jan 2021 01:46:21 +0000 (01:46 +0000)]
Bug 11996: (follow-up) Updating the uk-UA currency

I have changed GRN to UAH in both
installer/data/mysql/ru-RU/optional/sample_currency.sql and in
installer/data/mysql/uk-UA/optional/sample_currency.sql

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 732e69f4b25b7af22ab034f143b8df5d7ffd263a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 11996: Made RUB default currency for ru-RU
Ethan Amohia [Thu, 17 Jan 2019 02:42:32 +0000 (02:42 +0000)]
Bug 11996: Made RUB default currency for ru-RU

Didn't know how to change the uk-UA default currency.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6bb8065af69438673ca5ed0bca0664c366a87e02)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 24447: Changing 'DUE' to example in database that exists.
Eden Bacani [Thu, 21 Jan 2021 01:20:49 +0000 (01:20 +0000)]
Bug 24447: Changing 'DUE' to example in database that exists.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0a0ff7c5ceab836631be060a4571681ff40e275c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25381: (QA follow-up) Fix occurence in the one file that escaped
Katrin Fischer [Thu, 21 Jan 2021 23:44:10 +0000 (23:44 +0000)]
Bug 25381: (QA follow-up) Fix occurence in the one file that escaped

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 02adae8a5f7ecf8f6e44042d078e406b0aacf19a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25381: XSLTs should not define entities
Didier Gautheron [Fri, 8 May 2020 13:19:54 +0000 (15:19 +0200)]
Bug 25381: XSLTs should not define entities

Bug 23290 explicitly disabled entity expansion during XML parsing for security reasons.

However, many XSLTs define the following entity:
<!ENTITY nbsp "&#160;" >

They don't use the entity &nbsp, but its presence could lead to confusion.

Signed-off-by: Eden Bacani <eden.bacani@gmail.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 10c08b6552c7063c4c029701018d6f54e6549acb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 25245: Add plugins_nightly.pl to the default cron
Martin Renvoize [Wed, 22 Apr 2020 11:10:56 +0000 (12:10 +0100)]
Bug 25245: Add plugins_nightly.pl to the default cron

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 1ce9e0160cf7e7264400244f23b314cc8a94ad0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>