koha.git
5 years agoBug 10676: Fix behaviour of OpacHiddenItems for items.restricted
Katrin Fischer [Fri, 4 Jan 2019 10:11:03 +0000 (10:11 +0000)]
Bug 10676: Fix behaviour of OpacHiddenItems for items.restricted

The numerical restricted value was overwritten in GetItemsInfo
with the description. So OpacHiddenItems would only work for
restricted using the description, not the numerical value
of the authorised value like for other similar status fields.

This changes GetItemsInfo to use a separate variable for
the description, as it's already done for notforloan and
changes the template files where the variable is used
accordingly.

To test
- Before applying patch
- Configure OpacHiddenItems with:
  restricted: [1]
- Find a record with more than one item and mark one of the items
  as "Restricted Access"
  (assume standard sample data - check authorised value if status doesn't exist)
- Verify the item is still shown in OPAC.
- Apply patch
- Verify that the item is now hidden
- Verify that the status still displays nicely in the staff detail page
- Delete OpacHiddenItems
- Verify that the status is showing nicely in the OPAC detail page

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 39d2885d1330afe825e1881f5fc8033d459f6006)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22287: Correct new charts CSS
Owen Leonard [Thu, 7 Feb 2019 13:11:35 +0000 (13:11 +0000)]
Bug 22287: Correct new charts CSS

This patch reverts some changes to reports CSS from Bug 22168 which were
unnecessary and which adversely affected the report add/edit form
styling.

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

Go to Reports -> Saved reports and repeat the test plan for Bug 22168:

- Run a report which returns more than one column.
- On the report results page, click the "Create chart" button. The chart
  settings form should appear in a modal window.
- Click the "Draw" button. The modal should disappear and the chart
  should be shown.

