koha.git
5 years agoBug 22116: Add price formatting to rental charge and replacement price on items tab...
Katrin Fischer [Sat, 5 Jan 2019 06:45:05 +0000 (06:45 +0000)]
Bug 22116: Add price formatting to rental charge and replacement price on items tab in staff

Adds formatting to replacement price and rental charge on items
tab.

To test:
- Add a rental charge to one or more of your item types
- Edit a record with some items, add replacement cost to some
- Find or create a record with your rental charged itemtype (MARC21:942$c)
- Go to the staff detail page of those records
- Check "Items" tab for
  - Rental charge on top
  - Replacement price for items
- Verify information is displayed correctly when toggling CurrencyFormat
  system preference

Signed-off-by: Jack Kelliher <jke0429@stacmail.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21441: Fix wrong reference to a 'holds' table on system information tab
Katrin Fischer [Mon, 4 Feb 2019 23:42:34 +0000 (00:42 +0100)]
Bug 21441: Fix wrong reference to a 'holds' table on system information tab

It looks like a typo snuck in on the about page, listing a holds
table instead of reserves.

To test:
- Manually create the same PK (reserve_id) in reserves and old_reserves
- Verify that the message on about > system information now
  correctly lists those tables (not holds and old_reserves)

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 21840: Fixed some typos in the templates
Jasmine Amohia [Wed, 16 Jan 2019 01:37:22 +0000 (01:37 +0000)]
Bug 21840: Fixed some typos in the templates

intranet-tmpl/prog/en/modules/ill/ill-requests.tt:13
Bibliograpic record ID --> Bibliographic record ID

intranet-tmpl/prog/en/modules/acqui/basket.tt:547
Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order cancel holds first -->  ... with this order. Cancel holds first

intranet-tmpl/prog/en/modules/acqui/parcel.tt
Can't cancel order, ([% loop_order.holds_on_order | html %]) holds are linked with this order cancel holds first --> ... with this order. Cancel holds first

intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt:32
Print this slabel --> Print this label

Test plan:
1. Check that the fixes in the patch are correct

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 21829: (QA follow-up) - Update the number of unit tests
Kyle M Hall [Mon, 11 Feb 2019 12:15:11 +0000 (07:15 -0500)]
Bug 21829: (QA follow-up) - Update the number of unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21829: Correctly format dateexpiry in notices (date only)
Jonathan Druart [Wed, 14 Nov 2018 12:38:01 +0000 (09:38 -0300)]
Bug 21829: Correctly format dateexpiry in notices (date only)

dateexpiry is a date, we should not display the time
part in notice.

Test plan:
Create a notice with borrowers.dateexpiry, generate this notice.
The value should be displayed without the time part

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21829: Add tests for dateexpiry format in notices
Jonathan Druart [Wed, 14 Nov 2018 12:37:58 +0000 (09:37 -0300)]
Bug 21829: Add tests for dateexpiry format in notices

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22009: Fix error messages for filing rules and splitting rules.
Katrin Fischer [Thu, 20 Dec 2018 23:37:02 +0000 (23:37 +0000)]
Bug 22009: Fix error messages for filing rules and splitting rules.

Some error messages were doubled up with different error codes.

To test:
I am not sure how to trigger those from the GUI, might
require a code review/code changes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22119: Add price formatting in more places in circulation
Katrin Fischer [Sun, 13 Jan 2019 09:06:22 +0000 (10:06 +0100)]
Bug 22119: Add price formatting in more places in circulation

This adds some missing Price filters to some places in circulation.
To check verify the amount are displayed according to setting
of CurrencyFormat (use FR or CH for seeing a change)

Use a patron account with no pending fines at the beginning
for all tests.

1)
- Switch RentalFeesCheckoutConfirmation to "Ask"
- Check out an item with a rental charge
- Verify message is formatted correctly:
  Rental charge for this item: ...

2)
- Switch RentalsInNoissuesCharge to "Don't include"
- Make sure patron has only Rental fines on their account
- Check out another item
- Verify message is formatted correctly:
  The patron has unpaid charges for holds, rentals etc ...

3)
- Switch BatchCheckouts to "Allow"
- Add the patron category of your test patron to BatchCheckoutsValidCategories
- Checkout any item
- Verify the message in the information column is formatted correctly:
  The patron has unpaid charges for holds, rentals etc of ...

Signed-off-by: Jasmine Amohia <jasmineamohia.student@wegc.school.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
Katrin Fischer [Sat, 5 Jan 2019 17:39:42 +0000 (17:39 +0000)]
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22120: Add price formattig to patron summary print
Katrin Fischer [Sun, 13 Jan 2019 10:15:27 +0000 (11:15 +0100)]
Bug 22120: Add price formattig to patron summary print

The patron summary print lists the replacement prices
and rental charges of items and totals them. With this
patch they will be formatted according to the
CurrencyFormat system preference.

To test:
- Find or create a patron with some checkouts
- Make sure some items have replacement price set
  and some have a rental charge
- "Print summary" from the account in staff
- Verify that charges and prices in the checkouts
  table are formatted correctly
- Toggle CurrencyFormat to different settings

Signed-off-by: helene hickey <hickeyhe@wgc.school.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17347: Ignore whitespace before and after on renewing
Katrin Fischer [Mon, 14 Jan 2019 05:41:48 +0000 (05:41 +0000)]
Bug 17347: Ignore whitespace before and after on renewing

When an item is checked out, Koha ignores whitespace
at the beginning and the end of the entered barcode.
This makes life easier, if a barcode is C&P from another
page. This patch makes the renewal page behave the same.

To test:
- Checkout an item
- Renew the item from the renew tab or renewal page
  entering the barcode with leading and trailing
  whitespace
- "Barcode not found"
- Apply patch
- Try again
- Barcode should be found now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21885: Calendar to-date starts before end-date
Pasi Kallinen [Tue, 27 Nov 2018 09:53:32 +0000 (11:53 +0200)]
Bug 21885: Calendar to-date starts before end-date

When adding new holidays to the calendar, you pick the start date,
and then the end date, but the end date calendar will start from
current date, not from the picked start date. Sometimes this means
many extra clicks to pick an end date.

Make the end date calendar start from the beginning date by default.

Test plan:

1) Go to the tools -> calendar
2) Pick a start date somewhere in the future, and then open the
   end date calendar. Notice how it starts before the start date
   of the date range.
3) Apply patch.
4) Pick a start date in the future. The end date calendar should
   automatically default to the same date.
5) Change the start date a day backwards, note how the end date
   does not change.
6) Change the start date after the end date, note how the end date
   adjusts, so it is not in the past.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22238: Remove koha-*-sip scripts in favor of koha-sip
Tomas Cohen Arazi [Wed, 30 Jan 2019 18:31:43 +0000 (15:31 -0300)]
Bug 22238: Remove koha-*-sip scripts in favor of koha-sip

This patch removes traces from the (deprecated) koha-*-sip scripts.

