]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 19618: (RM follow-up) Add missing use statements
Martin Renvoize [Tue, 1 Oct 2019 10:45:13 +0000 (11:45 +0100)]
Bug 19618: (RM follow-up) Add missing use statements

The compile test was failing, this patch corrects for some missing use
statements and updates the dbic classes to include the type mappings

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: DBRev 19.06.00.030
Martin Renvoize [Tue, 1 Oct 2019 07:12:28 +0000 (08:12 +0100)]
Bug 19618: DBRev 19.06.00.030

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: (QA follow-up) POD Fix
Martin Renvoize [Thu, 12 Sep 2019 15:55:17 +0000 (16:55 +0100)]
Bug 19618: (QA follow-up) POD Fix

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: Add tests
Agustin Moyano [Thu, 5 Sep 2019 19:08:14 +0000 (16:08 -0300)]
Bug 19618: Add tests

This patch adds tests for new features

To test:
1) prove t/db_dependent/Koha/Club/Enrollment.t
2) prove t/db_dependent/Koha/Club/Hold.t
3) prove t/db_dependent/api/v1/clubs_holds.t
4) Sign off

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: Add api endpoint for club holds
Agustin Moyano [Tue, 10 Sep 2019 06:20:38 +0000 (03:20 -0300)]
Bug 19618: Add api endpoint for club holds

This patch adds an endpoint in thi api in /api/v1/clubs/{club_id}/holds whith the verb POST that maps to Koha::REST::V1::Clubs::Holds#add controller.
Classes for club_holds and club_holds_to_patron_holds new tables where also added.

To test:
1) Reach SUCCESS.3 test point of previous patch with club that has no enrollments
2) Click on "Place Hold"
SUCCESS => an alert should appear that you cannot place hold on a club without patrons
3) Reach SUCCESS.3 test point of previous patch with club that has enrollments
4) Click on "Place Hold"
SUCCESS => holds priority list should appear with holds for every patron in club
5) Repeat steps 3 and 4.
SUCCESS => new holds should appear in different order
6) Sign off

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: Add ability to place holds for members of a club in intranet
Agustin Moyano [Thu, 5 Sep 2019 17:13:27 +0000 (14:13 -0300)]
Bug 19618: Add ability to place holds for members of a club in intranet

This patch adds the ability to place a hold for each member of a club in random order.

To test:
1) apply this patch
2) create 2 clubs, (club names should have some part in common, and some part different for each other)
3) in one of them add at least 6 members
4) enter patron clubs management and click on "Actions" button
SUCCESS.1 => club with members has a new action called "search to hold"
5) click on search to hold
SUCCESS.2 => in the list of bilios there appears an action called "Place hold for <club name>"
6) click on "Place hold for <club name>"
SUCCESS.3 => a new window appears where you can select pickup location (defaults to club's library, if any), and the list of members.
7) go back to the list of bilios in the catalog and click on "Forget <club name>"
8) click on "Holds" action of any biblio
SUCCESS.4 => a search box appears with two tabs: Patrons and Clubs
9) click on Clubs tab and search by the common part of clubs names
SUCCESS.5 => a list of clubs that matches the search appears. If you click on any of them, the same page as SUCCESS.3 appears.
10) go back to the search box in SUCCESS.4 and search by the different part of the name.
SUCCESS.6 => because there is only one club that matches search criteria, the same page as SUCCESS.3 appears;
11) Sign off

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: Add club_holds and club_holds_to_patron_holds tables
Agustin Moyano [Thu, 5 Sep 2019 17:13:36 +0000 (14:13 -0300)]
Bug 19618: Add club_holds and club_holds_to_patron_holds tables

This patch adds 2 new tables
1. club_holds
2. club_holds_to_patron_holds

They are ment to keep info about hold requests made in name of a club

To test:
1) apply this patch
2) perl installer/data/mysql/updatedatabase.pl
SUCCESS => 2 new tables were created

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23648: The logged in link (class "loggedinusername") needs data-patroncategory
Owen Leonard [Wed, 25 Sep 2019 11:58:38 +0000 (11:58 +0000)]
Bug 23648: The logged in link (class "loggedinusername") needs data-patroncategory

This patch adds a "data-categorycode" attribte to the logged in link in
the global header of the OPAC. This will allow access to the patron
category for use in customization and whatnot.

To test, apply the patch and log in to the OPAC. Use the browser's DOM
inspector tool to examine the logged-in user's name in the header. It
should have a "data-categorycode" attribute with the correct value.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23447: Fix capitalization and other minor edits on patron batch edit template
Katrin Fischer [Sat, 10 Aug 2019 19:55:52 +0000 (21:55 +0200)]
Bug 23447: Fix capitalization and other minor edits on patron batch edit template

Just some small fixes:

- Category => Patron category (more specific for translation)
- Attribute => Patron attribute
- Opac Note => OPAC note
- Add missing colons (:) after some of the labels

To test:
- Find an existing cardnumber
- Go to Tools > Patron batch modification
- Use cardnumber in input field and continue
- Verify strings show as noted above
- Apply patch
- Repeat and verify strings have changed, everything still works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23689: (follow-up) Use Library limitations to match other occurrences
Katrin Fischer [Mon, 30 Sep 2019 12:59:20 +0000 (14:59 +0200)]
Bug 23689: (follow-up) Use Library limitations to match other occurrences

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23689: Fix terminology for branches limitations on authorized values
Martin Renvoize [Fri, 27 Sep 2019 13:41:51 +0000 (14:41 +0100)]
Bug 23689: Fix terminology for branches limitations on authorized values

