]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 22075: Fix encoding problem with RIS export in OPAC
Katrin Fischer [Sun, 7 Apr 2019 16:25:28 +0000 (16:25 +0000)]
Bug 22075: Fix encoding problem with RIS export in OPAC

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

This patch fixes it.

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 64740260e51b4249dbc99d151dadfb173cde5298)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22618: (RMaint follow-up) Backport fix
Martin Renvoize [Mon, 15 Apr 2019 11:57:54 +0000 (12:57 +0100)]
Bug 22618: (RMaint follow-up) Backport fix

Remove tests for bug 15774 not in 18.11.x series that somehow got
wrongly introduced by the above bug bug backport

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22646: Fix use of PrivacyPolicyURL
Magnus Enger [Fri, 5 Apr 2019 08:03:58 +0000 (10:03 +0200)]
Bug 22646: Fix use of PrivacyPolicyURL

To test:

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

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

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

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

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

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

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

Test plan:

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

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e90cb16d79f611caa3cd6d6cbbca4ea01d7a8077)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22288: Correct item search in batchMod by barcode file
Nick Clemens [Sat, 23 Mar 2019 11:44:53 +0000 (11:44 +0000)]
Bug 22288: Correct item search in batchMod by barcode file

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

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

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

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

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

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

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

prove -v t/db_dependent/Acquisition.t

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 247d0d1df1ee5cc7f3184d8ac6ab35373af739b3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17978: Unit tests for changes
Nick Clemens [Mon, 24 Dec 2018 15:59:22 +0000 (15:59 +0000)]
Bug 17978: Unit tests for changes

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0b931d5de3c4fe9fa2b4823d9b8727b28a46aa7c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21003: Made Edit keywords more consistent in add_items-step2.tt
Hayley Mapley [Thu, 7 Mar 2019 20:28:48 +0000 (20:28 +0000)]
Bug 21003: Made Edit keywords more consistent in add_items-step2.tt

When adding a course reserve with a barcode that already exists, the
title, breadcrumbs, and legend of the form all specify that the user is
editing, and not adding, the book.

Test plan:
Same as comment 1

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 41e0ff7cd6240c2c9ba2d1bec816b191ef091eb1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21003: Removed warning and changed wording on add_items-step2.tt
Hayley Mapley [Thu, 7 Mar 2019 02:50:12 +0000 (02:50 +0000)]
Bug 21003: Removed warning and changed wording on add_items-step2.tt

When editing an item in a Course Reserve, the page displayed is the same
that is displayed when adding an item to a Course Reserve. This patch
removes the warning 'This course already has this item on reserve' when
the item is being edited, as well as changes the title, breadcrumbs, and
header of the div. This patch also Changes the header of the div to say
'Edit 'book_name' in 'course_name'' instead of 'Add 'book_name' to
'course_name'' when adding items to a course reserve if the item is
already present.

To test:
1) Create a new course in Course Reserves (you will need Course
    Reserves enabled in syspref)
2) Add an item by clicking the Add reserves button
3) Click the edit button on the right hand side of the item listing
under the Reserves heading
4) Observe that the warning 'The course already has this item on reserve' appears, and that the title, breadcrumbs and
header of the div all say Add/Reserve
5) Apply the patch
6) Repeat step 3 and observe that the title, breadcrumbs and header of
the div now say Edit
7) Also verify that when adding a reserve with a barcode that does not
yet exist in the course reserves that the warning 'The course already...' is not displayed and that the header of the div says Add
8) Finally verify that when adding a reserve with a barcode that DOES
exist in the course reserves that the warning 'The course already...' IS
displayed and the header of the div says Edit
9) Sign off!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3eee6f3091fcb621152af7f4db6441c98cb74558)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 12441: Search.pl conditional checks and displays using same syspref
Hayley Mapley [Thu, 14 Mar 2019 03:47:59 +0000 (03:47 +0000)]
Bug 12441: Search.pl conditional checks and displays using same syspref

Script search.pl checks OPACdefaultSortField and OPACdefaultSortOrder, but
shows defaultSortField and defaultSortOrder when using Advanced Search
in the staff client.

Test plan:
Apply the patch and then check that the Advanced Search uses
defaultSortOrder and defaultSortField sysprefs instead of the OPAC
sysprefs in the conditional. Check that sort behaviour in Advanced
Search still functions as expected. (It should do - this doesn't change
what displays, just improves consistency).

Sponsored-by: Catalyst IT
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c786e4de2369de34ce26610309cbce53534446d3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22475: Shelving location doesn't appear on tags list view
Owen Leonard [Thu, 7 Mar 2019 16:04:25 +0000 (16:04 +0000)]
Bug 22475: Shelving location doesn't appear on tags list view

This patch corrects the tags list view so that shelving location appears
correctly. Previously the template tried to display a variable which was
empty.

To test, apply the patch and locate an title which has both a tag
applied to it and a shelving location defined for one or more items. Go
to Tools -> Tags and click the tag to view titles with that tag. In the
location column of the table the shelving location should appear along
with library and call number.

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 54cf1df239e3b83ae5550e3ef499038dd5597d95)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 10345: Increment copy number when adding multiple copies.
Björn Nylén [Thu, 28 Mar 2019 09:28:29 +0000 (10:28 +0100)]
Bug 10345: Increment copy number when adding multiple copies.