Then test the process for adding or editing an SQL report. The form
should be styled in a way consistent with other forms in the staff
client.

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>
(cherry picked from commit 040c5439c020c34702d1161f12bdc3792d5172f4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 12488: Make bulkmarcimport.pl -d use DELETE instead of TRUNCATE
Magnus Enger [Mon, 11 Feb 2019 10:07:21 +0000 (11:07 +0100)]
Bug 12488: Make bulkmarcimport.pl -d use DELETE instead of TRUNCATE

On MySQL >= 5.5 bulkmarcimport.pl with the -d (delete) switch gives
an error like "Cannot truncate a table referenced in a foreign
key constraint". This patch proposes to replace the offending
TRUNCATE with DELETE. Auto incerement counters are reset to 1 to
preserve the functionality from TRUNCATE.

To test:
- Make sure you havae a test database with some records and items
- Run bulkmarcimport.pl with the -d switch
- Observe the error described above
- Apply this patch
- Run bulkmarcimport.pl with the -d switch again
- Observe the lack of an error
- Verify that the newly imported records and items have biblionumber
  and itemnumbers starting with 1

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>
(cherry picked from commit b7b4694666657f57aaf61d091ed34c9f754a11e3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19832: (QA follow-up) Remove obsolete pending_queue call
Marcel de Rooy [Fri, 15 Feb 2019 10:06:33 +0000 (10:06 +0000)]
Bug 19832: (QA follow-up) Remove obsolete pending_queue call

Only use of $pending was removed in the former patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 012200fbc0e3684be312cad055dc583c30a1131d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19832: Don't fill holds in SIP/Transaction/Checkout.pm
Nick Clemens [Wed, 16 Jan 2019 13:19:45 +0000 (13:19 +0000)]
Bug 19832: Don't fill holds in SIP/Transaction/Checkout.pm

AddIssue already checks for holds in the item being issued and deals with them

The sip code, additionally, does not consider that multiple holds per bib
is allowed

To test:
 0 - Apply only first patch (unit tests)
 1 - Place two holds for a patron on a bib
 2 - Checkout that item via sip_cli_emulator
 3 - Note all holds are cancelled/filled
 4 - prove -v t/db_dependent/SIP/Transaction.t
 5 - it fails
 6 - Apply second patch
 7 - prove tests, all green
 8 - Place two holds on a single bib for one patron again
 9 - Checkout the item via sip_cli_emulator
10 - Only one holds is filled

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>
(cherry picked from commit c3b41cb12465249cc87ed8866855e06e61842872)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19832: Unit tests
Nick Clemens [Wed, 16 Jan 2019 13:19:31 +0000 (13:19 +0000)]
Bug 19832: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: maxissueqty      => 10.
Replaced dot by comma.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 50fd86d42fa76b3840c61ea004d026d4810bc4dc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22067: Return if no patron passed to can_see_patron_infos
Nick Clemens [Thu, 3 Jan 2019 20:52:15 +0000 (20:52 +0000)]
Bug 22067: Return if no patron passed to can_see_patron_infos

To test:
1 - Find an adult patron
2 - Add a child to their account
3 - Delete the parent from the db
4 - Attempt to edit the child record
5 - Apply patch
6 - Repeat
7 - Note you can edit the child account
8 - Note guarantor id is not a link

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No blocker for me, but we are a bit hiding that guarantorid probably should
be a foreign key cleared to NULL at deletion time.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5324268e099ead7a6864d16bae0f051444a1d34e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22140: Larger unit test for get_hostitemnumbers_of
Fridolin Somers [Wed, 6 Feb 2019 15:10:07 +0000 (16:10 +0100)]
Bug 22140: Larger unit test for get_hostitemnumbers_of

Add syspref EasyAnalyticalRecords impact in unit test for get_hostitemnumbers_of

Test plan :
Run t/db_dependent/Items.t

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>
(cherry picked from commit 0da1090d3a21f9ee596500477504be476bed8af7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22140: Use of EasyAnalyticalRecords pref is get_hostitemnumbers_of
Fridolin Somers [Wed, 6 Feb 2019 14:03:01 +0000 (15:03 +0100)]
Bug 22140: Use of EasyAnalyticalRecords pref is get_hostitemnumbers_of

Like Bug 20702 defined GetHostItemsInfo does nothing if EasyAnalyticalRecords pref is disabled, get_hostitemnumbers_of must be dependant on this pref too.

Test plan :
1) Build an analytical record with 773$0 and $9
2) Enable EasyAnalyticalRecords
4) Place an hold on the record
5) => You see the linked item
6) Disable EasyAnalyticalRecords
7) Place an hold on the record
8) => You dont see the linked item

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>
(cherry picked from commit 12fe392d26fda1559f5690a71330a93ffc72a6b7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22140: Use of EasyAnalyticalRecords pref in search
Fridolin Somers [Wed, 16 Jan 2019 12:32:35 +0000 (13:32 +0100)]
Bug 22140: Use of EasyAnalyticalRecords pref in search

Like Bug 20702 defined GetHostItemsInfo does nothing if EasyAnalyticalRecords pref is disabled, there are other places where code must be dependant on this pref.

Test plan :
1) Build an analitical record with 773$0 and $9
2) Enable EasyAnalyticalRecords
3) Don't apply patch
4) Go to OPAC
5) Perform a search that displays the record, check there is the linked item
6) Open record detail page, check there is the linked item
7) Apply patch and redo 5) and 6)
8) Disable EasyAnalyticalRecords
9) redo 5) and 6), you should not see the linked item

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>
(cherry picked from commit 7266d50dd2725c87acf889aa7d6a211999ca1c47)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13515: DBRev 18.11.03.001
Nick Clemens [Fri, 15 Feb 2019 13:17:45 +0000 (13:17 +0000)]
Bug 13515: DBRev 18.11.03.001

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2c6d39452af2364463b509d7d18526714bc17b3f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13515: Fix constraint name before deleting it
Jonathan Druart [Thu, 14 Feb 2019 20:19:08 +0000 (17:19 -0300)]
Bug 13515: Fix constraint name before deleting it

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1f23384475214cf291afe081aaa2ef6d18767ed8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13515: Add unit tests
Alex Arnaud [Wed, 26 Dec 2018 16:44:39 +0000 (17:44 +0100)]
Bug 13515: Add unit tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 11b9bb3da9b250ca6fa23792775685037330599e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13515: Add a foreign key constraint to messages.borrowernumber
Jonathan Druart [Tue, 18 Dec 2018 15:43:00 +0000 (12:43 -0300)]
Bug 13515: Add a foreign key constraint to messages.borrowernumber