This patch corrects the terminology and also updates the tooltip to use
the current bootstrap tooltip library.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23688: System preference uppercasesurnames broken by typo
Kyle M Hall [Fri, 27 Sep 2019 11:23:28 +0000 (07:23 -0400)]
Bug 23688: System preference uppercasesurnames broken by typo

In the process of moving this feature from memberentry.pl to Patron.pm, the 's' on uppercasesurnames was dropped, breaking the feature.

Test Plan:
1) Test uppercasesurnames, note it does not work
2) Apply this patch
3) Test uppercasesurnames, note it works now!

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t
Fridolin Somers [Thu, 26 Sep 2019 07:08:40 +0000 (09:08 +0200)]
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t

I've choosen to add it to db_dependent because we may add other tests
to cover transferbook() cases that will change DB

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23679: fix software error when trying to transfer an unknown barcode
Fridolin Somers [Thu, 26 Sep 2019 07:09:15 +0000 (09:09 +0200)]
Bug 23679: fix software error when trying to transfer an unknown barcode

When trying to transfer an unknown barcode in
/cgi-bin/koha/circ/branchtransfers.pl you get the error :

Can't call method "itemnumber" on an undefined value at
/home/koha/src/C4/Circulation.pm line 319.

This comes from C4::Circulation::transferbook which should stop when
finding unknown barcode.

Test plan :
1) Go to /cgi-bin/koha/circ/branchtransfers.pl
2) Enter a barcode not existing in database
3) Without patch you get a software error, with patch you get a message
   saying 'No Item with barcode'
4) Enter a barcode existing in database and check transfer is OK

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22804: OPAC Overdrive JavaScript contains untranslatable strings
Owen Leonard [Thu, 2 May 2019 16:26:55 +0000 (16:26 +0000)]
Bug 22804: OPAC Overdrive JavaScript contains untranslatable strings

This patch moves untranslatable strings out of overdrive.js and into
opac-bottom.inc where other strings are defined for use in JavaScript
files.

To test you must have OverDrive integration set up, including
OverDriveCirculation. Test the various Overdrive integration features:

 - Placing holds
 - Cancelling holds
 - Checking out
 - Checking in

These features should work as expected.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23624: (RM follow-up) Sponsorship Line
Martin Renvoize [Mon, 30 Sep 2019 14:52:02 +0000 (15:52 +0100)]
Bug 23624: (RM follow-up) Sponsorship Line

Sponsored-by: Higher Education Libraries of Massachusetts
Sponsored-by: Fenway Libraries Online
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23624: (QA follow-up) Test error cases
Tomas Cohen Arazi [Wed, 25 Sep 2019 13:44:03 +0000 (10:44 -0300)]
Bug 23624: (QA follow-up) Test error cases

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23624: (QA follow-up) Don't fetch the count unless the query was successful
Kyle M Hall [Fri, 20 Sep 2019 11:14:34 +0000 (07:14 -0400)]
Bug 23624: (QA follow-up) Don't fetch the count unless the query was successful

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23624: (QA follow-up) Optimize even more
Tomas Cohen Arazi [Thu, 19 Sep 2019 14:13:28 +0000 (11:13 -0300)]
Bug 23624: (QA follow-up) Optimize even more

This patch makes counting the results have no memory footprint by
leveraging on the DB to count the rows.

To test:
- Without this path, run:
  $ kshell
 k$ prove t/db_dependent/Reports/Guided.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
 k$ prove t/db_dependent/Reports/Guided.t
=> SUCCESS: Tests still pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23624: Unit tests
Tomas Cohen Arazi [Thu, 19 Sep 2019 13:50:46 +0000 (10:50 -0300)]
Bug 23624: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23624: Count rows in report without (potentially) consuming all memory
Paul Hoffman [Tue, 17 Sep 2019 17:00:03 +0000 (13:00 -0400)]
Bug 23624: Count rows in report without (potentially) consuming all memory

C4::Reports::Guided::nb_rows (called by get_prepped_report in reports/guided_reports.pl) uses DBI::fetchall_arrayref to retrieve all rows at once; counts them; and then discards the rows and returns the count.  This has the potential, if the number of rows is very large, to exhaust all available memory.

(Other code in guided_reports.pl has the same potential effect, but because the solution to that is much less straightforward it will be addressed in a separate bug report.)

This patch uses the second ($max_rows) parameter to DBI::fetchall_arrayref to retrieve a smaller number (1,000) of rows at a time, looping until all results have been retrieved.  This will only use as much memory as the maximum amount used by a single call to DBI::fetchall_arrayref.

Test Plan:
1) Create a report the will generate a huge number of results
2) Run the report, watch your memory usage spike
3) Apply this patch
4) Restart all the things!
5) Run the report again, note your memory usage is much lower

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23602: (follow-up) Improve tooltip formatting
Martin Renvoize [Fri, 27 Sep 2019 12:13:05 +0000 (13:13 +0100)]
Bug 23602: (follow-up) Improve tooltip formatting

This follow-up changes the formatting of the tooltip to add a newline for
library limit.

To test, apply the patch and go to Administration -> Item types.