To test:
1. Add multiple copies of an item with data in the 'Copy number' field. Note that tha data will be identical for all items.
2. Apply patch.
3. Add multiple copies of an item with a positive integer (ie. only digits) in the 'Copy number' field. Note that the copy number is incremented for each item.
4. Add multiple copies of an item with some other type of data in the 'Copy number' field. Note that the copy number field remains unchanged for the added items.

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 0e0a3173859d4374087e99e1a7cd929c8da61c76)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22620: OPAC description for CCODE in opac-reserve.tt
Fridolin Somers [Tue, 2 Apr 2019 07:57:35 +0000 (09:57 +0200)]
Bug 22620: OPAC description for CCODE in opac-reserve.tt

Bug 20450 added CCODE to opac-reserve.tt using AuthorisedValues TT plugin.

This patch changes the plugin call so that it requests OPAC description.

Test plan :
1) Define a CCODE with staff and OPAC descriptions
2) Apply this collection on an item
3) At OPAC, place an hold on this item
4) Verify the collection display correctly OPAC description and not staff description

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 05e49e6be98723f67ec85a5843fad1fc9787925f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22575: Item type administration uses invalid error class for dialog
Owen Leonard [Tue, 26 Mar 2019 14:11:28 +0000 (14:11 +0000)]
Bug 22575: Item type administration uses invalid error class for dialog

This patch modifies the item types administration script so that it
passes a valid message type to the template, where the type is used as a
CSS class. "Error" is a nonexistent dialog class. It should be "alert."

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

 - Try to delete an item type which is in use. The style of the error
   dialog should be correct.
 - Try to add an item type using a code which already exists. The error
   should look correct.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 40503c8fa86e6c4480ec8ca59e28f0c6f394502d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22607: DBRev 18.11.04.001
Nick Clemens [Sat, 23 Mar 2019 08:51:15 +0000 (08:51 +0000)]
Bug 22607: DBRev 18.11.04.001

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ced69febf3de17691d885e9ee7e03ef46c28b2ae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22607: Change default value in issues.renewals to '0'.
Josef Moravec [Fri, 29 Mar 2019 08:13:48 +0000 (08:13 +0000)]
Bug 22607: Change default value in issues.renewals to '0'.

This patch change renewals column of issues and old_issues tables.

Now it is NOT NULL default 0. It does not make sense when number of
renewals is undefined, it is always integer with value zero or more

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cf95f0a7e6897d3dc4b90c92ffad19230379d7cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22611: Correction for call to get create_item in EDI.pm
Colin Campbell [Mon, 1 Apr 2019 11:16:51 +0000 (12:16 +0100)]
Bug 22611: Correction for call to get create_item in EDI.pm

There was a typo in the addition of a call to
effective_create_items causing processing to abort after adding
a single copy.

This patch reverts to using the C4::Context call as used for the
first copy created, the intended call to effective_create_items
is a wrapper around that as the field in the basket is guaranteed
to be null (its not set when we call AddBasket). Being consistent
and explicit in what we call should guard against future changes
in dependencies exposing the logic flaw

Added some comments to make logical flow of code clearer

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 f6bc67e851722451a970d085f51fb11fb03e21b3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22648: Fix typo in SQL in smart-rules.pl
Katrin Fischer [Sat, 6 Apr 2019 10:19:14 +0000 (10:19 +0000)]
Bug 22648: Fix typo in SQL in smart-rules.pl

Fixes 2 SQL statements for setting the maximum
number of checkouts possible.

To test:
- In 18.11
- Verify that setting Default checkout, hold and return policy works
- Verfiy that setting Default checkout, ohld and return policy by
  patron category works

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: (follow-up) Add Modern::Perl
Nick Clemens [Fri, 29 Mar 2019 13:17:14 +0000 (13:17 +0000)]
Bug 13895: (follow-up) Add Modern::Perl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 94206510d7a7641e0e283738f56249c90f7d632e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22586: IntranetReportsHomeHTML no longer renders as HTML on reports-home.pl
Lucas Gass [Tue, 26 Mar 2019 11:17:31 +0000 (11:17 +0000)]
Bug 22586: IntranetReportsHomeHTML no longer renders as HTML on reports-home.pl

As of 18.11 the IntranetReportsHomeHTML syspref no longer renders HTML
on report-home.pl. I think this is being filtered wrong in the template.

Test Plan:

1) Edit IntranetReportsHomeHTML, set to "<p>Test</p>"
2) View a report, note that you see the html p tags are displayed
litterly
3) Apply this patch
4) Reload the page
5) Note the p tags are rendered as html

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7aaa10e0922b21f1c9ed40ede0d3dfc0a63c2832)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22596: use raw TT filter in items search with custom field
Fridolin Somers [Wed, 27 Mar 2019 14:37:51 +0000 (15:37 +0100)]
Bug 22596: use raw TT filter in items search with custom field

When items search is with a custom field using authorised values, html TT filter is breaking the JS, it should use raw.

