]> git.koha-community.org Git - koha.git/log
koha.git
3 years agoBug 23763: (QA follow-up) Add +x to Search.t file permissions
Katrin Fischer [Sun, 7 Feb 2021 01:56:39 +0000 (01:56 +0000)]
Bug 23763: (QA follow-up) Add +x to Search.t file permissions

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 23763: Make search on staff and opac use new routine
Nick Clemens [Mon, 7 Oct 2019 14:20:32 +0000 (14:20 +0000)]
Bug 23763: Make search on staff and opac use new routine

To test:
1 - Apply patch
2 - Search on staff and opac side
3 - Confirm you can paginate results
4 - Confirm you see 10 pages on pagination if under page 10
5 - Confirm you see 20 pages in pagination if over page 10
6 - Confirm you can go to first or last page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: perltidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 23763: Create a pagination_bar routine
Nick Clemens [Mon, 7 Oct 2019 14:19:07 +0000 (14:19 +0000)]
Bug 23763: Create a pagination_bar routine

To test:
prove -v t/Koha/SearchEngine/Search.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: perltidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
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>
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>
3 years agoBug 12260: Compiled CSS
Jonathan Druart [Mon, 8 Feb 2021 16:08:01 +0000 (17:08 +0100)]
Bug 12260: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
3 years agoBug 20410: DBRev 20.12.00.010
Jonathan Druart [Mon, 8 Feb 2021 16:06:53 +0000 (16:06 +0000)]
Bug 20410: DBRev 20.12.00.010

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 20410: Remove OpacGroupResults and PazPar2
Jonathan Druart [Tue, 2 Feb 2021 15:00:22 +0000 (16:00 +0100)]
Bug 20410: Remove OpacGroupResults and PazPar2

This feature is not used as far as we know and it's not known to work.
It's preferable to remove it.

Test plan:
Make sure the OpacGroupResults pref code is removed, as well as the
PazPar2 files and code.

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>
3 years agoBug 27476: Improve link text for logging in on OPAC
Ella Wipatene [Wed, 20 Jan 2021 01:56:53 +0000 (01:56 +0000)]
Bug 27476: Improve link text for logging in on OPAC

(Note: Must have Shibboleth and CAS added to OPAC)
1. (Before downloading patch) Go to OPAC
2. Search for an item in the search bar (i.e. type 'a')
3. On one of the items, click on 'Place hold'
4. The links should say 'If you have a Shibboleth account, please click
here to log in', 'Please click here to log in' and 'If you have a CAS
account, please click here to log in'
5. Add patch
6. Repeat steps 1-3
7. The links should now say 'Log in using a Shibboleth account', 'Log in'
and 'Log in using a CAS account'

NOTE: Also noticed on the initial log in box there was the same issue -
here is the testing for that:
1. Go to OPAC home page
2. In the top right click 'Log in to your account'
3. The link should say 'If you have a Shibboleth account, please click
here to log in.'
4. Apply patch
5. Repeat steps 1&2
6. The link should now say 'Log in using a Shibboleth account'

Sponsored-by: Catalyst IT
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>
3 years agoBug 27404: update labels/label-edit-range.tt for ACC2
Catherine Ma [Tue, 19 Jan 2021 23:17:39 +0000 (23:17 +0000)]
Bug 27404: update labels/label-edit-range.tt for ACC2

Form has been edited in
intranet-tmpl/prog/en/modules/labels/label-edit-range.tt

Test Plan:
- Go to Tools > Label Creator > New > Barcode range
- Verify the input filds for the barcode range behave as
  expected.