In the table of item types, find one with library limitations. Hovering
over the "# library limitations" test should trigger a Bootstrap-styled
tooltip showing the library name and code, one per line.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23602: (follow-up) Correct terminology, add tooltip
Owen Leonard [Fri, 13 Sep 2019 16:13:33 +0000 (16:13 +0000)]
Bug 23602: (follow-up) Correct terminology, add tooltip

This follow-up changes the use of "branch" to the Koha standard
"library." The patch also adds the use of a Bootstrap tooltip for
showing an item type's library limitations in the main table of item
types.

To test, apply the patch and go to Administration -> Item types.

In the table of item types, find one with library limitations. Hovering
over the "# library limitations" test should trigger a Bootstrap-styled
tooltip showing the library name and code.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23602: Display branch limitations in itemtype table
Agustin Moyano [Fri, 13 Sep 2019 13:55:30 +0000 (10:55 -0300)]
Bug 23602: Display branch limitations in itemtype table

This patch adds a column in itemtype table to display branch limitations.

To test:
1) Open item types admin page.
CHECK => there is no column for branch limitations, even if you add a limitation in an item type.
2) Apply this patch
SUCCESS => A new column appears that displays branch limitations per item type
3) Sign off

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23213: Enable minimum payment threshold check in OPAC
Agustin Moyano [Wed, 26 Jun 2019 05:02:39 +0000 (02:02 -0300)]
Bug 23213: Enable minimum payment threshold check in OPAC

This patch enables OPAC to check for the miminum payment threshold per payment method.

If the total amount to pay is less than the threshold, payment for that method is disabled.

To test:
1) apply dependencies
2) get 2 payment plugins, one with threshold as https://gitlab.com/thekesolutions/plugins/koha-plugin-pay-via-paypal/uploads/4c66444ff697586dff3d8759c1e5746c/koha-plugin-pay-via-paypal-v1.0.0.kpz and one without threshold as https://github.com/bywatersolutions/koha-plugin-pay-via-paygov/releases/download/v1.0.5/koha-plugin-pay-via-paygov-v1.0.5.kpz
3) install both plugins
4) Configure both plugins to work correctly (can be invented data.. we are not interested in the actual payment page, but to test if payment method is allowed)
5) In plugin with threshold, set minimum threshold to 10
6) Fetch any user, and create 2 manual invoices, both for the amount of 5
7) Enter OPAC as user, and go to "my fines" tab
CHECK => both plugins appear as payment method
8) Check the checkbox of one of the fines
SUCCESS => plugin with threshold is now disabled, and has a warning message that says "Minimum amount needed by this service is 10.00"
        => plugin without threshold is enabled
        => if plugin with threshold was selected, "Make payment" button is disabled until an enabled payment method is selected
9) Check the second checkbox
SUCCESS => both payment methods are now enabled
10) Sign off

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23214: Modify account-table.inc to enable payment of guarantees fines
Agustin Moyano [Thu, 13 Jun 2019 05:57:52 +0000 (02:57 -0300)]
Bug 23214: Modify account-table.inc to enable payment of guarantees fines

This patch enables a guarantor to pay guarantees fines in OPAC

To test:
1. Apply dependencies
2. On intranet, search for AllowStaffToSetFinesVisibilityForGuarantor preference and set to "Allow"
3. Enable some payment method
4. Find a patron with guarantor and edit
5. Change "Show fines to guarantor" select to "Yes" and save
6. Create a manual invoice for the patron (guarantee)
7. Enter OPAC with guarantor user
8. Go to "your fines" tab
SUCCESS => Guarantees fines appear, and is selectable to pay
9. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23631: fr-CA translation of NEW_SUGGESTION notice
caroline [Tue, 17 Sep 2019 21:59:21 +0000 (17:59 -0400)]
Bug 23631: fr-CA translation of NEW_SUGGESTION notice

This patch provides the fr-CA translation for the NEW_SUGGESTION notice.

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23683: Course reserves public notes on specific items should allow for HTML
Lucas Gass [Sun, 22 Sep 2019 02:01:23 +0000 (02:01 +0000)]
Bug 23683: Course reserves public notes on specific items should allow for HTML

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23101: Hide action buttons on contracts if user lacks permission
Katrin Fischer [Fri, 12 Jul 2019 12:40:22 +0000 (12:40 +0000)]
Bug 23101: Hide action buttons on contracts if user lacks permission

When the user doesn't have superlibrarian, full acq or
contracts_manage permission, don't show buttons for editing
and deleting contracts.

To test:
- Create a vendor with a few contracts
- Create a staff user with
  - superlibrarian = can view edit/delete contracts
  - full acq perms = same
  - without manage_contracts = can view, but action buttons are gone
- Make sure the sorting of the contracts table works in all cases

Signed-off-by: Holly Cooper <hc@interleaf.ie>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23607: Make /patrons/:patron_id/account staff only
Tomas Cohen Arazi [Fri, 13 Sep 2019 14:26:03 +0000 (11:26 -0300)]
Bug 23607: Make /patrons/:patron_id/account staff only

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23625: Make new 'required' attributes match the currently used syntax in other...
Kyle M Hall [Tue, 17 Sep 2019 19:41:12 +0000 (15:41 -0400)]
Bug 23625: Make new 'required' attributes match the currently used syntax in other templates

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23625: ArticleRequestsMandatoryFields* only affects field labels, does not make...
Eric Phetteplace [Mon, 16 Sep 2019 19:53:32 +0000 (12:53 -0700)]
Bug 23625: ArticleRequestsMandatoryFields* only affects field labels, does not make inputs required

