]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 22688: Unit tests
Kyle M Hall [Thu, 11 Apr 2019 14:13:58 +0000 (10:13 -0400)]
Bug 22688: Unit tests

Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22451: Use Asset everywhere
Josef Moravec [Tue, 26 Feb 2019 13:54:28 +0000 (13:54 +0000)]
Bug 22451: Use Asset everywhere

Test plan:
Use installer and onboaarding tool, make sure the js and css files are
loaded

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22451: Update test
Josef Moravec [Tue, 26 Feb 2019 13:43:21 +0000 (13:43 +0000)]
Bug 22451: Update test

Test plan:
prove t/db_dependent/Koha/Template/Plugin/Asset.t

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22451: Make Asset plugin use Koha::version instead of version from db
Josef Moravec [Tue, 26 Feb 2019 13:30:20 +0000 (13:30 +0000)]
Bug 22451: Make Asset plugin use Koha::version instead of version from db

Test plan:
Apply the patch a try to use Koha, css and js files should be used
normally

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22652: Editing Course reserves is broken
Lyon3 Team [Thu, 11 Apr 2019 08:48:42 +0000 (10:48 +0200)]
Bug 22652: Editing Course reserves is broken

To test:
1. Create a course reserve or go on an existing one
2. Add items and add a change for the holdingbranch
3. On the list of items in this course reserve
(course_reserves/course-details.pl?course_id=xx), click on "edit" at the
end of a row :

Without the patch, you can't see the holdingbranch you have choose for
this item, but you see "LEAVE UNCHANGED"

With the patch, you can see the holdingbranch you have choose when
adding this item in the course

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20830: Make sure a fund is selected when ordering from a stage file
Olivier Crouzet [Mon, 11 Mar 2019 14:00:23 +0000 (15:00 +0100)]
Bug 20830: Make sure a fund is selected when ordering from a stage file

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21346: Remove inline onclicks per comment 42
Christopher Brannon [Wed, 5 Dec 2018 20:33:25 +0000 (20:33 +0000)]
Bug 21346: Remove inline onclicks per comment 42

To test:
1)  Apply patch.
2)  Check that there is no changed behavior with buttons or checkboxes.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21346: Convert dialogs to modals.
Christopher Brannon [Sun, 4 Nov 2018 03:47:30 +0000 (03:47 +0000)]
Bug 21346: Convert dialogs to modals.

This addresses most of the transfer dialogs.  There are some dialogs
that I have not converted because I don't know what triggers them,
therefore I cannot test them.

The following scenarios have been addresses, and should be tested:

FOR TRANSFERS

1) Checkin with no issue, hold or transfer; not at home (AutomaticItemReturn set to Don't)
     * Should give 3 options - Yes, Yes with print, or No.
     * Yes and Yes with print should trigger a transfer back home.
     * No should do nothing.
     * Print should open a window for printing, with correct
     information.
     * All three options should close the modal.

     TO TEST:
     1) Set AutomaticItemREturn to Don't.
     2) Check in an item with no issues, holds or transfers set, at a
     location other than the owning library.
     3) Test conditions above.

2) Checkin with no issue, hold or transfer; not at home (AutomaticItemReturn set to Do)
    * Should give 2 options - Print or OK.
    * Should automatically set transfer.
    * Print should open a window for printing, with correct information.
    * Both buttons should close modal.

    TO TEST:
    1) Set AutomaticItemReturn to Do.
    2) Check in an item with no issues, holds or transfers set, at a
    location other than the owning library.
    3) Test conditions above.

3) Checkin with no issues or holds, but transfer already set
    * Should give 3 options - OK, Print or Cancel.
    * OK and print should not touch existing transfer.
    * Cancel should remove the exisiting transfer.
    * Print should open a window for printing, with correct information.
    * All three options should close the modal.

    TO TEST:
    1) Check in an item following step 2 of either test above.
    2) Check in item again, while a transfer exists.
    3) Test conditions above.

WRONG BRANCH

4) If AllowReturnToBranch is not set "to any library", and the item is not checked in at the appropriate branch, the wrong-branch-modal pops up:
    * Should give 1 option - OK.
    * Should not check anything in or initiate a transfer.
    * OK should close the modal.

    TO TEST:
    1) Set AllowReturnToBranch to "only the library the item is from".
    You can test the other settings, as long as you pay attention to
    where you are checking the item in at.
    2) Check in an item at a branch other than the owning library.
    3) Test conditions above.

Signed-off-by: Lisette <lisetteslatah@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21346: Remove double dialog
Christopher Brannon [Thu, 1 Nov 2018 21:08:19 +0000 (21:08 +0000)]
Bug 21346: Remove double dialog

To Test:
1) Place a hold on an item for pickup at another branch.
2) Check in item to trigger hold and transfer.
3) Check in item again without changing location.  Note modal AND old
dialog behind modal.
4) Apply patch.
5) Check in item again without changing location.  Note modal without
the old dialog.

Signed-off-by: Lisette <lisetteslatah@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21346: Streamline logic in holds and transfers
Christopher Brannon [Thu, 1 Nov 2018 20:21:08 +0000 (20:21 +0000)]
Bug 21346: Streamline logic in holds and transfers

1) Replaced comparison with string to make testing branch easier.
2) Replaced useless 0 values with undef.

Does not change any behavior, only simplifies code.

Signed-off-by: Lisette <lisetteslatah@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21953: (follow-up) Fix test count
Nick Clemens [Fri, 12 Apr 2019 02:52:58 +0000 (02:52 +0000)]
Bug 21953: (follow-up) Fix test count

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10796: Schema changes
Nick Clemens [Fri, 12 Apr 2019 02:52:02 +0000 (02:52 +0000)]
Bug 10796: Schema changes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10796: DBRev 18.12.00.045
Nick Clemens [Fri, 12 Apr 2019 02:41:53 +0000 (02:41 +0000)]
Bug 10796: DBRev 18.12.00.045

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21890: DBRev 18.12.00.044
Nick Clemens [Fri, 12 Apr 2019 02:36:26 +0000 (02:36 +0000)]
Bug 21890: DBRev 18.12.00.044

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10796: (QA follow-up) Changing password recovery verbiage for users who are disal...
Liz Rea [Wed, 27 Mar 2019 19:16:56 +0000 (19:16 +0000)]
Bug 10796: (QA follow-up) Changing password recovery verbiage for users who are disallowed online password resets

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10796: Use $category->effective_change_password in the OPAC
Tomas Cohen Arazi [Wed, 20 Feb 2019 16:58:35 +0000 (13:58 -0300)]
Bug 10796: Use $category->effective_change_password in the OPAC

