]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 29608: Made so doesn't require full permission
Isobel Graham [Thu, 1 Sep 2022 11:37:06 +0000 (12:37 +0100)]
Bug 29608: Made so doesn't require full permission

Made so the numbering sequence does not need to require full
permission.

1. Edit number patterns a confirm you don't need full permission

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27191: Set focus on first input when adding a new patron category
Katrin Fischer [Thu, 18 Aug 2022 20:15:30 +0000 (20:15 +0000)]
Bug 27191: Set focus on first input when adding a new patron category

When adding a new patron category, the focus/cursor should be
in the first input field of the form: Category code

To test:
* Add a new patron category in administration > patron categories
  - cursur is in no field
* Apply patch
* Add another new patron category
  - cursor is now in the first input field of the form: Category code

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27193: Set focus on first input when adding a new patron attribute
Katrin Fischer [Thu, 18 Aug 2022 19:47:20 +0000 (19:47 +0000)]
Bug 27193: Set focus on first input when adding a new patron attribute

When adding a new patron attribute, the focus/cursor should be
in the first input field of the form: Patron attribute type code

To test:
* Add a new patron attribute - cursur is in no field
* Apply patch
* Add another new patron attribute - cursor is now in
  the first input field: Patron attribute type code

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27436: Set focus on first input when adding a new SQL report
Katrin Fischer [Thu, 18 Aug 2022 20:06:41 +0000 (22:06 +0200)]
Bug 27436: Set focus on first input when adding a new SQL report

When adding a new SQL report, the focus/cursor should be
in the first input field of the form: Report name

To test:
* Add a new SQL report in reports > new from SQL
  - cursur is in no field
* Apply patch
* Add another new SQL report
  - cursor is now in the first input field of the form: Report name

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31398: Set focus on first input when adding a new authority type
Katrin Fischer [Thu, 18 Aug 2022 20:33:42 +0000 (20:33 +0000)]
Bug 31398: Set focus on first input when adding a new authority type

When adding a new authority type the focus should be on the
first field of the input form: Authority type

* Add a new authority type from administration > authority types
* Verify the focus is not on any of the form fields/inputs
* Apply patch
* Add another new authority type
* Verify the focus/cursor is now in the Authority type field

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31399: Set focus on first input when adding a new classification source, filing...
Katrin Fischer [Thu, 18 Aug 2022 20:48:44 +0000 (20:48 +0000)]
Bug 31399: Set focus on first input when adding a new classification source, filing rule, or splitting rule

This makes sure the cursor/focus is always in the first form
field when adding an entry on the classification configuration page.

* Got to administration > classification sources
* Verify for each of the three "New ..." buttons on top that
  the entry form has no focus on any field
* Apply patch
* Repeat testing the new forms and the focus now should always
  be in the first input field of the entry form

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31400: Set focus on first input when adding a new matching rule
Katrin Fischer [Thu, 18 Aug 2022 20:56:02 +0000 (20:56 +0000)]
Bug 31400: Set focus on first input when adding a new matching rule

When adding a new matching rule the cursor/focus should be in
the first input field of the form: Matching rule code

* Add a new matching rule form administration > matching rules
* Verify the cursor is in the search form on top of the page
* Apply patch
* Add another new matching rule
* Verify the cursor is now in the first input field of the form

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31397: Set focus in first input when adding a new bibliographic framework
Katrin Fischer [Thu, 18 Aug 2022 20:24:57 +0000 (20:24 +0000)]
Bug 31397: Set focus in first input when adding a new bibliographic framework

When adding a new bibliographic framework, the focus/cursor should be
in the first input field of the form: Framework code

To test:
* Add a new bibliographic framework from adminsitration > bibliographic
  MARC frameworks
  - cursur is in no field
* Apply patch
* Add another new framework
  - cursor is now in the first input field of the form: Framework code

https://bugs.koha-community.org/show_bug.cgi?id=27191

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27802: Set cursor focus in first input when adding a cash register
Alex Buckley [Mon, 15 Aug 2022 11:01:39 +0000 (11:01 +0000)]
Bug 27802: Set cursor focus in first input when adding a cash register

Test plan:
1. Visit Administration > Accounting > Cash registers and notice the
cursor is not focussed in the first input field (Name)

2. Apply patch

3. Refresh the new cash registers page and confirm your cursor is
focussed in the first input field (name)

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: DBIC schema
Tomas Cohen Arazi [Wed, 7 Sep 2022 20:40:39 +0000 (13:40 -0700)]
Bug 31374: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: DBRev 22.06.00.039
Tomas Cohen Arazi [Wed, 7 Sep 2022 20:36:52 +0000 (13:36 -0700)]
Bug 31374: DBRev 22.06.00.039

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: (QA follow-up) Fix typo collumn in database update
Katrin Fischer [Sat, 27 Aug 2022 14:40:13 +0000 (14:40 +0000)]
Bug 31374: (QA follow-up) Fix typo collumn in database update

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: (follow-up) change private note to staff_note and reorder columns
Lucas Gass [Mon, 22 Aug 2022 22:21:22 +0000 (22:21 +0000)]
Bug 31374: (follow-up) change private note to staff_note and reorder columns

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: Update Suggestion.pm
Lucas Gass [Fri, 19 Aug 2022 16:18:44 +0000 (16:18 +0000)]
Bug 31374: Update Suggestion.pm