Test plan :
1) Go to Administration > Item search fields
2) Define a search field with an authorised values category
3) Go to items search
4) Use the "New field" link
5) Check use of custom field is OK

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eb7e0f018c479024f0ceacb9f0c235b556ec2979)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: (QA follow-up) Make the class plural
Tomas Cohen Arazi [Wed, 27 Mar 2019 17:23:18 +0000 (14:23 -0300)]
Bug 13895: (QA follow-up) Make the class plural

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eabcec1d6c172e0e590aa497eae0c264bcd2b5dc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Fix test
Josef Moravec [Wed, 13 Mar 2019 16:25:38 +0000 (16:25 +0000)]
Bug 13895: Fix test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 583328e3f8c2e1827419185628069ad8c9979943)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Adapt naming according to voted RFC
Josef Moravec [Wed, 13 Mar 2019 16:03:09 +0000 (16:03 +0000)]
Bug 13895: Adapt naming according to voted RFC

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a142369b309068ed2ba5d34f033f4e047483401d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: (follow-up) Fix POST response
Josef Moravec [Mon, 25 Feb 2019 22:17:01 +0000 (22:17 +0000)]
Bug 13895: (follow-up) Fix POST response

Test plan:
prove t/db_dependent/api/v1/chcekouts.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 47ad7afccaf1ca0ae7b8dbfad9998aaac6d9a938)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Change renewal endpoint
Josef Moravec [Thu, 21 Feb 2019 00:26:17 +0000 (00:26 +0000)]
Bug 13895: Change renewal endpoint

Instead of PUT on /checkout/{checkout_id} endpoint, you should now call
POST on /checkouts/{checkout_id}/renewal

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 95d23bc3c38f3cd6a4e6be3aac451c3899cccc83)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Refactor test using REST Basic auth
Josef Moravec [Thu, 21 Feb 2019 00:15:22 +0000 (00:15 +0000)]
Bug 13895: Refactor test using REST Basic auth

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a0148b440a4f05c6a6d216c85b03ea502b0da95b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Remove create_item and create_biblio subs from test
Josef Moravec [Wed, 20 Feb 2019 21:42:36 +0000 (21:42 +0000)]
Bug 13895: Remove create_item and create_biblio subs from test

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a7e704382fa97ba08c8d2d57f6a818e76e858770)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Remove the opac checks in privileged endpoint
Josef Moravec [Wed, 20 Feb 2019 21:30:49 +0000 (21:30 +0000)]
Bug 13895: Remove the opac checks in privileged endpoint

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4672e6e6c40cf595da7e836525e5b6e486f78efe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: (follow-up) Adapt checkout endpoint to openapi, update terminology
Josef Moravec [Mon, 4 Feb 2019 14:22:54 +0000 (14:22 +0000)]
Bug 13895: (follow-up) Adapt checkout endpoint to openapi, update terminology

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1dfb57164fd6d986b110caa695a3baf9800ff93a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: (QA follow-up) Adjust OpenAPI definitions for checkouts
Tomas Cohen Arazi [Fri, 10 Nov 2017 19:16:49 +0000 (16:16 -0300)]
Bug 13895: (QA follow-up) Adjust OpenAPI definitions for checkouts

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b63fd774c181b96e514122c0d693f222b99b1cdd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Add API routes for checkouts retrieval and renewal
Julian Maurice [Mon, 23 Mar 2015 12:10:46 +0000 (13:10 +0100)]
Bug 13895: Add API routes for checkouts retrieval and renewal

GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bugs 16699 and 14868

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Lari Taskula <larit@student.uef.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e3f2e346f884e2ba6e4a8f43709955f776a259de)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21049: Set 007/00 when selecting material type (Rancor)
Julian Maurice [Fri, 8 Mar 2019 09:12:50 +0000 (10:12 +0100)]
Bug 21049: Set 007/00 when selecting material type (Rancor)

There is a 1-1 relationship between the material type values and the
position 00 of 007 field. Selecting a material type should set this
position's value.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 856425db1e156ee4faf1aae70b0a78845711ba43)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21049: Fix value of material select for Rancor 007 widget
Julian Maurice [Wed, 6 Mar 2019 07:43:18 +0000 (08:43 +0100)]
Bug 21049: Fix value of material select for Rancor 007 widget

The material type is selected in accordance with position 0 of 007

Test plan:
1. Create a new record using the advanced editor
2. Select a material type for field 007 and set at least the position 0
   of this field
3. Save the record and reload the page
4. The material type should remain selected
5. Try with all available material types

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e85294a738da7cce2a4897998ffa795f977b4cd7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22536: Display problem in Holds to Pull report
Owen Leonard [Tue, 19 Mar 2019 12:41:26 +0000 (12:41 +0000)]
Bug 22536: Display problem in Holds to Pull report

This patch modifies the display of several values in the holds to pull
report so that they can be displayed as lists instead of as chunks of
HTML generated in SQL.

This patch modifies the SQL in pendingreserves.pl so that values can be
formatted in the same way that holding branch is. The better long-term
solution is to remove SQL from pendingreserves.pl altogether, but this
is a quick fix.

This patch also makes a couple of minor markup changes to fix
validation.

To test, apply the patch and go to Circulation -> Holds to pull. To see
the changes the patch makes your holds to pull list should have titles
with multiple items at multiple branches, with call number, copy number,
and enumeration data. These values should all be displayed in bulleted
lists.

Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9a321c128fed457bf6d11d2ce7ee7edf7dd28004)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22560: Forgotten password "token expired" page still shows boxes to reset password
Owen Leonard [Fri, 22 Mar 2019 13:19:51 +0000 (13:19 +0000)]
Bug 22560: Forgotten password "token expired" page still shows boxes to reset password

This patch modifies the OPAC password recovery template so that the new
password entry form doesn't appear if the patron has followed an invalid
or expired link.