To test:
- Apply the patch
- Verify no traces of koha-*-sip remain on the codebase (besides
  Release Notes, koha-common.links and the koha-sip script):
  $ cd kohaclone
  $ git grep koha-start-sip
  $ git grep koha-stop-sip
  $ git grep koha-enable-sip
=> SUCCESS: No traces!
- Create the following symlinks:
  $ sudo ln -s /usr/sbin/koha-sip  /usr/sbin/koha-start-sip
  $ sudo ln -s /usr/sbin/koha-sip  /usr/sbin/koha-stop-sip
  $ sudo ln -s /usr/sbin/koha-sip  /usr/sbin/koha-enable-sip
- Try the koha-*-zebra commands:
  $ sudo koha-stop-sip kohadev
  $ sudo koha-start-sip kohadev
  $ sudo koha-restart-sip kohadev
=> SUCCESS: They all work as expected!

- Sign off :-D!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22235: (follow-up) Make koha-remove stop SIP server if required
Tomas Cohen Arazi [Wed, 30 Jan 2019 12:44:21 +0000 (09:44 -0300)]
Bug 22235: (follow-up) Make koha-remove stop SIP server if required

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22235: Make maintenance scripts use koha-sip instead of koha-*-sip
Tomas Cohen Arazi [Wed, 30 Jan 2019 12:37:47 +0000 (09:37 -0300)]
Bug 22235: Make maintenance scripts use koha-sip instead of koha-*-sip

This patch makes all maintenance scripts use **koha-sip** instead of
the old **koha-*-sip** scripts.

To test:
- Run:
  $ perl misc4dev/cp_debian_files.pl
  $ sudo service koha-common stop
=> SUCCESS: No errors and the SIP-related sevices are stopped
  $ sudo service koha-common start
=> SUCCESS: No errors and the SIP-related services are started
  $ sudo service koha-common restart
=> SUCCESS: No erros and SIP-related services are running
  $ sudo koha-create --create-db test
  $ sudo koha-sip --enable test
  $ sudo koha-sip --start test
  $ sudo koha-disable test
=> SUCCESS: No errors, instance disabled, no SIP running for test
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18562: Tab completion in bash
Tomas Cohen Arazi [Wed, 30 Jan 2019 12:12:36 +0000 (09:12 -0300)]
Bug 18562: Tab completion in bash

This patch adds the fancy tab completion in bash.

To test:
- Run:
  $ source debian/koha-common.bash-completion
  $ sudo koha-sip <tab>
- Play with all the options
=> SUCCESS: The combinations make sense (e.g. only SIP-enabled instances
  are completed for --start, --stop, --restart, -v and --verbose are not
  offered if the other one is already in there, --enable only applies to
  SIP-disabled instances, etc).
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18562: Add manpage for koha-sip
Tomas Cohen Arazi [Wed, 30 Jan 2019 12:12:25 +0000 (09:12 -0300)]
Bug 18562: Add manpage for koha-sip

This patch adds the manpage for koha-sip.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove xt/verify-debian-docbook.t
=> SUCCESS: Tests pass!
- Run:
  $ misc4dev/cp_debian_files.pl
  $ man koha-sip
=> SUCCESS: The man page shows correctly.
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18562: Add koha-sip maintenance script
Tomas Cohen Arazi [Wed, 30 Jan 2019 11:42:53 +0000 (08:42 -0300)]
Bug 18562: Add koha-sip maintenance script

This patch introduces a single script to handle all actions on SIP
servers for Koha instances. It is intended to be a replacement for:

- koha-start-sip
- koha-stop-sip
- koha-enable-sip

It adds a function called is_sip_running to koha-functions.sh.

To test:
- Apply this patch
- Run:
  $ misc4dev/cp_debian_files.pl
  $ sudo koha-sip --enable kohadev
  $ sudo koha-sip --start kohadev
  $ sudo koha-sip --status kohadev
=> SUCCESS: The SIP server is running for kohadev
- Run:
  $ sudo koha-sip --restart --verbose kohadev
  $ sudo koha-sip --status kohadev
=> SUCCESS: The SIP server is running for kohadev
- Run:
  $ sudo koha-sip --stop kohadev
  $ sudo koha-sip --status kohadev
=> SUCCESS: The SIP server is not running for kohadev
- Play with other combinations like enabling an already enabled
instance, etc. Remember you need to remove the
/etc/koha/sites/kohadev/SIPconfig.xml file so it is considered disabled.
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22293: Sticky toolbar making vendor form uneditable
Owen Leonard [Fri, 8 Feb 2019 12:52:48 +0000 (12:52 +0000)]
Bug 22293: Sticky toolbar making vendor form uneditable

The new floating toolbar plugin doesn't like a particular combination of
markup: A toolbar inside a form which is styled "display:inline." The
staff client CSS styles forms that way globally, so it must be
explicitly overridden in these situations.

Changing the default will have broad consequences, so I propose an
inline style to fix this.

To test, apply the patch and go to Acquisitions. Add or edit a vendor
and confirm that after scrolling down the page the form is still
editable.

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
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 22282: Fix PDF issue when exporting PDF in French format.
Liz Rea [Thu, 31 Jan 2019 22:41:29 +0000 (22:41 +0000)]
Bug 22282: Fix PDF issue when exporting PDF in French format.

Fixing up QA comments, keeping 1st instance and removing the 2nd.
Original test plan by Christophe Croullebois.

To test :
Without the patch :

1° select in Acquisitions preferences/OrderPdfFormat French 3-page
2° restart plack if needed
3° In acqui/basketgroup.pl select closed tab
4° Click on "Export as PDF" button
5° You should see a blank page saying "Internal Server Error"

With the patch :

Do the same

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22110: Fix editing of adjustments for CurrencyFormat != US
Katrin Fischer [Mon, 14 Jan 2019 12:47:25 +0000 (12:47 +0000)]
Bug 22110: Fix editing of adjustments for CurrencyFormat != US

When using CurrencyFormat FR or CH the editing an amount behave
badly. Example: changing displayed 1,00 to 1,11 would save as 1,00.

At the moment Koha only understands decimal dot, not comma.
So every time data is entered, we use decimal dot.

1) Add an adjustment to an invoice
2) Change system preference CurrencyFormat to FR or CH
3) Verify the amount displays with a decimal comma
4) Try changing the amount to something like 1,11
5) Save the amount
6) Verify it shows 1.00
7) Apply patch
8) Refresh the invoice page if necessary
9) Verify amount is now shown as 1.00
10) Repeat test, use 1.11
11) Verify it will be stored correctly.

Signed-off-by: Mackey Johnstone <mackeyfj@gmail.com>
Signed-off-by: mikael <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 22278: Clear cache when creating new report groups or subgroups
Nick Clemens [Wed, 6 Feb 2019 12:49:58 +0000 (12:49 +0000)]
Bug 22278: Clear cache when creating new report groups or subgroups

When a user adds a new group we create it, then fetch the groups from the cache. However, we aren't clearing the cache on creation. This patch fixes that