To test:
1. Apply patch and restart services
2. Go to Acquistions -> Suggestions -> New Purchase suggestion
3. Notice the new 'Non-public notes:' textarea
4. Make sure you 'Set a patron' so we can later look at the suggestion from the OPAC
5. Make a new suggestion and make sure you add some Non-public notes
6. Back on the 'Suggestions management' page you should see a new column for 'Non-public note'
7. Go to table settings and make sure you can properly hide the column
8. Change the status and make sure it shows up on the table with all statuses (pending, accepted, rejected, etc )
9. Check the API by going to (/api/v1/suggestions). Your suggestion should show up and 'privatenote' should include your non-public note.
10. Log in to the OPAC as the patron we set the suggestion to earlier. You should not see anything related to the non-public note displaying from the OPAC

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: Update API spec
Lucas Gass [Tue, 16 Aug 2022 20:55:54 +0000 (20:55 +0000)]
Bug 31374: Update API spec

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: Add privatenote column to table settings
Lucas Gass [Tue, 16 Aug 2022 20:51:20 +0000 (20:51 +0000)]
Bug 31374: Add privatenote column to table settings

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: Add non-public note to template
Lucas Gass [Tue, 16 Aug 2022 20:46:46 +0000 (20:46 +0000)]
Bug 31374: Add non-public note to template

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31374: Database/Schema update
Lucas Gass [Tue, 16 Aug 2022 20:40:24 +0000 (20:40 +0000)]
Bug 31374: Database/Schema update

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27081: Handle first column (checkboxes) in column settings for lost items report
Jonathan Druart [Wed, 10 Aug 2022 14:36:28 +0000 (16:36 +0200)]
Bug 27081: Handle first column (checkboxes) in column settings for lost items report

We are adding one column (the one with the checkboxes) at the beginning
of each row if it's possible to export the report to CSV.
However the column settings were not modified. We need to append one
object representing this column.

Test plan:
To test:
* Create a CSV profile of type SQL for exporting lost items
* Make sure you have some lost items
* Run Reports > Items lost
=> You can hide the notes (last column)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31404: (QA follow-up) Mostly whitespace fixes
Katrin Fischer [Wed, 7 Sep 2022 12:37:39 +0000 (12:37 +0000)]
Bug 31404: (QA follow-up) Mostly whitespace fixes

* Removed the leading space from the new entries as this could
  lead to another string to translate and they are not needed
* Removed some doubled up whitespaces from the <a> tags and
  a stray -
* Removed title from Article requests since it was the same text
  as the link itself, not adding information

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31404: Sync Circulation sidebar with Circulation home
Isobel Graham [Wed, 31 Aug 2022 15:09:43 +0000 (16:09 +0100)]
Bug 31404: Sync Circulation sidebar with Circulation home

This patch syncs the content of the circulation sidebar navigation with
the content of the circulation homepage

Test plan
1. Enable the `CircSidebar` system preference
2. Compare the sidebar navigation on circulation pages with the content
   of the circulation homepage.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31490: Terminology: change 'staff client' to 'staff interface' in marc-overlay...
Caroline Cyr La Rose [Tue, 30 Aug 2022 19:11:27 +0000 (15:11 -0400)]
Bug 31490: Terminology: change 'staff client' to 'staff interface' in marc-overlay-rule

This patch corrects the terminology for staff interface in the record overlay rules administration page.

To test:
1) Apply patch
2) Enable the MARCOverlayRules system preference
3) Go to Administration > Record overlay rules
4) Open the 'Filter' drop-down menu
=> The second option should read 'Staff interface MARC editor'

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31483: Close <ol> tag properly on password reset page
Lucas Gass [Wed, 31 Aug 2022 20:59:31 +0000 (20:59 +0000)]
Bug 31483: Close <ol> tag properly on password reset page

To test:
1) Enable EnableExpiredPasswordReset
2) Find a patron and change their password so you know what it is supposed to be
3) In the database, expire the patron's password, e.g.
UPDATE borrowers SET password_expiration_date = '2022-08-22' where borrowernumber = 21;
4) Go to the OPAC, try to log in with the patron's credentials
5) Click Reset your password
=> Note that the form is in the grey breadcrumbs box, you can compare with any other OPAC page, the grey box should only contain the breadcrumbs

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30042: Remove Date::Calc dependency in batch_anonymize.pl
Tomas Cohen Arazi [Tue, 8 Feb 2022 17:45:11 +0000 (14:45 -0300)]
Bug 30042: Remove Date::Calc dependency in batch_anonymize.pl

This patch makes the script use the Koha::DateUtils tools instead.

To test:
1. Run:
   $ kshell
  k$ perl misc/cronjobs/batch_anonymise.pl --verbose --days 7
=> SUCCESS: You see (the date may vary):
Checkouts and holds before 2022-02-15 will be anonymised.
2. Apply this patch
3. Repeat 1
=> SUCCESS: Same output
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28708: fr-CA localization file
Caroline Cyr La Rose [Tue, 16 Aug 2022 20:51:38 +0000 (16:51 -0400)]
Bug 28708: fr-CA localization file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29882: remove unrequired package definitions in list-deps script
Mason James [Fri, 14 Jan 2022 07:00:03 +0000 (20:00 +1300)]
Bug 29882: remove unrequired package definitions in list-deps script

to test...

- apply patch, rebuild new package

- install new koha-common pkg successfully

Signed-off-by: Magnus Enger <magnus@libriotech.no>
I did not build packages, just grep'ed the source to check that
these modules are no longer used. Please set back to "Needs
signoff" if this is not considered good enough.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31435: (QA follow-up) Don't pass explicitly default parameter values
Joonas Kylmälä [Wed, 7 Sep 2022 15:49:59 +0000 (18:49 +0300)]
Bug 31435: (QA follow-up) Don't pass explicitly default parameter values