Test plan:

1. Enable article requests ( syspref: ArticleRequests => Enable, Circ and fine rules ALL/ALL (or a given category/itemtype): Article requests => Yes )
2. Set one or more fields to require in the ArticleRequestsMandatoryFields, ArticleRequestsMandatoryFieldsItemOnly, and/or ArticleRequestsMandatoryFieldsRecordOnly settings (all these settings are affected in the same manner)
3. Search for a title and select the "Request Article" button from the OPAC search results
4. Authenticate as a patron
5. Neglect to fill out at least one of the mandatory fields
6. Select the "Place Request" button at the bottom of the form
7. The form submits despite the empty mandatory fields
8. Apply patch
9. Repeat steps 3, 5, & 6
10 . The form should refuse to submit, show a browser-native message about the missing required fields.

Sponsored-by: California College of the Arts
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22602: Fix OverDrive circulation when coming from another site
Nick Clemens [Fri, 6 Sep 2019 11:13:27 +0000 (11:13 +0000)]
Bug 22602: Fix OverDrive circulation when coming from another site

On bug 21078 we caught an error and returned, this makes us skip some variable setting that we need.

This patch moves that code into its own function.

To test:
0 - Have OverDrive circulation setup and working
1 - Place a link to your kohadev installation on another site
2 - Follow that link to the opac
3 - Note all items show as 'Place hold' even if available copies
4 - Apply patch
5 - Repeat 1&2
6 - Note the items availability shows correctly

Signed-off-by: Elizabeth Quinn <EQuinn@chplnj.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23651: Add address of restricted page to syspref description
Nick [Fri, 20 Sep 2019 16:44:53 +0000 (16:44 +0000)]
Bug 23651: Add address of restricted page to syspref description

To test:
1 - Look at the restricted page syspref
2 - Check that the url is listed
3 - Add some content to the page
4 - Save the prefs
5 - Verify the address listed takes you to the page on the opac

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18710: Wrong subfield modified in batch item modification
Fridolin Somers [Wed, 31 May 2017 14:54:32 +0000 (16:54 +0200)]
Bug 18710: Wrong subfield modified in batch item modification

In Tools > Batch item modification, one can modify or delete a subfield.
When deleting a subfield et modifying another, the wrong subfield gets modified.

This is caused by the fact that disabled inputs are not posted in form.
So for a subfield to delete :
Input name=field_value is not posted. But input name=subfield is posted with subfield code.
So these 2 arrays does not have the same size :
    my @subfields = $input->multi_param('subfield');
    my @values    = $input->multi_param('field_value');

For exemple, deleting $2, not changing $u and modidying $v will modify $u with value for $v o_O

This patch correts but setting disabled all inputs of a deleted subfield : field_value, tag, subfield and mandatory. Like it was not present in the form.

Test plan :
- Go to Tools > Batch item modification
- Enter a barcode and submit
- Lets say there are subfields : $2 (not mandatory), $u and $v
- Check the subfield $2 to be deleted
=> $2 input is disabled
- Enter a text in $v
- Submit the form
=> Without patch, the text for $v gets into $u
=> With patch, the text for $v gets into $v
- Check the subfield $2 is well deleted

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23627: Reduce Koha::Biblio->get_coins noise if no 245
Tomas Cohen Arazi [Mon, 16 Sep 2019 20:22:17 +0000 (17:22 -0300)]
Bug 23627: Reduce Koha::Biblio->get_coins noise if no 245

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23272: (RM followup) Fix edit action
Martin Renvoize [Fri, 27 Sep 2019 11:53:46 +0000 (12:53 +0100)]
Bug 23272: (RM followup) Fix edit action

This bug introduced a regression whereby if an authorized value has no
branch limitations then the authorized value cannot be edited once it
has been created. The edit page would display an error and not load.

This is the second case of a simple ternary correcting the issue, but
the logic of returning 'undef' from 'get_branch_limits' being called
into question.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: (RM follow-up) Accounts vs. Accounting
Martin Renvoize [Fri, 27 Sep 2019 09:35:07 +0000 (10:35 +0100)]
Bug 23321: (RM follow-up) Accounts vs. Accounting

The QA follow-up converting 'Accounts' to 'Accounting' missed some cases
and ended up breaking the perferences screen.  This follow-up corrects
that.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23517: (follow-up) AddReserve expects a priority parameter
Tomas Cohen Arazi [Tue, 24 Sep 2019 14:39:17 +0000 (11:39 -0300)]
Bug 23517: (follow-up) AddReserve expects a priority parameter

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23526: (RM follow-up) Fix failing test
Martin Renvoize [Tue, 24 Sep 2019 07:21:13 +0000 (08:21 +0100)]
Bug 23526: (RM follow-up) Fix failing test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22744: Changes for opac and remove JS
Nick Clemens [Mon, 23 Sep 2019 10:25:13 +0000 (10:25 +0000)]
Bug 22744: Changes for opac and remove JS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22744: Remove the 'do not notify' buttons
Nick Clemens [Thu, 13 Jun 2019 10:56:34 +0000 (10:56 +0000)]
Bug 22744: Remove the 'do not notify' buttons