To test:
 0) Start a new report
 1) Pick create for the group
 2) Enter code and value
 3) Save
 4) You remain on the page and value and code are now empty (ok)
 5) BUT: The pull down for the group remains "None" instead of reflecting
    the new group
 6) Open a new tab and browse to reports - note the group exists and the report is in it
 7) On original tab save report again, the group was not selected so is lost
 8) Apply patch
 9) Retest with a new report
10) Group is created, saved, and selected upon save
11) Subsequent edits include the new group
12) Test with subgroups as well

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 21738: unit tests for HoldTitle
Alex Arnaud [Thu, 7 Feb 2019 16:22:17 +0000 (17:22 +0100)]
Bug 21738: unit tests for HoldTitle

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21738: make call of CanBookBeReserved more safe
Alex Arnaud [Fri, 4 Jan 2019 15:33:39 +0000 (16:33 +0100)]
Bug 21738: make call of CanBookBeReserved more safe

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 21738: check items count in C4:ILSDI::HoldTitle
Alex Arnaud [Tue, 13 Nov 2018 08:44:51 +0000 (09:44 +0100)]
Bug 21738: check items count in C4:ILSDI::HoldTitle

Test plan:
  - Try holding a title without items via ILS-DI
    (cgi-bin/koha/ilsdi.pl?service=HoldTitle&patron_id=1&bib_id=1),
  - you get an error,
  - apply this patch,
  - try again,
  - you should get the code "Notitems"Bug 21738: check items count in
    C4:ILSDI::HoldTitle

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 18723: Change dot into comma
Jose-Mario Monteiro-Santos [Thu, 17 Jan 2019 21:41:58 +0000 (16:41 -0500)]
Bug 18723: Change dot into comma

This fixes the regression that multiplies the amount entered by 100
when CurrencyFormat is set to FR. It replaces the last dot with a
comma before dealing with the value of ActualCost and ReplacementCost.

Test Plan:
a)Replicate the issue:
    0- Set CurrencyFormat to FR
    1- Go to Acquisitions
    2- Search for a Vendor
    3- Click on "New basket"
    4- Give basket a name and click "Save"
    5- Click on "Add to basket"
    6- Add an order through preferred method
    7- In Accounting details, enter a vendor price with dot decimal (i.e. 19.44)
    8- Save your order line
    9- Click on "Close this basket"
    10- Confirm closing of basket by clicking on "Yes, close"
    11- Click on "Receive shipment"
    12- Enter an invoice number and click "Next"
    13- Click on "Receive" to the right of your order
    14- In Accounting details, notice the Actual cost is written with a decimal dot.
    15- Change the Actual cost, using a dot decimal (i.e 20.99)
    16- Receive the order
    17- Click on "Save"
    18- In "Already received" notice the price is multiplied by 100 (i.e. 2099,00)
    19- Click on "Cancel receipt"
    20- Click on "Receive" to the right of your order
    21- In Accounting details, change the Actual cost, using a comma decimal (i.e. 20,99)
    22- Receive the order
    23- Click on "Save"
    24- In "Already received", notice the price is correct.
b)Apply the patch
c)Test the patch:
    1- Click on "Cancel receipt"
    2- Click on "Receive to the right of your order
    3- Change the Actual cost/Replacement cost, using a dot decimal (21.99)
    4- Receive the order
    5- Click on "Save"
    6- Notice that the Actual cost and the Replacement cost use commas
    7- Change the Actual cost, using a comma decimal (21,99)
    8- Click on "Save"
    9- In "Already received", notice the price is still correct.

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21446: Remove fix comment
Christopher Brannon [Sat, 29 Sep 2018 19:08:47 +0000 (19:08 +0000)]
Bug 21446: Remove fix comment

Fix is not needed.

Signed-off-by: helene hickey <hickeyhe@wgc.school.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21446: Improve display of changed values on course reserves and show permanent...
Christopher Brannon [Sat, 29 Sep 2018 18:09:03 +0000 (18:09 +0000)]
Bug 21446: Improve display of changed values on course reserves and show permanent location instead of cart

TO TEST:
1) Set ReturnToShelvingCart on.
2) Create a Course Reserve and make inactive.
3) Add an item, changing Item type, Collection code, Shelving
   location, and Holding library.
4) Note these four fields in the item list.
5) Activate course reserve.
6) Note subtle/no difference in these fiels in the list.
7) Check in the item.
8) Go back to course reserves and note that the cart is listed in the
   field instead of permanent location.
9) Deactivate course reserve.
10) Reset permanent location on item manually.
11) Apply patch.
12) Repeat steps 4-9 noting that the permanent location is showing
    instead of current location.
    Also, if a change is assigned to the item, the change AND
    the regular state always show.  The active state will be in
    bold.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20000: Use Modern::Perl in installer scripts
Aleisha Amohia [Wed, 19 Dec 2018 20:32:32 +0000 (20:32 +0000)]
Bug 20000: Use Modern::Perl in installer scripts

To test:

Check that we are using Modern::Perl when strict *and* warnings were used before,
and commented lines and FIXMEs have been removed from the rest, out of
files listed below.

data/mysql/backfill_statistics.pl
data/mysql/labels_upgrade.pl
data/mysql/patroncards_upgrade.pl
data/mysql/update22to30.pl
data/mysql/updatedatabase.pl
externalmodules.pl
html-template-to-template-toolkit.pl
install.pl

Sponsored-by: Catalyst IT
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 11373: (follow-up) Add "change calculation" feature to the fine payment forms
Owen Leonard [Fri, 11 Jan 2019 16:05:12 +0000 (16:05 +0000)]
Bug 11373: (follow-up) Add "change calculation" feature to the fine payment forms

This patch provides some follow-ups, including corrections to the
JavaScript and updates to the text for readability.

- Remove obsolete script "type" attribute
- Update the use of the obsolete jQuery method "bind"
- Use Bootstrap's built-in "show" option instead of simulated click
- Handle preventDoubleFormSubmit function's "waiting" class if modal is
  closed manually

To test, apply the patch and follow the original test plan. Everything
should work as expected.

Note that when the modal is shown, the cursor changes to the "waiting"
one when you hover over the body of the page. If you click "No" in the
modal, the cursor should return to normal.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 11373: Show the difference between the amount collected and the amount paid of...
Frédérick [Tue, 10 Dec 2013 21:51:39 +0000 (16:51 -0500)]
Bug 11373: Show the difference between the amount collected and the amount paid of a fine payment.

This patch adds a feature in the fine payment section. It allows to see the change due to patrons when the amount collected is higher than the amount paid.

Test plan :
- Apply patch.
- Select a patron with a fine.
- Go to Fines > Pay fines.
- Click the button pay.
- Choose the amount paid equal to the outstanding amount (exemple : 3$).
- Choose the amount collected to be more than the outstanding amount (exemple : 5$).
- Confirm that the change is correct (example : 5$ - 3$ = 2$).
- Click the button confirm.
- Click on Yes in the dialog box.
- Confirm that the payment has been made (example : last amount = 3$).

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22195: (follow-up) Add text labels to buttons if window is wide enough
Owen Leonard [Fri, 1 Feb 2019 14:12:18 +0000 (14:12 +0000)]
Bug 22195: (follow-up) Add text labels to buttons if window is wide enough