This patch makes the OPAC pages that rely on OpacPasswordChange use the
current patron's category to make the decision to allow password change
or not.

It does so by making sure all the places in which OpacPasswordChange was
used, use $logged_in_user->category->effective_change_password instead.

Special attention is required on the case of opac-registration-verify.pl
in which the use of an unblessed Koha::Patron object is changed in
favour of the blessed object, so we can actually use the new method to
make a decision on the text to display.

To test:
- Go through the OPAC pages, check that the password change strings and
links are displayed only whne appropriate.
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10796: Handle can_change_password on the staff interface
Tomas Cohen Arazi [Wed, 20 Feb 2019 16:36:55 +0000 (13:36 -0300)]
Bug 10796: Handle can_change_password on the staff interface

This patch makes the staff interface handle the new flag when editing
the categories. I didn't add the flag to the list of categories table
because it makes it too big, but can be easily added if required by
users or QA.

To test:
- Along with other patches from this bug, edit patron categories
=> SUCCESS: Notice the changes are correctly stored
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10796: Add Koha::Patron::Category->effective_change_password method
Tomas Cohen Arazi [Wed, 20 Feb 2019 16:26:18 +0000 (13:26 -0300)]
Bug 10796: Add Koha::Patron::Category->effective_change_password method

This method checks whether the local $self->change_password is set to
override the OpacPasswordChange syspref (i.e. if it is set to a
bool) or undef, in which case it falls back to the value of the syspref

To test:
- Apply this patches
- Make sure the DB is updated:
  $ updatedatabase
- Update the schema files:
  $ dbic
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patron/Category.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10796: DB update
Tomas Cohen Arazi [Wed, 20 Feb 2019 16:18:00 +0000 (13:18 -0300)]
Bug 10796: DB update

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21890: (QA follow-up) Use List::Util::any
Martin Renvoize [Mon, 1 Apr 2019 17:46:21 +0000 (18:46 +0100)]
Bug 21890: (QA follow-up) Use List::Util::any

When possible it's a good idea to use `any` from List::Util to shortcut
on the first occurence of a truthy value.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21890: Wrap message in span
Tomas Cohen Arazi [Fri, 22 Mar 2019 14:22:00 +0000 (11:22 -0300)]
Bug 21890: Wrap message in span

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21890: Allow restricting password resets by patron category
Tomas Cohen Arazi [Thu, 31 Jan 2019 19:29:30 +0000 (16:29 -0300)]
Bug 21890: Allow restricting password resets by patron category

This patch makes the templates relying on the OpacResetPassword syspref
use the introduced TT plugin method instead by changing:

[% IF Koha.Preference('OpacResetPassword') %]

=>

[% IF Categories.can_any_reset_password %]

To test:
- Verify that all the places in which the 'forgot password' link is
displayed in OPAC keep working, provided there's at least one category
that has the flag set
- Attempt to recover the password for a patron that belong to a valid
category (i.e. that has the flag set)
=> SUCCESS: You can go through the normal process
- Attempt to recover the password for a patron that belongs to a
category with the flag unset.
=> SUCCESS: Once Koha identifies your category, you are told you are not
allowed to do it
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21890: Add can_any_reset_password() to the Categories TT plugin
Tomas Cohen Arazi [Thu, 31 Jan 2019 19:27:10 +0000 (16:27 -0300)]
Bug 21890: Add can_any_reset_password() to the Categories TT plugin

This patch introduces a method to the Koha::Template::Plugin::Categories
TT plugin. This methods queries for categories filtering them by
effective_reset_password flag set, and returns a boolean representing the fact
that there's at least one category allowed.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Template/Plugin/Categories.t
=> SUCCESS: Tests pass!
- Sign off :-D

Caveat: this patch/tests require the schema to be updated

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21890: Add Koha::Patron::Category->effective_reset_password method
Tomas Cohen Arazi [Tue, 5 Feb 2019 19:44:14 +0000 (16:44 -0300)]
Bug 21890: Add Koha::Patron::Category->effective_reset_password method

This method checks wether the local $self->reset_password is set to
override the OpacResetPassword syspref (i.e. if it is set to a bool) or
undef, in which case if falls back to the value of the syspref.

To test:
- Apply this patches
- Make sure the DB is updated:
  $ updatedatabase
- Update the schema files:
  $ dbic
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patron/Category.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21890: Handle can_reset_password on the staff interface
Tomas Cohen Arazi [Thu, 31 Jan 2019 19:28:39 +0000 (16:28 -0300)]
Bug 21890: Handle can_reset_password on the staff interface

This patch makes the staff interface handle the new flag when editing
the categories. I didn't add the flag to the list of categories table
because it makes it too big, but can be easily added if required by
users or QA.

To test:
- Along with other patches from this bug, edit patron categories
=> SUCCESS: Notice the changes are correctly stored
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21890: DB updates
Tomas Cohen Arazi [Thu, 31 Jan 2019 19:25:59 +0000 (16:25 -0300)]
Bug 21890: DB updates

This patch adds a new column to the categories table:
'reset_password' which is a boolean, and represents, well... that. The
value itself is nullable.

The idea is that OpacResetPassword governs the general behaviour, and
this can be overriden at category-level.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21582: Use CodeMirror for *UserJS & *UserCSS
Owen Leonard [Fri, 29 Mar 2019 19:01:19 +0000 (19:01 +0000)]
Bug 21582: Use CodeMirror for *UserJS & *UserCSS

This patch adds CodeMirror syntax highlighting by default to JS and CSS
system preferences. HTML preferences will use CodeMirror editors if
UseWYSIWYGinSystemPreferences is disabled.

Three new CodeMirror files are added to support three new syntax
highlighting modes: XML (for HTML), CSS, and JS.

A new option is added to *.pref file configurations for textareas which
are intended for HTML, JS, or CSS: syntax. This option is passed to the
CodeMirror configuration to control syntax highlighting mode.

Textareas without a syntax option specified will not have CodeMirror
enabled.

To test, apply the patch and go to Administration -> System preferences.

Test the behavior of several preferences which use <textarea> as their
input. For example:

- OPACUserJS (JS)
- IntranetUserCSS (CSS)
- OpacHeader (HTML)
- BibtexExportAdditionalFields (no highlighting)

Text entry in each of these should have the correct syntax highlighting
applied to them. All data should be saved correctly.

Test with UseWYSIWYGinSystemPreferences both on and off.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22594: Validate SMS messaging numbers using the E.164 format
Kyle M Hall [Wed, 27 Mar 2019 12:35:27 +0000 (08:35 -0400)]
Bug 22594: Validate SMS messaging numbers using the E.164 format