These checkboxes are simply a way to clear the prefs before editing. We are not saving
a lot of click, and we are confusing people, this patch simply removes them

To test:
1 - Edit a patron's messaging preferences
2 - Think too hard about the 'Do not notify' boxes
3 - Feel confused
4 - Apply this patch
5 - Edit a patron's messaging preferences
6 - Confirm it feels better

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23517: (follow-up) More test cases
Tomas Cohen Arazi [Mon, 16 Sep 2019 13:32:48 +0000 (10:32 -0300)]
Bug 23517: (follow-up) More test cases

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23517: (follow-up) Tidy tests
Tomas Cohen Arazi [Wed, 4 Sep 2019 17:06:45 +0000 (14:06 -0300)]
Bug 23517: (follow-up) Tidy tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23517: Add the controller method for holds priorities handling
Tomas Cohen Arazi [Tue, 3 Sep 2019 19:39:40 +0000 (16:39 -0300)]
Bug 23517: Add the controller method for holds priorities handling

This patch implements the PUT /holds/:hold_id/priority endpoint
To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23517: Add a spec for PUT /holds/{hold_id}/priority
Tomas Cohen Arazi [Tue, 3 Sep 2019 19:39:08 +0000 (16:39 -0300)]
Bug 23517: Add a spec for PUT /holds/{hold_id}/priority

This patch adds the OpenAPI spec for the endpoint, and tests for the
desired behaviour.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: DBRev 19.06.00.029
Martin Renvoize [Mon, 23 Sep 2019 10:48:54 +0000 (11:48 +0100)]
Bug 23321: DBRev 19.06.00.029

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: (QA follow-up) Accounts vs. Accounting
Tomas Cohen Arazi [Fri, 20 Sep 2019 18:56:45 +0000 (15:56 -0300)]
Bug 23321: (QA follow-up) Accounts vs. Accounting

The UI uses 'Accounting' in several places (patron details tab, admin
page section name, breadcrumbs, etc). Use the same name on the sysprefs.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: Add Koha::Object(s) info to the schema
Tomas Cohen Arazi [Fri, 20 Sep 2019 18:50:14 +0000 (15:50 -0300)]
Bug 23321: Add Koha::Object(s) info to the schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: (QA follow-up) Add missing TT filters
Tomas Cohen Arazi [Fri, 20 Sep 2019 18:30:29 +0000 (15:30 -0300)]
Bug 23321: (QA follow-up) Add missing TT filters

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: (QA follow-up) Booleans
Tomas Cohen Arazi [Fri, 20 Sep 2019 18:26:08 +0000 (15:26 -0300)]
Bug 23321: (QA follow-up) Booleans

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: (QA follow-up) Make atomic update idempotent
Tomas Cohen Arazi [Fri, 20 Sep 2019 18:06:38 +0000 (15:06 -0300)]
Bug 23321: (QA follow-up) Make atomic update idempotent

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: (follow-up) Add test for Koha::Account change
Martin Renvoize [Fri, 13 Sep 2019 16:04:00 +0000 (17:04 +0100)]
Bug 23321: (follow-up) Add test for Koha::Account change

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: (follow-up) Correction to exception logic
Martin Renvoize [Fri, 13 Sep 2019 16:03:02 +0000 (17:03 +0100)]
Bug 23321: (follow-up) Correction to exception logic

This patch reduces the noisy warning of uninitialised variables

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: (follow-up) Add cash register to admin-menu
Martin Renvoize [Fri, 13 Sep 2019 15:28:38 +0000 (16:28 +0100)]
Bug 23321: (follow-up) Add cash register to admin-menu

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: (follow-up) Require cash registers for payments
Martin Renvoize [Fri, 19 Jul 2019 08:20:49 +0000 (09:20 +0100)]
Bug 23321: (follow-up) Require cash registers for payments

This follow-up catches the case where no cash registers have been
defined for the current branch and as such payments cannot be processed.

Test plan:
1) Ensure you have 'UseCashRegisters' set to 'Do'
2) Attempt to make a payment for a fee whilst logged into a branch that
   has not yet had cash registers configured.
3) Note that you are shown a warning and cannot proceed.
4) Signoff

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: Add cash register support to paycollect
Martin Renvoize [Tue, 17 Sep 2019 11:24:27 +0000 (12:24 +0100)]
Bug 23321: Add cash register support to paycollect

This patch ties in the cash registers system to the paycollect payment
pages in the staff client.

Test plan:
1) Add some manual fees to a test patron
2) Select some fees to pay off
3) Note the addition of a select box for selecting your cash register
   upon payment.
4) Set a branch default cash register for the current branch
5) Repeat step 3 and note that the pre-selected cash register is the one
   set in step 4.
6) Unset the branch default cash register for the current branch
7) Repeat step 3 and note that there is no cash register pre-selected
8) Set 'UseCashRegisters' to 'Do not'
9) Repeat step 3 and note that there is no longer an option to select a
   cash register
10) Signoff

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: Allow setting of branch default
Martin Renvoize [Tue, 17 Sep 2019 11:24:18 +0000 (12:24 +0100)]
Bug 23321: Allow setting of branch default

This adds the ability to set a cash register as the default selected
option when making payments at a particular branch.

1) Note the addition of a 'Make branch default' button in each row of
   the table under 'Manage cash registers'