This patch adds responsive handling of text labels to the columns
configuration and export buttons.

To test, apply the patch and clear your browser cache if necessary.

 - View a page with column configuration, e.g. Administration -> Patron
   categories.
 - At wider browser widths the buttons should have text labels.
 - At narrower browser widths the labels should be hidden.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22195: (follow-up) Add tooltip to buttons
Owen Leonard [Sat, 26 Jan 2019 19:20:32 +0000 (19:20 +0000)]
Bug 22195: (follow-up) Add tooltip to buttons

This patch adds title attributes and Bootstrap tooltips to the columns
configuration and export/print butttons.

To test, apply the patch and visit a page with columns configuration
buttons. Confirm that when you hover over each of the DataTable control
buttons a tooltip is shown.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22195: Change default DataTables configuration to consolidate buttons
Owen Leonard [Wed, 23 Jan 2019 16:40:44 +0000 (16:40 +0000)]
Bug 22195: Change default DataTables configuration to consolidate buttons

This patch changes the default DataTables configuration provided by the
columns settings include file. It consolidates DataTables buttons into
to menus: One for column configuration and one for export options.

This change would not affect tables which aren't set up for column
configuration.

To test, apply the patch and view a page with columns configuration.

 Example: Tools -> Notices & slips
  - Confirm that the buttons appear as expected.
  - Confirm that each button menu performs its task correctly (column
    visiblity, export, print).
  - Test other pages with columns configuration. For instance:
    Acquisitions order search, Currencies administration, Holds queue

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21850: (follow-up) Add query information in title attribute
Owen Leonard [Mon, 28 Jan 2019 18:46:41 +0000 (18:46 +0000)]
Bug 21850: (follow-up) Add query information in title attribute

This follow-up adds back the old machine-friendly search details to a
title attribute in case it might be useful for debugging purposes.

To test, apply the patch and perform a search in the OPAC. On the search
results page, hover your mouse over the "Results" link in the
breadcrumbs. The title attribute value should appear with the search
details.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21850: Remove search request from page title of OPAC result list
Owen Leonard [Fri, 4 Jan 2019 15:26:05 +0000 (15:26 +0000)]
Bug 21850: Remove search request from page title of OPAC result list

This patch modifies the OPAC search results template so that advanced
search terms are not shown in the page title and breadcrumbs. This
removes potentially confusing computer-oriented code from the public
view.

For simple searches the search term is displayed, using the same logic
that determines whether the search bar should be populated with the last
search term.

To test:

 - Apply the patch
 - Peform a simple keyword search in the OPAC
   - On the results page the title and breadcrumbs should show 'Results
     of search for [your keyword]
 - Perform an advanced search with multiple parameters
   - The page title and breadrumbs should show only 'Search results'
   - The breadcrumbs should also show a link back to Advanced search
     using the returntosearch parameter

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: mikael <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 20809: Compiled CSS
Nick Clemens [Mon, 4 Feb 2019 15:54:59 +0000 (15:54 +0000)]
Bug 20809: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20809: (QA follow-up) Fix missing filters
Katrin Fischer [Sun, 6 Jan 2019 00:22:28 +0000 (00:22 +0000)]
Bug 20809: (QA follow-up) Fix missing filters

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20809: (follow-up) Add missing JS to view log page
Owen Leonard [Fri, 14 Sep 2018 17:06:31 +0000 (17:06 +0000)]
Bug 20809: (follow-up) Add missing JS to view log page

If the log viewer is being used to track patron-related data the
patron-related JavaScript file should be included.

To test, apply the patch and open a patron record. In the left-hand
sidebar choose Modification Log. Test the patron image edit/replace
process from the patron image in the sidebar and confirm that it works
correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20809: (follow-up) Corrections to CSS and JS
Owen Leonard [Wed, 12 Sep 2018 16:33:48 +0000 (16:33 +0000)]
Bug 20809: (follow-up) Corrections to CSS and JS

This follow-up modifies JavaScript so that the confirmation dialog is
triggered when deleting a patron image from the modal window.

The CSS is modified to improve the alignment of patron image and edit
button.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20809: Link patron image to patron image add/edit form
Owen Leonard [Tue, 14 Aug 2018 13:04:39 +0000 (13:04 +0000)]
Bug 20809: Link patron image to patron image add/edit form

This patch modifies an include file so that it is possible with edit a
patron's image on any patron-related page which uses that include.

To test you must have the patronimages system preference enabled.

Apply the patch and open any patron record for viewing.

 - Hover the mouse over the patron image.

   - If the patron has a previously-defined patron image, should you see
     an "Edit" button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

   - If a patron has no patron image defined, you should see an "Add"
     button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

This process should work from any page which shows the patron sidebar:
Check out, Details, Fines, Routing lists, Circulation history, etc.

Patch works as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21808: Field 711 is not handled correctly in showAuthor XSLT for relator term...
Marcel de Rooy [Mon, 12 Nov 2018 10:48:23 +0000 (11:48 +0100)]
Bug 21808: Field 711 is not handled correctly in showAuthor XSLT for relator term or code

The test should check $4 or $e for fields ne 111,711.
And should check $4 or $j for 111,711.

Test plan:
Edit a record, add a meeting in 711 without $4 but with $j.
Without this patch the term is not visible, with this patch it is.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22097: CataloguingLog should be suppressed for item branch transfers
Kyle M Hall [Thu, 10 Jan 2019 19:32:22 +0000 (14:32 -0500)]
Bug 22097: CataloguingLog should be suppressed for item branch transfers

Bug 18816 missed the fact that a branch transfer triggers ModItem and
thus generates an action log line. We should not be creating those
action logs, especially considering the transfers table itself already
documents the transfer.

Test Plan:
1) Enable CataloguingLog
2) Transfer an item to another branch
3) Note the new action log line created
4) Apply this patch
5) Create another item transfer
6) No new action log line should be created!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22197: Add Mana KB link to administration sidebar menu
Owen Leonard [Thu, 24 Jan 2019 13:48:42 +0000 (13:48 +0000)]
Bug 22197: Add Mana KB link to administration sidebar menu

This patch adds a link to the Mana KB configuration page to the
administration sidebar menu.

To test, apply the patch and:

 - Log in to the staff client as a user who lacks permission to manage
   Mana KB.
   - Go to an Administration page which shows the sidebar, like
     Libraries or Patron categories. There should be no link to Mana KB
     in the left-hand sidebar.
 - Log in to the staff client as a user who has permission to manage
   Mana KB.
   - Go to Administration -> Mana KB
     - In the sidebar menu you should see a link to Mana KB and it
       should be bold.
   - Navigate to another Administration page which shows the sidebar.
     The Mana KB link should not be highlighted.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22198: DBRev 18.12.00.013