Many SMS messaging services reject numbers that do not conform to the E.164 international public telecommunication
numbering plan.

We already tell patrons on the OPAC "Please enter numbers only. (123) 456-7890 would be entered as 1234567890."
but we do not enforce this. We should be validating the patron's SMS number on both the staff side and the patron
self-service for updating the SMS number.

Test plan:
1) Apply this patch
2) Enable SMS message ( you can set to Email to enable )
3) Test entering and updating SMS numbers on the OPAC and staff
   interfaces.
4) Note you can only enter a 1 to 14 digit number with an optional + sign
   at the beginning ( used to indicate the number includes a country calling code )

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18584: Our legacy code contains trailing-spaces
Thatcher Leonard [Wed, 10 Apr 2019 23:23:46 +0000 (23:23 +0000)]
Bug 18584: Our legacy code contains trailing-spaces

This patch removes trailing spaces and replaces tab characters with
spaces in the branch transfer limits template.

Mentored-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21953: DBRev 18.12.00.043
Nick Clemens [Fri, 12 Apr 2019 02:01:05 +0000 (02:01 +0000)]
Bug 21953: DBRev 18.12.00.043

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21953: Clarify PF = Lost item processing fee
Martin Renvoize [Tue, 9 Apr 2019 11:03:22 +0000 (12:03 +0100)]
Bug 21953: Clarify PF = Lost item processing fee

Currently PF is only ever used for lost item processing fees. This patch
alters the end user faceing description to clarify that.

Note: It may be nice to make the code more descriptive too at some
point, but that can happen in another bug in my opinion.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21953: (QA follow-up) Corrections to DB Update
Martin Renvoize [Tue, 9 Apr 2019 11:00:16 +0000 (12:00 +0100)]
Bug 21953: (QA follow-up) Corrections to DB Update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21953: Update existing rows in DB
Jonathan Druart [Wed, 6 Mar 2019 19:09:06 +0000 (16:09 -0300)]
Bug 21953: Update existing rows in DB

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Test plan passes.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21953: Add tests
Jonathan Druart [Wed, 6 Mar 2019 19:00:09 +0000 (16:00 -0300)]
Bug 21953: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21953: Term 'Lost item' untranslatable
Caroline Cyr La Rose [Thu, 20 Dec 2018 22:12:21 +0000 (17:12 -0500)]
Bug 21953: Term 'Lost item' untranslatable

This patch removes the hardcoded untranslatable string
'Lost item' from C4/Circulation.pm.

To test:
1) Make sure the system preference WhenLostChargeReplacementFee is set to Charge
2) Optional: in Administration > Item types, add a default replacement cost to
the item type you plan to use
3) Loan an item out to a patron
(If there is no default replacement cost, make sure the item has a replacement
price)
4) In the patron's account > Details > Loans, click on the item's barcode
5) Set the lost status to Lost
6) Go back to the patron's account > Fines
7) Notice it is written 'Lost item , Lost item title barcode (title)'
8) If you have another language installed, switch to the other language
and notice the second Lost item is still in English
9) Apply the patch
10) Redo steps 3-6
11) Notice it is written 'Lost item, title barcode (title)'
12) Optional: switch to another language, notice there is no English string

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22597: Remove "more_subfields_xml" from GetPatronInfo response
Arthur Suzuki [Wed, 27 Mar 2019 14:49:04 +0000 (15:49 +0100)]
Bug 22597: Remove "more_subfields_xml" from GetPatronInfo response

Test plan
1/ Set an item with some xml data in more_subfields_xml
2/ Issue this item to a borrower
3/ Query the webservice with GetPatronInfo methods and show_loans=1 params
4/ Check no <more_subfields_xml> tags are returned in the xml response from the webservice

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19648: Revise marc21_field_007.xml
Katrin Fischer [Wed, 6 Feb 2019 00:14:01 +0000 (00:14 +0000)]
Bug 19648: Revise marc21_field_007.xml

- Removes some doubled up entries
- Fixes some whitespace issues
- Adds some missing entries, for example:
    007, nonprojected graphic, secondary support material a-c

To test:
  - Verify that the 007 cataloging plugin works correctly and
    matches standard:
    http://www.loc.gov/marc/bibliographic/bd007k.html

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18387: (QA Follow up) adding specificity to error template.
Liz Rea [Tue, 9 Apr 2019 17:49:00 +0000 (17:49 +0000)]
Bug 18387: (QA Follow up) adding specificity to error template.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18387: Allow sco-user to access errors templates
Nick Clemens [Mon, 9 Jul 2018 13:30:38 +0000 (13:30 +0000)]
Bug 18387: Allow sco-user to access errors templates

To test:
 1 - Enable AuthoSelfCheck prefs
 2 - In opacuserjs or scouserjs add a fetch of an unreachable resources
 3 - Visit the SCO
 4 - Sign in as a patron then click 'finish'
 5 - Say 'yes' to receipt
 6 - Note you are directed to log in
 7 - Apply patch
 8 - Restart all the things
 9 - Repeat 4 & 5
10 - Sucess, receipt prints

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22628: Add VOID and FFOR to relevant templates
Martin Renvoize [Tue, 9 Apr 2019 12:24:05 +0000 (13:24 +0100)]
Bug 22628: Add VOID and FFOR to relevant templates

This patch adds the VOID and FFOR codes to the releveant templates for
display purposes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21891: DBRev 18.12.00.042
Nick Clemens [Fri, 12 Apr 2019 01:43:44 +0000 (01:43 +0000)]
Bug 21891: DBRev 18.12.00.042

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21891: (follow-up) Update database to set blank values to "default"
Owen Leonard [Thu, 11 Apr 2019 11:03:20 +0000 (11:03 +0000)]
Bug 21891: (follow-up) Update database to set blank values to "default"

This patch adds a database update which will update any blank values of
the XSLTDetailsDisplay system preference to "default." Although a blank
value will still result in the default XSLT view, it's more consistent
with the other XSLT preferences to use "default."

To test, apply the patch and set the XSLTDetailsDisplay to a blank
value. Run the database update. The value of the XSLTDetailsDisplay
system preference should now be "default."

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21891: Remove non-XSLT detail view in the staff client
Owen Leonard [Tue, 27 Nov 2018 17:32:51 +0000 (17:32 +0000)]
Bug 21891: Remove non-XSLT detail view in the staff client

This patch removes the non-XSLT markup from the bibliographic detail
page in the staff client. The XSLTDetailsDisplay preference has
been altered to accommodate this change. A blank value in
XSLTDetailsDisplay will now be equivalent to "default."

To test, apply the patch and set the value of XSLTDetailsDisplay to
either blank or "default."