2) Click the button and note that the button has changed.
3) Click on an alternative cash register for the same branch and note
   that the default has been switched to the new register.
4) Click the 'unset' button on the default branch and note that there is
   no longer a default register for this branch.
5) Signoff

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: Koha::Library additions
Martin Renvoize [Tue, 17 Sep 2019 11:24:01 +0000 (12:24 +0100)]
Bug 23321: Koha::Library additions

This patch adds the relationship accessor for Cash::Registers to the
Koha::Library class and include the relevant tests.

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: Add cash register management
Martin Renvoize [Tue, 17 Sep 2019 11:23:49 +0000 (12:23 +0100)]
Bug 23321: Add cash register management

Add in administrative interfaces to allow the management of cash
registers.

Test plan:
1) Enable the use of cash registers by setting 'UseCashRegisters' to
   'Do'
2) Check that the 'Accounts > Manage cash registers' option now appears
   in the 'Administration' area.
3) Click through to 'Manage cash registers' and note the message
   suggesting you add your first register
4) Add you're first cash register
5) Note that the message has now been replaced by a table of cash
   registers including the one you have added in the previous step.
6) Edit the cash register created in step 4 and note that the table
   reflects the changes
7) Signoff

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: Add cash register permission
Martin Renvoize [Wed, 17 Jul 2019 13:03:30 +0000 (14:03 +0100)]
Bug 23321: Add cash register permission

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: Add cash register preference
Martin Renvoize [Thu, 18 Jul 2019 07:02:31 +0000 (08:02 +0100)]
Bug 23321: Add cash register preference

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: Add cash_registers table
Martin Renvoize [Tue, 16 Jul 2019 14:16:18 +0000 (15:16 +0100)]
Bug 23321: Add cash_registers table

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23321: DBIC Classes
Martin Renvoize [Tue, 16 Jul 2019 16:11:26 +0000 (17:11 +0100)]
Bug 23321: DBIC Classes

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23537: Overdrive won't show complete results at all times
Liz Rea [Wed, 4 Sep 2019 02:10:21 +0000 (02:10 +0000)]
Bug 23537: Overdrive won't show complete results at all times

To test:

On an overdrive enabled OPAC (tough sell, I know)

    Do a search for something you know has magazines, the collection I
    was looking at had "knit" as one

    Without this patch, the results will show "(many) items found in
    overdrive collection" but only show a small number of them.

    With the patch, the number of results should match the number
    shown/paginated.

    A site that has this fix applied, is
    https://tracy.bywatersolutions.com/cgi-bin/koha/opac-overdrive-search.pl?q=knit

    Before this patch, the number of results was 44, but there were only
    8 shown. Now we see all 44

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23623: (RM follow-up) Minor JS Tidy
Martin Renvoize [Mon, 23 Sep 2019 10:03:02 +0000 (11:03 +0100)]
Bug 23623: (RM follow-up) Minor JS Tidy

Apply 'Break lines on chained methods' to the new JS code introduced in
this patchset to prevent really long lines.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23623: (follow-up) Add missing filters
Josef Moravec [Tue, 17 Sep 2019 19:03:14 +0000 (19:03 +0000)]
Bug 23623: (follow-up) Add missing filters

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23623: (follow-up) Add missing comma in ajax call definition
Josef Moravec [Tue, 17 Sep 2019 18:59:26 +0000 (18:59 +0000)]
Bug 23623: (follow-up) Add missing comma in ajax call definition

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23623: Remove the svc/patron/show* scripts
Tomas Cohen Arazi [Mon, 16 Sep 2019 18:56:36 +0000 (15:56 -0300)]
Bug 23623: Remove the svc/patron/show* scripts

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23623: Use the new API for changing privacy settings (guarantors)
Tomas Cohen Arazi [Mon, 16 Sep 2019 18:57:12 +0000 (15:57 -0300)]
Bug 23623: Use the new API for changing privacy settings (guarantors)

This patchset makes opac-memberentry.pl use the API instead of the old
svc scripts for ajax calls, for setting privacy configuration in the
OPAC.

To test:
1) Disable OPACPrivacy
2) Enable AllowPatronToSetCheckoutsVisibilityForGuarantor
3) Enable AllowPatronToSetFinesVisibilityForGuarantor
4) Have a known patron be the guarantee of someone (so things display)
5) Log into the OPAC, go to the 'your personal details' tab
6) Change 'Allow your guarantor to view your current checkouts?' and
click the 'Update' button.
=> SUCCESS: Operation succeeds
7) Reload the tab
=> SUCCESS: The page reflects the expected changes (i.e. the API did it
        right)
8) Repeat 6 and 7 with the 'Allow your guarantor to view your current
fines?' option
=> SUCCESS: It works as well
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23584: Add the controller method and tests
Tomas Cohen Arazi [Mon, 16 Sep 2019 18:06:09 +0000 (15:06 -0300)]
Bug 23584: Add the controller method and tests

This patchset adds endpoints for the patrons to change their privacy
settings regarding their guarantors.

The following endpoints are added:

  PUT /public/patrons/:patron_id/guarantors/can_see_charges
  PUT /public/patrons/:patron_id/guarantors/can_see_checkouts

They can only be used by the patron themselves with valid sessions. And
enforce the AllowPatronToSetCheckoutsVisibilityForGuarantor and
AllowPatronToSetFinesVisibilityForGuarantor system preferences when
required.

All this is covered by unit tests.

