Commit graph

51062 commits

Author SHA1 Message Date
Emily Lamancusa
d9463f82c4
Bug 34881: Improve idempotency of DBRev
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:25:52 -03:00
531bbbcaa5
Bug 35041: Fix Patron.t for a filter_by_last_update test
Since filter with from now tests stricter, we should be a bit
more accurate with setting our test datetime.

Test plan:
Run t/db_dependent/Koha/Patron.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:25:51 -03:00
Julian Maurice
1a2288052d
Bug 27249: Replace DateTime->now by dt_from_string
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:34 -03:00
Julian Maurice
9e2a258f6f
Bug 27249: Add missing POD for Koha::Exceptions::Calendar
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:33 -03:00
Julian Maurice
4b4028d783
Bug 27249: Fix code style
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:32 -03:00
Julian Maurice
4eec4020fa
Bug 27249: Catch NoOpenDays exception while checking out an item
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>
2023-10-17 14:45:32 -03:00
Julian Maurice
2b58f4d89c
Bug 27249: Prevent infinite loop when searching for an open day
Calendars can be configured in a way that all days are closed.
The simplest way to do that is to configure a repeatable holiday for
every day of the week.
With such calendars, searching for an open day will literally take
forever.

This patch sets a hard limit on how many iterations are allowed before
giving up. This limit is set to the arbitrary value of 5000, which
should be large enough to be able to consider there is no open days if
we haven't found any with that many iterations, and small enough to
allow the loop to end quickly

Test plan:
1. Set system preference 'useDaysMode' to 'Use the calendar to push the
   due date to the next open day' ('Datedue'). Make sure the existing
   circulation rules do not conflict with that setting.
2. Browse to Tools » Calendar
3. Set every day of the week to "Holiday repeated every same day of the
   week"
4. Issue an item to a patron
5. Check the box and select 'Renew selected items'
6. The renewal should fail pretty quickly

Signed-off-by: Sam Lau <samalau@gmail.com>
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>
2023-10-17 14:45:31 -03:00
ebc7f49254
Bug 35037: (follow-up) Minor adjustments to margins and padding
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:31 -03:00
4ac7c8bc06
Bug 35037: Revise the appearance of the last patron button
Following Bug 21246 I find the button to be too obtrusive. This patch
makes CSS changes to the style of the "Last patron" button shown in the
staff interface when the "showLastPatron" system preference is enabled.

To test, apply the patch and rebuild the staff interface CSS.

- Enable the showLastPatron system preference if necessary.
- Go to Circulation in the staff interface and check out to a patron.
- A "Last patron" button should appear on the right-hand end of the
  breadcrumbs bar.
- Check that the link, dropdown button, and dropdown menu look good.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:30 -03:00
d10ce467f5
Bug 34401: Fix inconsistencies in Item search fields page titles, breadcrumbs, and headers
This patch fixes some inconsistencies in the item search fields
administration page, making sure the page title, breadcrumb navigation,
and page headers are consistent with each other.

The patch makes some changes to the way new item search fields are added
in order to keep the display consistent with other similar interfaces:
The "add" form is no longer shown dynamically from the page listing item
search fields. Clicking the "New search field" toolbar button will now
take you to the same template used for editing existing search fields.
This allows us to put the correct context into page title, breadcrumbs,
and headings.

To test, apply the patch and go to Administration -> Item search fields.
Test the process of adding a new search field and editing an existing
search field.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:29 -03:00
David Nind
40b8180ff9
Bug 34966: Terminology - fix add item form (& to and)
This patch updates the add item form in the staff interface to
change the 'Add & duplicate' button to 'Add and duplicate'.

In our terminology guide, & should only be used when
it is part of a proper noun or a common abbreviation:
https://wiki.koha-community.org/wiki/Terminology