View the detail page for a bibliographic record in the staff client. The
XSLT view should be shown.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22501: Add raw filter to course reserves summary page
Katrin Fischer [Wed, 10 Apr 2019 20:42:22 +0000 (20:42 +0000)]
Bug 22501: Add raw filter to course reserves summary page

Fixes another place where the public note is shown:
- Course reserves module start/summary page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22501: (QA follow-up) use $raw for the note in the intranet
Liz Rea [Tue, 9 Apr 2019 17:56:43 +0000 (17:56 +0000)]
Bug 22501: (QA follow-up) use $raw for the note in the intranet

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22501: OPAC course reserves notes should allow html links
Lucas Gass [Tue, 26 Mar 2019 17:41:36 +0000 (17:41 +0000)]
Bug 22501: OPAC course reserves notes should allow html links

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22642: Corrections to updatedatebase for bug 12395
Martin Renvoize [Mon, 8 Apr 2019 17:04:14 +0000 (18:04 +0100)]
Bug 22642: Corrections to updatedatebase for bug 12395

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19630: Removed constant message from Status column
Hayley Mapley [Sun, 7 Apr 2019 22:25:11 +0000 (10:25 +1200)]
Bug 19630: Removed constant message from Status column

Test plan:
Same as initial test plan, except that when a hold has no status that
the Status column for that hold should be blank instead of saying
"Hold has been placed".

Sponsored-by: Catalyst IT
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19630: Added Status column to Patron Holds table
Hayley Mapley [Thu, 14 Mar 2019 21:37:36 +0000 (21:37 +0000)]
Bug 19630: Added Status column to Patron Holds table

When a hold has been suspended or is waiting, the status
message appears in the Barcode column of the Holds table. This patch
fixes this by adding a separate Status column which details the status
of the Hold, whether it has been suspended, or is in transit, etc.

Test plan:
1) Place an item level hold and a 'Next Available' record level hold for
a patron.
2) View the holds in Patrons->Patron details for that Patron in the Check out and Details tabs
3) Suspend one of the holds, and note that the status appears in the
barcode column
4) Set a hold to be waiting for pickup, and note the status appears in
the barcode column
5) Apply the patch
6) Check the same holds and note that the statuses now appear in the new
column called Status, and note that if a hold has status effect that the
row reads "Hold has been placed"
7) Verify that this is the case in both the Holds tables (in Check out
    tab and Details tab)

Sponsored-by: Catalyst IT
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19497: Removed title (tooltip) from Edit button in items_search_fields.tt
Hayley Mapley [Thu, 14 Mar 2019 04:14:57 +0000 (04:14 +0000)]
Bug 19497: Removed title (tooltip) from Edit button in items_search_fields.tt

This patch removes the tooltip that appears when hovering over the Edit button
of Item Search Fields in the staff client. This was done for consistency reasons,
including that this tooltip is not translated and tooltips do not appear to be
on the majority of buttons in the staff client.

Test plan:
1) In Home->Administration->Item search fields create a new search field
if you haven't got any already
2) Observe the tooltip that appears when hovering over the Edit button in
the Item serach fields table.
3) Apply the patch and observe that the tool tip no longer appears.

Sponsored-by: Catalyst IT
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19670: DBRev 18.12.00.041
Nick Clemens [Thu, 11 Apr 2019 13:39:10 +0000 (13:39 +0000)]
Bug 19670: DBRev 18.12.00.041

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19670: Change Collation of marc_field to allow mixed case mappings
Ere Maijala [Thu, 14 Mar 2019 12:33:18 +0000 (14:33 +0200)]
Bug 19670: Change Collation of marc_field to allow mixed case mappings

Test plan:
1. Apply patch and update database
2. Verify that you can add a search field mapping for both 100a and 100A.
3. Verify that the above also works with a newly-created database.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22444: currencies_manage permission doesn't provide link to manage currencies...
Owen Leonard [Wed, 6 Mar 2019 19:02:50 +0000 (19:02 +0000)]
Bug 22444: currencies_manage permission doesn't provide link to manage currencies when selected alone

This patch modifies the acquisitions sidebar menu so that it checks
properly for the currencies_manage permission.

This patch also removes the menu link directly to the administration
home page. Since we're removing the check on the general
"CAN_user_parameters" permission it doesn't make sense to assume the
page is accessible.

To test, apply the patch and modifiy a staff user so that they have no
"parameters" permissions but do have "currencies_manage" permission.

Go to the Acquisitions home page. There should be a link to currencies
management in the sidebar menu.

Perform the same test with a user who has "parameters" permissions but
not "currencies_manage" permission. There should be no link to
currencies in the acquisitions sidebar menu. The user should have access
to the administrative home page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21263: Pickup library not set correctly when using Default holds policy
Maryse Simard [Thu, 7 Feb 2019 13:24:03 +0000 (08:24 -0500)]
Bug 21263: Pickup library not set correctly when using Default holds policy

In the case of a specific item hold, it can only be fulfilled if the pickup library
matches the hold fulfillment policy. Therefore, if OPACAllowUserToChooseBranch is
set to don't allow, the pickup library should correspond to the policy.

In case of hold that does not specify an item, the homebranch or holdingbranch
can't be determined at this time, so the pickup library still defaults to the
homebranch of the borrower. Same if there is no policy or it states 'any'.

To test:
- Make sure OPACAllowUserToChooseBranch is set to don't allow
- Make sure you have two branches A and B
- Have one item whose homebranch is B
- Have one user whose homebranch is A
- Make sure the circulation rules allow the user to reserve the item's item type

1. Go to Administration > Circulation and fines rules
2. Create a Default holds policy by item type for that item type
    - Item type = item's item type
    - Hold policy = From any library
    - Hold pickup library match = item's home library
    - Return policy = item returns home
3. Go to the OPAC and log in with the user's credentials
4. Search for the item
5. Click on "Place hold"
6. Select a specific item and confirm hold
7. In the user's file on the OPAC and check the reservation's pickup library. It should be the item's homebranch

You can then repeat the steps for 'item's holding library' or 'any library' as
the Hold pickup library match. It should also work the same way if there is no
'Default holds policy by item type' for this item type but a 'Default checkout,
hold and return policy' set.

Finally, check that placing a hold without selecting a specific item still
defaults the pickup library to the borrower's homebranch.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22121: Display 'Price paid' on ILL requests according to CurrencyFormat pref
Andrew Isherwood [Fri, 5 Apr 2019 13:45:39 +0000 (14:45 +0100)]
Bug 22121: Display 'Price paid' on ILL requests according to CurrencyFormat pref