This patch adds a missing foreign key constraint to
mesages.borrowernumber.
To create it sucessfully the entries from the messages table that are
not linked with an existing patron will be removed.

Test plan:
0/ Do not apply the patch
1/ Add messages to different patrons
2/ Delete one of the patron's record
3/ Have a look at the messages table and notice that the messages for
the deleted patron's record still appear
4/ Apply the patch and execute the update DB entry
5/ Have a look again at the messages table and notice that the messages
for the deleted patron's record have been removed
6/ Delete a patron that have messages
7/ Notice that now the messages are deleted when the patron's record is
deleted

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0daa02a961be828d5c38b6933c91ee79853f95c5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoUpdate release notes for 18.11.03 release v18.11.03
Martin Renvoize [Fri, 22 Feb 2019 12:56:09 +0000 (12:56 +0000)]
Update release notes for 18.11.03 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoIncrement version for 18.11.03 release
Martin Renvoize [Fri, 22 Feb 2019 12:43:17 +0000 (12:43 +0000)]
Increment version for 18.11.03 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoRMaint: Translations follow-up
Martin Renvoize [Fri, 22 Feb 2019 12:39:32 +0000 (12:39 +0000)]
RMaint: Translations follow-up

Fix for failing junittests on arabic translation

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoTranslation updates for Koha 18.11.03
Koha translators [Fri, 22 Feb 2019 12:20:11 +0000 (09:20 -0300)]
Translation updates for Koha 18.11.03

(cherry picked from commit ea86f66d8aca321cd2149224e34877020b169b5e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
(cherry picked from commit 89ae6cc3bfea81dea8d6995965a44b92c34764aa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit cfea47cb064362bbb1fc93769be4b7df3a8e2fae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 7a58d0215907c05b0b82944141f6f4d4595c3979)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit f3f5b98fd909f9e13aa4e45a16dc275ef4ee8489)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 5b160af2a051dc3693f04dabf320d0995cf26160)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 04e121a741a442f5b557e11864eb69be9d0c3ded)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 558742577d3902cd5e2abf5c3f165c6425e163da)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit dc6be66e2b2ec5917d7bec020d4e94c40baa9f6c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 3c2cc8da26f7a907c0b51f928ffb100eefbfa692)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 0e220869f5a3327eee8f9426d648fbcaaa0fd7fa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 0939d44c22cda569faf4c0c60fd67de04097b34d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 5bb04247477dce80fbacf9993be3164518c03df6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit c0e6051ac5bd0190a6491ecc853614a156014d88)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 74b6a659e5ec831e99beaad2f9ce6dad6409a3a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 713f873626404e7904bebd0b97dee1d9f67745fc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 6ec979057b2b4f10fe469d2655fa0fcb47af1cb7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 0844f2c174c83ce3da11be07511730b0c220e5ad)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 619d97b91d075bd7d48c95102029a8d89269be6f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit ea36265697c85cfb1f7de0b2344ef8647dc31387)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit c7f47ea36a8992356c6c055a22891ea168cbdc9c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 20a38ee50e6fe62712e299bcec9e939dc2bbb58e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 6179f23dd8b4ed24add2e76c7b8e193372052201)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit b3c25b64b868b56423c50b9df4fac4bb55947679)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit ab9e4ca6a46519ddc69ad76837407c0a4f0ed0cd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 7520ede89987a7a65301debdda46950a6364ebfd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 1da0ba48b6fdf38cfd3d3ea63ec076b15995610f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit a32653a66fa02f1fe9002647d337261bf36d62e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 9961e2c08f8dba0896ed4f6bfa6a7befebd28d5d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit a8259c38dbe910188ece5126d226166014e001ed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit d2ce727e260f6b45266a8147aee7654811a44fa1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit c345d30cc8284f690f375faa140de49e62358709)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 186209875a4951b15faded3f8c47eba71716c7af)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit fb62e8d1fc8b210a5b23801b7b8faff3280bf638)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 3ca0234d34ac9708a8335cfa97805fb7498201bf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit b2dce05ddff8a047e7770ea241b1edd9b798212e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 7e69ab62a5ef3fbd350c6606d25b5ab6f6bc168e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 766eaa0df45f04523737a8f04b045122b3e11b18)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 0ee4e9e14fe461e72806491c819f4c033f95f13b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 8625eefc76a9390e28e9136f19b9767814bc27a5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit abb51797d8d5ebb274856e912e207a921ace478b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit bc30f84e583959a8c9f4b77db5b8a24ef24e04dd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 9330deee558f553c357edf8eb1aa96bd40563087)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22132: DBRev 18.11.02.001
Nick Clemens [Thu, 31 Jan 2019 13:36:04 +0000 (13:36 +0000)]
Bug 22132: DBRev 18.11.02.001

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 914f448fe1c1d5c01e3188a827a0d18ec3001b45)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 63f40e519c7fbbba70a2944113830a1d3ed80306)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 8ee08c3922dd892e9432ce243fc7244092fdd18f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 26af040c79e548e9388346b247f509f743401c34)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 103670e726b9938aa1484b7486cba94adf7b69a9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit 3ffed7d55a1d77df2d3c0748614434866612ed24)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
(cherry picked from commit a3993a75822972e1e013410ab020f5a749248017)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21495: Regression in hold override functionality
Kyle M Hall [Thu, 15 Nov 2018 13:35:33 +0000 (08:35 -0500)]
Bug 21495: Regression in hold override functionality