This patch also corrects the markup in the page title.

To test, apply the patch and follow the process for resetting a
forgotten password. When you follow the password recovery link, modify
the URL so that the "uniqueKey" parameter is different.

The page should show an error message. The password entry form should
not appear.

Check the page title in the browser's title bar. It should look correct.

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

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7ac1457ffc27cf6ec5a3a7bab6abc8a010e02b6a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22561: Forgotten password requirements hint doesn't list all rules for new passwords
Owen Leonard [Fri, 22 Mar 2019 12:57:31 +0000 (12:57 +0000)]
Bug 22561: Forgotten password requirements hint doesn't list all rules for new passwords

This patch modifies a few templates in the OPAC so that all available
information on password requirements is displayed for each case where
the patron is setting a password:

 - If the RequireStrongPassword system preference is set, a message
   should appear listing strong password requirements and minimum
   password length.
 - If RequireStrongPassword is not set, the message should only ask for
   a minimum password length.

To test, apply the patch and enable the PatronSelfRegistration and
OpacResetPassword preferences.

On the following pages, test with RequireStrongPassword both on and
off. The correct messages should appear.

 - OPAC -> Forgot password. Follow the process to reset your password
   until you reach the step where you are entering the new password.
 - OPAC -> Register here. Check the password section of the registration
   form.
 - OPAC -> Log in -> Change your password.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 50be1c4006e0a1d7e3b537bd849bc77f7a6bb56f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17746: (QA follow-up) Make set_password.pl generate a password if required
Tomas Cohen Arazi [Wed, 20 Feb 2019 14:26:40 +0000 (11:26 -0300)]
Bug 17746: (QA follow-up) Make set_password.pl generate a password if required

This patch makes the set_password.pl script generate the password if it
is not passed as an argument.

It also changes the behaviour of set_password.pl: it will now print the
userid and password (generated or not) to mimick the behaviour from
koha-reset-passwd.

The koha-reset-passwd gets simplified as it doesn't generate the random
password anymore, it passes the responsability to set_password.pl

To test:
- Follow the steps from the original platch
- Verify all behaves as expected

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3ef48c8708736e9d5b16e462e520302c007cb4c1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17746: Add misc/admin/set_password.pl script
Tomas Cohen Arazi [Mon, 4 Feb 2019 18:09:34 +0000 (15:09 -0300)]
Bug 17746: Add misc/admin/set_password.pl script

This patch introduces a script that allows changing a patron's password.
The change overrides the defined password enforcement policy.

If multiple conditions are passed to match on the patron, they all need
to match. Otherwise an error message is printed.

Attributes to search the patron on:
- cardnumber
- patron_id (a.k.a. borrowernumber)
- userid

we usually know some of them, but if we specify more than one, they need
to match a patron, together.

To test:
1) Apply this patch
2) Have a known patron (i.e. you know the cardnumber, the borrowernumber
   and the userid).
3) Run:
  $ kshell
 k$ perl misc/admin/set_password.pl --cardnumber <the_card_number> \
                                    --password a_password
4) Verify you can login with the new password
5) Repeat 3) through 5) with --patron_id and --userid
=> SUCCESS: You can login in all cases
6) Try combining some or all the parameters
=> SUCCESS: It fails when it should, it succeeds when it should
7) Sign off :-D

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e2f6542e1ebbd15977b47c86d2a9ef55fa0c5e9b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17746: Make koha-reset-passwd user set_password.pl
Tomas Cohen Arazi [Tue, 5 Feb 2019 17:04:12 +0000 (14:04 -0300)]
Bug 17746: Make koha-reset-passwd user set_password.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0cd4ca289bd2e1bd11fdbd015225a909971ce213)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22550: OPAC suggestion form doesn't require mandatory fields
Owen Leonard [Wed, 20 Mar 2019 16:24:42 +0000 (16:24 +0000)]
Bug 22550: OPAC suggestion form doesn't require mandatory fields

Test plan:
1. OPAC->login->your purchase suggestions->New purchase suggestion
2. Click button "Submit your suggestion" directly without filling in any field.
   Empty suggestion record was added succeffully.
3. Apply the patch.
4. Click button "Submit your suggestion" directly without filling in any field.
   The required fields should be labeled in red.
   (you can change the mandatory fields by preference 'OPACSuggestionMandatoryFields')

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Jogiraju,T. <rajujogi.t@gmail.com>
Signed-off-by: Jogiraju,T. <rajujogi.t@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 28e7f1d4e7a114b04d6940463f47351466a638dd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22495: Restore Elasticsearch mapping for su-geo
Ere Maijala [Tue, 12 Mar 2019 09:29:33 +0000 (11:29 +0200)]
Bug 22495: Restore Elasticsearch mapping for su-geo

Test plan:
1. Reset mappings
2. Run perl misc/search_tools/rebuild_elastic_search.pl -d -b -v
3. Do a search and verify that the Places facet works

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 53b059afbb5731373a92a3ebaaceea4e1d656363)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21974: Make Elasticsearch connection settings configurable
Ere Maijala [Mon, 17 Dec 2018 14:22:58 +0000 (16:22 +0200)]
Bug 21974: Make Elasticsearch connection settings configurable

Default settings are appended in get_elasticsearch_params so that there's a central place for them. Defaults can be overridden in koha-conf.xml.

Test plan:

1. Verify that searches still work with the patch applied.
2. Verify that search fails after adding the following under <elasticsearch> in koha-conf.xml:
<cxn_pool>Static</cxn_pool>
3. Verify that search fails after adding the following under <elasticsearch> in koha-conf.xml:
<cxn_pool>FOO</cxn_pool>

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 65f35447e93008810cec3eba63a286b9940d5824)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21622: (RM follow-up) adjust for changes from bug 21282
Nick Clemens [Mon, 25 Mar 2019 12:58:39 +0000 (12:58 +0000)]
Bug 21622: (RM follow-up) adjust for changes from bug 21282

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 18f9c3eb514f5733c55d92b16bd0f38d29161290)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21998: Silent tests
Jonathan Druart [Wed, 27 Feb 2019 17:49:35 +0000 (14:49 -0300)]
Bug 21998: Silent tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e9fa69ca64e78cc9ea540e3fed1e9ffb1b3488fe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21998: Throw exception on bad pattern
Josef Moravec [Tue, 18 Dec 2018 11:53:21 +0000 (11:53 +0000)]
Bug 21998: Throw exception on bad pattern

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ee73d577ed564d98e77cf25fcdadcbc594f7217c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21998: Add pattern parameter in Koha::Token
Marcel de Rooy [Wed, 19 Sep 2018 13:36:36 +0000 (15:36 +0200)]
Bug 21998: Add pattern parameter in Koha::Token

Allow a pattern too in Koha::Token->generate. Only supported length.
Does not affect CSRF calls. So tiny change without further impact.

Test plan:
Run  t/Token.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 b794643bb075c0aa5de81f2481ae1df56f674309)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19661: (follow-up) Use Basic auth in tests
Josef Moravec [Tue, 26 Feb 2019 09:16:05 +0000 (09:16 +0000)]
Bug 19661: (follow-up) Use Basic auth in tests

Test plan:

prove t/db_dependent/api/v1/acquisitions_funds.t

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 48484173e26bf9859984860a17089f09de5c8b6a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19661: Add and change properties and parameters to conform to the funds RFC.
Matthias Meusburger [Tue, 15 Jan 2019 09:46:04 +0000 (10:46 +0100)]
Bug 19661: Add and change properties and parameters to conform to the funds RFC.

Also, perform an exact search when searching on the fund owner id.

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 6e98cc4503cedba411371d4005be41b5822569c8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19661: Use Koha::Acquisition::Funds instead of C4::Budgets
Matthias Meusburger [Wed, 17 Jan 2018 10:49:14 +0000 (11:49 +0100)]
Bug 19661: Use Koha::Acquisition::Funds instead of C4::Budgets

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 b6be4024196c9e62363eabf0d2ad0b9f9141d15c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19661: REST API - Funds Endpoint
Matthias Meusburger [Thu, 12 Oct 2017 07:55:12 +0000 (07:55 +0000)]
Bug 19661: REST API - Funds Endpoint

This patch adds a new route to the REST api:

/api/v1/acquisitions/funds/

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
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 717975abebe938a5e79ffc07055ed6190b43f206)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21948: Compiled CSS
Nick Clemens [Fri, 22 Mar 2019 19:20:55 +0000 (19:20 +0000)]
Bug 21948: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7a9a8f2f08e4b74af712d59e1f1f9f0a7b3205a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21948: Clean up style of item detail page
Owen Leonard [Tue, 4 Dec 2018 19:53:29 +0000 (19:53 +0000)]
Bug 21948: Clean up style of item detail page

This patch removes some page-specific style from the item detail page in
the staff client and adds some markup in order to trigger a more
generally-used style.

This patch also adds a font-awesome icon to the "Edit item" link on the
page.

To test, apply the patch and regenerate the staff client CSS. Open a
bibliographic record and view the "Items tab."

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 32020105e8494ba82a8a505711c5047560c9d304)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoUpdate release notes for 18.11.04 release v18.11.04
Martin Renvoize [Mon, 25 Mar 2019 17:16:50 +0000 (17:16 +0000)]
Update release notes for 18.11.04 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoIncrement version for 18.11.04 release
Martin Renvoize [Mon, 25 Mar 2019 16:36:38 +0000 (16:36 +0000)]
Increment version for 18.11.04 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoTranslation updates for Koha 18.11.04
Koha translators [Mon, 25 Mar 2019 16:08:08 +0000 (13:08 -0300)]
Translation updates for Koha 18.11.04

(cherry picked from commit 40211e2a2a4939ee379fde2e2c10f2b7c89849ac)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22565: (QA follow-up) Fix test Acquisition.t
Josef Moravec [Mon, 25 Mar 2019 11:21:45 +0000 (11:21 +0000)]
Bug 22565: (QA follow-up) Fix test Acquisition.t

Test plan:
prove t/db_dependent/Acquisition.t
should pass

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 607eb83bc06410d59aefb6907070865f9f272115)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22565: Add test for ModReceiveOrder regression
Martin Renvoize [Mon, 25 Mar 2019 11:04:37 +0000 (11:04 +0000)]
Bug 22565: Add test for ModReceiveOrder regression