To test:
- Install BLDSS backend
  see: https://wiki.koha-community.org/wiki/ILL_backends
- Add a new BLDSS ILL request
- Edit ILL request
- Fill in Price paid field
- Verify Price paid is formatted correctly on 'Manage ILL request'
  page

Signed-off-by: Ethan Amohia <ethan.amohia@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
https://bugs.koha-community.org/show_bug.cgi?id=22121

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22472: Make column_exists early return if the table does not exist
Jonathan Druart [Thu, 7 Mar 2019 12:14:25 +0000 (09:14 -0300)]
Bug 22472: Make column_exists early return if the table does not exist

On the way we move TableExists to C4::Installer, where it belongs to.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22472: Add tests
Jonathan Druart [Thu, 7 Mar 2019 12:14:06 +0000 (09:14 -0300)]
Bug 22472: Add tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21659: Change link to basket group edit page
Katrin Fischer [Thu, 4 Apr 2019 00:56:43 +0000 (00:56 +0000)]
Bug 21659: Change link to basket group edit page

I have taken another look at other links like the one
from acq order search and changed the link to not lead
to the vendor's basket group page but to the edit page
of the invidividual basket group.

To test:
- Same as first patch, verify links now lead
  to the basket grou edit page

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

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21659: Fix links to basket groups from order receive page
Katrin Fischer [Mon, 11 Mar 2019 16:24:16 +0000 (16:24 +0000)]
Bug 21659: Fix links to basket groups from order receive page

Fixes a problem with the template variables on the order
receive page, so that the links to basket groups work
correctly again.

To test:
- Create some orders with and without basket groups
- Receive shipment
- Verify that the basket group links for pending orders work right
- Receive an order line
- Verify that the basket group links for received orders work right

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22634: Standardize table creation for stockrotation* tables in kohastructure.sql
Katrin Fischer [Wed, 3 Apr 2019 20:35:38 +0000 (22:35 +0200)]
Bug 22634: Standardize table creation for stockrotation* tables in kohastructure.sql

The existing pattern is:
DROP TABLE IF EXISTS ...
CRATE TABLE

Stockrotation was using:
CREATE TABLE IF NOT EXISTS ...
which would not recreate the table in a database it's already
existing in possibly causing mismatches in table structure.

To test:
- Drop your database
- Run through the web installer
- Make sure there are no Database/SQL errors
- Makse sure the 4 stockrotation tables have been created

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22631: Make links on barcode on hold summary page consistent (bug 21070)
Katrin Fischer [Wed, 3 Apr 2019 19:28:38 +0000 (19:28 +0000)]
Bug 22631: Make links on barcode on hold summary page consistent (bug 21070)

Bug 21070 changed the link on the holds summary so the barcode
would link to the item on moredetail for an item level hold.

If a hold is already waiting, the link still goes to the detail
page of the record. This patch changes it so the barcode always
links to the item.

To test:
- Place some item level holds on a record
- Verify the barcodes on the hold summary page link to
  moredetail.pl
- Return one of the items so that the hold is waiting
- Verify the barcode links to the record detail page now
- Apply patch
- Verify barcodes for pending and waiting holds now both
  link to moredetail.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22624: Show OPAC description for authorised values in OPAC
Katrin Fischer [Mon, 1 Apr 2019 19:15:18 +0000 (19:15 +0000)]
Bug 22624: Show OPAC description for authorised values in OPAC

Patch adds the IS_OPAC parameter to a few GetByCode calls in
OPAC files.

To test:
- Add different OPAC and intranet descriptions to some authorised
  value categories:
  - TERM
  - DEPARTMENT
  - LOC
  - CCODE
- Create a new course using the values and adding items to it
- Check the course reserves overview and detail pages in OPAC
- Verify Department, term, location, and collection show
  the OPAC description if existing
- Create a subscription, make sure a default location is selected
- Check the OPAC detail page, subscription tab for this subsription
  in the OPAC
- Verify the location of the subscription displays correctly

Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13629: SingleBranchMode removes both library and availability search from advance...
Owen Leonard [Thu, 4 Apr 2019 18:27:28 +0000 (18:27 +0000)]
Bug 13629: SingleBranchMode removes both library and availability search from advanced search

This patch modifies the OPAC advanced search form so that it is possible
to limit searches to available items even if there is only one library.

To test, apply the patch and go to the advanced search page in the OPAC.

 - With only one library configured: There should be a section labeled
   "Availability" with just the "only available" checkbox.

 - With multiple libraries: The section should be labeled "Location and
   availability" and should have the library dropdown and the
   availability checkbox.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14358: Changing the module refreshes the page and resets library choice
Owen Leonard [Thu, 4 Apr 2019 14:05:21 +0000 (14:05 +0000)]
Bug 14358: Changing the module refreshes the page and resets library choice

This patch makes an incremental change towards fixing Bug 14358: The
"New notice" button is converted to a dropdown button which asks the
user to select a module to start with.

To test, apply the patch and go to Tools -> Notices. Test the "New
notice" button and confirm that module selections are reflected in the
notice add form you are shown.

Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22680: Compiled CSS
Nick Clemens [Thu, 11 Apr 2019 12:30:50 +0000 (12:30 +0000)]
Bug 22680: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22680: OPAC language footer not positioned correctly
Owen Leonard [Wed, 10 Apr 2019 17:55:22 +0000 (17:55 +0000)]
Bug 22680: OPAC language footer not positioned correctly

This patch modifies the OPAC CSS so that the language-selection footer
is positioned correctly.

To test, apply the patch and rebuild the OPAC CSS.

- Enable one or more translations in the OPAC
- View a page in the OPAC which can display in your browser without a
  vertical scrollbar (for instance, the OPAC main page with no news
  items or OpacMainUserBlock).
  - The language-selection footer should appear at the bottom of the
    screen. At smaller browser heights the footer should scroll
    offscreen.
  - Test with content in the opaccredits system preference, and with
    OpacKohaUrl enabled. The footer should still be positioned
    correctly.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22626: (RM follow-up) Adjust column after 12166
Nick Clemens [Thu, 11 Apr 2019 12:26:21 +0000 (12:26 +0000)]
Bug 22626: (RM follow-up) Adjust column after 12166

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22626: 'Filter paid transactions' broken on Transactions tab in staff
Owen Leonard [Tue, 9 Apr 2019 16:06:27 +0000 (16:06 +0000)]
Bug 22626: 'Filter paid transactions' broken on Transactions tab in staff

This patch changes a parameter in the function which filters the
DataTable of transactions. The addition of more columns to the table
changed the index of the column which is being filtered.