Test plan:
1. In the staff interface, search for and select a record.
2. Select New > New item.
3. Note that "Add & duplicate" is one of the action buttons at the
bottom of the add item form.
4. Apply the patch.
5. Refresh the page.
6. Note that the action button is now labelled 'Add and duplicate'.
7. Sign off! 8-)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi>
Signed-off-by: Reetta Pihlaja <reetta.pihlaja@siilinjarvi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:29 -03:00
Aleisha Amohia
2a7be7d6c8
Bug 34800: Adding openhub links for Koha contributors
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:28 -03:00
6a22310dd4
Bug 34395: Fix inconsistencies in Authority types page titles, breadcrumbs, and header
This patch fixes some inconsistencies in the authority
types administration page, making sure the page title, breadcrumb
navigation, and page headers are consistent with each other.

Test each page to confirm that page title, heading, and breadcrumbs are
consistent:

- Administration -> Authority types
  - New authority type
  - Edit authority type
  - Delete an authority type which is not used
  - Delete an authority type which is in use
  - Authority type MARC structure
    - New tag
    - Edit tag
    - Delete tag
    - View subfields
    - Edit subfields

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:27 -03:00
094441d3f6
Bug 34399: Fix inconsistencies in Record overlay rules page titles, breadcrumbs, and headers
This patch fixes some inconsistencies in the record overlay rules
page, making sure the page title, breadcrumb navigation, and page
headers are consistent with each other.

Test the record matching rules page to confirm that page title, heading,
and breadcrumbs are consistent.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:27 -03:00
eedd3223bc
Bug 34405: Fix inconsistencies in EDI accounts/Library EAN page titles, breadcrumbs, and headers
This patch fixes some inconsistencies in templates for EDI accounts
and Library EANs, making sure the page title, breadcrumb navigation, and
page headers are consistent with each other.

To test, apply the patch and check these views:

- Administration -> EDI accounts
  - New EDI account
  - Edit EDI account
  - Confirm deletion of EDI account
- Administration -> Library EANs
  - New library EAN
  - Edit library EAN
  - Confirm deletion of EDI account
    - With an account for a specific library
    - With an account for any library

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:26 -03:00
d19cfb44ae
Bug 30719: DBRev 23.06.00.036
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:26 -03:00
56419590cb
Bug 30719: Rename batch for ill_batch in Koha::Illrequest
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:25 -03:00
e6de47e9ec
Bug 30719: Remove unused Koha::Illbatch->requests_count method
This patch removes this stray method from the original implementation.

To test:
1. Apply this patch
2. Run:
   $ git grep requests_count
=> SUCCESS: Notice the only ILL-related mantions are API related, which
is returned by using the 'requests+count' embed, which is unrelated to
this particular method
3. Run:
   $ prove t/db_dependent/api/v1/ill_batches.t \
     t/db_dependent/Illbatches.t
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:24 -03:00
f51f1265a1
Bug 30719: Remove unused (and wrong) key in Koha::Illrequest->strings_map()
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:24 -03:00
e21c19e170
Bug 30719: (QA follow-up) Updating remaining naming
Update statuscode -> status_code on the js files
Update remaining batch_id -> ill_batch_id
Update batch object in Illrequest.pm strings_map

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:23 -03:00
a71140fe60
Bug 30719: (QA follow-up) Pick better column names and cleanup
This patch takes on normalizing the attribute names, embeds, and also
makes the whole API more kosher, in terms of using accessors for related
objects, using the standard structure for strings_map, etc.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:23 -03:00
2102e948a8
Bug 30719: (QA follow-up) Rename illbatchstatuses
illbatchstatuses endpoint is now ill/batchstatuses

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:22 -03:00
833a808cdf
Bug 30719: (QA follow-up) Rewrite remaining ill batches endpoints
get, add and update rewrite

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:21 -03:00
3801c65bee
Bug 30719: (QA follow-up) Rewrite Illbatches list endpoint
Update accessors
Add +strings embed
Add x-koha-embed to batches list andpoint
Add embed to API call from the front-end
Update table to get data from _strings
Add x-koha-embed to tests
Add strings_map to Illbatch
Add to_api_mapping to Illbatch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:21 -03:00
edb048de78
Bug 30719: (QA follow-up) Rename illbatches endpoint to ill/batches
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:20 -03:00
17499fbf06
Bug 30719: Atomic update fixes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:19 -03:00
9e57d4abaa
Bug 30719: (QA follow-up) Fix "Request Status" capitalization
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:19 -03:00
33ab6fc91c
Bug 30719: (QA follow-up) c->validation fixes
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:18 -03:00
fc83fb3ebb
Bug 30719: (QA follow-up) Squash:
This is a squash of 25 QA patches located at:
    https://github.com/PTFS-Europe/koha/commits/new_30719