This test checks that order_internalnote is only updated for the given
orderline in ModReceiveOrder.

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>
(cherry picked from commit 9bf2b27df5c0b403feea9f78962244d6cbf8a7c8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22565: Do NOT replace all internalnote's on receive
Martin Renvoize [Mon, 25 Mar 2019 10:49:15 +0000 (10:49 +0000)]
Bug 22565: Do NOT replace all internalnote's on receive

Bug 21467 introduced a but whereby setting any order_internalnote on
receive one would end up setting all orders to have that internalnote.

This patch adds the missing WHERE clause to the database query which was
likely lost during a rebase?

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>
(cherry picked from commit 9acf69f7a690a78bd09af7afbb28e4b32c493903)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13735: Update PrepareItemrecordDisplay to use maxlength
Katrin Fischer [Wed, 6 Feb 2019 02:02:11 +0000 (02:02 +0000)]
Bug 13735: Update PrepareItemrecordDisplay to use maxlength

The PrepareItemrecordDisplay method used to generate the item
display on receiving serials was using a hardcoded maxlength
of 255 on input fields. This patch updates it to use the
maxlength defined in the frameworks instead as the normal
item form does.

To test:
- Create or reuse an existing subscription
- Make note of the framework the record uses
- Add an item on receive
- Check the maxlength on the various fields is set to 255
  (check source code or use developer tools)
- You can also verify that by adding a long note to
  one of the note fields
- Apply patch
- Repeat tests, the maxlength should now be 9999
- In your framework settings, change the length of one
  of the subfields to another value
- Verify that the item form reflects the change

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 0429aadc217f05a98bbaa51f955b835ac552fd7a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21130: (Follow up OPAC Results) Prevent HTML class from being translated
Blou [Tue, 11 Sep 2018 18:42:03 +0000 (14:42 -0400)]
Bug 21130: (Follow up OPAC Results) Prevent HTML class from being translated

This fixes the same issue where "title" is being translated (in fr-CA at least) and thus
break the javascript impacting the result display in the OPAC

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5334e0f32a8b93c407c2bfc931397a0ae70b8d64)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21130: Prevent HTML class from being translated
David Bourgault [Fri, 27 Jul 2018 21:13:42 +0000 (17:13 -0400)]
Bug 21130: Prevent HTML class from being translated

Adds a xsl:value-of tag to prevent the value from being translated.

TEST PLAN
0) Apply patch
1) Translate
2) In the opac, div.record has not changed

NOTE:
I don't know if this bug affects all translations, I noticed it when translating to fr-CA.
The fix will work for all languages.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e64fb90311a9f2b37b49fc670962089cbb3d32de)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13763: (follow-up) Strip leading whitespace characters from input barcode
Josef Moravec [Wed, 20 Mar 2019 15:52:07 +0000 (15:52 +0000)]
Bug 13763: (follow-up) Strip leading whitespace characters from input barcode

this makes the work with barcodes from input consistant on checking out,
     checking in and renewing

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 28ff4f6393e65ebfca60c05611fafc926f1fb239)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13763: Added check for filter syspref in renew.pl
Hayley Mapley [Thu, 14 Mar 2019 04:58:31 +0000 (04:58 +0000)]
Bug 13763: Added check for filter syspref in renew.pl

In Circulation->Renew, the renew feature does not check the system
preference itemBarcodeFilter to see whether the barcode needs to be
converted. This patch fixes this, adding a check for the system pref and
applying it accordingly to convert the barcode if it is needed.

Test plan:
1) In Circulation->Renew, enter a barcode that you know exists in the
catalogue but add extra spaces, breaking up the barcode. Note that this
fails with a warning that says 'No item matches this barcode'

2) In system Preferences, set the itemBarcodeInputFilter pref to Remove
spaces and repeat step1. Note that the result is the same as in step 1

3) Apply the patch

4) Repeat step 1, and note that the filter removes the spaces and the
item is renewed (or gives an error that indicates it recognises the
barcode)

Sponsored-by: Catalyst IT
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 48e9082043115416063e66217db60f0054b68088)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: DBRev 18.11.03.004
Nick Clemens [Thu, 21 Mar 2019 18:11:29 +0000 (18:11 +0000)]
Bug 18736: DBRev 18.11.03.004

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bc36d8e06b3b43b09b655718f7fad5a1780b246a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: Calculate tax depending on rounding
Nick Clemens [Tue, 15 Jan 2019 15:06:06 +0000 (15:06 +0000)]
Bug 18736: Calculate tax depending on rounding

Marcel's comments pointed out that while I tried to avoid storing
rounded values it is required for tax generation.

This patch makes that change and adds test coverage and POD for
populate_order_with_prices

To test:
Follow plan on other patches, ensure that orders and totals match on the
basket, invoice, and budget pages

prove -v t/db_dependent/Acquisition/populate_order_with_prices.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0aeae50229c6a381fe112644b72eefd6848fb655)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: (QA follow-up) Resolve uninitialized warn from Biblio.pm L3334
Marcel de Rooy [Fri, 14 Dec 2018 09:46:56 +0000 (10:46 +0100)]
Bug 18736: (QA follow-up) Resolve uninitialized warn from Biblio.pm L3334

Running t/db/Budgets.t:
Use of uninitialized value in join or string at C4/Biblio.pm line 3334.

Test plan:
Run again. Verify no warnings left.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 876323cf5bb5185834a875f3da29ac33f7760ef4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: (QA follow-up) Change to signed, add large int test
Marcel de Rooy [Fri, 28 Sep 2018 09:20:49 +0000 (11:20 +0200)]
Bug 18736: (QA follow-up) Change to signed, add large int test