Sponsored by Catalyst IT

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>
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>
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>
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>
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>
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>
3 years agoBug 27628: Compiled CSS
Jonathan Druart [Mon, 8 Feb 2021 13:53:47 +0000 (14:53 +0100)]
Bug 27628: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
3 years agoBug 27581: DBRev 20.12.00.009
Jonathan Druart [Mon, 8 Feb 2021 13:54:53 +0000 (13:54 +0000)]
Bug 27581: DBRev 20.12.00.009

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27581: Fix missing occurrences in tests
Jonathan Druart [Mon, 8 Feb 2021 13:47:46 +0000 (14:47 +0100)]
Bug 27581: Fix missing occurrences in tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27581: (QA follow-up) Fix occurence in it-IT custom.sql
Katrin Fischer [Sat, 6 Feb 2021 23:57:41 +0000 (23:57 +0000)]
Bug 27581: (QA follow-up) Fix occurence in it-IT custom.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27581: Rename USeICU preference to UseICUStyleQuotes
Nick Clemens [Fri, 29 Jan 2021 19:48:53 +0000 (19:48 +0000)]
Bug 27581: Rename USeICU preference to UseICUStyleQuotes

Rather thna have a poorly named preference with an explanation of how it doesn't
do what it implies it does, let's rename it!

To test:
 1 - Set UseICU to 'Using'
 2 - Go to the details page of a record in the staff interface
 3 - Hover over a subject heading that has subfields
 4 - Note the link has curly brackets around the subject, like:
     http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=su:{Winnie-the-Pooh Fictitious character}
 5 - Change UseICU to 'Not using'
 6 - Note the link is now:
     http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=su:"Winnie-the-Pooh Fictitious character"
 7 - Repeat on OPAC
 8 - Apply patch
 9 - Restart all
10 - Repeat tests, the behaviour has not changed
11 - Read the new syspref description and confirm it makes sense

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>
3 years agoBug 27563: Remove check-url.pl in favor of check-url-quick.pl
Nick Clemens [Wed, 27 Jan 2021 19:53:21 +0000 (19:53 +0000)]
Bug 27563: Remove check-url.pl in favor of check-url-quick.pl

The check-url.pl script has been deprecated since Koha 3.8 - this patch removes it.
If any users are still referencing that script in their cronjobs they will need to
update to the new script upon upgrade.

To test:
1 - verify the script is gone
2 - verify check-url-quick.pl works

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>
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>
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>
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>
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>
3 years agoBug 27604: Init to {}
Jonathan Druart [Mon, 8 Feb 2021 13:43:27 +0000 (14:43 +0100)]
Bug 27604: Init to {}

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27604: (QA follow-up) Limit the libraries during the query
Nick Clemens [Fri, 5 Feb 2021 17:29:54 +0000 (17:29 +0000)]
Bug 27604: (QA follow-up) Limit the libraries during the query

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27604: Make sure PatronSelfRegistrationLibraryList is used
Jonathan Druart [Wed, 3 Feb 2021 15:14:12 +0000 (16:14 +0100)]
Bug 27604: Make sure PatronSelfRegistrationLibraryList is used

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
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>
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>
3 years agoBug 24488: create a loop to avoid copy paste
Jonathan Druart [Tue, 5 Jan 2021 08:03:31 +0000 (09:03 +0100)]
Bug 24488: create a loop to avoid copy paste

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD amended patch: Rename variables

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: (QA follow-up) Go to next loop as early as possible
Josef Moravec [Thu, 19 Nov 2020 06:27:49 +0000 (06:27 +0000)]
Bug 24488: (QA follow-up) Go to next loop as early as possible

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: perf - Move holds search out of the loop
Jonathan Druart [Wed, 18 Nov 2020 10:45:41 +0000 (11:45 +0100)]
Bug 24488: perf - Move holds search out of the loop