The changes caused by the patches for bug 11512 have broken existing
workflows for many libraries and are widely considered to be a bad move.
We should revert this behavior.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 398704662487a0c8a3f848a2ae23618ee96406ff)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22168: Improve styling of new chart settings for reports
Owen Leonard [Fri, 18 Jan 2019 17:10:40 +0000 (17:10 +0000)]
Bug 22168: Improve styling of new chart settings for reports

This patch updates a number of aspects of the reports chart creation
interface: Chart creation form is now shown in a modal window, and a
separate link has been added to show or hide the chart itself.

Also changed: Minor markup and JavaScript cleanup.

To test, apply the patch and go to Reports -> Saved reports.

- Run a report which returns more than one column.
- On the report results page, click the "Create chart" button. The chart
  settings form should appear in a modal window.
- Confirm that the form controls work correctly: Each label should give
  focus to the correct input. Changing the chart type should show or
  hide the appropriate form fields.
- Click the "Draw" button. The modal should disappear and the chart
  should be shown.
- Above the chart should be a "Hide chart" link which works to hide (and
  then show) the chart.

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>
(cherry picked from commit 8e1efe8f10fd5b575b2ceea3b33d1ed9dd91bd96)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17006: (follow-up) set_password expects a hashref
Tomas Cohen Arazi [Mon, 28 Jan 2019 15:37:54 +0000 (12:37 -0300)]
Bug 17006: (follow-up) set_password expects a hashref

Sponsored-by: Municipal Libray Ceska Trebova
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a7978a9e97e98c5f2322b16b32289bb59bd1f26f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17006: Add /patrons/{patron_id}/password
Martin Renvoize [Fri, 1 Feb 2019 15:18:45 +0000 (15:18 +0000)]
Bug 17006: Add /patrons/{patron_id}/password

This patch introduces an endpoint for changing a patron's password. It
targets privileged user with the right permissions, changing some
patron's password.

To test:

- Apply this patchset
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons_password.t
=> SUCCESS: tests pass!
- Play with the different use cases highlighted by the tests, on your
favourite REST testing tool (Postman, RESTer on FF, etc).

Sponsored-by: Municipal Libray Ceska Trebova
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ae1e6b558c1e5c581fe0652774c97ae18531758a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17006: OpenAPI spec
Tomas Cohen Arazi [Thu, 16 Aug 2018 10:01:21 +0000 (07:01 -0300)]
Bug 17006: OpenAPI spec