For kohaTable these are the default values.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31435: (follow-up) Make kohaTable calls consistent
Martin Renvoize [Mon, 5 Sep 2022 12:59:57 +0000 (13:59 +0100)]
Bug 31435: (follow-up) Make kohaTable calls consistent

Our calls to instantiate a kohaTable from JS were inconsistent in how
they pass table_settings where no table_settings exist.

This patch replaces empty arrays and empty hashrefs with a consistent
'null' being passed to ake it clear we don't have any settings to pass
yet.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31435: Tie 'Configure' to table_settings
Martin Renvoize [Mon, 22 Aug 2022 07:15:34 +0000 (08:15 +0100)]
Bug 31435: Tie 'Configure' to table_settings

This patch adds a check for table_settings to prevent the display of
'Configure this table' when table settings are not passed to the
datatable wrapper.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Suggested test plan:
* Without patch:
* Go to Administration > SMTP servers
* Verify the configure button shows, but doesn't work
* Apply patch
* Reload the SMTP servers page
* The configure button will no longer show

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31364: Check length of the multiple syspref array instead whether it is null
Joonas Kylmälä [Sun, 4 Sep 2022 11:37:46 +0000 (14:37 +0300)]
Bug 31364: Check length of the multiple syspref array instead whether it is null

The multiple systempreferences are always defined as an empty array at
the minimum, so in order to determine whether we need to remove all
the selections from the systempreference we should check whether the
array is empty and not whether the array doesn't exist.

To test:
 1) Set at least 1 value for OPACHoldsIfAvailableAtPickupExceptions
 2) Remove all the values for OPACHoldsIfAvailableAtPickupExceptions
 and notice you get the message "Nothing to save"
 3) Apply patch and repeat, removing all the values should work now.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31488: Update Max checkout text
Isobel Graham [Thu, 1 Sep 2022 09:44:37 +0000 (10:44 +0100)]
Bug 31488: Update Max checkout text

This changes text from "you have checked out too many items" to
"You have reached the maximum limit of items checked out".

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31170: (QA follow-up) Fix capitalization in database update
Katrin Fischer [Wed, 7 Sep 2022 13:17:53 +0000 (13:17 +0000)]
Bug 31170: (QA follow-up) Fix capitalization in database update

As this has not been released yet, we can also fix the database
update to not introduce the wrong capitalization in the first
place.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31170: Decapatalized "Overdue Item Fine Description"
Isobel Graham [Thu, 1 Sep 2022 10:45:04 +0000 (11:45 +0100)]
Bug 31170: Decapatalized "Overdue Item Fine Description"

I changed "Overdue Item Fine Description" to "Overdue item fine
description" for both the name and title.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27272: Remove GetItemsInfo, GetItemsLocationInfo and GetHostItemsInfo
Jonathan Druart [Fri, 3 Jun 2022 06:39:39 +0000 (08:39 +0200)]
Bug 27272: Remove GetItemsInfo, GetItemsLocationInfo and GetHostItemsInfo

With the different bug reports we removed the calls for those 3
subroutines. We can remove them now.

Test plan:
git grep their names and you should not find any occurrences in the code
base

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30231: (bug 5927 follow-up) See (rejected) forms of series entry visible in searc...
Janusz Kaczmarek [Fri, 4 Mar 2022 21:47:11 +0000 (22:47 +0100)]
Bug 30231: (bug 5927 follow-up) See (rejected) forms of series entry visible in search result (OPAC and intra)

When using zebra with IncludeSeeFromInSearches on, with traced series, the rejected
forms (4XX) of series entries are visible in result lists, both in OPAC and intra
interfaces.

Test plan:
=========
1. Have a MARC 21 installation with zebra, and with IncludeSeeFromInSearches on.
   Have an authority records for series (130, or 100/110/111 with
   title) with rejected forms (4XX fields).  So the auth record should
   contain at least:

   130 _0 $a Series title
   430 _0 $a Some other title under which the series in known

   Use (each) authority record in at least two biblio records (in appropriate
   fields, i.e.  800/810/811/830 or even deprecated 440, if it makes use
   of UNIF_TITLE).
   Don't forget to properly input also 490 (for 8XX). So the biblio record
   shold contain at least:

   245 nn $a Work title.
   490 1_ $a Series title
   830 _0 $a Series entry $9 <koha_id>

   Reindex.
2. Perform a simple biblio search (in OPAC and in intra) with the title
   from auth record.
3. You shold get a list of results.  See the Series information--you
   shold see not only the accepted entry from 1XX in auth but also the
   rejected forms from 4XX.
4. Apply the patch.
5. Repeat 3. You shold see only the entry form of series now.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31356: Use hold expiration date instead of adding days to the waiting date
Nick Clemens [Fri, 12 Aug 2022 16:19:49 +0000 (16:19 +0000)]
Bug 31356: Use hold expiration date instead of adding days to the waiting date

The Talking Tech outbound script currently just adds the
ReservesMaxPickUpDelay to the waiting date to calculate the
"expiration date", but it should use the actual hold expiration
date which may differ from this naive calculation based on
various system preference values.

Test Plan:
1) Create a holiday for tomorrow
2) Set ReservesMaxPickUpDelay to 5
3) Set "Days mode" to "Same week day"
4) Enable ExcludeHolidaysFromMaxPickUpDelay
5) Enable TalkingTechItivaPhoneNotification
6) Create a hold and fill the hold so it is waiting
7) Enable "Hold filled" phone notices for that patron
8) Create a 'phone' version of the HOLD notice
9) Run ./misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type RESERVE -w 0
10) Note the output has the expiration date ( 15th colume ) 5 days from now which is *not* the hold's expiration date
11) Apply this patch
12) Repeat the command from step 9
13) Note the expiration date column now matches the holds actual expiration date!

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31428: 'Configure this table' -> 'Configure'
Martin Renvoize [Mon, 22 Aug 2022 07:18:46 +0000 (08:18 +0100)]
Bug 31428: 'Configure this table' -> 'Configure'