To test:
1) Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23584: Add spec for PUT /public/patron/:patron_id/guarantors
Tomas Cohen Arazi [Mon, 16 Sep 2019 18:05:38 +0000 (15:05 -0300)]
Bug 23584: Add spec for PUT /public/patron/:patron_id/guarantors

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22837: (follow-up) Fix POD
Tomas Cohen Arazi [Thu, 19 Sep 2019 18:44:59 +0000 (15:44 -0300)]
Bug 22837: (follow-up) Fix POD

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22837: (follow-up) Fix some tests
Tomas Cohen Arazi [Thu, 19 Sep 2019 18:41:02 +0000 (15:41 -0300)]
Bug 22837: (follow-up) Fix some tests

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22837: Update callers to use new signature
Martin Renvoize [Fri, 3 May 2019 12:13:07 +0000 (13:13 +0100)]
Bug 22837: Update callers to use new signature

Test plan:
Run t/db_dependent/Circulation.t, t/db_dependent/Koha/Account.t,
t/db_dependent/Koha/Account/Lines.t and
t/db_dependent/api/v1/patrons_accounts.t and all should pass.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22837: Update apply to accept an arrayref
Martin Renvoize [Fri, 3 May 2019 11:59:16 +0000 (12:59 +0100)]
Bug 22837: Update apply to accept an arrayref

This patch update the signature of Koha::Account::Line->apply to accept
an arrayref of debits to apply against a credit instead of requireing a
Koha::Objects set.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23526: Don't use encoded question mark in shib_login_url
Nick [Tue, 10 Sep 2019 14:04:43 +0000 (14:04 +0000)]
Bug 23526: Don't use encoded question mark in shib_login_url

To test:
1 - Enable shib
2 - Do a search
3 - Try to login from search
4 - Get an error
5 - Apply patch
6 - Retry

Note: You do have to fully configure shibboleth, you can simply enable it in koha-conf.xml and check the URLs.
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23425: (QA follow-up) Keep it generic
Tomas Cohen Arazi [Tue, 17 Sep 2019 18:08:06 +0000 (15:08 -0300)]
Bug 23425: (QA follow-up) Keep it generic

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23425: Display the MARCXML error in the Metadata::Invalid exception message
Jonathan Druart [Sun, 4 Aug 2019 15:47:02 +0000 (10:47 -0500)]
Bug 23425: Display the MARCXML error in the Metadata::Invalid exception message

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23605: Fix terminology for branches limitations on patron category admin page
Katrin Fischer [Fri, 13 Sep 2019 12:18:09 +0000 (12:18 +0000)]
Bug 23605: Fix terminology for branches limitations on patron category admin page

Fix branches to library.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21390: Send registration verification emails immediately
Martin Renvoize [Tue, 17 Sep 2019 13:54:03 +0000 (14:54 +0100)]
Bug 21390: Send registration verification emails immediately

Sponsored by: Goethe-Institut
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21390: Send registration verification emails immediately
Chris Cormack [Wed, 4 Sep 2019 21:43:13 +0000 (21:43 +0000)]
Bug 21390: Send registration verification emails immediately

To test
1/ Enable self registration
2/ Register, notice message is queued in the table but not sent
3/ Apply patch
4/ Register again, notice message is queued, but immediately sent

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21852: Add more columns and column configuration to overdues report
Owen Leonard [Fri, 16 Nov 2018 14:51:48 +0000 (14:51 +0000)]
Bug 21852: Add more columns and column configuration to overdues report

This patch adds some new columns to the overdue report: Patron category,
item home library, item holding library, item type. Adding these columns
makes available columns better match the available filter fields in the
sidebar form.

Column configuration is added to this DataTable, with the new columns
defined as hidden by default in order to preserve current functionality.

This patch also fixes a bug where the home and holding branch template
variable names didn't match what was being used in the template for
pre-selecting the searched-for value in the sidebar filter menu.

To test, apply the patch and go to Circulation -> Overdues.

 - The list of overdues should look correct, with no new columns shown.
 - Test the column visibility button, showing the columns which are
   hidden by default. Confirm that the data in these columns displays
   correctly.
 - Update the default configuration for this table in Administration
   -> Configure columns. Confirm that your changes are applied to the
   overdues report.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20691: (QA follow-up) Fix self-reg
Tomas Cohen Arazi [Tue, 17 Sep 2019 13:45:05 +0000 (10:45 -0300)]
Bug 20691: (QA follow-up) Fix self-reg

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23597: Add missing reserved query parameters to GET /holds
Tomas Cohen Arazi [Wed, 11 Sep 2019 17:33:45 +0000 (14:33 -0300)]
Bug 23597: Add missing reserved query parameters to GET /holds

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23575: Template error causes item search to be submitted multiple times
Owen Leonard [Mon, 9 Sep 2019 16:58:04 +0000 (16:58 +0000)]
Bug 23575: Template error causes item search to be submitted multiple times

This patch corrects the item search template so that the submit handler
is not nested inside an unrelated loop. The change should have no
outward effect on the behavior of the item search other than making it
faster.

To observe the bug in action, open your browser's developer tools and
click the "Network" tab. Filter the output to only "XHR" and perform an
item search. You should see multiple requests.

To test, apply the patch and perform an item search. It should behave
normally.