To test, apply the patch and locate a patron who has multiple fines or
charges, some of them paid. Go to Accounting -> Transactions. Test the
"Filter paid transactions" link. Table rows which show "0.00" in the
"Oustanding" column should be hidden.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12166: DBRev 18.12.00.040
Nick Clemens [Thu, 11 Apr 2019 12:21:01 +0000 (12:21 +0000)]
Bug 12166: DBRev 18.12.00.040

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12166: (QA follow-up) Update test for description
Martin Renvoize [Tue, 9 Apr 2019 08:19:16 +0000 (09:19 +0100)]
Bug 12166: (QA follow-up) Update test for description

Update the relevant test to check for 'description eq title' as aposed
to the old 'description eq "Reserve Charge - title"'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12166: (follow-up) Fix sequence of columns in OPAC
Katrin Fischer [Sat, 6 Apr 2019 13:16:56 +0000 (13:16 +0000)]
Bug 12166: (follow-up) Fix sequence of columns in OPAC

Type and description column headings were switched.

To test:
- Check the table headings of the fines table in the
  OPAC fines table match the content

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12166: (follow-up) Remove 'Reserve Charge' from descriptions in accountlines
Katrin Fischer [Sat, 6 Apr 2019 12:11:38 +0000 (12:11 +0000)]
Bug 12166: (follow-up) Remove 'Reserve Charge' from descriptions in accountlines

With the prior 'Hold fee' will be displayed in OPAC and staff, so
the 'Reserve Charge' would just be an untranslatable double up
of information.

To test:
- Make sure you create some Reserve Charges prior to applying this
  patch set
- Verify they show in staff and OPAC account
- Apply patch
- Run database update
- Verfy the "Rental Charge - " is gone and old and new entries
  match now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12166: Improve display of Reserve charges in patron account
Owen Leonard [Thu, 4 Apr 2019 15:44:30 +0000 (15:44 +0000)]
Bug 12166: Improve display of Reserve charges in patron account

This patch makes changes to the way hold fees are recorded and displayed
in the OPAC and staff client:

 - No English strings should be stored in the accountline description.
 - The accounttype code should be used to display what kind of charge it
   is.

To test, apply the patch and go to the staff client:

 - Configure a patron category to have a hold fee.
 - Place one or more holds for a patron in that category.
 - On the patron's record, view Accounting -> Make a payment
   - There should be a separate column for "Account type" showing "Hold
     fee" for the hold charges.
   - There should be no "Res" or "Reserve Charge" text in the
     description column--just the title.
 - Switch to the "Transactions" tab. The display should be similar.
 - In the OPAC, log in as a patron who has hold fees on their account.
   - View the "your fines" page to confirm that the information is
     displayed correctly there as well.

 - Place a hold for a patron who incurs hold charges.
 - Log in to the self-checkout module as that patron and check out an
   item which will fulfill that hold.
 - The correct fine information should be saved to accountlines: A "Res"
   type with a description consisting only of the title.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20937: Truncate items for print notices when user has an email
Nick Clemens [Wed, 27 Feb 2019 17:45:47 +0000 (12:45 -0500)]
Bug 20937: Truncate items for print notices when user has an email

To test:
 1 - Set PrintNoticesMaxLines to 1
 2 - Checkout 2 (or more) items to a patron and make them overdue to trigger a
notice
 3 - Make sure the patron has an email
 4 - Make sure the notice you are sending is set to 'print' as the type
 5 - Run overdue_notices.pl without the 'nomail' option
 6 - Find the message and note all items have been added
 7 - Apply patch
 8 - Clear the message queue
 9 - Re-run overdue_notices.pl
10 - Confirm the message now has only 1 item.
11 - Set PrintNoticesMaxLines to 0
12 - Clear the message queue
13 - Re-run overdue_notices.pl
14 - Confirm the message has 2 items as expected

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22075: Fix encoding problem with RIS export in OPAC
Katrin Fischer [Sun, 7 Apr 2019 16:25:28 +0000 (16:25 +0000)]
Bug 22075: Fix encoding problem with RIS export in OPAC

When exporting a record with diacritics in RIS
format from the detail page in OPAC the encoding
is not correct and the diacritics appear broken.

This patch fixes it.

To test:
- Find or create a record with some special
  chars in your OPAC
- Go to the detail page
- Save as > RIS
- Verify the diacritics are broken in an editor
- Apply patch
- Repeat and verify everything now displays correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22541: Invoice adjustments should show invoice number and include link on ordered...
Nick Clemens [Mon, 25 Mar 2019 12:55:03 +0000 (12:55 +0000)]
Bug 22541: Invoice adjustments should show invoice number and include link on ordered.pl and spent.pl

To test:
 1 - Find a vendor in acquisitions
 2 - Click 'receive shipment'
 3 - Create an invoice
 4 - Click 'Finish receiving'
 5 - Add an adjustment that encumbers while open and update adjustments
 6 - Go to acqui-home and click on the ordered total for the fund with the adjustment
 7 - Note the invoice adjustment shows the invoice id and does not link
 8 - Add another invoice and another adjustment, but close the invoice this time
 9 - Go to acqui-home and click on the spent total for the fund with the adjustment
10 - Note the invoice adjustment shows the invoice id and does not link
11 - Apply patch
12 - Visit the spent and ordered pages and note the adjustments show invoicenumber and are links
13 - prove -v t/db_dependent/Koha/Acquisition/Invoice/Adjustments.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22595: Items search is mixing inputs
Fridolin Somers [Wed, 27 Mar 2019 15:19:29 +0000 (16:19 +0100)]
Bug 22595: Items search is mixing inputs

Items search is using inputs and selects from search form to create an Ajax call.

In this call selects are parsed before inputs.
But a custom search field can be used with authorised values and used after a regular search field.
In this case the "q" param is not ordered like the "name" param.

Test plan :
1) Go to Administration > Item search fields
2) Define a search field with an authorised values category
3) Go to items search
4) Use a regular filter like call number
5) Click on new field
6) Use custom field with an authorised value
7) Perform search
=> Without patch you get wrong resuts, authorised value is used as value for first field
=> You can see this by listening traffic in Firebug, look at params "f" and "q"
8) Check some combinaison of select and input filters

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22250: Clean up Mana KB integration with serials and reports
Owen Leonard [Thu, 31 Jan 2019 14:29:45 +0000 (14:29 +0000)]
Bug 22250: Clean up Mana KB integration with serials and reports