Sponsored-by: Municipal Libray Ceska Trebova
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d4570947b0ba4f52f03e190b787b2605948a1495)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17006: Unit tests
Tomas Cohen Arazi [Thu, 16 Aug 2018 10:00:38 +0000 (07:00 -0300)]
Bug 17006: Unit tests

Sponsored-by: Municipal Libray Ceska Trebova
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fd1e9bf59590a6772a16cd7af4212c91c6b63642)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19994: Used Modern::Perl in Authorities perl scripts
Jasmine Amohia [Thu, 17 Jan 2019 00:51:11 +0000 (00:51 +0000)]
Bug 19994: Used Modern::Perl in Authorities perl scripts

Test plan:
1. Review code of the following files and confirm that 'use Modern::Perl;' is used in place of
'use strict; use warnings;'

auth_finder.pl
authorities-home.pl
authorities.pl
blinddetail-biblio-search.pl
detail-biblio-search.pl
detail.pl
export.pl
merge.pl
merge_ajax.pl

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>
(cherry picked from commit 843c4a4bae760754d96867d2596bc78651910c8e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 10562: Improve Leader06 Type Labels in MARC21slim2OPACResults.xsl
Owen Leonard [Fri, 29 Jun 2018 16:27:28 +0000 (16:27 +0000)]
Bug 10562: Improve Leader06 Type Labels in MARC21slim2OPACResults.xsl

This patch takes the suggestions in Bug 10562 and implements those
changes in MARC21slim2OPACResults.xsl. This patch also makes the
following changes:

 - De-duplicate famfamfam icons: Remove the /silk subdirectory and move
   non-duplicates to famfamfam/; Correct paths to these images in
   templates and CSS
 - Improve the granularity of some material type icon choices: Show
   "Film," "Picture," or "Object" instead of "Visual material."
 - Remove unnecessary title attributes from material type images
 - Implement the kind of changes made in Bug 18235, "Add classes to
   material type icons on result lists and detail pages"

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>
(cherry picked from commit c747c74568850089d2a13b47aecf9987214ff8db)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15110: Improve decreaseHighHolds system preference description
helene hickey [Thu, 17 Jan 2019 02:28:57 +0000 (02:28 +0000)]
Bug 15110: Improve decreaseHighHolds system preference description

To test:
1) Apply patch
2) Go to Koha admin
3) Search in system prefernces for 'high demand'
4) Verify that the system prefernce 'decreaseLoanHighHolds' is in the
results of the search

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>
(cherry picked from commit fe2dceba34310c890dd1f06b114de9f3151f59e1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22124: Update cataloguing plugin system to not generate type parameter in script tag
Josef Moravec [Mon, 14 Jan 2019 09:16:53 +0000 (09:16 +0000)]
Bug 22124: Update cataloguing plugin system to not generate type parameter in script tag

Test plan:
1) Apply the patch
2) Have defined some cataloguing plugin which generates javascript - for
example dateaccessioned.pl
3) Go to cataloguing/adding item and show source
-> there should be no type parameter in script tag in code added by
cataloguing pulgin
4) prove t/db_dependent/FrameworkPlugin.t

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>
(cherry picked from commit cadb7eaab2c9617551450f84acadff0d48a846b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22136: Added 'ExtendedPatronAttributes' notes to 'Import Patrons' notes.
Ethan Amohia [Wed, 16 Jan 2019 04:01:44 +0000 (04:01 +0000)]
Bug 22136: Added 'ExtendedPatronAttributes' notes to 'Import Patrons' notes.

Fixed ExtendedPatronAttributes typo.

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>
(cherry picked from commit 273656f84c9dbc49c8a3669c7994b8c0ea7f3522)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19818: Add id into tag html from moremember.tt
helene hickey [Thu, 17 Jan 2019 01:09:04 +0000 (01:09 +0000)]
Bug 19818: Add id into tag html from moremember.tt

1) Go to the patron details for a patron
2) On the right of the screen, right click one of the labels below
   'Library use' etc, and Inspect Element