Bug 30719: (QA follow-up) Batch column should be hidden by default
Bug 30719: (QA follow-up) Fix wrong tt filter type
Bug 30719: (QA follow-up) Make atomicupdate idempotent
Bug 30719: (QA follow-up) Use COMMENT syntax in database files
Bug 30719: (QA follow-up) Fix tiny boolean is_system
Bug 30719: (QA follow-up) Add missing CONSTRAINT entries from kohastructure.sql to the atomicupdate file
Bug 30719: (QA follow-up) Add missing koha_object_class and
koha_objects_class methods
Bug 30719: (QA follow-up) Swap search to find
Bug 30719: (QA follow-up) Fix tests
Bug 30719: (QA follow-up) API terminology - id -> batch_id
Bug 30719: (QA follow-up) API terminology - borrowernumber -> patron_id
Bug 30719: (QA follow-up) API terminology - branchcode -> library_id
Bug 30719: (QA follow-up) Make mandatory illbatch_statuses translatable
Bug 30719: (QA follow-up) Improve translatability
Bug 30719: (QA follow-up) Fix capitalization of Interlibrary Loan
Bug 30719: (QA follow-up) Change Branch to Library in ILL batches table
Bug 30719: (QA follow-up) Add template WRAPPER to batch statuses breadrcrumbs
Bug 30719: (QA follow-up) Utilize patron_to_html function to display patron info in batches table
Bug 30719: (QA follow-up) Add mandatory batch statuses to the atomicupdate
Bug 30719: (QA follow-up) Add page-section to the batch statuses list page
Bug 30719: (QA follow-up) Style Save button on batch status edit page
Bug 30719: (QA follow-up) Add question mark to label string, rephrase new ILL batch button
Bug 30719: (QA follow-up) Add noExport class to action columns in batch list table and batch modal table
Bug 30719: (QA follow-up) Add page-section and headers to ILL batch table
Bug 30719: (QA follow-up) Perltidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:18 -03:00
45d369aa81
Bug 30719: DBIC schema
Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:17 -03:00
4a694c4fb5
Bug 30719: Tests
Co-authored-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:16 -03:00
36680ea6c0
Bug 30719: ILL Batch Statuses
- UI adding support for batch statuses in batch UI
- Admin UI for managing batch statuses
- API specs

Co-authored-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:16 -03:00
a5dbafec5b
Bug 30719: ILL Batches
- Add batch column to requests table
- Establish if there are any availability or metadata enrichment plugins and pass that to the template
- Verify if we have any backend that can support batches, if not, don't show the option
- Updates to the ILL toolbar
- New ILL batch modal
- New Koha classes
- API specs

Co-authored-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:15 -03:00
5bf5860370
Bug 30719: DB and API
- Adds 'batch' accessor to Illrequest object
- New illbatches and illbatch_statuses tables
- New foreign key 'batch_id' in illrequests table
- Atomic update file
- Default illbatch_statuses
- Add 'add' ill_requests api method
- Add POST method in ill_requests path
- Add 'batch_id property to ill_request api definition
- Updated swagger.yml with new batches and batchstatuses endpoints

Co-authored-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:15 -03:00
1cabc0ed67
Bug 26314: (QA follow-up) Improve POD and fix links for UseControlNumber off
When UseControlNumber is off, we previously did a search on the title index,
but this was not actually correct. It might work when we have a dependent
title and the title also appears on 245$p, but there is a better way:

The title of the set record will be found in:
* 773$3 for a dependent title
* 800/810/811/830 for an independent title

The search indices to use are host-item and title-series.