[1] Add trivial subtest in t/Number/Price.t
Checking a negative number and a large number for the MAX_INT change.
Note: Confusing to have t/Prices.t too.

[2] Change UNSIGNED to SIGNED in get_rounding_sql. Although I did not spot
problems with negative prices, we theoretically could while casting.
cast(-2 as unsigned) == 18446744073709551614

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2f5e839bf780955d228c9672abce9d6e5ad1aedf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: (QA follow-up) Cosmetic changes
Marcel de Rooy [Fri, 28 Sep 2018 08:09:01 +0000 (10:09 +0200)]
Bug 18736: (QA follow-up) Cosmetic changes

[1] Resolve warnings like:
Use of uninitialized value $rounding_pref in string eq at /usr/share/koha/devclone/C4/Acquisition.pm line 2040.

[2] Fixing unusual use of whitespace too.

[3] Remove list operator from get_rounding_sql return. Only used in scalar
context.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9922d2bf40e2b7429f300d4d73134f9fef3b8c65)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: (follow-up) Remove duplicate code and adjust tests
Nick Clemens [Thu, 20 Sep 2018 19:34:10 +0000 (19:34 +0000)]
Bug 18736: (follow-up) Remove duplicate code and adjust tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ca28c83abbd449c7e5f1d7b86760b7fb53741988)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: (follow-up) cast as UNSIGNED instead of INTEGER
Nick Clemens [Sun, 16 Sep 2018 01:21:16 +0000 (01:21 +0000)]
Bug 18736: (follow-up) cast as UNSIGNED instead of INTEGER

More recent MySql versions require the use of SIGNED or UNSIGNED rather
than INTEGER. UNSIGNED will still work in older installs

Signed-off-by: Julian Maurice <julian.maurice@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 ab4cf23286219b473820b61bca82c884de274e80)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: Unit tests for GetBudgetHierarchy
Nick Clemens [Fri, 24 Aug 2018 11:11:19 +0000 (11:11 +0000)]
Bug 18736: Unit tests for GetBudgetHierarchy

prove -v t/db_dependent/Budgets.t

Signed-off-by: Julian Maurice <julian.maurice@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 d9b3d0fa36869a40b9db65375dba4972913697d8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: (follow-up) Fix missing rounding and bad formatting
Nick Clemens [Fri, 24 Aug 2018 01:22:35 +0000 (01:22 +0000)]
Bug 18736: (follow-up) Fix missing rounding and bad formatting

This patch:
Adds a missing use
Uses 'Koha::Number::Price->round()' instead of 'format()' to ensure numeric
returns
Ensures too big numbers don't crash round()
Uses syspref in 'GetBudgetHierarchy'

To test:
Follow previous test plan
Check values on admin/aqbudgets.pl are affected by syspref
Ensure values throughout acquisitions are correctly calculated/displayed
(even when greater than 1,000)

Signed-off-by: Julian Maurice <julian.maurice@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 4ccbae8879a386a1846bb48c18b3722f936dc983)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: (follow-up) Add missing test cases
Mark Tompsett [Tue, 17 Apr 2018 23:39:57 +0000 (23:39 +0000)]
Bug 18736: (follow-up) Add missing test cases

We now fully cover GetBudgetsPlanCell in these tests

Signed-off-by: Julian Maurice <julian.maurice@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 b17ca2b701fab5307330b6196590e5d3048978e1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: (follow-up) Add tests and FIXME for GetbudgetsPlanCell
Nick Clemens [Tue, 17 Apr 2018 14:37:11 +0000 (14:37 +0000)]
Bug 18736: (follow-up) Add tests and FIXME for GetbudgetsPlanCell

prove t/db_dependent/Budgets.t

Signed-off-by: Julian Maurice <julian.maurice@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 00cf699c82aeea46ef5a72bf344fd306430c5aba)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: Unit tests for rounding
Nick Clemens [Tue, 6 Jun 2017 14:37:17 +0000 (10:37 -0400)]
Bug 18736: Unit tests for rounding

Unit tests to highlight the issue

To test:
Prove t/db_dependent/Budgets.t
prove t/Acquisition.t

Signed-off-by: Julian Maurice <julian.maurice@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 bf0882252f242efa8cc9f08625c0abe305d205a6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: Use rounding syspref to determine correct prices in calculations
Nick Clemens [Thu, 28 Dec 2017 15:15:47 +0000 (15:15 +0000)]
Bug 18736: Use rounding syspref to determine correct prices in calculations

To test:
Place an order (no tax just for simplicity)
 listprice/rrp = 16.99
 discount = 42%
 quantity = 8
 estimated calculated at 9.85
 but order total is 78.83, but 8 times 9.85 = 78.80
Apply patches, set OrderPriceRounding syspref to 'Nearest cent'
Not order total is now as expected
View ordered.pl and confirm values are correct
Complete order, view invoice and confirm values
View spent.pl and confirm values
Go through acquisitions module and confirm prices throughout are
correct.

Signed-off-by: Julian Maurice <julian.maurice@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 7fe5f8cd2c2d1eddd2a835fb644c262cffcbd34c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: Add OrderPriceRounding syspref
Nick Clemens [Thu, 28 Dec 2017 15:11:11 +0000 (15:11 +0000)]
Bug 18736: Add OrderPriceRounding syspref