3) View <li> tags which should now each have a unique <id> tag for each

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>
(cherry picked from commit a011f4e6444a2a337042cc49ed9f529bb101fde9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21926: Enhance OAI-PMH:archiveID system preference description
Josef Moravec [Fri, 30 Nov 2018 10:26:54 +0000 (10:26 +0000)]
Bug 21926: Enhance OAI-PMH:archiveID system preference description

Test plan:
1) Apply the patch
2) Go to Administration -> System preferences -> Web services, section
OAI-PMH
3) See description on OAI-PMH:archiveID and confirm it does make sense
and have the link to implementation guidelines

Signed-off-by: Michal Denar <black23@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>
(cherry picked from commit ddc4c5b8aa75cfe8994ff150a0cae4cc51656852)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21290: Updating documentation for ModItem
helene hickey [Wed, 16 Jan 2019 23:20:38 +0000 (23:20 +0000)]
Bug 21290: Updating documentation for ModItem

To test:
Review the patch and check it is now updated correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9a5bfee706f85bc5fd53a9c2d0616c2e1186379a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20679: Removed 'rows per page' from report print layout
Jasmine Amohia [Wed, 16 Jan 2019 20:53:40 +0000 (20:53 +0000)]
Bug 20679: Removed 'rows per page' from report print layout