As we are not only looking for 773, POD was adjusted to reflect that.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:14 -03:00
a210aa9f63
Bug 26314: (QA follow-up) Resolve new QA script failures
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:13 -03:00
f14f56a8f4
Bug 26314: Update for changes to bug 11175 methodology
This moves the show_volumes calculation back out of C4::XSLT into the
controller scripts and refined the search query builder slightly based
on the XSLT equivilent.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:13 -03:00
80a775d5f9
Bug 26314: (follow-up) Make title search explicit
This patch updates the get_volumes_query search returned when
UseControlNumber is disabled such that it matches the query produced by
XSLT sheets by replacing the ->title accessor with the more specific
->subfield('245', "a") accessor to just take subfield `a` into account.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:12 -03:00
6e49a8be26
Bug 26314: (follow-up) Use clean_search_term
This patch uses the now public clean_search_term from bug 28316 to
sanitize the title string and prevent crashes in elastic search when
title contain reserved characters.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:11 -03:00
cd0a374b93
Bug 26314: Only display volumes link when required
This patch makes C4::XSLT query for volumes the same way it would do
with the generated link (i.e. based on UseControlNumber) and passes
a flag to the XSLT so it displays (or not) the 'Show volumes' link.

To test:
1. Apply the first patch
2. Have a known record without volumes
3. Open the record in the OPAC
=> FAIL: It shows the 'Show volumes' link
4. Have a record known to have volumes
5. Open the record in the OPAC
=> SUCCESS: It shows the 'Show volumes' link
6. Apply this patch and restart_all
7. Reload the above records
=> SUCCESS: It shows the link where it has to, and hides it where it
   shouldn't be displayed.
8. Repeat for Intranet
9. Sign off :-D

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:11 -03:00
f27ed123be
Bug 16223: DBRev 23.06.00.035
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:12 -03:00
d4da5419dc
Bug 16223: Tidy
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:12 -03:00
693b52f5aa
Bug 16223: Mark lift_after_payment as boolean in schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:11 -03:00
bc94bf81ad
Bug 16223: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:10 -03:00
b12f3515d8
Bug 16223: (QA follow-up) Adjust DB changes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:10 -03:00
ad29aae5c3
Bug 16223: (QA follow-up) Add filter, remove superfluous condition
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:09 -03:00
Emmi Takkinen
8d2bb62d3c
Bug 16223: Require fee limit only if "Lift after payment" is set as "Yes"
Fee limit should only be required if restriction is
meant to be lifted after payment. This patch makes
"Fee limit" input field required based on value of
"Lift after payment" select field.

To test:
1. Create a new restriction.
2. "Lift after payment" should be set as "No".
3. Change value as "Yes".
=> "Fee limit" should now have "Required" text
after input field.
4. Try to save restriction.
=> Text "This field is required" should be
displayed after "Fee limit".
5. Change "Lift after payment" back to "No".
=> Both texts should now be lifted.

Also test with existing restriction and make sure
restrictions are still saved without problems.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:08 -03:00
c04e297f39
Bug 16223: (QA follow-up) Move trigger to apply
This patch moves the del_restrictions_after_payment from before the
actual credit application call inside Koha::Account::pay to after the
application of credits to debits in Koha::Account::Line::apply.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:08 -03:00
cba9824e6d
Bug 16223: (QA follow-up) Remove GetDebarments
We remove the GetDebarments routine in 31095.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:07 -03:00
Emmi Takkinen
335f68eb51
Bug 16223: Add ability to define liftable restrictions
Some libraries debar Patrons at the end of the year for having unpaid fines,
like in Bug 15157. Currently librarians have to manually remove this type of
debarments after Patron has paid his/her fines.

This patch adds ability to create restrictions which are lifted after
patron pays ceratain amount of fines.

To test:
1. Apply this patch.
2. Restart your services if needed.
3. Navigate to page restrictions.pl.
=> Note that table has two new colums in it, "Lift after payment?" and "Fee limit".
4. Add new restriction which has "Lift after payment?" set
as Yes and fee limit as 5.
5. Create fees for a patron so they exceed fee limit e.g. 10
6. Add restriction made in step 2. for the patron
7. Pay patrons fees partially so that they go under fee limit
=> Note that patrons restriction should now be lifted.

Also prove t/db_dependent/Patron/Borrower_Debarments.t.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:06 -03:00