Nick Clemens [Mon, 4 Feb 2019 14:59:37 +0000 (14:59 +0000)]
Bug 22198: DBRev 18.12.00.013

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22198: Add granular permission setting for Mana KB
Owen Leonard [Thu, 24 Jan 2019 13:47:26 +0000 (13:47 +0000)]
Bug 22198: Add granular permission setting for Mana KB

This patch adds a separate permission for managing Mana KB.

To test, apply the patch and update the database.

 - Open the permissions page for a patron with staff client privileges
   - Confirm that there is a "Manage Mana KB content sharing
     (manage_mana)" permission.
   - Leaving this new permission unchecked, log into the staff client
     with as that patron and go to the Administration home page.
       - The "Using Mana-KB" link should not appear.
       - Navigate directly to /cgi-bin/koha/admin/share_content.pl. You
         should get a "permission denied" message.
   - Modify the patron's permissions to grant them access to Mana KB.
       - Confirm that the link now appears on the Administration home
         page and that the user can access the page.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22196: (QA follow-up) Fix some more typo
Josef Moravec [Mon, 28 Jan 2019 20:56:40 +0000 (20:56 +0000)]
Bug 22196: (QA follow-up) Fix some more typo

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22196: (QA follow-up) Fix some typo
Katrin Fischer [Sun, 27 Jan 2019 01:07:01 +0000 (01:07 +0000)]
Bug 22196: (QA follow-up) Fix some typo

Fixes the typo on the admin main page.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22196: Clean up Mana KB administration template
Owen Leonard [Wed, 23 Jan 2019 17:56:50 +0000 (17:56 +0000)]
Bug 22196: Clean up Mana KB administration template

This patch makes language changes to the Mana KB administration
template, and corresponding language changes to the Web Services
preference file.

Some markup errors have been fixed:

 - Correct title and breadcrumbs, copied and pasted from another
   template
 - Add ids to form fields to match their label "for" attributes
 - Make <input>s self-closing
 - Correct class names on alert dialogs
 - Wrap text in JavaScript with _() to make it translatable

Also changed: Some language revisions to the Mana dialogs on the
Administration home page.

To test, apply the patch and go to Administration -> Share content with
Mana KB.

Test the process for enabling and configuring Mana KB. Check that
forms work correctly and that the language of instructions and labels
reads well.

Go to Administration -> System preferences -> Web services, and confirm
that the language changes to the Mana KB preference look good.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21907: Fix article requests count for non-superlibrarians
Jonathan Druart [Tue, 11 Dec 2018 13:13:42 +0000 (10:13 -0300)]
Bug 21907: Fix article requests count for non-superlibrarians

The query generates "Column 'branchcode' in where clause is ambiguous"

Test plan:
1 - Enable 'IndependentBranchesPatronModifications' and article requests
2 - Sign in as non-superlibrarian
3 - View plack log
4 - Refresh mainpage, see error in logs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 16231: Correct permission handling in subscription edit
Owen Leonard [Wed, 3 Oct 2018 16:07:19 +0000 (16:07 +0000)]
Bug 16231: Correct permission handling in subscription edit

This patch corrects the way subscription edit menu items are displayed
according to the user's permissions settings.

To test, apply the patch and log in to the staff client as a user who
has permission to create, edit, and delete subscriptions.

- Locate an subscription and view the details for it.
- Confirm that each "Edit" menu item works correctly.
- Repeat the process when logged in as a user with varying combinations
  of create, edit, and delete permissions.
- Test as a user limited by IndependentBranches.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22254: Correction to datehandling in test
Martin Renvoize [Fri, 1 Feb 2019 09:55:54 +0000 (09:55 +0000)]
Bug 22254: Correction to datehandling in test

Adding 13 months is not always the same as adding 1 month and then
adding 12 months in DateTime maths.  This patch rectified the test
to match the correct behaviour in koha.

Test plan.

1) Modify the test (around line 268) to test against the suspect
   leap date of 2019-01-31 and watch the test fail.
2) Apply the patch (which also adds this modification to test
   for such a leap date) and watch the test now pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19915: (follow-up) Fix test count from rebase
Nick Clemens [Fri, 4 Jan 2019 18:37:09 +0000 (18:37 +0000)]
Bug 19915: (follow-up) Fix test count from rebase

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19915: Don't delete in tests
Nick Clemens [Thu, 1 Nov 2018 13:11:16 +0000 (13:11 +0000)]
Bug 19915: Don't delete in tests

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19915: Only show class sources in use
Nick Clemens [Fri, 15 Jun 2018 04:10:39 +0000 (04:10 +0000)]
Bug 19915: Only show class sources in use

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
https://bugs.koha-community.org/show_bug.cgi?id=19905

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19915: Use cn_sort values for getting inventory items
Nick Clemens [Thu, 4 Jan 2018 15:00:28 +0000 (15:00 +0000)]
Bug 19915: Use cn_sort values for getting inventory items

To test:
1 - Catalog an item under LCC with callnumber GT95
2 - cn_sort should calculate as GT0095
3 - Go to inventory tool
4 - Enter a range that should have your item e.g LC GT90 to GT100
5 - Item is not returned
6 - Apply patch
7 - Item should be returned
8 - Verify things otherwise work as expected

Signed-off-by: Anne-Claire Bernaudin <anne-claire.bernaudin@univ-rennes1.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
https://bugs.koha-community.org/show_bug.cgi?id=19905

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19915: (QA follow-up) Tidy up GetItemsForInventory.t
Marcel de Rooy [Fri, 6 Jul 2018 09:20:47 +0000 (11:20 +0200)]
Bug 19915: (QA follow-up) Tidy up GetItemsForInventory.t

Standard edits like modules, schema, Koha objects instead of DBIC.
Removing unneeded autoflush.
Moving initial test to a first subtest.
No need to clear issues if you clear items.
Adding a FIXME for OldWay; would be nice to remove that code..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
https://bugs.koha-community.org/show_bug.cgi?id=19905

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19915: Add unit test to GetItemsForInventory.t
Nick Clemens [Thu, 4 Jan 2018 14:53:14 +0000 (14:53 +0000)]
Bug 19915: Add unit test to GetItemsForInventory.t

prove -v t/db_dependent/Items/GetItemsForInventory.t

Signed-off-by: Anne-Claire Bernaudin <anne-claire.bernaudin@univ-rennes1.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Moved the betwen typo edit back here.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22236: Translation should generate tags with consistent attribute order
Marcel de Rooy [Wed, 30 Jan 2019 15:37:10 +0000 (15:37 +0000)]
Bug 22236: Translation should generate tags with consistent attribute order

When running misc/translator/translate, the order of attributes in the translated templates is not consistent and may vary. This is caused by the random order of hash keys in perl.

This causes things like this in run 1:
<input type="submit" class="btn" value="Plaats aanvraag" />
And this in run 2:
<input value="Plaats aanvraag" type="submit" class="btn" />
As you can see, there is actually no difference apart from the order.

When comparing the result of various translation runs, I would rather get rid of such noise and only see the real changes.