Test plan:
1. Create a report or view an existing report
2. Notice that 'Rows per page:' is visible
3. Print report (Ctrl+P)
4. Confirm that on printed report, 'Rows per page:' is no longer visible

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>
(cherry picked from commit 65b64bcafacf983a101f263e554b6d7274567bb9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22149: Fixed grammar in the manage_circ_rules_from_any_libraries description
Jasmine Amohia [Wed, 16 Jan 2019 23:10:35 +0000 (23:10 +0000)]
Bug 22149: Fixed grammar in the manage_circ_rules_from_any_libraries description

Test plan:
1. Review patch and confirm that the sentence makes sense

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>
(cherry picked from commit 9e79de6ef2d1662d04018203d2f9ff48be8a0f0f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21930: Reworded message on permissions.inc
Jack Kelliher [Tue, 15 Jan 2019 03:24:17 +0000 (03:24 +0000)]
Bug 21930: Reworded message on permissions.inc

1. Go to patrons account, more, Set Permissions.
2. Dropdown the Parameters section.
3. Text should display "If not set the logged in user could only edit
circulation rules for its the own library (please note that
        manage_circ_rules is still required)"
4. Apply patch and reload page
5. Text should now display "Edit circulation rules from any library. If
not set the logged in user could only edit circulation rules for their
own library (please note that manage_circ_rules is still required)"

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>
(cherry picked from commit ae84cf1e7a512ce198e5fe7e0b4dd3930967ba76)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22029: Google plus has been removed from the social links.
helene hickey [Tue, 15 Jan 2019 21:08:47 +0000 (21:08 +0000)]
Bug 22029: Google plus has been removed from the social links.

For testing:
1) Make sure SocailNetworks is enabled
2) Find a book and verify that in the social links, there is a Google
Plus option
3) apply patch and verify that the Google Plus option is no longer there

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>
(cherry picked from commit 380e57ed72aa3b11e91b3897501b9966392a3eaf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20569: Improved description of CheckPrevCheckout system preference
Jasmine Amohia [Tue, 15 Jan 2019 21:34:32 +0000 (21:34 +0000)]
Bug 20569: Improved description of CheckPrevCheckout system preference

The CheckPrevCheckout preference can be overriden by a setting in the
patron categories, I've edited the options to reflect this.

Test plan:
1. Check the CheckPrevCheckout system preferences and confirm that the
options are clear

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>
(cherry picked from commit 9b69ceeac64850dce05b56c978856bd5d1c43b06)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22138: updated tab names on members/paycollect.pl
Jasmine Amohia [Wed, 16 Jan 2019 00:54:52 +0000 (00:54 +0000)]
Bug 22138: updated tab names on members/paycollect.pl

Test plan:
1. Give patron outstanding fees
2. Search patron and select 'Make payment'
3. Select either 'Pay' or 'Write off'
4. Confirm that first tab title remains as 'Transactions'
5. Confirm that current tab title remains as 'Make a payment'

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>
(cherry picked from commit 0584d96bc082b5a7ab2b80af69fe2b7cebcbd188)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22083: Typo in circulation_batch_checkouts.tt
Caroline Cyr La Rose [Tue, 8 Jan 2019 14:28:35 +0000 (09:28 -0500)]
Bug 22083: Typo in circulation_batch_checkouts.tt

There is a typo in circulation_batch_checkouts.tt that makes Koha skip
a warning if the user cannot borrow due to circulation rules.

This patch corrects this typo.

To test:

1. In Administration > Global system preferences, 'Allow'
   BatchCheckouts and enter patron categories in
   BatchCheckoutsValidCategories
2. Go to Administration > Circulation and fines rules
3. Enter a rule where a certain category of patrons (that is in
   BatchCheckoutsValidCategories) cannot take out a particular item type
4. Search the catalog for an item of that item type
5. Copy the barcode
6. Go into patrons and find a patron of that category
7. Click on the Batch checkout tab
8. Paste the barcode in the box and click Check out
9. It should say 'Too many checked out'
10. Apply the patch
11. Try the check out again, it should show both warnings ('Too many
    checked out' and 'This patron can't check out this item per library
    circulation policy')

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>
(cherry picked from commit 3ee95bd0213943b625ea5a35eb04e45835cf6f65)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22066: Record library_id for manual credits
Tomas Cohen Arazi [Mon, 7 Jan 2019 17:06:01 +0000 (14:06 -0300)]
Bug 22066: Record library_id for manual credits

On creating manual credits, the (newly introduced) branchcode should be
set now. This trivial patch makes it work.

To test:
- Create a manual credit for a known patron
- Using MySQL check the result:
  $ sudo mysql
  > SELECT * FROM accountlines WHERE borrowernumber=<known_id>;
=> FAIL: The created accountline row has NULL for the branchcode
- Apply this patch
- Create a manual credit for the patron
- Run:
  > SELECT * FROM accountlines WHERE borrowernumber=<known_id>;
=> SUCCESS: branchcode is set correctly
-Sign 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>
(cherry picked from commit 094a1cb0703b22d18c061cdc4879c1fc3c76ea80)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22207: course reserves page does not have unique <body> id
Lucas Gass [Fri, 25 Jan 2019 15:37:21 +0000 (15:37 +0000)]
Bug 22207: course reserves page does not have unique <body> id

Test plan: Go to cgi-bin/koha/opac-course-reserves.pl in the OPAC and
make sure the body id is opac-course-reserves

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
(cherry picked from commit 358adce2e75bdd317165c86a9b5064bc52d9e2ad)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21089: Compiled CSS
Martin Renvoize [Fri, 1 Feb 2019 12:26:59 +0000 (12:26 +0000)]
Bug 21089: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5c547ffff2ca04a87695a57e972171cd76cc828c)
(rmaint recompiled for 18.11.x series)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21089: Overlapping elements in ordering information on acqui/supplier.pl
Owen Leonard [Mon, 7 Jan 2019 13:48:55 +0000 (13:48 +0000)]
Bug 21089: Overlapping elements in ordering information on acqui/supplier.pl

This patch changes the HTML structure of the vendor edit page so that
the markup is a little simpler. CSS is modified to match. This structure
should serve as a model for other similar form structures:

 <fieldset class="rows">
     <ol>
         <li>
             <label>General label:</label>
             <label class="radio">
                 Specific label 1 <input type="radio" />
             </label>
             <label class="radio">
                 Specific label 2 <input type="radio" />
             </label>
         </li>
     </ol>
 </fieldset>

To test, apply the patch and regenerate the staff client CSS.

 - Go to Acquisitions -> Vendor search -> Vendor -> Edit vendor
 - In the "Ordering information" section, confirm that the position of
   radio buttons looks correct.
 - Confirm that radio button labels work correctly.
 - Confirm that the adjacent dropdown menus work well.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5c547ffff2ca04a87695a57e972171cd76cc828c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21478: (QA follow-up) Make sure tests don't fail randomly
Tomas Cohen Arazi [Mon, 28 Jan 2019 15:23:35 +0000 (12:23 -0300)]
Bug 21478: (QA follow-up) Make sure tests don't fail randomly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e33f125384694dd825965dffae8d2ca31840aecf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21478: Make Koha::Hold->suspend reject found holds
Tomas Cohen Arazi [Fri, 25 Jan 2019 16:49:37 +0000 (13:49 -0300)]
Bug 21478: Make Koha::Hold->suspend reject found holds

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>
(cherry picked from commit 1d5934cae52dd96d9c5b8685a5f5531c69e92df8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21478: Unit tests
Tomas Cohen Arazi [Fri, 25 Jan 2019 16:48:54 +0000 (13:48 -0300)]
Bug 21478: Unit tests

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>
(cherry picked from commit 92db2e74fd3cd761ae67d2f7573ee03d32d0a8ed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21478: Add Koha::Exceptions::Hold
Tomas Cohen Arazi [Fri, 25 Jan 2019 15:48:04 +0000 (12:48 -0300)]
Bug 21478: Add Koha::Exceptions::Hold

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>
(cherry picked from commit 11ce911915a237047d8168876849de3df2b3b2e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21877: (RM follow-up) Move space into conditional
Nick Clemens [Mon, 28 Jan 2019 11:32:55 +0000 (11:32 +0000)]
Bug 21877: (RM follow-up) Move space into conditional

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b4cbb1643aa20ada17c3f73df3e59dfc5a3dbd8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21877: Use AuthorisedValues.GetDescriptionByKohaField for notforloan in checkout
Fridolin Somers [Tue, 22 Jan 2019 08:45:02 +0000 (09:45 +0100)]
Bug 21877: Use AuthorisedValues.GetDescriptionByKohaField for notforloan in checkout

Using only TT plugin for authorised value description is a better code.

Test plan :
Part 1:
1.1) On a catalog with items.notforloan defined with authorized values category NOT_LOAN
1.2) Define in NOT_LOAN an authorized values 1 with description 'at the beach'
1.3) Define in NOT_LOAN an authorized values 2 with description empty
Part 2:
2.1) Set preference 'AllowNotForLoanOverride' to 'Don't allow'
2.2) Edit an item with notforloan=1
2.3) Checkout this item => You see 'Item not for loan (at the beach)'
2.4) Edit an item with notforloan=2
2.5) Checkout this item => You see 'Item not for loan'
Part 3:
3.1) Set preference 'AllowNotForLoanOverride' to 'Allow'
3.2) Edit an item with notforloan=1
3.3) Checkout this item => You see 'Item is normally not for loan (at the beach)'
3.4) Edit an item with notforloan=2
3.5) Checkout this item => You see 'Item is normally not for loan'

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>
(cherry picked from commit 36df53ad8d4987e938e478d934d553b73e7450f2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21877: Show authorized value description for withdrawn in checkout
Fridolin Somers [Tue, 22 Jan 2019 08:47:22 +0000 (09:47 +0100)]
Bug 21877: Show authorized value description for withdrawn in checkout

During checkout the withdrawn information is displayed in a message :
"Item has been withdrawn".

Like in other pages and like notforloan, we should display the withdrawn authorized value description.

This patch adds this display.
Add <span> so that translation does not change.
Also adds class 'co-withdrawn' (like in checkin 'ci-*' classes) to ease hidding this new information via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description 'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description empty
4) Edit an item with withdrawn=1
5) Checkout this item => You see 'Item has been withdrawn (dropped in trash)'
6) Edit an item with withdrawn=2
7) Checkout this item => You see 'Item has been withdrawn'

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>
(cherry picked from commit cfd59672bb09c4766632de4c6f11cf9cf4bea3f9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22203: Holds modal does not link to patorn account
Nick Clemens [Thu, 24 Jan 2019 14:57:46 +0000 (14:57 +0000)]
Bug 22203: Holds modal does not link to patorn account

To test:
1 - Place a hold for a patron
2 - Check the item in at the pickup location
3 - Note the holds modal does not link to patron
4 - Apply patch
5 - Check in item again
6 - Patron name in modal is a link

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
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>
(cherry picked from commit 258c538e76914e6c2023242b555bb38c6f1970b9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>