Check the browser's "Network" monitor again to verify that only one
request is being sent.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22037: (QA follow-up) Correct misleading comment
Marcel de Rooy [Fri, 13 Sep 2019 07:36:25 +0000 (07:36 +0000)]
Bug 22037: (QA follow-up) Correct misleading comment

Comment needs to be corrected, and now applies to the whole code
paragraph following it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22037: (QA follow-up) Implement use of CHARGES_GUARANTEES
Kyle M Hall [Thu, 22 Aug 2019 13:25:54 +0000 (09:25 -0400)]
Bug 22037: (QA follow-up) Implement use of CHARGES_GUARANTEES

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22037: Block SIP checkout if guarantees have debt
Jonathan Druart [Thu, 20 Dec 2018 22:39:34 +0000 (19:39 -0300)]
Bug 22037: Block SIP checkout if guarantees have debt

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23272: (RM followup) Fix failing tests
Martin Renvoize [Fri, 13 Sep 2019 10:19:28 +0000 (11:19 +0100)]
Bug 23272: (RM followup) Fix failing tests

This bug introduced a regression whereby if any authorized value has no
branch limitations then the authorized value administration page would
fail to display at all.

A simple ternary corrects the issue, but I'm now wondering about the
logic of returning 'undef' from 'get_branch_limits'.. perhaps an empty
(or full) resultset might be a better option to prevent us from
requireing ternaries before calling chained methods on such objects.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 6759: DBRev 19.06.00.028
Martin Renvoize [Fri, 13 Sep 2019 07:09:15 +0000 (08:09 +0100)]
Bug 6759: DBRev 19.06.00.028

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 6759: (QA follow-up) Unit tests
Tomas Cohen Arazi [Thu, 12 Sep 2019 18:16:04 +0000 (15:16 -0300)]
Bug 6759: (QA follow-up) Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 6759: Update existing accountlines for 'A'
Martin Renvoize [Wed, 24 Apr 2019 10:15:33 +0000 (11:15 +0100)]
Bug 6759: Update existing accountlines for 'A'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 6759: Split account creation and renewal charges
Martin Renvoize [Wed, 24 Apr 2019 10:08:49 +0000 (11:08 +0100)]
Bug 6759: Split account creation and renewal charges

Test plan:
1. Enable charging for patron enrolement
2. Add a new patron where the category is charged for
3. Note the charge of type 'Account management fee'
4. Renew the patron
5. Note the next charge of type 'Account management fee'
6. Apply patch
7. Repeat steps 1-6 and note the first charge will be of type 'Account
creation fee' and the second of type 'Account renewal fee'
8. Bonus points, enable 'FeeOnChangePatronCategory' and check that when
changing a patron from a free category to a charged one that a new
'Account renewal fee' is charged.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23272: Adapt controller and tests
Tomas Cohen Arazi [Fri, 5 Jul 2019 19:24:17 +0000 (16:24 -0300)]
Bug 23272: Adapt controller and tests

This patch adapts the controller script for handling authorised values,
and the tests to reflect the method names changes.

To test:
- Verify you can add/delete/edit authorised values with/without branch
limitations, as usual
=> SUCCESS: All works as usual!
- Run:
  $ kshell
 k$ prove t/db_dependent/AuthorisedValues.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23272: Make Koha::AuthorisedValue use Koha::Object::Limit::Library
Tomas Cohen Arazi [Fri, 5 Jul 2019 19:23:52 +0000 (16:23 -0300)]
Bug 23272: Make Koha::AuthorisedValue use Koha::Object::Limit::Library

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15497: (RM follow-up) Fix for new itemtype case
Martin Renvoize [Fri, 13 Sep 2019 06:51:53 +0000 (07:51 +0100)]
Bug 15497: (RM follow-up) Fix for new itemtype case

When creating an entirely new itemtype the script would fail upon
attempting to lookup existing itemtype branch limits. This patch adds a
ternary to prevent the failure.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21058: Added HTML class to showRDAtag264
David Bourgault [Wed, 7 Aug 2019 18:01:58 +0000 (18:01 +0000)]
Bug 21058: Added HTML class to showRDAtag264

Adds the HTML class "rda264" to the span generated by the XSLT function
showRDAtag264.

To test, same as previous, using a notice with a 264 tag. Both patches
only apply to MARC21.

I was unsure how to name the class, so I've chose the simplest, most
explicit name.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21058: Added HTML classes in MARC21slim2_Detail.xsl
David Bourgault [Wed, 7 Aug 2019 16:42:30 +0000 (16:42 +0000)]
Bug 21058: Added HTML classes in MARC21slim2_Detail.xsl

This is a very small patch. I've simply added the following classes to
their respective spans in the detail XSLs for both interfaces.

- in_note (773$n)
- preceeding_entry_note (780$n)
- succeeding_entry_note (785$n)

To test:

1. Apply patch
2. Open details page of notice with a 773$n, 780$n or 785$n field
3. Inspect element. The class should be visible.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23580: Add C4::Context->yaml_preference
Tomas Cohen Arazi [Tue, 10 Sep 2019 14:42:31 +0000 (11:42 -0300)]
Bug 23580: Add C4::Context->yaml_preference

This patch adds a new methods to be used on YAML-based sysprefs. The
idea is that we would use it instead of handling the YAML decoding
in-place everywhere we use YAML syprefs.

Ideally, we could even move pipe separated values sysprefs into YAML,
etc.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/Context.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>