This patch makes many changes to templates and JavaScript related to the
integration of Mana with serials reports:

 - Many incorrect uses of the raw filter with html
 - Corrections to Bootstrap modal markup
 - Untranslatable strings moved out of JavaScript
 - Removed markup and JavaScript related to reports comments, a feature
   which doesn't exist in this version.

  New include file: mana/mana-comment-status.inc

  This file contains hidden-by-default messages which are shown during
  the process of submitting a comment on a subscription.

  New include file: mana/mana-share-report.inc

  This file contains the "Share report" modal markup formerly in
  guided_reports_start.tt

  New JavaScript file: mana.js

  Previously mana.inc, an include file containing only JavaScript which
  didn't include any template processing.

  Changed: mana/mana-report-search-result.inc

  This include file is now a full template so that jQuery's load()
  function can be used to pull its contents into the reports search
  modal.

  Changed: svc/mana/search

  This script was returning json-encoded HTML. Now it returns regular
  HTML.

To test you must have Mana configured and enabled. Apply the patch and
go to Reports -> Saved reports.

 - Choose New report -> New SQL from Mana. A "Mana search" modal should
   appear.
   - Perform a search which will return results, e.g. "circulation."
   - A "Loading" indicator should appear while the results are being
     retrieved. It should disappear when results appear.
   - Results should appear in the DataTable with sorting, paging, and
     search options.
   - In the "Notes" column, notes longer than 200 characters should be
     truncated with a "Show more" link. Clicking it should expand the
     comment and reveal a "Show less" link in its place.
   - Click the "Import" button (previously "Use"). The button icon
     should change to a loading indicator.
   - When the import is complete you should be redirected to a view of
     your new report.

Go to Serials and click the "Search on Mana" link in the sidebar.

 - Perform a search for a serial
 - Results should appear in a DataTable with sorting, paging, and search
   options.
 - Sorting by title should ignore articles "a," "an," and "the."

Create a new subscription or edit an existing subscription which will
match a record in Mana.

 - On the second step of adding/editing the subscription a message
   should appear at the top of the form, "Searching for subscription in
   Mana Knowledge Base," with a loading icon.
 - When searching has completed a "Show Mana results" link should
   appear.
 - Clicking the link should trigger a modal showing search results which
   match your subscription, displayed in a DataTable with sorting,
   paging, and search options.
 - The last column of the table should contain "Import" and "Report"
   buttons.
   - Clicking the "Report" button should trigger a menu. Any existing
     comments will be listed as well as a "New comment" item.
     - Clicking an existing comment should cause the menu to close and a
       "Submitting comment" message to appear. It should be shortly
       replaced with a "Your comment has been submitted" message.
     - Clicking "New comment" should reveal a comment form.
       - It should not be possible to submit an empty comment.
       - Clicking the "cancel" link should redisplay the search results.
       - Submitting a new comment should trigger a "Submitting comment"
         message followed by a "Your comment has been submitted"
         message.
   - In the table of search results, click the "Import" button
     (previously "Use"). The button icon should change to a loading
     indicator.
     - The modal should close and the data from Mana should be loaded
       into the subscription entry form.

View the detail page of a subscription which has saved with Mana data.

  - There should be a "Report mistake" button in the toolbar. Clicking
    it should reveal a menu of comments like the one you saw previously.
     - Clicking an existing comment should cause the menu to close and a
       "Submitting comment" message to appear. It should be shortly
       replaced with a "Your comment has been submitted" message.
     - Clicking "New comment" should reveal a comment form modal.
       - It should not be possible to submit an empty comment.
       - Clicking the "cancel" link should hide the modal.
       - Submitting a new comment should trigger a "Submitting comment"
         message followed by a "Your comment has been submitted"
         message.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19747: Add link to article requests help page
Katrin Fischer [Tue, 12 Mar 2019 11:11:45 +0000 (11:11 +0000)]
Bug 19747: Add link to article requests help page

Newer manuals contain information about article requests.
This patch adds the link to the article request section
in the manual.

To test:
- Activate ArticleRequests system preference
- Go to Circulation > Article requests
- Click on Help
- Verify that you end up in the proper section of the manual

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20912: (QA follow-up) Fix for missed signature failure
Martin Renvoize [Wed, 3 Apr 2019 14:59:20 +0000 (15:59 +0100)]
Bug 20912: (QA follow-up) Fix for missed signature failure

We missed a change in calling parameters passed to CalcDateDue in AddRenewal
during the initial QAing. This patch corrects the call and adds a test to catch
regressions.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22646: Fix use of PrivacyPolicyURL
Magnus Enger [Fri, 5 Apr 2019 08:03:58 +0000 (10:03 +0200)]
Bug 22646: Fix use of PrivacyPolicyURL

To test:

PatronSelfRegistration = Allow
PatronSelfRegistrationDefaultCategory = PT (or some other real category)
GDPR_Policy = Enforced
PrivacyPolicyURL = Some URL

- Go to <opac>/cgi-bin/koha/opac-memberentry.pl and verify that the text "privacy
  policy" displays a link to the current page, not the URL in PrivacyPolicyURL
- Go to Administration > System preferences > Patrons > Privacy
- Verify that the descriptions of GDPR_Policy and PrivacyPolicyURL does not
  mention that PrivacyPolicyURL needs to be set if GDPR_Policy is set.
- Apply the patch
- Verify that opac-memberentry.pl now links to the URL in PrivacyPolicyURL
- Verify that the syspref descriptions mention the relationship between them

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21013: Missing itemtype for checkut makes patron summary print explode
Owen Leonard [Thu, 14 Mar 2019 13:15:01 +0000 (13:15 +0000)]
Bug 21013: Missing itemtype for checkut makes patron summary print explode

This patch moves retrieval of the item type description from the script
to the template using the ItemTypes template plugin.

To test, apply the patch and locate an item which is checked out to
someone. Modify the database record for that item to remove the item
type (items.itype).

View the print summary for the patron who has that item checked out. The
page should display correctly. Checked-out items which have an item type
should show that item type description correctly.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22295: Make Elasticsearch query builder group multi-term queries
Ere Maijala [Fri, 8 Mar 2019 11:27:26 +0000 (13:27 +0200)]
Bug 22295: Make Elasticsearch query builder group multi-term queries

Test plan:

1. Do an advanced search for
Title = new
AND
Title = york
2. Verify that the results match an advanced search for:
Title = new york
3. Verify that tests in t/db_dependent/Koha/SearchEngine/Elasticsearch still pass

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22675: Fix SCO behaviour on non-existent barcodes
Tomas Cohen Arazi [Tue, 9 Apr 2019 18:59:14 +0000 (15:59 -0300)]
Bug 22675: Fix SCO behaviour on non-existent barcodes

Bug 21206 replaced GetItem for Koha::Items->find, and introduced this
problem. This patch verifies $item is defined before attempting to use
its methods.