The needed change is not trivial to find, but only requires a simple addition to a sort operation in tmpl_process3.pl. The current sort only makes sure that the '/' comes at the end. We should sort the names of the keys too when this value is 0 (just meaning: no end tag symbol).

Test plan:
[1] Run a translation without this patch and set a few templates aside.
[2] Run a translation with this patch.
[3] Run a compare (diff) on the templates copied in step 1. Verify that the
    only changes are found in the sort order of attributes in html tags.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21751: Compiled CSS
Nick Clemens [Mon, 4 Feb 2019 14:28:19 +0000 (14:28 +0000)]
Bug 21751: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21751: (follow-up) Correction to selectors
Owen Leonard [Mon, 28 Jan 2019 13:28:30 +0000 (13:28 +0000)]
Bug 21751: (follow-up) Correction to selectors

This patch makes a couple of corrections to the selectors used by
hcsticky in targeting the position of the floating toolbar. These
changes were made necessary by changes made in recently-pushed patches.

To test, confirm that these two pages work correctly:

 - Acquisitions -> Vendor -> View basket
 - Patrons -> New patron

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21751: Remove former fixFloat plugin
Jonathan Druart [Thu, 6 Dec 2018 17:54:58 +0000 (14:54 -0300)]
Bug 21751: Remove former fixFloat plugin

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21751: Replace fixFloat with HC-sticky to fix Chrome display
Owen Leonard [Thu, 6 Dec 2018 17:15:49 +0000 (17:15 +0000)]
Bug 21751: Replace fixFloat with HC-sticky to fix Chrome display

This patch replaces the fixFloat jQuery plugin with a new one: HC-sticky
(https://github.com/somewebmedia/hc-sticky). This plugin provides the
same functionality without the page-reflow problems fixFloat suffers
from.

To test, apply the patch and regenerate the staff client CSS. Test the
behavior of the floating toolbar on these pages:

 - Acquisitions -> Vendor -> Vendor details
 - Acquisitions -> Vendor -> View basket
   - On both these pages, test toolbar behavior before and after
     expanding the "Orders search" options at the top of the page.
 - Administration -> System preferences
 - Authorities -> Create or edit an authority
 - Catalog -> Advanced search
   - Search results
 - Catalog -> Item search
 - Cataloging -> Add or edit a record
   - Open the plugin window for the 008 field
 - Tools -> Label creator -> New label batch -> Add items -> Search ->
   Results
 - Patrons -> New patron
   - Test before and after expanding the patron search options at the
     top of the page
   - Test editing a patron too
 - Tools -> Automatic item modifications by age -> Edit
 - Tools -> Notices & slips -> Edit
 - Lists -> View list

Check that the About page has been updated with information about the
plugin.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22242: Javascript error in value builder cased by Select2
Fridolin Somers [Thu, 31 Jan 2019 08:12:13 +0000 (09:12 +0100)]
Bug 22242: Javascript error in value builder cased by Select2

Same as Bug 17780 but in value builders.

Select2 (Bug 13501) introduced divs and inputs that broke some
assumptions about the expected HTML structure. This patch checks if
input has name attribute, because some inputs in Select2 have not.

It brakes value builders marc21_linking_section.tt and
unimarc_field_4XX.tt.

Test plan :
1)  On a MARC21 database
2)  Define 774$0 as a regular subfield
3)  Define 774$4 with an authorised value category
4)  Define 774$t with value builder marc21_linking_section
5)  Create a new record
6)  Use value builder in 774$t
7)  Search for a record and click choose
8)  Without patch : a popup window does not close and show a blank
    screen
9)  With patch : popup windows get close and you see in field 774 $0 and
    $t field with values
10) Same tests with a UNIMARC database on field 461 with value builder
    unimarc_field_4XX.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested successfully with MARC21

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19816: Implement dateonly for rfc3339 format
Tomas Cohen Arazi [Thu, 24 Jan 2019 17:29:09 +0000 (14:29 -0300)]
Bug 19816: Implement dateonly for rfc3339 format

This patch implements the dateonly option for the rfc3339. This is
described in the OpenAPI 2.0 specification [1]. The required output
format is described on RFC 3339 [2], as 'full-date'.

[1] https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#dataTypeFormat
[2] https://tools.ietf.org/html/rfc3339#section-5.6

To test:
- Apply the regression tests patch
- Run:
 k$ prove t/DateUtils.t
=> FAIL: Tests fail because dateonly is not implemented
- Apply this patch
- Run:
 k$ prove t/DateUtils.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19816: Regression tests
Tomas Cohen Arazi [Thu, 24 Jan 2019 17:27:28 +0000 (14:27 -0300)]
Bug 19816: Regression tests

This patch adds tests for the rfc3339 behaviour when dateonly => 1.

To test:
- Run:
  $ kshell
 k$ prove t/DateUtils.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
 k$ prove t/DateUtils.t
=> FAIL: dateonly is not implemented

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22253: Check we actually need to update the password
Tomas Cohen Arazi [Thu, 31 Jan 2019 19:30:25 +0000 (16:30 -0300)]
Bug 22253: Check we actually need to update the password

This patch makes memberentry.pl check if password needs to be updated
before attempting to call set_password. Above this there's a check that
won't raise any errors if no password is passed, or the default string (****) is received.

So we could reach that line of code with no password, but the code
wouldn't check that.

To test:
- In master, edit any patron without changing the password
=> FAIL: It raises an exception
- Apply this patch
- Edit the patron withtout changing the password
=> SUCCESS: Edit successful
- Edit the patron, changing the password
- Try to login with the new password
=> SUCCESS: The password got changed correctly
- Sigh off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21610: Improve default values for dates
Jonathan Druart [Fri, 19 Oct 2018 11:22:20 +0000 (08:22 -0300)]
Bug 21610: Improve default values for dates

This patch fixes failures on t/db_dependent/Koha/Patrons/Import.t
and keep t/Auth_with_shibboleth.t and t/db_dependent/Koha/Object.t green

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21610: (follow-up) Default value for dates
Marcel de Rooy [Fri, 19 Oct 2018 10:14:20 +0000 (12:14 +0200)]
Bug 21610: (follow-up) Default value for dates

We have some dates with DEFAULT CURRENT_TIMESTAMP and some dates with
default and UPDATE clause.

Test plan:
Run Object.t again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21610: (QA follow-up) Better use columns_info from DBIx
Marcel de Rooy [Fri, 19 Oct 2018 09:05:50 +0000 (11:05 +0200)]
Bug 21610: (QA follow-up) Better use columns_info from DBIx

We should better use the published method than a private hash key.
And shorter to go via _result than adding a new schema call.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21610: Fix integers and dates values at Koha::Object->store level
Jonathan Druart [Thu, 18 Oct 2018 21:55:44 +0000 (18:55 -0300)]
Bug 21610: Fix integers and dates values at Koha::Object->store level

With strict SQL modes, we are facing several issues when objects are stored.