I agree, the shorter wording should be used.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31177: Fix misplaced import in C4::ILSDI::Services
Tomas Cohen Arazi [Mon, 18 Jul 2022 15:47:49 +0000 (12:47 -0300)]
Bug 31177: Fix misplaced import in C4::ILSDI::Services

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31499: Add libhttp-tiny-perl 0.076 dependency for ES7
Mason James [Wed, 31 Aug 2022 16:38:17 +0000 (04:38 +1200)]
Bug 31499: Add libhttp-tiny-perl 0.076 dependency for ES7

no testing info provided

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29697: (QA follow-up) Remove useless warning
Tomas Cohen Arazi [Wed, 31 Aug 2022 15:34:39 +0000 (12:34 -0300)]
Bug 29697: (QA follow-up) Remove useless warning

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29697: (QA follow-up) Make tests less fragile
Tomas Cohen Arazi [Wed, 31 Aug 2022 15:31:46 +0000 (12:31 -0300)]
Bug 29697: (QA follow-up) Make tests less fragile

This patch makes the tests less fragile to existing data. It does so by
making sure that when checking if the item would be hidden by
OpacHiddenItems and lost status, the item is not skipped, and thus the
notforloan value, as retrieved from the search engine is picked for the
notforloan_count calculation.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30335: Fix DBRev permissions
Tomas Cohen Arazi [Wed, 31 Aug 2022 13:18:23 +0000 (10:18 -0300)]
Bug 30335: Fix DBRev permissions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30016: Remove GetOpenIssue subroutine
Nick Clemens [Thu, 3 Feb 2022 13:14:33 +0000 (13:14 +0000)]
Bug 30016: Remove GetOpenIssue subroutine

This patch adjusts the code that uses GetOpenIssue to use/find a Koha::Checkout object
instead

To test:
1 - Add a course to course reserves
2 - Create an item with barcode TESTKOC
3 - Add the item to a course
4 - Checkout the item
5 - View course details on stff and opac and confirm item shows as checked out and due date displays
6 - prove t/db_dependent/Circulation/issue.t t/db_dependent/Circulation.t t/db_dependent/CourseReserves.t
7 - Browse to Circulation->Upload offline circulation
8 - Upload a file to return the item: https://wiki.koha-community.org/wiki/Koha_offline_circulation_file_format
9 - Confirm item is returned

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31315: (QA follow-up) Show itemtype description instead of database code
Joonas Kylmälä [Sun, 28 Aug 2022 15:26:28 +0000 (15:26 +0000)]
Bug 31315: (QA follow-up) Show itemtype description instead of database code

This restores the previous definition for itype that displayed the
description instead of itemtype.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31315: Remove GetHostItemsInfo and GetItemsInfo from moredetail
Jonathan Druart [Fri, 3 Jun 2022 06:16:20 +0000 (08:16 +0200)]
Bug 31315: Remove GetHostItemsInfo and GetItemsInfo from moredetail

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search.

Here we are going to deal with catalogue/moredetail

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Remove unused variable
Joonas Kylmälä [Sun, 28 Aug 2022 14:21:06 +0000 (14:21 +0000)]
Bug 30847: Remove unused variable

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Consolidate code to check if patron can place holds and exit if they cannot
Nick Clemens [Wed, 25 May 2022 14:58:36 +0000 (14:58 +0000)]
Bug 30847: Consolidate code to check if patron can place holds and exit if they cannot

This will save us fetching more info if we are denying the holds

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Don't get biblio/item info when placing holds
Nick Clemens [Wed, 25 May 2022 14:44:50 +0000 (14:44 +0000)]
Bug 30847: Don't get biblio/item info when placing holds

The only bit we get form the hash is the rank and title
We can simply fetch the biblio once to calculate
no need to fetch all the info as we don't display or use it

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Don't declare undef variable for assignment
Nick Clemens [Wed, 25 May 2022 14:34:55 +0000 (14:34 +0000)]
Bug 30847: Don't declare undef variable for assignment

New holds have found set to undef - we can do this directly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Avoid fetching biblio object
Nick Clemens [Wed, 25 May 2022 14:33:26 +0000 (14:33 +0000)]
Bug 30847: Avoid fetching biblio object

Here the items biblionumber is either equal to the biblionumber passed
in or it is not and should be - we can just assign directly from the
item in all cases

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Don't fetch patron twice
Nick Clemens [Wed, 25 May 2022 14:19:32 +0000 (14:19 +0000)]
Bug 30847: Don't fetch patron twice

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Remove unused OPACShowHoldQueueDetails
Nick Clemens [Wed, 25 May 2022 14:02:57 +0000 (14:02 +0000)]
Bug 30847: Remove unused OPACShowHoldQueueDetails

Search for the variables, they aren't used!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Remove unused noreserve parameter
Nick Clemens [Wed, 25 May 2022 14:00:16 +0000 (14:00 +0000)]
Bug 30847: Remove unused noreserve parameter

This is defined but never used

To test:
1 - git grep noreserve
2 - only one ocurrence
3 - Apply patch
4 - repeat, no ocurrence
5 - Note the plural has a few uses

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30847: Cleanup calculation of holds and rank
Nick Clemens [Wed, 25 May 2022 13:23:26 +0000 (13:23 +0000)]
Bug 30847: Cleanup calculation of holds and rank