To test:
- Log into SCO
- Type an invalid barcode
=> FAIL: Things explode :-/
- Apply this patch, reload
- Type an invalid barcode
=> SUCCESS: A nice error message is displayed :-D
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22553: Unchecking a subpermission does not uncheck the top level permission
Owen Leonard [Tue, 9 Apr 2019 13:21:08 +0000 (13:21 +0000)]
Bug 22553: Unchecking a subpermission does not uncheck the top level permission

This patch makes a minor change to the set permissions page's JavaScript
so that unchecking a subpermission will uncheck the top level
permission.

To test, apply the patch and open the "Set permissions" page for a
patron.

 - Expand a permission with multiple subpermissions.
 - Check the top level permission. All subpermissions should be checked.
 - Uncheck one of the subpermissions. The top level permission should
   now be unchecked.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22288: Correct item search in batchMod by barcode file
Nick Clemens [Sat, 23 Mar 2019 11:44:53 +0000 (11:44 +0000)]
Bug 22288: Correct item search in batchMod by barcode file

To test:
1 - Have a list of barcodes that exist in your catalog
2 - Go to Tools->Batch item modification
3 - Attempt to modify items using the list
4 - Get an error page
5 - Apply patch
6 - Repeat
7 - Modification should work correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22390: Never copy items if original order has been created from a subscription
Jonathan Druart [Mon, 4 Mar 2019 19:07:22 +0000 (16:07 -0300)]
Bug 22390: Never copy items if original order has been created from a subscription

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Tiny change to the code comment: serial => subscription order

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22390: (bug 15184 follow-up) Use aqorders.subscriptionid instead of biblio.serial
Jonathan Druart [Thu, 21 Feb 2019 17:48:24 +0000 (14:48 -0300)]
Bug 22390: (bug 15184 follow-up) Use aqorders.subscriptionid instead of biblio.serial

It seems that we made a wrong assumption on bug 15184, see
  commit d658cb6f7ecb18845a78d4708ee63ad1126f220f
  Bug 15184: Do copy items for not a serial OR if items are created on ordering

To know if an order has been created from a subscription we should check
$order->subscriptionid instead of the $biblio->serial flag

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22618: Move tests to t/db_dependent/Acquisition.t
Nick Clemens [Tue, 2 Apr 2019 18:02:14 +0000 (18:02 +0000)]
Bug 22618: Move tests to t/db_dependent/Acquisition.t

prove -v t/db_dependent/Acquisition.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22641: Use raw filter on html slip
Nick Clemens [Sat, 23 Mar 2019 08:13:13 +0000 (08:13 +0000)]
Bug 22641: Use raw filter on html slip

To test:
Enable SCO
Load a patron
Hit finish, print slip
Note slip shows as raw html
Apply patch
Repeat, get a correctly formatted slip

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=22068

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17978: Unit tests for changes
Nick Clemens [Mon, 24 Dec 2018 15:59:22 +0000 (15:59 +0000)]
Bug 17978: Unit tests for changes

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17978: Check if hold can be placed before placing on placerequest.pl
Nick Clemens [Mon, 24 Dec 2018 14:33:51 +0000 (14:33 +0000)]
Bug 17978: Check if hold can be placed before placing on placerequest.pl

To test:
 1 - Set an All/All/All rule with reserves limited 2 to
 2 - Search in the staff side
 3 - Select all records (or more than 2) from the results
 4 - Click 'Place hold'
 5 - Find a patron, place holds
 6 - You get more holds than you should
 7 - Delete those holds
 8 - Apply patch
 9 - Search and select more than 2 records
10 - Find patron, place holds
11 - Only 2 holds are placed

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17978: Circ rules will not limit holds
Kyle M Hall [Tue, 19 Dec 2017 19:20:56 +0000 (14:20 -0500)]
Bug 17978: Circ rules will not limit holds

The crux of this issue is that all those holds are unfilled record level holds. The code that checks for the number of holds the user already has *always* uses a branchcode of some form. Because of this, any open record level holds are completely ignored for this purpose.

Test Plan:
1) Set ReservesControlBranch to "item's home library"
2) Set an All libraries/All Patrons/All itemtypes rules limiting a patron to 2 holds
3) Place 3 record level holds, you can but you should not be able to!
4) Delete the holds
5) Apply this patch
6) Attempt to place 3 record level holds
7) Note that you cannot!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22068: (QA follow-up) Return meaningful error codes
Tomas Cohen Arazi [Fri, 5 Apr 2019 18:13:36 +0000 (15:13 -0300)]
Bug 22068: (QA follow-up) Return meaningful error codes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22068: Prevent patrons to cancel article request they did not create
Jonathan Druart [Thu, 14 Feb 2019 20:03:17 +0000 (17:03 -0300)]
Bug 22068: Prevent patrons to cancel article request they did not create

opac-article-request-cancel.pl doesn't check that the article request to
be cancelled actually belongs to the logged-in borrower. This results in
any logged-in user being able to cancel any article request just by
changing the id in the URL.

Test plan:
- Login with Patron P1, create an article request
- Cancel it
- Create another one
- Copy the cancellation link (must be /cgi-bin/koha/opac-article-request-cancel.pl?id=X)
- Login with Patron P2
- Hit the cancellation link
=> Without this patch the article request is cancelled
=> With this patch applied there is a 404 redirection

Note that the 404 will also appears when the article request id does not
exist.

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: Schema updates
Nick Clemens [Wed, 10 Apr 2019 19:57:10 +0000 (19:57 +0000)]
Bug 22600: Schema updates

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: DBRev 18.12.00.039
Nick Clemens [Wed, 10 Apr 2019 19:55:14 +0000 (19:55 +0000)]
Bug 22600: DBRev 18.12.00.039

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22512: DBRev 18.12.00.038
Nick Clemens [Wed, 10 Apr 2019 19:53:39 +0000 (19:53 +0000)]
Bug 22512: DBRev 18.12.00.038

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: (QA follow-up) Raise an exception on missing interface param
Tomas Cohen Arazi [Tue, 9 Apr 2019 14:58:19 +0000 (11:58 -0300)]
Bug 22600: (QA follow-up) Raise an exception on missing interface param

This patch makes add_credit and add_debit raise a
Koha::Exceptions::MissingParameter exception if the 'interface'
parameter is ommited.

The database will fail to generate the line anyways in strict mode, and
we better handle it gracefuly.

Bonus: fixed the TODOs in the tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22600: Update Tests adding 'interface' as needed
Martin Renvoize [Fri, 29 Mar 2019 09:46:12 +0000 (09:46 +0000)]
Bug 22600: Update Tests adding 'interface' as needed

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>