The following errors can be raised by DBIx::Class when an object does not have
a valid (as defined at DB level) value:
- Incorrect integer value: '' for column COLUMN
- Incorrect decimal value: '' for column COLUMN
- Column 'COLUMN' cannot be null
- Field 'COLUMN' doesn't have a default value
- Incorrect date value: '' for column 'COLUMN'

We already handled some of them for Koha::Patron. As we do not want to provide such
changes for all Koha::* modules we are going to fix this at Koha::Object->store level
in order to provide a global fix.

This is related to bug 21599 (for item types) and bug 21596 (for patrons)

Test plan:
- Apply first patch, run the tests
=> Patch fail because of the previous error in Koha::ItemType->store, to make them pass
you can replace
  $self->notforloan(0) unless $self->notforloan;
with
  $self->notforloan(undef) unless $self->notforloan;
- Apply second patch, run the tests
=> They fail because of dates and/or integers values
- Apply third patch, run the tests
=> They now pass

Deep code review wanted!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21610: Remove specific changes we made previously
Jonathan Druart [Thu, 18 Oct 2018 21:46:30 +0000 (18:46 -0300)]
Bug 21610: Remove specific changes we made previously

We handled integers and dates for Koha::Patron and Koha::ItemType, we
want now Koha::Object to deal with.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21610: Add tests
Jonathan Druart [Thu, 18 Oct 2018 21:38:18 +0000 (18:38 -0300)]
Bug 21610: Add tests

Adding few tests to Koha/Object.t in order to highlight what we are
trying to fix.

Note that Koha::ItemType->store was wrong for notforloan, the default
value should be null
    `notforloan` smallint(6) DEFAULT NULL,
but the previous fix (bug 21599) made it default to '0'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22132: DBRev 18.12.00.012
Nick Clemens [Thu, 31 Jan 2019 13:36:04 +0000 (13:36 +0000)]
Bug 22132: DBRev 18.12.00.012

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22132: (QA follow-up) set_password now expects a hashref
Tomas Cohen Arazi [Wed, 30 Jan 2019 18:46:04 +0000 (15:46 -0300)]
Bug 22132: (QA follow-up) set_password now expects a hashref

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22132: (QA follow-up) Tests - use Mojo builtin for auth
Martin Renvoize [Thu, 24 Jan 2019 15:54:08 +0000 (15:54 +0000)]
Bug 22132: (QA follow-up) Tests - use Mojo builtin for auth

Mojolicious has built in handling for encoding/decoding of of basic auth
paramenters. We should use it to simplify our test here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22132: Add Basic authentication to the API
Tomas Cohen Arazi [Tue, 15 Jan 2019 16:23:23 +0000 (13:23 -0300)]
Bug 22132: Add Basic authentication to the API

This patch implements Basic authentication for the API to aid testers
and developers with tools like Postman.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth_basic.t
=> SUCCESS: Tests pass!
- Open Postman or your favourite tool
- In Authorization, choose Basic auth.
- Enter the username and password of a known privileged user.
- Hit an endpoint with Postman, for example:
  ] GET http://kohadev-intra.myDNSname.org:8081/api/v1/patrons
=> SUCCESS: Basic authentication is great!
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22132: Unit tests
Tomas Cohen Arazi [Tue, 15 Jan 2019 16:23:09 +0000 (13:23 -0300)]
Bug 22132: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22132: Add RESTBasicAuth syspref
Tomas Cohen Arazi [Tue, 15 Jan 2019 16:22:53 +0000 (13:22 -0300)]
Bug 22132: Add RESTBasicAuth syspref

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17854: Compiled CSS
Nick Clemens [Wed, 30 Jan 2019 12:49:00 +0000 (12:49 +0000)]
Bug 17854: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17854: Adds print/close icon in checkout
Christopher Brannon [Mon, 24 Sep 2018 19:51:36 +0000 (19:51 +0000)]
Bug 17854: Adds print/close icon in checkout

To Test:
1) Apply Patch.
2) Go to a patron checkout screen (circulation.pl).
3) Note there are no clear screen buttons in the upper right corner of
the checkout window.
4) Turn on the DisplayClearScreenButton preference.
5) Go back to patron checkout.  Note the clear screen button and the new
printer icon next to it.
6) Click the printer icon.  This will trigger a print slip function, and
close the patron screen.
7) Try to arrow back to the previous screen.  Should go to main menu and
not the patron screen, just like the orginal close button (X).

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21871: (QA follow-up) C4::Biblio qw(GetMarcUrls)
Katrin Fischer [Sun, 27 Jan 2019 05:14:34 +0000 (05:14 +0000)]
Bug 21871: (QA follow-up) C4::Biblio qw(GetMarcUrls)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21817

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21871: (QA follow-up) Use Koha.Preference in template
Katrin Fischer [Sun, 27 Jan 2019 05:13:06 +0000 (05:13 +0000)]
Bug 21871: (QA follow-up) Use Koha.Preference in template

Use TT plugin to get value for OPACURLOpenInNewWindow.

Works without, but might be a little nicer.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21817

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21871: (follow-up) Remove link tracking
Owen Leonard [Tue, 15 Jan 2019 19:18:47 +0000 (19:18 +0000)]
Bug 21871: (follow-up) Remove link tracking

Links to tracklinks.pl were erroneously copied from detail.tt. This
patch removes them.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21817

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21871: Show authority 856 links in the OPAC
Owen Leonard [Wed, 21 Nov 2018 13:54:45 +0000 (13:54 +0000)]
Bug 21871: Show authority 856 links in the OPAC

This patch modifies the authority detail view in the OPAC so that any
links found in 856 tags are displayed and active.

To test, apply the patch and locate or create an authority record which
contains one or more URLs in 856 tags.
 - View this record in the OPAC and confirm that the links appear.
 - Test records with and without link text.
 - Test records with and without public notes.

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21817

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22191: Add column configuration to libraries administration
Owen Leonard [Wed, 23 Jan 2019 15:23:15 +0000 (15:23 +0000)]
Bug 22191: Add column configuration to libraries administration

This patch adds column configuration to the table of libraries
in administration. No new defaults for the table are defined.

To test, apply the patch and clear your browser cache if necessary.

 - Go to Administration -> Libraries
   - Test that the "Column visibility" button works to show and hide
     columns. The "actions" column should be excluded.
   - Test that export options (Excel, CSV, etc) exclude the "actions"
     column.
 - Go to Administration -> Columns settings and edit the default
   configuration of the libraries table. Confirm that these
   changes are reflected in libraries administration.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22190: Add column configuration to patron category administration
Owen Leonard [Wed, 23 Jan 2019 14:48:31 +0000 (14:48 +0000)]
Bug 22190: Add column configuration to patron category administration

This patch adds column configuration to the table of patron categories
in administration. No new defaults for the table are defined.