Signed-off-by: Julian Maurice <julian.maurice@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 aea90223d6f250d6f74e00244abbb3e0334107b5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22206: (RMaint follow-up) Fix for bad test plan
Martin Renvoize [Tue, 19 Mar 2019 12:08:21 +0000 (12:08 +0000)]
Bug 22206: (RMaint follow-up) Fix for bad test plan

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21832: add is_expired to ILS-DI example
Fridolin Somers [Thu, 7 Mar 2019 13:46:29 +0000 (14:46 +0100)]
Bug 21832: add is_expired to ILS-DI example

Test plan :
1) Apply patch
2) Enable ILS-DI
3) Go to <opac URL>/cgi-bin/koha/ilsdi.pl?service=Describe&verb=GetPatronInfo
4) Check you see is_expired in example response

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c0df2d0e8612e1ca428f51462fcfb99fbc3f0009)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21832: add unit test
Fridolin Somers [Tue, 12 Feb 2019 14:52:22 +0000 (15:52 +0100)]
Bug 21832: add unit test

Adds a check that is_expired exists in service GetPatronInfo.

Test plan :
Run : prove t/db_dependent/ILSDI_Services.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: remove ref to bug number, we have git for that

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 20ce110f5c656f51bad262708d4b577568c1a52a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21832: Restore is_expired in ILS-DI GetPatronInfo service
Fridolin Somers [Wed, 14 Nov 2018 10:18:58 +0000 (11:18 +0100)]
Bug 21832: Restore is_expired in ILS-DI GetPatronInfo service

Since Bug 17578 removed C4::Member::GetMemberDetails, the information "is_expired" disappeared from ILS-DI service GetPatronInfo.

I propose to restore in by adding the code that exisited in C4::Member::GetMemberDetails directly in C4::ILSDI::Services.

Test plan :
1) Enable ILS-DI webservice
2) Choose a patron not expired
3) Call web-service (replace X with patron's borrowernumber) :
   /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X
4) You see : <is_expired>0</is_expired>
5) Choose a patron expired
6) Call web-service (replace X with patron's borrowernumber) :
   /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X
7) You see : <is_expired>1</is_expired>

Signed-off-by: Maryse Simard <maryse.simard@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: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0748911eb26f2a35d8ba881dcb92e37a979fc9a9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20658: (follow-up) Fix for QA: Add missing html filters
Owen Leonard [Mon, 24 Sep 2018 12:10:47 +0000 (12:10 +0000)]
Bug 20658: (follow-up) Fix for QA: Add missing html filters

This patch adds missing filters to the installer header and footer
include files.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ef231b41119237952ce8a445c953c3957c987734)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20658: Move template JavaScript to the footer: Installer and onboarding
Owen Leonard [Wed, 25 Apr 2018 16:28:18 +0000 (16:28 +0000)]
Bug 20658: Move template JavaScript to the footer: Installer and onboarding

This patch updates the installer and onboarding templates so that
JavaScript is included in the footer instead of the header. A new
include file is added, installer-intranet-bottom.inc, so that only
required JS is being loaded.

Some markup changes are included to improve validity.

To test, apply the patch and start with a blank Koha database. Run
through the installer and onboarding processes and confirm that there
are no problems. Check especially JS-related interactions like
datepickers and fields which are validated via JS, like the password
inputs.

NOTE: The qa tool will flag this patch for not using the Asset plugin,
but it doesn't work correctly for installer files.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9ceb745fb2f9c226ffab40a32137c8d43d10ad74)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20782: Fix link from edifactmessages to invoices
Martin Renvoize [Mon, 21 May 2018 11:15:37 +0000 (12:15 +0100)]
Bug 20782: Fix link from edifactmessages to invoices

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 57cfc3bab7d76c3a382f8111f5d5c9490eb2eb91)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22206: (follow-up) Voted RFC changes
Tomas Cohen Arazi [Thu, 28 Feb 2019 13:00:27 +0000 (10:00 -0300)]
Bug 22206: (follow-up) Voted RFC changes

This patch changes expiration_date for end_date as voted when the RFC
was approved.

It also adds a test for the Location header being added correctly when
suspending a hold (SWAGGER3.4.1)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6ebcc255d3def898c491333bc8702c56b09e4537)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22206: (QA follow-up) Fix tests for hold suspension api
Josef Moravec [Thu, 21 Feb 2019 00:59:22 +0000 (00:59 +0000)]
Bug 22206: (QA follow-up) Fix tests for hold suspension api

Test plan:

prove t/db_dependent/api/v1/holds.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1db9598e81abf009b80aa44699061e845c9e87e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22206: Add routes to suspend/resume holds
Tomas Cohen Arazi [Mon, 28 Jan 2019 10:40:15 +0000 (07:40 -0300)]
Bug 22206: Add routes to suspend/resume holds

This patch introduces:

- POST   /holds/{hold_id}/suspension { "expiration_date": "2019-01-30" }
- DELETE /holds/{hold_id}/suspension

to suspend a hold or resume a suspended hold, respectively.

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6067d2d49f790ab9ffead1381c571c14b0ba43ff)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22206: Unit tests
Tomas Cohen Arazi [Mon, 28 Jan 2019 10:39:47 +0000 (07:39 -0300)]
Bug 22206: Unit tests

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>
(cherry picked from commit bcc150a9c05c1de4fe2fc5e07a5469f90d48953c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>