This will need attention from QA.
We are assuming that the hold with the highest priority has priority=1

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: Simplify structure passed to the template
Jonathan Druart [Wed, 18 Nov 2020 10:14:45 +0000 (11:14 +0100)]
Bug 24488: Simplify structure passed to the template

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: perf - move patrons_count out of the loop
Jonathan Druart [Wed, 18 Nov 2020 10:14:10 +0000 (11:14 +0100)]
Bug 24488: perf - move patrons_count out of the loop

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: perf - Group by at DBMS level
Jonathan Druart [Wed, 18 Nov 2020 09:42:39 +0000 (10:42 +0100)]
Bug 24488: perf - Group by at DBMS level

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: Fix count distinct patron on a given hold
Jonathan Druart [Wed, 18 Nov 2020 09:36:40 +0000 (10:36 +0100)]
Bug 24488: Fix count distinct patron on a given hold

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: (QA follow-up) Move getting items out of cycle
Josef Moravec [Tue, 17 Nov 2020 20:38:10 +0000 (20:38 +0000)]
Bug 24488: (QA follow-up) Move getting items out of cycle

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: (QA follow-up) Remove two queries out of foreach cycle
Josef Moravec [Tue, 17 Nov 2020 19:02:16 +0000 (19:02 +0000)]
Bug 24488: (QA follow-up) Remove two queries out of foreach cycle

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: (QA follow-up) Make pending reserves faster
Josef Moravec [Tue, 17 Nov 2020 18:35:07 +0000 (18:35 +0000)]
Bug 24488: (QA follow-up) Make pending reserves faster

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: (QA follow-up): Fix small bugs, add checkk for waiting holds
Josef Moravec [Tue, 17 Nov 2020 10:45:00 +0000 (10:45 +0000)]
Bug 24488: (QA follow-up): Fix small bugs, add checkk for waiting holds

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: [DISCUSSION] For comparaison
Jonathan Druart [Wed, 7 Oct 2020 16:33:59 +0000 (18:33 +0200)]
Bug 24488: [DISCUSSION] For comparaison

I'd like someone to run a benchmark with and without this patch on a
quite big database and see which approach is the best

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: Simplify searches
Jonathan Druart [Wed, 7 Oct 2020 16:06:05 +0000 (18:06 +0200)]
Bug 24488: Simplify searches

It also:
Use dtf for date handling
add missing td

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: Display patron with the highest priority hold
Jonathan Druart [Wed, 7 Oct 2020 15:23:11 +0000 (17:23 +0200)]
Bug 24488: Display patron with the highest priority hold

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: Fix reserve.reserve_id' isn't in GROUP BY
Jonathan Druart [Thu, 23 Jul 2020 06:58:04 +0000 (08:58 +0200)]
Bug 24488: Fix reserve.reserve_id' isn't in GROUP BY

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24488: Show correct first patron details on Holds to pull
Aleisha Amohia [Thu, 23 Jan 2020 03:59:37 +0000 (03:59 +0000)]
Bug 24488: Show correct first patron details on Holds to pull

This patch rewrites the complex search query to reduce the risk of
reordering the results multiple times.

This patch includes a change to schema files so may need to upgrade
schema and/or restart memcached

To test:
1) Reproduce problem following test plan in Description
2) Apply patch and refresh page
3) Notice the correct patron is now shown
4) Play with date selection, confirm correct results are still shown
5) Test cancelling holds
6) Test filtering table results
7) Test with biblios with multiple items
8) Test with making items unavailable (i.e. not for loan, checked out)

Sponsored by: IHC New Zealand

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
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>
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>
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>
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>
3 years agoBug 25552: DBRev 20.12.00.008
Jonathan Druart [Mon, 1 Feb 2021 16:18:57 +0000 (16:18 +0000)]
Bug 25552: DBRev 20.12.00.008

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
3 years agoBug 27321: Compiled CSS
Jonathan Druart [Mon, 1 Feb 2021 16:20:23 +0000 (17:20 +0100)]
Bug 27321: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
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>
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>
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>
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>
3 years agoBug 27330: (QA follow-up) Return 409 instead
Tomas Cohen Arazi [Wed, 27 Jan 2021 10:37:05 +0000 (07:37 -0300)]
Bug 27330: (QA follow-up) Return 409 instead

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
3 years agoBug 27330: (follow-up) Cleanup missed on bug 23843
Tomas Cohen Arazi [Mon, 4 Jan 2021 14:29:38 +0000 (11:29 -0300)]
Bug 27330: (follow-up) Cleanup missed on bug 23843

This patch makes some cleanup missed on bug 23843. The catch condition
on the controller was copied and pasted from other controller and should
be avoided unless there's a known case that needs special handling.
Otherwise it will be catched by the $c->unhandled_exception call.

All the old mappings were inadvertedly kept in the controller as well as
the (unused) _to_api method.