To test, apply the patch and clear your browser cache if necessary.

 - Go to Administration -> Patron categoires.
   - Test that the "Column visibility" button works to show and hide
     columns. The "actions" column should be excluded.
   - Test that export options (Excel, CSV, etc) exclude the "actions"
     column.
 - Go to Administration -> Columns settings and edit the default
   configuration of the patron categories table. Confirm that these
   changes are reflected in patron category administration.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.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 21449: Update two-column templates with Bootstrap grid: Circulation part 2
Owen Leonard [Thu, 24 Jan 2019 19:40:03 +0000 (19:40 +0000)]
Bug 21449: Update two-column templates with Bootstrap grid: Circulation part 2

This patch modifies several circulation templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths. For each page, test with
the CircSidebar preference both on and off.

 - Catalog -> Search -> Details -> Items -> View item's checkout history
 - Circulation -> Overdues with fines
 - Circulation -> Transfer
 - Circulation -> Patron -> Batch checkout
 - Circulation -> Built-in offline circulation interface
   - Synchronize
   - Pending offline circulation actions
   - Check out
   - Check in

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22148: Changed where user is redirected by cancelling payment
helene hickey [Wed, 16 Jan 2019 22:36:20 +0000 (22:36 +0000)]
Bug 22148: Changed where user is redirected by cancelling payment

To test:
1) Create a manual invoice and save
2) Go to Make a payment tab
3) Click 'Pay amount', then cancel
4) Notice you are redirected to the Transactions tab, rather than back to
Make a payment
5) Also try this with Pay selected and write off selected result when
cancelling should be the same
6) Apply patch and try steps 2-6 again
7) Verify that you are now redirected to the 'make a payment tab'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12283: Disable autocomplete for patron search inputs
Olli-Antti Kivilahti [Wed, 17 Oct 2018 19:03:00 +0000 (19:03 +0000)]
Bug 12283: Disable autocomplete for patron search inputs

In a production system, you don't usually search for the same
patron over and over, so there's no sense for the browser
to save a list of searched patrons in the patron quick
search. Therefore, should set autocomplete=off for that
input field.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22144: (QA follow-up) Prepare the ground for other formats
Tomas Cohen Arazi [Wed, 23 Jan 2019 16:25:33 +0000 (13:25 -0300)]
Bug 22144: (QA follow-up) Prepare the ground for other formats

This patch refactors the original implementation so it is ready for
supporting other formats. It also adds some error handling.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22144: Add method metadata() to Koha::Biblio
Kyle M Hall [Wed, 16 Jan 2019 19:25:07 +0000 (14:25 -0500)]
Bug 22144: Add method metadata() to Koha::Biblio

It would be very convenient to be able to retrieve a bib's attached metadata objects directly from the biblio object. This would be very useful for Template Toolkit syntax in slips and notices where a library would like to use arbitrary metadata fields that aren't stored in the database.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Biblio.t

Signed-off-by: Te Rahui Tunua <terahuitunua@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22194: Add Koha::Exceptions::Metadata
Tomas Cohen Arazi [Wed, 23 Jan 2019 16:10:14 +0000 (13:10 -0300)]
Bug 22194: Add Koha::Exceptions::Metadata

This trivial patch adds a basic Koha::Exceptions::Metadata exception and
Koha::Exceptions::Metadata::Invalid for using when the data cannot be
decoded (maybe because of incompatibility between format, schema, or
just bad data).

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21918: Update buttons on fines to match newer buttons
Owen Leonard [Thu, 29 Nov 2018 19:56:43 +0000 (19:56 +0000)]
Bug 21918: Update buttons on fines to match newer buttons

This patch makes a number of changes to the "Pay fines" template, the
goal of which is to make the interface look better in general. Changes
include:

 - Styling the "Pay" and "Write off" buttons as Bootstrap buttons.
 - Adding DataTables sorting, searching, and filtering.
 - Adding a column showing the fine date.
 - Hide the "Add note" input, add a link to show it.
 - Add some missing "preventDefault" methods from events.
 - Add "Writeoff selected" to the buttons which are disabled when there
   is no checkbox selection.
 - The <tfoot> tag is now expected by the HTML validator to be after
   <tbody>, so this section has been moved to suppress validator errors.

To test, apply the patch and locate a patron who has multiple
outstanding fines.

 - Go to Fines -> Pay fines
 - Confirm that the table of fines is shown as a DataTable, with sorting
   on columns which have data.
 - Test columns settings in Administration -> Columns settings.
 - Confirm that fine dates are shown, and that sorting by this column
   works correctly.
 - Click an "Add note" link to show a note input field. Focus should be
   in the newly-displayed input.
   - Confirm that notes are still saved correctly when paying or writing
     off single or multiple fines.
   - Confirm that when the "add note" input is hidden, its contents are
     erased.
 - Uncheck all checkboxes by clicking the "Clear all" link at the top.
   The "Pay selected" and "Write off selected" buttons should become
   disabled.
   - Checking any checkbox should re-enable those buttons.
 - Test that the relocated "Apply" button (for outstanding credits)
   still works as expected.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22155: Schema updates
Nick Clemens [Wed, 30 Jan 2019 11:36:11 +0000 (11:36 +0000)]
Bug 22155: Schema updates

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22155: DBRev 18.12.00.011
Nick Clemens [Wed, 30 Jan 2019 11:35:59 +0000 (11:35 +0000)]
Bug 22155: DBRev 18.12.00.011

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22155: Adapt uses of biblio_metadata.marcflavour to schema
Tomas Cohen Arazi [Fri, 18 Jan 2019 02:25:38 +0000 (23:25 -0300)]
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema

This patch makes the code using Koha::Biblio::Metadata->marcflavour use
->schema instead for all interactions.

To test:
- Update the DB structure:
  $ updatedatabase
- Update the schema files:
  $ dbic
- Notice all the places in which biblio_metadata is used
  $ cd kohaclone
  $ git grep biblio_metadata
=> SUCCESS: They all use `schema` instead of marcflavour
- Notice all the places that use Koha::Biblio::Metadata:
  $ git grep Koha::Biblio::Metadata
=> SUCCESS: They all use the schema attribute when they used to use
marcflavour
- Run all the modified tests and scripts
=> SUCCESS: We are all good
- Sign off :-D

Note: while this seems like a minor change, the places in which plain
SQL is used really require understanding the queries and how they are
used, because some query results might be passed to some other method
that in turn uses the marcflavour attribute. I of course took that into
account but errare humanum est :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22155: DB update
Tomas Cohen Arazi [Fri, 18 Jan 2019 01:55:11 +0000 (22:55 -0300)]
Bug 22155: DB update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20634: Changing the identical label "Library:" to "Location" in Inventory Home.
Olivia Lu [Tue, 15 Jan 2019 21:24:25 +0000 (21:24 +0000)]
Bug 20634: Changing the identical label "Library:" to "Location" in Inventory Home.

To find fix:

1. Go to tools
2. Go to Inventory
3. Verify that under Item location filters the label should be "Location"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21971: TestBuilder::build_sample_item
Jonathan Druart [Thu, 6 Dec 2018 22:51:39 +0000 (19:51 -0300)]
Bug 21971: TestBuilder::build_sample_item

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>