Currently we loop over all the holds on the record to get a count of the reserves not
waiting and a rank for the upcoming hold

We can simply count the number of nont waiting holds and add 1

Note: Before this patch the count of holds included the new hold we were going to place
which meant rank and count were the same. I believe countaing existing holds and our
upcoming rank is the correct behavior

To test:
 1 - Set OPACShowHoldQueueDetails system preference to 'Show holds and their priorty level'
 2 - Place a few holds on a bib on the staff side
 3 - Mark 1 waiting
 4 - Attempt to place hold on the bib on the opac
 5 - Note 'Your priority' and 'Number of holds' are the same number
 6 - Place another hold, confirm both increase
 7 - Set another hold waiting, confirm both decrease
 8 - Apply patch
 9 - Confirm 'Your priority' is now 1 greater than Number of holds
10 - Place a hold, set a hold waiting, confirm numbers adjust as appropriate

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30262: Trim whitespace off tracklinks.pl URLs
David Cook [Thu, 10 Mar 2022 04:02:49 +0000 (04:02 +0000)]
Bug 30262: Trim whitespace off tracklinks.pl URLs

This patch trims whitespace off tracklinks.pl URLs so that
the URL is in the same format as the URLs returned by
C4::Biblio::GetMarcUrls, which is used by tracklinks.pl internally.

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29
2. Add a 856 with $u of 'https://koha-community.org ' (note the space at the end0
3. Save record
4. Change 'TrackClicks' syspref to 'Track'
5. Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29
6. Click on the online resource (eg
http://localhost:8080/cgi-bin/koha/tracklinks.pl?uri=https%3A%2F%2Fkoha-community.org%20&biblionumber=29
)
7. Note you are redirected to https://koha-community.org

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Added the link with a space at the end. Verified that without the
patch, clickin on "Click here to access online" gives a 404. After
applying the patch the redirect works as expected.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30335: DBRev 22.06.00.038
Tomas Cohen Arazi [Wed, 31 Aug 2022 11:44:14 +0000 (08:44 -0300)]
Bug 30335: DBRev 22.06.00.038

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30335: (follow-up) Ensure existing users remain permitted
Martin Renvoize [Fri, 15 Jul 2022 16:21:13 +0000 (17:21 +0100)]
Bug 30335: (follow-up) Ensure existing users remain permitted

This patch updates the database update to ensure users with the
'remaining_permissions' subpermission of 'updatecharges' continue to be
able to manually invoice and manually credit borrower accounts after the
patch is applied.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30335: (follow-up) Bind new permissions to pages and tabs
Martin Renvoize [Fri, 15 Jul 2022 16:05:51 +0000 (17:05 +0100)]
Bug 30335: (follow-up) Bind new permissions to pages and tabs

This patch binds the new permissions added in the previous patch to the
tab display on the borrower account page.

Test plan
1) Apply the previous patch and run the database update
2) Configure a user without the new permissions
3) Confirm the 'Create manual invoice' and 'Create manual credit' tabs
   no longer appear under the 'Accounting' area when logged in as the
   above user.
4) Confirm that you cannot manually navigate to /members/mancredit.pl or
   /members/maninvoice.pl when logged in as the above user.
5) Confirm that users with the above permissions are still able to see
   the tabs and take actions on them.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30335: (follow-up) Add permissions for manual accounts options
Martin Renvoize [Fri, 15 Jul 2022 15:54:03 +0000 (16:54 +0100)]
Bug 30335: (follow-up) Add permissions for manual accounts options

This patch adds two new sub-permissions, `manual_credit` and
`manual_invoice` to allow/prevent staff the ability to add manual
invoices and credits to a patrons account.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30335: Add classes to invoice/credit tabs on patron accouting pages
Lucas Gass [Tue, 22 Mar 2022 17:45:40 +0000 (17:45 +0000)]
Bug 30335: Add classes to invoice/credit tabs on patron accouting pages

To test:
1. Apply patch and go to the patron accounting page.
2. Notice the class names for each list element on the page.
3. You can use the following CSS to try hiding each of the tabs:

.transactions { display: none; }
.makepayment { display: none; }
.manualinvoice { display: none; }
.manualcredit { display: none; }

Signed-off-by: Rachael Laritz <rachael@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31489: Typo in EnableExpiredPasswordReset description
Caroline Cyr La Rose [Tue, 30 Aug 2022 16:10:37 +0000 (12:10 -0400)]
Bug 31489: Typo in EnableExpiredPasswordReset description

This patch corrects a typo in the EnableExpiredPasswordReset system preference description.

To test:
1) Apply patch
2) Go to Administration > Global system preferences
3) Search for EnableExpiredPasswordReset
4) Read the description and make sure there are no errors.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31379: Change results per page text for default
Fridolin Somers [Wed, 17 Aug 2022 06:09:32 +0000 (20:09 -1000)]
Bug 31379: Change results per page text for default

Since Bug 14715, one can change number of results per page.
The actual text in combobox for default value is : "Library default:
20"

This text is hard to translate correctly.
For example french translation use "site par défaut" wrongly meaning
"default library".

I propose to simply use "20 (defaut)".

Test plan :
1) Go to system preferences and set both 'numSearchResultsDropdown' and
   'OPACnumSearchResultsDropdown' to 'Show'
2) Do a catalogue search in the intranet using a search term that will
   bring lots of results
3) Look at restults per page combobox
4) Same for OPAC

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31473: Fix fragile test about bad OpacHiddenItems conf
Tomas Cohen Arazi [Fri, 26 Aug 2022 19:45:10 +0000 (16:45 -0300)]
Bug 31473: Fix fragile test about bad OpacHiddenItems conf