The base class is also cleaned from unnecessary mappings. Only mapped
things need to be added.

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

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>
3 years agoBug 27330: Return 403 if club has no enrollments
Tomas Cohen Arazi [Mon, 4 Jan 2021 14:24:51 +0000 (11:24 -0300)]
Bug 27330: Return 403 if club has no enrollments

This patch makes the controller script return a 403 as it should [1]
instead of a plain 500.

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

[1] https://www.restapitutorial.com/httpstatuscodes.html

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>
3 years agoBug 27330: Regression tests
Tomas Cohen Arazi [Mon, 4 Jan 2021 14:19:58 +0000 (11:19 -0300)]
Bug 27330: Regression tests

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>
3 years agoBug 27330: Use Basic auth in tests
Tomas Cohen Arazi [Mon, 4 Jan 2021 12:59:26 +0000 (09:59 -0300)]
Bug 27330: Use Basic auth in tests

This patch puts the tests in line with the current codebase. Some bits
are passed through perltidy to aid readability...

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/clubs_holds.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
=> SUCCESS: Tests look more like the rest of the API tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
3 years agoBug 25670: Fix random failure on Orders.t
Jonathan Druart [Mon, 1 Feb 2021 09:35:12 +0000 (10:35 +0100)]
Bug 25670: Fix random failure on Orders.t

It has failed at least 3 times:

 #   Failed test 'The right order is returned'
 #   at t/db_dependent/Koha/Acquisition/Orders.t line 153.
 #          got: '50'
 #     expected: '49'

 #   Failed test 'The right order is returned'
 #   at t/db_dependent/Koha/Acquisition/Orders.t line 154.
 #          got: '49'
 #     expected: '50'
 # Looks like you failed 2 tests of 6.

I cannot manage to make it fail locally

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27486: Fix UsageStats.t
Jonathan Druart [Mon, 1 Feb 2021 09:26:00 +0000 (10:26 +0100)]
Bug 27486: Fix UsageStats.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 20212: Add missing html filter
Jonathan Druart [Mon, 1 Feb 2021 09:24:47 +0000 (10:24 +0100)]
Bug 20212: Add missing html filter

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27251: Add missing html filter
Jonathan Druart [Mon, 18 Jan 2021 10:21:26 +0000 (11:21 +0100)]
Bug 27251: Add missing html filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27251: Don't export the actions column
Jonathan Druart [Mon, 18 Jan 2021 10:18:55 +0000 (11:18 +0100)]
Bug 27251: Don't export the actions column

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27251: Fix sort by displayed_on
Jonathan Druart [Mon, 18 Jan 2021 10:14:09 +0000 (11:14 +0100)]
Bug 27251: Fix sort by displayed_on

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27251: Don't hide the table on delete if empty
Jonathan Druart [Wed, 6 Jan 2021 09:40:12 +0000 (10:40 +0100)]
Bug 27251: Don't hide the table on delete if empty

If we filtered the result, delete the only row displayed then the table
was hidden. This is a nice behaviour, especially if there was no filter.
However we must show it again if the filters are removed.
I am suggesting to simply to not hide the table and avoid adding more JS
code to deal with this very specific use case.

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>
3 years agoBug 27251: Rewrite QOTD with the Koha REST API
Jonathan Druart [Wed, 16 Dec 2020 11:34:43 +0000 (12:34 +0100)]
Bug 27251: Rewrite QOTD with the Koha REST API

This patch replace the QOTD editor with our new way to CRUD the
adminitration page (like libraries and STMP servers)

Test plan:
Play with the QOTD by adding, removing, updating quotes
Try to find bugs :)

Bug 27251: Fix capitalization

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>
3 years agoBug 27352: Missed case in bug 25032
Tomas Cohen Arazi [Wed, 6 Jan 2021 16:11:34 +0000 (13:11 -0300)]
Bug 27352: Missed case in bug 25032

Probably because of the order things got pushed.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27352: Unit tests
Tomas Cohen Arazi [Wed, 6 Jan 2021 16:10:12 +0000 (13:10 -0300)]
Bug 27352: Unit tests

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>