There's been a behavior change in recent MariaDB that made some cases
deal with truncated data in DOUBLE context instead of DECIMAL.

Probably this:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-27380

This made the affected test fail consistently on those versions.

This trick for checking OpacHiddenItems is correct (as introduced on bug
28125 doesn't really make use of the warning, just prints it in
about.pl) so one option was to just check for a warning.

I decided to keep the test, but add the optional DECIMAL|DOUBLE check on
the qr. This way other eventual changes will make it fail and serve as a
warning in case something more relevant changes.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: (QA follow-up) Reduce database queries
Kyle M Hall [Wed, 24 Aug 2022 17:10:18 +0000 (17:10 +0000)]
Bug 31112: (QA follow-up) Reduce database queries

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: (follow-up) Don't return "on_reserve" when there are 0 possible holds
Joonas Kylmälä [Mon, 22 Aug 2022 19:02:14 +0000 (19:02 +0000)]
Bug 31112: (follow-up) Don't return "on_reserve" when there are 0 possible holds

It's possible that there could be 0 possible reserves, for example
when the hold has already been filled, thus the check would fail as
the item count can never be less than 0.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: (follow-up) Bring back the check for non-priority holds
Joonas Kylmälä [Mon, 22 Aug 2022 19:02:03 +0000 (19:02 +0000)]
Bug 31112: (follow-up) Bring back the check for non-priority holds

Before the changes from bug 31112 when CheckReserves returned a
non-priority hold we didn't return "on_reserve" status but checked in
addition to that whether there are any priority holds and if there
were, only then we returned the "on_reserve" error.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: (QA follow-up) Fetch patrons with reserves
Nick Clemens [Fri, 19 Aug 2022 13:23:05 +0000 (13:23 +0000)]
Bug 31112: (QA follow-up) Fetch patrons with reserves

Previously we fetched all in a single call using biblionumbers

Fetching each individually could be a performance hit on systems
with large numbers of holds

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: (QA follow-up) Restore check to avoid extra processing
Nick Clemens [Fri, 19 Aug 2022 13:11:09 +0000 (13:11 +0000)]
Bug 31112: (QA follow-up) Restore check to avoid extra processing

We now count all holds for all patrons, we can still eject if we have more
holds than we do items

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: CanBookBeRenewed: take into account patrons with more than 1 hold to a...
Joonas Kylmälä [Mon, 18 Jul 2022 16:29:06 +0000 (16:29 +0000)]
Bug 31112: CanBookBeRenewed: take into account patrons with more than 1 hold to a biblio

If a single patron had more than 1 hold to a biblio and there was only one
available item we allowed incorrectly renewing the checkout when
AllowRenewalIfOtherItemsAvailable was set to "Allow". This
changes CanBookBeRenewed so that it makes sure all the holds are
filled and not just one per patron.

To test:
 1) prove t/db_dependent/Circulation.t
 2) (Optional, as unit test is provided)
    - Set AllowRenewalIfOtherItemsAvailable = Allow
    - Create biblio with three items
    - Checkout one item to patron A
    - Add two biblio-level holds for patron B
    - Try to renew patron A's checkout with and without this patch.
    - Notice that without this patch the renewal succeeds even though we
      one unfilled hold left. After applying the patch the renewal should
      fail.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: Remove unnecessary if-clause
Joonas Kylmälä [Mon, 18 Jul 2022 16:29:06 +0000 (16:29 +0000)]
Bug 31112: Remove unnecessary if-clause

To test:
 1) Please check manually that the logic stays the same, use git's -w command line parameter to
    ignore whitespace changes in the diff output.
 2) prove t/db_dependent/Circulation.t

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 20262: (QA follow-up) Update unit tests for changes to payin_amount
Kyle Hall [Mon, 13 Jun 2022 12:05:16 +0000 (08:05 -0400)]
Bug 20262: (QA follow-up) Update unit tests for changes to payin_amount

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 20262: (QA follow-up) Fix spelling errors
Kyle Hall [Mon, 13 Jun 2022 10:52:28 +0000 (06:52 -0400)]
Bug 20262: (QA follow-up) Fix spelling errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 20262: Add ability to refund lost item fees without creating credits
Stefan Berndtsson [Thu, 30 Sep 2021 13:11:59 +0000 (15:11 +0200)]
Bug 20262: Add ability to refund lost item fees without creating credits

Some libraries handle refunding of paid lost fees at a financial office and not within Koha. To facilitate this, it would be good for Koha to have the option to not generate lost returned credits by skipping fully paid lost items, and only refunding the outstanding balance on partially paid lost fees.

Test Plan:
1) Apply this patch
2) Set your lost item refund on return policies to 'Only if unpaid'
3) Mark an item lost, charging the lost fee
4) Return the item, a full refund should occur
5) Mark another item lost, charging the lost fee
6) Make a partial payment on this lost fee
7) Return the item
8) The remaining balance of that fee should be 0, but the patron should
   not recieve a credit for the already paid balance
8) Mark another item lost, charging the lost fee
9) Fully pay the lost fee
10) Return the item. The paid lost fee should be unaffected.
11) Run tests in t/db_dependent/Circulation.t

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 21366: Add --reload option to koha-plack help/manual
David Cook [Fri, 12 Aug 2022 02:13:10 +0000 (02:13 +0000)]
Bug 21366: Add --reload option to koha-plack help/manual

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 21366: Add koha-plack --reload to gracefully restart Plack/Starman
David Cook [Thu, 11 Aug 2022 05:26:36 +0000 (05:26 +0000)]
Bug 21366: Add koha-plack --reload to gracefully restart Plack/Starman

This patch adds a "--reload" option to koha-plack, which allows
a sysadmin to gracefully restart Koha.

This is very useful when installing Koha plugins or deploying a hot fix
where you need to change code but don't want to interrupt anyone's
usage of Koha.

0. Apply patch
1. cp /usr/sbin/koha-plack /usr/sbin/koha-plack.bak
2. cp debian/scripts/koha-plack /usr/sbin/koha-plack
3. ps -efww | grep "starman"
4. Now at roughly the same time do the following two actions:
    4a. Go to http://localhost:8081/cgi-bin/koha/about.pl
    4b. koha-plack --reload kohadev
5. Note that the web request completes successfully
6. ps -efww | grep "starman"
7. Note that the "starman master" process stays alive, but the "starman worker" processes have been restarted

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: (QA follow-up) Fix rebase issue
Tomas Cohen Arazi [Fri, 26 Aug 2022 18:48:27 +0000 (15:48 -0300)]
Bug 24295: (QA follow-up) Fix rebase issue

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Finally remove GetTransfers from C4/Circulation
Martin Renvoize [Mon, 19 Apr 2021 15:18:58 +0000 (16:18 +0100)]
Bug 24295: Finally remove GetTransfers from C4/Circulation

This patch handles the final removal of GetTransfers from
C4::Circulation.

Test plan
1/ Check that there is no mention of the GetTransfers method codebase
wide now
2/ Run the circulation and transfers tests and check nothing fails..
perhaps even run the full test suit in k-t-d
3/ Signoff

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from circ/transferstoreceive.pl
Martin Renvoize [Tue, 9 Nov 2021 11:40:56 +0000 (11:40 +0000)]
Bug 24295: Remove GetTransfers from circ/transferstoreceive.pl

Just drop the import of GetTransfers from circ/transferstoreceive.pl is
it's never actually used.

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from C4/Search.pm
Martin Renvoize [Mon, 19 Apr 2021 14:59:57 +0000 (15:59 +0100)]
Bug 24295: Remove GetTransfers from C4/Search.pm

This patch removes the final use of GetTransfers from C4::Search.

Test plan
1/ Perform a search that will include results for some items that have
transfers of various states assigned to them
2/ Check the results match expectations (before and after applying the
patch should look the same)
3/ Signoff

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers call from C4/HoldsQueue.pm
Martin Renvoize [Tue, 16 Mar 2021 10:12:39 +0000 (10:12 +0000)]
Bug 24295: Remove GetTransfers call from C4/HoldsQueue.pm

This patch removes the GetTransfers call from
GetItemsAvailableToFillHoldRequestsForBib instead replacing it with an
inline JOIN in the initial query.

Test plan
1/ Run the holds queue
2/ Check the results
3/ Put one of the items in the holds queue into transit
4/ Run the holds queue again
5/ Check that the results do not contain the item that is in transit
6/ Apply the patch
7/ Run the holds queue again
8/ Check that the results still do not contain the item that is in
transit

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Replace mock in t/db_dependent/Circulation/transferbook.t
Martin Renvoize [Mon, 15 Mar 2021 16:41:41 +0000 (16:41 +0000)]
Bug 24295: Replace mock in t/db_dependent/Circulation/transferbook.t

Replace the call to GetTransfers with the get_transfer method in
Koha::Item in transferbook.t

Test plan
1/ Run t/db_dependent/Circulation/transferbook.t
2/ Confirm it passes
3/ Apply patch
4/ Repeat steps 1-2

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Replace mock in t/db_dependent/Search.t
Martin Renvoize [Tue, 9 Nov 2021 11:38:06 +0000 (11:38 +0000)]
Bug 24295: Replace mock in t/db_dependent/Search.t

Replace the mock of GetTransfers in this test with a mock of transfers
data

Test plan
1/ Run t/db_dependent/Search.t
2/ Confirm it passes
3/ Apply patch
4/ Repeat steps 1-2

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from svc/holds
Martin Renvoize [Mon, 15 Mar 2021 16:24:03 +0000 (16:24 +0000)]
Bug 24295: Remove GetTransfers from svc/holds

This patch replaces the call to C4::GetTransfers in svc/holds with a
call to the get_transfer method in the Koha::Item object.

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from detail.pl
Martin Renvoize [Mon, 15 Mar 2021 16:18:36 +0000 (16:18 +0000)]
Bug 24295: Remove GetTransfers from detail.pl

This patch replaces the call to GetTransfers in detail.pl with the
get_transfer method available from the Koha::Item object

Test plan
1/ Trigger the transfer of the item
2/ Check the detail page for the display of the current transfer
   status
3/ Apply patch
4/ Repeat step 2

JK: Remove unneeded string formatting for transfertwhen as it's done
    on the template toolkit side already with $KohaDates

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from request.pl
Martin Renvoize [Mon, 15 Mar 2021 16:15:22 +0000 (16:15 +0000)]
Bug 24295: Remove GetTransfers from request.pl

This patch replaces the call to GetTransfers in reserve.pl with the
get_transfer method available from the Koha::Item object

Test plan
1/ Place a reserve on an item at a different branch
2/ Trigger the transfer of the item
3/ Check the reserves page for the display of the current transfer
   status
4/ Apply patch
5/ Repeat step 3

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from opac-basket.pl
Martin Renvoize [Mon, 15 Mar 2021 16:09:42 +0000 (16:09 +0000)]
Bug 24295: Remove GetTransfers from opac-basket.pl

This patch replaces the call to GetTransfers in opac-basket with the
get_transfer method available from the Koha::Item object

Test plan
1/ Trigger the transfer of the item
2/ Check the opac-basket page for the display of the current transfer
   status
3/ Apply patch
4/ Repeat step 2

JK: Remove unneeded string formatting for transfertwhen as it's done
    on the template toolkit side already with $KohaDates. Add missing
    Koha::Items module import.

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from opac-reserve.pl
Martin Renvoize [Mon, 15 Mar 2021 15:56:20 +0000 (15:56 +0000)]
Bug 24295: Remove GetTransfers from opac-reserve.pl

This patch replaces the call to GetTransfers in opac-reserve with the
get_transfer method available from the Koha::Item object

Test plan
1/ Place a reserve on an item at a different branch
2/ Trigger the transfer of the item
3/ Check the opac-reserves page for the display of the current transfer
status
4/ Apply patch
5/ Repeat step 3

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfer from Z3950Responder
Martin Renvoize [Mon, 15 Mar 2021 15:42:49 +0000 (15:42 +0000)]
Bug 24295: Remove GetTransfer from Z3950Responder

Replace the GetTrasfer call in Z3950Responder/Session.pm with a call to
the Koha::Item method 'get_transfer'.

Test plan
1/ Configure your system to use the Z3950 responder
2/ Trigger an item transfer for an item
3/ Search for the item via Z3950 and varify the transfer status is set
4/ Apply the patch
5/ Repeat step 3

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31033: Explicitly define max child processes for SIP server
David Cook [Fri, 24 Jun 2022 01:42:52 +0000 (01:42 +0000)]
Bug 31033: Explicitly define max child processes for SIP server

By default, the SIP server appears to only use 1 child process for
responding to SIP connections.

This change makes this explicit in the configuration, which should
make it so that people who need more than 1 simultaneous SIP connection
can know to just increase the value for the "max_servers" parameter
in the SIPconfig.xml file.

Test plan:
1. Add "max_servers='1'" to your SIP configuration file
2. koha-sip --restart kohadev
3. Open 3 terminals
4. Run "telnet localhost 6001" on 2 terminals
5. On the 3rd terminal, run the following:
ss -l -n -t
ps -efww | grep "sip"
6. Note that there are 2 processes called
kohadev-koha-sip: perl /kohadevbox/koha/C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml
One of these processes is the parent of the other
7. The Recv-Q in the "ss" output should show 1
(This means that 1 of your telnet connections is in the server's TCP backlog)
8. Celebrate as the configuration works as expected

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: DBRev 22.06.00.037
Tomas Cohen Arazi [Thu, 25 Aug 2022 11:49:26 +0000 (08:49 -0300)]
Bug 23681: DBRev 22.06.00.037

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Compiled CSS
Tomas Cohen Arazi [Thu, 25 Aug 2022 11:43:50 +0000 (08:43 -0300)]
Bug 23681: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Move to ::Patron::Restriction::Type(s)
Martin Renvoize [Mon, 22 Aug 2022 17:09:27 +0000 (18:09 +0100)]
Bug 23681: Move to ::Patron::Restriction::Type(s)

This patch moves the new classes under ::Patron::Restriction:: and
enhances the Unit tests for those classes.

NOTE: We should drop keyed_on_code as part of bug 31095
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) New schema files
Tomas Cohen Arazi [Fri, 19 Aug 2022 17:59:49 +0000 (14:59 -0300)]
Bug 23681: (QA follow-up) New schema files

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) debarment_types => restriction_types
Tomas Cohen Arazi [Fri, 19 Aug 2022 15:42:21 +0000 (12:42 -0300)]
Bug 23681: (QA follow-up) debarment_types => restriction_types

The code moved from *debarments* to *restrictions* but the table didn't.
This patch just renames things accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Fix memberentry page display
Martin Renvoize [Mon, 4 Jul 2022 14:13:35 +0000 (15:13 +0100)]
Bug 23681: (QA follow-up) Fix memberentry page display

We were missing some changes to the restriction types dropdown handling
in the memberentry template.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Remove spacing and add question mark
Martin Renvoize [Mon, 4 Jul 2022 11:20:37 +0000 (12:20 +0100)]
Bug 23681: (QA follow-up) Remove spacing and add question mark

This patch removes the superflous whitespace around the restriction
descriptions and also adds the missing question mark into the delete
question.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Add patron restrictions to admin menu
Martin Renvoize [Mon, 4 Jul 2022 11:12:47 +0000 (12:12 +0100)]
Bug 23681: (QA follow-up) Add patron restrictions to admin menu

This patch adds the patron restrictions page to the admin menu that
appears to the left on all administration pages.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (follow-up) Mark fields at booleans
Martin Renvoize [Fri, 6 May 2022 07:21:35 +0000 (08:21 +0100)]
Bug 23681: (follow-up) Mark fields at booleans

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Proper handling of default option
Martin Renvoize [Wed, 4 May 2022 11:36:17 +0000 (12:36 +0100)]
Bug 23681: (QA follow-up) Proper handling of default option

This patch removes the 'can_be_added_manually' flag. Only non-system
restriction types can be added manually, so we exclude is_system instead
of having two flags. (And we set the 'Manual' that's added at install
time to default but not system).

We then add proper handling for setting the default manual restriction
type in the management page and set the dropdown list to use that value
by default.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Merge update files
Martin Renvoize [Wed, 4 May 2022 09:48:58 +0000 (10:48 +0100)]
Bug 23681: (QA follow-up) Merge update files

This patch merges the three atomic update files into one and also
adds a check for foreing key existance to make the update idempotent.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>