]> git.koha-community.org Git - koha.git/log
koha.git
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>
(cherry picked from commit 60b1a4f83611414a042651bea757dc7e96fde6f9)

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

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b160af2a051dc3693f04dabf320d0995cf26160)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ecb86a84c13e4e5661f4c6683b7755c21d607bbe)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 04e121a741a442f5b557e11864eb69be9d0c3ded)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1106c0fa595c8378807bc955b29c2f83c2af5ba9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22119: Add price formatting in more places in circulation
Katrin Fischer [Sun, 13 Jan 2019 09:06:22 +0000 (10:06 +0100)]
Bug 22119: Add price formatting in more places in circulation

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

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

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

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

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

Signed-off-by: Jasmine Amohia <jasmineamohia.student@wegc.school.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit dc6be66e2b2ec5917d7bec020d4e94c40baa9f6c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 26c59980fe123fc6033098ae374f57c4afd53aca)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22120: Add price formattig to patron summary print
Katrin Fischer [Sun, 13 Jan 2019 10:15:27 +0000 (11:15 +0100)]
Bug 22120: Add price formattig to patron summary print

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

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

Signed-off-by: helene hickey <hickeyhe@wgc.school.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3c2cc8da26f7a907c0b51f928ffb100eefbfa692)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3638172077c95f0cba2f0e190f245e598e4b004d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 17347: Ignore whitespace before and after on renewing
Katrin Fischer [Mon, 14 Jan 2019 05:41:48 +0000 (05:41 +0000)]
Bug 17347: Ignore whitespace before and after on renewing

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0e220869f5a3327eee8f9426d648fbcaaa0fd7fa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7c881b32b5f7bfca6ccb17b8ddc8045ad37a3524)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21885: Calendar to-date starts before end-date
Pasi Kallinen [Tue, 27 Nov 2018 09:53:32 +0000 (11:53 +0200)]
Bug 21885: Calendar to-date starts before end-date

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

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

Test plan:

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

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0939d44c22cda569faf4c0c60fd67de04097b34d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a69fd8912496c5d7335e0e4d8f113d2b2aeb7b61)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22282: Fix PDF issue when exporting PDF in French format.
Liz Rea [Thu, 31 Jan 2019 22:41:29 +0000 (22:41 +0000)]
Bug 22282: Fix PDF issue when exporting PDF in French format.

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

To test :
Without the patch :

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

With the patch :

Do the same

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0844f2c174c83ce3da11be07511730b0c220e5ad)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 981670c68cb3d12b30c410c12ed6488f5a555117)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22278: Clear cache when creating new report groups or subgroups
Nick Clemens [Wed, 6 Feb 2019 12:49:58 +0000 (12:49 +0000)]
Bug 22278: Clear cache when creating new report groups or subgroups

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

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

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ea36265697c85cfb1f7de0b2344ef8647dc31387)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f64d0d9038a58abe360744200348950688e834cd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21808: Field 711 is not handled correctly in showAuthor XSLT for relator term...
Marcel de Rooy [Mon, 12 Nov 2018 10:48:23 +0000 (11:48 +0100)]
Bug 21808: Field 711 is not handled correctly in showAuthor XSLT for relator term or code

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

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

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6179f23dd8b4ed24add2e76c7b8e193372052201)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9199083de8637d96148b873cc745c1a81fe78d01)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22097: CataloguingLog should be suppressed for item branch transfers
Kyle M Hall [Thu, 10 Jan 2019 19:32:22 +0000 (14:32 -0500)]
Bug 22097: CataloguingLog should be suppressed for item branch transfers

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b3c25b64b868b56423c50b9df4fac4bb55947679)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0f0218bc838bee7b55853a456334fd2518b5784c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21907: Fix article requests count for non-superlibrarians
Jonathan Druart [Tue, 11 Dec 2018 13:13:42 +0000 (10:13 -0300)]
Bug 21907: Fix article requests count for non-superlibrarians

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ab9e4ca6a46519ddc69ad76837407c0a4f0ed0cd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9c823701268d07feb149e219ece7c88d89d47732)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 16231: Correct permission handling in subscription edit
Owen Leonard [Wed, 3 Oct 2018 16:07:19 +0000 (16:07 +0000)]
Bug 16231: Correct permission handling in subscription edit

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

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

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

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7520ede89987a7a65301debdda46950a6364ebfd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f2151c1bbc98003576606d8b1bd2cb2453e6925a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22254: Correction to datehandling in test
Martin Renvoize [Fri, 1 Feb 2019 09:55:54 +0000 (09:55 +0000)]
Bug 22254: Correction to datehandling in test

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

Test plan.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1da0ba48b6fdf38cfd3d3ea63ec076b15995610f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 413f34ba244af3560861785f5aa74ab457f00b02)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22236: Translation should generate tags with consistent attribute order
Marcel de Rooy [Wed, 30 Jan 2019 15:37:10 +0000 (15:37 +0000)]
Bug 22236: Translation should generate tags with consistent attribute order

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

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

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

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

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

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fb62e8d1fc8b210a5b23801b7b8faff3280bf638)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 150de6dfe7f7d18f5b61e45b0442802c2f61fe9f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22242: Javascript error in value builder cased by Select2
Fridolin Somers [Thu, 31 Jan 2019 08:12:13 +0000 (09:12 +0100)]
Bug 22242: Javascript error in value builder cased by Select2

Same as Bug 17780 but in value builders.

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

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

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

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3ca0234d34ac9708a8335cfa97805fb7498201bf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 55b20ad1a7b8afa5c385bd3f9825014d40936ba1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 19816: Implement dateonly for rfc3339 format
Tomas Cohen Arazi [Thu, 24 Jan 2019 17:29:09 +0000 (14:29 -0300)]
Bug 19816: Implement dateonly for rfc3339 format

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

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

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b2dce05ddff8a047e7770ea241b1edd9b798212e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dcc0478089f5fde72426d94810bed6430df73a34)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 19816: Regression tests
Tomas Cohen Arazi [Thu, 24 Jan 2019 17:27:28 +0000 (14:27 -0300)]
Bug 19816: Regression tests

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

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7e69ab62a5ef3fbd350c6606d25b5ab6f6bc168e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 41115fc79dfd16be62dd56e1946e0a2e08c6a2fc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Add RESTBasicAuth syspref - Revert
Lucas Gass [Tue, 12 Feb 2019 00:39:57 +0000 (00:39 +0000)]
Bug 22132: Add RESTBasicAuth syspref - Revert

This reverts commit 5b020c98163c9af74b60338d126887eb2fd7ec9f.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Unit tests - Revert
Lucas Gass [Tue, 12 Feb 2019 00:39:19 +0000 (00:39 +0000)]
Bug 22132: Unit tests - Revert

This reverts commit 2b12b70de4a117365cf76521be2119aa01a00957.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Add Basic authentication to the API - Revert
Lucas Gass [Tue, 12 Feb 2019 00:38:41 +0000 (00:38 +0000)]
Bug 22132: Add Basic authentication to the API - Revert

This reverts commit 2403b01021e66cae65e210426b644cc6a695ff5f.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: (QA follow-up) Tests - use Mojo builtin for auth - Revert
Lucas Gass [Tue, 12 Feb 2019 00:37:34 +0000 (00:37 +0000)]
Bug 22132: (QA follow-up) Tests - use Mojo builtin for auth - Revert

This reverts commit 7296f1d0bf76798ab914f45d65810e23194a565d.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: (QA follow-up) set_password now expects a hashref - Revert
Lucas Gass [Tue, 12 Feb 2019 00:36:46 +0000 (00:36 +0000)]
Bug 22132: (QA follow-up) set_password now expects a hashref - Revert

This reverts commit c028f916747ee4b6618b76ff5a85db1f3ba9ff88.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: DBRev 18.05.08.001 - Revert
Lucas Gass [Tue, 12 Feb 2019 00:35:50 +0000 (00:35 +0000)]
Bug 22132: DBRev 18.05.08.001 - Revert

This reverts commit 5dd2bed00cf4661cb9d1762415df649db7648e19.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: DBRev 18.05.08.001
Lucas Gass [Thu, 7 Feb 2019 23:31:38 +0000 (23:31 +0000)]
Bug 22132: DBRev 18.05.08.001

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 63f40e519c7fbbba70a2944113830a1d3ed80306)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3c8f67afe8d6e4dcc044d5f97a66336bd76af93e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: (QA follow-up) Tests - use Mojo builtin for auth
Martin Renvoize [Thu, 24 Jan 2019 15:54:08 +0000 (15:54 +0000)]
Bug 22132: (QA follow-up) Tests - use Mojo builtin for auth

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8ee08c3922dd892e9432ce243fc7244092fdd18f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a9b3b01dd9290f964d739e0f2f818990d9a6e9ba)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Add Basic authentication to the API
Tomas Cohen Arazi [Tue, 15 Jan 2019 16:23:23 +0000 (13:23 -0300)]
Bug 22132: Add Basic authentication to the API

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 26af040c79e548e9388346b247f509f743401c34)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 14e2dd9c9f6ee3c2796954f3e25433197c41f9d5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Unit tests
Tomas Cohen Arazi [Tue, 15 Jan 2019 16:23:09 +0000 (13:23 -0300)]
Bug 22132: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 103670e726b9938aa1484b7486cba94adf7b69a9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4730724c661d50df4268d581691cc73de8500186)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22132: Add RESTBasicAuth syspref
Tomas Cohen Arazi [Tue, 15 Jan 2019 16:22:53 +0000 (13:22 -0300)]
Bug 22132: Add RESTBasicAuth syspref

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3ffed7d55a1d77df2d3c0748614434866612ed24)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3741027605b61b0e988fd7e8df8ec60dc5fe5b99)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 20634: Changing the identical label "Library:" to "Location" in Inventory Home.
Olivia Lu [Tue, 15 Jan 2019 21:24:25 +0000 (21:24 +0000)]
Bug 20634: Changing the identical label "Library:" to "Location" in Inventory Home.

To find fix:

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a3993a75822972e1e013410ab020f5a749248017)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 92001cc504d03f3aa20b5295154e9ae66c0a530e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit e3fde6153e66b7c01b804ec7c36e22706abd3e27)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit 69802bed3e61f2039c14952480e57540e8f03ca8)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit c8ca6926ed114062d4a55ce981b32ffeb670fc7a)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit b27150cf9a4c62a636ed7d158e1fe44941de189b)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit 1debd138ca3603b7bf7fa0929553203c7bcbe2ac)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit 62d5d98371a673bb8c1c15d5dad382cf866879d2)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit e96eed9b841394353cc5c4484ddc608432e22d29)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit ba8cd76c6239ed71246c26666f16f07f56b731b7)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit e227fea2a23b9da2f201e49934018342109c9cd7)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit ea8bd52f6dbb6aab6aabb1d9e191b0356ba1a529)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit 52e13bf70c68df255b241f248ec138b96cc41cf1)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit 4c928041f1ee5ec4c21aab24dfd7f69399ae330f)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.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>
(cherry picked from commit a4345d8af3b6e30d21d7cd310dc144fd50d04b8e)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21478: (RMaint follow-up) fixed test count
Lucas Gass [Wed, 6 Feb 2019 16:17:43 +0000 (16:17 +0000)]
Bug 21478: (RMaint follow-up) fixed test count

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit 17231a2c35f13bef2fc19551cb7c3c7110e5c438)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit 81c6172ee224f7432ec809f8a9cd17f9c4971ecc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit f087b9895eb97f29a5a712dfcb3d0946fd570afd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit ddbfc92aa601e672535c4478eb8e65e624a7d53f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit 582a84a6c7328efe78bbacaad293e4e21e6785ca)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit 30895e2c561215fa7c094c9838021a0095a578ba)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit c22928630ac2c00501b2bb17d60a3b2ba99481c5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit fe56745739adcec6a7cb441ced3c359369aacca1)

5 years agoBug 22111: Format amount shown on place holds when maxoutstanding is reached (staff)
Katrin Fischer [Sat, 5 Jan 2019 03:50:36 +0000 (03:50 +0000)]
Bug 22111: Format amount shown on place holds when maxoutstanding is reached (staff)

Displays amount outstanding correctly when holds are blocked
by maxoutstanding.

To test:
- Check maxoutstanding system preference value
- Add a fine to a patron account exceeding maxoutstanding
- Try to place a hold for this patron from staff
- Verify this message is shown:

     Patron has outstanding fines: 6.00

- Toggle CurrencyFormat system preference and verify display
  changes according to setting

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Mikael Olangcay Brisebois <mikael.olangcay-brisebois@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c37ded96714409cd572c79f3c9cd69694e0e71de)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 78e617b201402b5e551ba79131b362b2ef7f0bee)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22113: Add price formatting on item lost report
Katrin Fischer [Sat, 5 Jan 2019 05:41:48 +0000 (05:41 +0000)]
Bug 22113: Add price formatting on item lost report

The item lost report displays the price and replacement
price for lost items. With the patch they will display
according to the CurrencyFormat system preference.

To test:
- Mark 1 or more items lost
- Make sure that replacement cost and purchase price are set
- Go to Reports > Items lost
- Search for your lost items
- Verify price and replacement price display
- Apply patch and toggle CurrencyFormat to different settings
- Refresh lost items report
- Verify prices are always displayed according to syspref setting

Signed-off-by: Olivia Lu <olivialokm@gmail.com>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c3fb484fe2922d2a97053b3fde4fb433c5aa0c4f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit da8e5fcd2447aad751e511adac4d29bac7cec82c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21855: Changed "deprecated delete_unverified_opac_registrations.pl cronjob" to...
Olivia Lu [Wed, 16 Jan 2019 03:54:25 +0000 (03:54 +0000)]
Bug 21855: Changed "deprecated delete_unverified_opac_registrations.pl cronjob" to "cleanup_database"

To Find Fix:

1. Go to Koha Administration
2. Search PatronSelfRegistrationVerifyByEmail
3. Verify that NOTE now says "system preference requires the
cleanup_database ..."

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mikael Olangcay Brisebois <mikael.olangcay-brisebois@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b93c5dcbfdeafc2758cb880bea02ca91c0ef4e67)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3f4b04852780e946c2fbc64ae4599058699a941d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 18909: Enable the maximum zebra records size to be specified per instance
Kyle M Hall [Tue, 6 Mar 2018 18:29:22 +0000 (13:29 -0500)]
Bug 18909: Enable the maximum zebra records size to be specified per instance

The default for Zebra is to not return results where the record size is
greater than 1045 KB ( 1 MB ). Some libraries need to increase this
ceiling, but it may come at a cost with z39.50 compatibility with other
services. For that reason, we should make this setting configurable on a
per-instance basis.

Test plan for kohadevbox:
1) Apply this patch
2) Run:
   $ reset_all
3) Restart Zebra:
   $ sudo koha-zebra --restart kohadev
4) Check how zebrasrv was called:
   $ ps waux | grep zebrasrv
=> SUCCESS: Looks like
 ... /usr/bin/zebrasrv -v none,fatal,warn -k 1024
5) Edit /etc/koha/sites/kohadev/koha-conf.xml, add:
   <zebra_max_record_size>2048</zebra_max_record_size>
6) Repeat (3) and (4)
=> SUCCESS: Looks like
 ... /usr/bin/zebrasrv -v none,fatal,warn -k 2048
7) Sign off :-D

General test plan:
1) Apply this patch
2) Build a Debian package
3) Specify a zebra_max_record_size of 2048 in your koha_conf.xml
4) Restart zebra
5) Index a record greater than 1 MB but smaller than 2 MB
6) Note that it is searchable!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8c0c6be7488e0543662e47006ded12e74ae4eb8d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35fc9c10032a4b130d9861efb36f112112294e57)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22118: Format hold fee when placing holds in OPAC
Katrin Fischer [Sat, 12 Jan 2019 08:21:38 +0000 (09:21 +0100)]
Bug 22118: Format hold fee when placing holds in OPAC

When Koha charges for holds, a message with the fee is
shown before the patron places the hold. The amount needs
to be formatted according to CurrencyFormat system preference.

To test:
- Add a hold fee to your patron category
- Log into the OPAC
- Search for a record to place a hold on
- Click Place hold
- Verify there is a note showing about the hold fee
- Toggle CurrencyFormat and HoldFeeMode and verify
  that the formatting is always correct

Signed-off-by: Jack Kelliher <jke0429@stacmail.net>
Signed-off-by: Mikael Olangcay Brisebois <mikael.olangcay-brisebois@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4f0618a8888dff72b15dfe9193259c1bc5d06b5f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b8527c5057ddac6f956d102efa27ef95cd5d3051)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 11922: Add SHOW_BCODE patron attribute for Norwegian web installer
Jasmine Amohia [Thu, 17 Jan 2019 02:32:08 +0000 (02:32 +0000)]
Bug 11922: Add SHOW_BCODE patron attribute for Norwegian web installer

Test plan:
1. Notice that /patron_attributes.sql and /patron_attributes.txt can be
located in 2-Valgfritt
2. Confirm that the SHOW_BCODE patron attribute in the English web
installers .sql and .txt file is also in the Norwegian web installers
.sql and .txt file

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 19920: Removed unnecessary code from C4/Members.pm
Jasmine Amohia [Wed, 16 Jan 2019 02:11:42 +0000 (02:11 +0000)]
Bug 19920: Removed unnecessary code from C4/Members.pm

A seperate bug (Bug 16853) removed the subroutine used in this file. I removed the code as it had become unnecessary.

Test plan:
1. Confirm that &changepassword can't be found in C4/Members.pm

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 20491: Updating the MARC subfield desciption of 952q
helene hickey [Wed, 16 Jan 2019 22:06:15 +0000 (22:06 +0000)]
Bug 20491: Updating the MARC subfield desciption of 952q

Test plan:
1) Go to admin, then to MARC frameworks, then to default
frameworks structure, then subfield stucture for 952
2) Verify that 'q'
is described as 'checked out'
3) Go to <intranet>/cgi-bin/koha/cataloguing/additem.pl?biblionumber=x
4) Verify
that 'q' is also descirbed as 'Checked out' in
5) Apply patch and update
your database
6) Verify that the description of 'q' has changed to 'Date
due'
7) Go to <intranet>/cgi-bin/koha/cataloguing/additem.pl?biblionumber=x
6) Verify that it has changed to 'Date due'

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 20491: (QA follow-up) Remove atomic update

We should not update existing installations, especially
since this would not work for translated frameworks.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6e4e4c9cbc04b42653599b4ddea35cbaa57e42f3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cabf7be3246fcd2248fcbbed497524c3cfa07980)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 7403: Shorten CataloguingLog preference description
helene hickey [Wed, 16 Jan 2019 02:16:26 +0000 (02:16 +0000)]
Bug 7403: Shorten CataloguingLog preference description

To test:

1) Look at value of CataloguingLog prefernce
2) Apply the patch and the value should change
3) Verify that the warning has been removed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 90a43b1868a068b54e398c1df2227a6b6cf93875)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 85bca71c640e1261d74d8c433f620f821b5d5f3d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 20274: Itemtypes report gives zero results if item-level_itypes set to bibliograp...
helene hickey [Tue, 15 Jan 2019 23:07:34 +0000 (23:07 +0000)]
Bug 20274: Itemtypes report gives zero results if item-level_itypes set to bibliographic records

1) Go to reports then catalog by item types
2) Pick a location and look at table
3) Change the system prefernce of item-level_itypes
4) Verify a zero result
5) Apply patch and retry
6) Verify that result does not change to zero on either preference

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22122: Rearranged inputs from a patrons basket in Acquisitions.
Ethan Amohia [Wed, 16 Jan 2019 03:26:36 +0000 (03:26 +0000)]
Bug 22122: Rearranged inputs from a patrons basket in Acquisitions.

Test Plan:
1. From home page, go to "Acquisitions"
2. Add a test vendor under "New vendor"
3. Give the vendor any name and click "Save"
4. Click "New Basket"
5. Give the basket a name and click "Save"
6. Click on "Add to basket"
7. Click on "From an external source"
8. Note the order of inputs (ISBN, ISSN, Title...)
9. Go back to the homepage
10. Go to "Cataloging"
11. Click on "New from Z39.50/SRU" button. A new window should open
12. The order of inputs under 'Z39.50/SRU Search' should all match the
order of inputs from step 8. (Except "Select MARC framework)

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoRevert "Bug 22125: branches.pickup_location should be flagged as boolean"
Lucas Gass [Fri, 1 Feb 2019 18:50:53 +0000 (18:50 +0000)]
Revert "Bug 22125: branches.pickup_location should be flagged as boolean"

This reverts commit 92cd2f8ca6ee06a05d2b6511ad75533bbf619773.

5 years agoBug 22101: Ill Requests missing in menu on advanced search page
Owen Leonard [Fri, 11 Jan 2019 16:27:17 +0000 (16:27 +0000)]
Bug 22101: Ill Requests missing in menu on advanced search page

This patch adds [% USE Koha %] to header.inc so that Koha.Preference
calls will work correctly.

To test, apply the patch and log in to the staff client as a user who
has permission to access the ILL module.

- Go to the catalog's advanced search page
- Cnfirm there is a header menu item under "More" for
  "ILL requests."

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22125: branches.pickup_location should be flagged as boolean
Tomas Cohen Arazi [Mon, 14 Jan 2019 11:04:51 +0000 (08:04 -0300)]
Bug 22125: branches.pickup_location should be flagged as boolean

This trivial patch just marks the mentioned column as a boolean.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
https://bugs.koha-community.org/show_bug.cgi?id=16497

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 95ce61fd3e2c7f41d14e570da3bb8bf05373c65e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 92cd2f8ca6ee06a05d2b6511ad75533bbf619773)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21192: Do not pick SelfRegistration hidden fields for SelfModification
Jonathan Druart [Mon, 13 Aug 2018 15:55:55 +0000 (12:55 -0300)]
Bug 21192: Do not pick SelfRegistration hidden fields for SelfModification

There was a mix up between "modification" and "edit" for $action in
opac-memberentry.pl.

If a patron is logged into the OPAC and they attempt to submit changes to their
personal details without having actually changed anything, the page reloads with
a message stating 'No changes were made.' However, the fields that now appear
are those that have been allowed/hidden according to the preferences set for
patron self registration, even if patron self registration is disabled. This can
lead to problems if there are discrepancies between the fields allowed for self
register settings and those allowed for patron self modification settings.

To replicate:

1.) In Administration › System preferences > OPAC, set PatronSelfRegistration to
'don't allow'

2.) Modify the unwanted fields for PatronSelfModificationBorrowerUnwantedField
and PatronSelfRegistrationBorrowerUnwantedField so that at least one field is
different between the two settings and save (for example, specify 'mobile' to be
hidden in the former, but don't include in the list of fields to be hidden in
the latter).

3.) Log into the OPAC and navigate to the 'your personal details' tab. Notice
that the editable fields correspond to those not hidden by
PatronSelfModificationBorrowerUnwantedField

4.) Without making any changes, click on 'Submit update request'.

5.) Note that on this page the fields correspond to those not hidden by
PatronSelfRegistrationBorrowerUnwantedField and are now editable (including any
fields that would otherwise be hidden by the Self Modification settings).

Reported-By: Chris Slone <cslone@camdencountylibrary.org>
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e0b1f945f9cdb4efd8b4403855cdc995023dc8be)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 63ebdb815987f0072587b7e3df5dc54cada1accd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21170: Remove "isn't numeric in numeric eq (==)" warnings in MARCdetail
Jonathan Druart [Mon, 17 Dec 2018 15:55:34 +0000 (12:55 -0300)]
Bug 21170: Remove "isn't numeric in numeric eq (==)" warnings in MARCdetail

Easily removed switching the two conditions.

Test plan:
Hit catalogue/MARCdetail.pl?biblionumber=1
=> Without this patch you will see in the log warnings like
  Argument "ddc" isn't numeric in numeric eq (==) at /home/vagrant/kohaclone/catalogue/MARCdetail.pl line 277.
=> With this patch applied the warnings do no longer appear

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b608f548a894cb433c4218b94a33d6b8a824a4c4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2cceecd43866efd56d84ab45c6b4e9f10895533f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22006: Handle undefined itemnumber for Koha::Account::Line->item
Jonathan Druart [Fri, 14 Dec 2018 19:15:24 +0000 (16:15 -0300)]
Bug 22006: Handle undefined itemnumber for Koha::Account::Line->item

If there is no item linked to an account line, the ->item method should return undef.
Without this patch it explodes with:
Carp::croak('DBIC result _type  isn\'t of the _type Item') called at /home/vagrant/kohaclone/Koha/Object.pm line 102

Exists since the introduction of this method by bug 12001

Reported on bug 19489 comment 18.

Test plan:
  prove t/db_dependent/Koha/Account/Lines.t
must return green

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6c8089b40fef1b59ab056bae8817933afdb2fcc3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 07cd6560b5d8334b11ac8c998c1d1156d01a4bcb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22006: Add tests
Jonathan Druart [Fri, 14 Dec 2018 19:14:42 +0000 (16:14 -0300)]
Bug 22006: Add tests

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 58f04600f084e2bb5306f18bba1b9a0b22e1664b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4d3510f89ccad4083aeb739f9a738ddc1cbf6741)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22082: ambiguous column in patron stats
Fridolin Somers [Tue, 8 Jan 2019 13:32:19 +0000 (14:32 +0100)]
Bug 22082: ambiguous column in patron stats

In Reports > Patrons statistics, the combination of activity and extended attributes generates an invalid SQL query with error :
ERROR 1052 (23000): Column 'borrowernumber' in IN/ALL/ANY subquery is ambiguous

This is because FROM contains tables borrowers and borrower_attributes both containing borrowernumber column.

Test plan :
1) Be sure to have a patron extended attribute
2) Be sure you have some recent circulation activity
3) Go to Reports > Patrons statistics
4) Select 'active' in 'Patron activity' and 1 years of activity
5) Check 'Row' in 'Patron category'
6) Check 'Columns' in a extended attribute
7) Submit
8) Without patch you have no results, with patch you have exepected results

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8d2324e6de6f639904d188cd432e14add4874779)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bccbb54491d3722411cee786000959abade33aa7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21491: Display 'Yes' as selected if no refundlostitemfee rules are set
Nick Clemens [Wed, 21 Nov 2018 13:40:35 +0000 (13:40 +0000)]
Bug 21491: Display 'Yes' as selected if no refundlostitemfee rules are set

To test:
1 - Delete all refund_lost_item_fee_rules form the db
    delete from refund_lost_item_fee_rules;
2 - View the Standard circ rules - Default lost item fee refund shows as
'No'
3 - View circ rules for a single library, shows as 'Default (Yes)'
4 - Return a lost item, it actually does refund (this is in the
        LostItemFeeRules code, default 1 if not set)
5 - Apply patch
6 - Rule shows as 'Yes'
7 - View a specifc rule, still says Default (Yes)

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

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22085: fix UNIMARC default XSLT broken by Bug 14716
Fridolin Somers [Wed, 9 Jan 2019 14:51:48 +0000 (15:51 +0100)]
Bug 22085: fix UNIMARC default XSLT broken by Bug 14716

Bug 14716 added a call to encode-uri() and namespace str.  This
namespace declaration is sometimes missing in UNIMARC default XSLT
files.

This patch adds namespace declaration also where encode-uri is not used
because it may be used in the future. And those files are the base for
home made custom files.

Test plan :
1) Use a UNIMARC DB
2) Use default in all XSLT sysprefs
3) Apply patch
4) Perform a search on OPAC
5) Check display is OK
6) Click on a record for detail page
7) Check display is OK
8) Perform a search on staff interface
9) Check display is OK
10) Click on a record for detail page
11) Check display is OK

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 76c10a5dcd37666f641fddd43231b32793f55b1b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c494f474ec23b29690ae3eb12310eb282d07c932)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22011: Fixed Typo on batchMod-edit.tt
Jack Kelliher [Tue, 15 Jan 2019 02:56:23 +0000 (02:56 +0000)]
Bug 22011: Fixed Typo on batchMod-edit.tt

1. Navigate to tools, then batch item modification.
2. Input a valid barcode into the barcode list input field, and press
continue.
3. Under the Edit items heading, text should display "Checking the box
right next the subfield ..."
4. Apply patch and refresh page, text should now display "Checking the
box right next to the subfield ..."

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

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21637: Fixed upercase letter in EasyAnalyticalRecords syspref
Mackey Johnstone [Tue, 15 Jan 2019 02:56:25 +0000 (02:56 +0000)]
Bug 21637: Fixed upercase letter in EasyAnalyticalRecords syspref

Changed 'Don't Display' to 'Don't display' for the
EasyAnalyticalRecords options.

To find fix:

1.Be loged in as a user who can access sys prefrences.

2.Go to:
Koha Administration > Global System Preferences > Cataloging >
Interface.

3.Confirm that the dropdown option for EasyAnalyticalRecords is now
'Don't display'

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

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22036: Indented code where '^I' was written rather than an indent.
Jasmine Amohia [Tue, 15 Jan 2019 03:30:52 +0000 (03:30 +0000)]
Bug 22036: Indented code where '^I' was written rather than an indent.

Code was previously written with '^I' where an indent was supposed to
be. I deleted all '^I's and replaced them with indents.

To find this change:
Look at the tags/review.pl file and confirm indentation is correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c29512266dd72991afb6f43e29e37f5db29d0c7b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e97ce49ba7752b5278c2ea2262401ab6690f211e)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 20865: Removed space before : on order receive filters
Jasmine Amohia [Tue, 15 Jan 2019 20:59:16 +0000 (20:59 +0000)]
Bug 20865: Removed space before : on order receive filters

I removed space before : on order receive filters

To find this change:
1. Create a vendor
2. Create a basket and add an order to basket
3. Close basket and select 'receive shipment'
4. Check that filter options found on the left side of the page finish with a colon and that there is no space before the colon

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

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 20165: Changed uppercase letter to a lowercase letter in the patron search search...
Olivia Lu [Tue, 15 Jan 2019 03:15:37 +0000 (03:15 +0000)]
Bug 20165: Changed uppercase letter to a lowercase letter in the patron search search fields under the plus option.

Changed "Street Address" to "Street address" in the patron search search
fields under the plus sign to fit Koha's capitalization rules.

To find this change:

1. Go to Patrons and switch in the search to search patrons
2. Click on the plus sign
3. Check "Search fields" pull down
4. "Street Address" should now be "Street address"

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

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22054: Updated the error message for attempting to renew an onsite checkout
helene hickey [Tue, 15 Jan 2019 03:47:58 +0000 (03:47 +0000)]
Bug 22054: Updated the error message for attempting to renew an onsite checkout

To test:

1) Enable OnSiteCheckouts system preference
2) Checkout an item checking the onsite checkout checkbos in more
options
3) Go to circulation > pending on-site checkouts
4) Verify the checkout shows
5) Go to circulation > renew
6) Try to renew the on-site checkout using the barcode
7) Verify display:

onsite_checkout  Continue without renewing

8) apply the patch and reload page with error message
9) verify display:

Item cannot be renewed because it's an onsite checkout

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

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22095: Replaced dead links with working links
Ethan Amohia [Tue, 15 Jan 2019 21:45:01 +0000 (21:45 +0000)]
Bug 22095: Replaced dead links with working links

I have updated the broken link everywhere it occurs.

Confirm that the new link works in the installer.

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

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21866: Changed "report" to "plugins" for the warning "This report was written...
Olivia Lu [Tue, 15 Jan 2019 03:52:30 +0000 (03:52 +0000)]
Bug 21866: Changed "report" to "plugins" for the warning "This report was written for an older version of Koha. Run at your own risk"

To find this change:

1. Enable use plugins in global system preferences
2. Go to tools then click tool plugins
3. Verify that this string now says plugins

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5e2e101037bb2bfb8579fcee331388e56658db84)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2c6b8230b8fa7dd0a7746327c126565fc8b47dc9)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22107: patrons.t doesn't need to delete existing data
Tomas Cohen Arazi [Fri, 11 Jan 2019 18:14:04 +0000 (15:14 -0300)]
Bug 22107: patrons.t doesn't need to delete existing data

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 21676d7b873fa1fdd2438f0972bf9f00f09c3474)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fb455d9b8dc736c25618e0ecbbd7ff156c228baf)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22107: Make tests use a simpler class, with no FK
Tomas Cohen Arazi [Fri, 11 Jan 2019 18:13:27 +0000 (15:13 -0300)]
Bug 22107: Make tests use a simpler class, with no FK

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 528e09cf15998744918833fb123a1d04d5762606)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a59826288b5c8706dbe7123bcb7df8707bfc1ce2)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21912: (QA follow-up) Do not delete existing patrons
Tomas Cohen Arazi [Wed, 26 Dec 2018 17:55:53 +0000 (14:55 -0300)]
Bug 21912: (QA follow-up) Do not delete existing patrons

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8e6c789255a60958ed12eb399b1acd21819fd40c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9b6b80488a6b9315b201a3f6d11d0341e58122b5)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21912: Add tests for Koha::Objects->search
Tomas Cohen Arazi [Thu, 29 Nov 2018 14:59:05 +0000 (11:59 -0300)]
Bug 21912: Add tests for Koha::Objects->search

This patch adds simple tests for the current behaviour. Specifically the
return values in both scalar and list context.

To test:
- Apply this patch
- Run:
  $ prove t/db_dependent/Koha/Objects.t
=> SUCCESS: Tests pass
- Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7669697732e3abf3b2c5a32446115d277be7342e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 464dcd7d9e2e7ba4e604ef0e7b5665dd8cd8b9b3)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoUpdate release notes for 18.05.08 release v18.05.08
Lucas Gass [Tue, 22 Jan 2019 17:08:26 +0000 (17:08 +0000)]
Update release notes for 18.05.08 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoIncrement version for 18.05.08 release
Lucas Gass [Tue, 22 Jan 2019 17:02:06 +0000 (17:02 +0000)]
Increment version for 18.05.08 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoTranslation updates for Koha 18.05.08
Koha translators [Tue, 22 Jan 2019 14:41:55 +0000 (11:41 -0300)]
Translation updates for Koha 18.05.08

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22071: (follow-up) Add POD for validate_query_parameters
Tomas Cohen Arazi [Mon, 7 Jan 2019 10:38:29 +0000 (07:38 -0300)]
Bug 22071: (follow-up) Add POD for validate_query_parameters

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 551626ce1e82286414c4a77c83febdcfbc99741a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f8bd298a0817bf6811c88fe7b441626c059b4f6f)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22071: (follow-up) Simplify code
Tomas Cohen Arazi [Mon, 7 Jan 2019 10:31:43 +0000 (07:31 -0300)]
Bug 22071: (follow-up) Simplify code

In order to add features to this method, the current code would force us
to do it for each authentication method.

There's duplicated code that could be simplified. This patch makes the
authentication code just set $user on each block (oauth and cookie
authentication) and moves the final permissions check to the end of the
authenticate_api_request method.

Overall, the behaviour remains unchanged.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t \
          t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests pass! Nothing changed!
- Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0d5058b7b29d90cc7c8e533ee56388fbb5a96d52)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a6dc145ce966338ec0ae96f7e32968149647c02f)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22071: Make authenticate_api_request stash koha.user in OAuth use case
Tomas Cohen Arazi [Fri, 4 Jan 2019 15:46:37 +0000 (12:46 -0300)]
Bug 22071: Make authenticate_api_request stash koha.user in OAuth use case

This patch makes the OAuth code stash the requestion Koha::Patron.

To test:
- Apply the tests patch:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail :-(
- Apply this patch
- Run:
 k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> SUCCESS: Tests pass :-D
- Sign off =D

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 613a0034e08af84af1e2198156bbfc6900ba6551)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 84ddb45e884394d08ba4dc836d3209e11e351048)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22071: Regression tests
Tomas Cohen Arazi [Fri, 4 Jan 2019 15:37:27 +0000 (12:37 -0300)]
Bug 22071: Regression tests

The authenticate_api_request() behaviour needs more tests. This patch
adds tests for the stashed Koha::Patron object. It highlights the bug in
the OAuth authentication case.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail in the OAuth case, pass in the cookie-based auth
case.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2067b8e3f8cb363370897ff179bcdbf5c97cbbbb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d830a2f0973fa6ffd634a9665f93a53c325c2d7a)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22073: Add to diacritics mappings for Ž and ž
Nick Clemens [Wed, 31 Oct 2018 12:50:27 +0000 (12:50 +0000)]
Bug 22073: Add to diacritics mappings for Ž and ž

To test:
1 - Find or add a record by author Slavoj Žižek
2 - Search for 'Zizek'
3 - No results
4 - Apply patch
5 - Reindex
6 - Search again
7 - Success!

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

Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5c313bc554a857da29f124957d58459c0ed4c03b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aee127e6397db9594c97d06b684cdeabf6f50e0d)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22020: (bug 21777 follow-up) Fix columns visibility for circulation.pl
Jonathan Druart [Wed, 19 Dec 2018 19:00:52 +0000 (16:00 -0300)]
Bug 22020: (bug 21777 follow-up) Fix columns visibility for circulation.pl

The table is used by circulation.pl and moremember.pl
When it is modified we need to take care of the two view.

Test plan:
Use the columns settings to hide/show the "check in" and other columns
Confirm the this patch fixes the display for moremember.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 17a8eb187959625ef67eea9999588fe502443691)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a02a19ffea86e64b65164e7578b5d9b8f611a064)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22052: Refactor DeleteExpiredOpacReigstrations
Nick Clemens [Fri, 28 Dec 2018 18:48:25 +0000 (18:48 +0000)]
Bug 22052: Refactor DeleteExpiredOpacReigstrations

This patch changes the sub to use Koha::Objects and updates the tests.
Previously the sub would die on borrowers with checkouts and would
delete borrowers if they had fines

To test:
 1 - prove -v t/db_dependent/
 2 - Set your selfreg preferences:
    PatronSelfRegistration: Allow
    PatronSelfRegistrationDefaultCategory: SELFREG (or of your choice)
    PatronSelfRegistrationExpireTemporaryAccountsDelay: 30
 3 - Register a patron into SELFREG or how you set above
 4 - Set their date enrolled to two months ago
 5 - Checkout an item to the patron
 6 - Issue a fine to that patron
 7 - perl misc/cronjobs/cleanup_database.pl --del-exp-selfreg -v
 8 - The job should die with an error
 9 - Check in the item
10 - run the corn again - patron is deleted, oops
11 - Apply patch
12 - Create another patron in the same way
13 - Checkout and fine the patron
14 - run the cron
15 - they are not deleted, and no error
16 - checkin the item
17 - run the cron
18 - they are not deleted and no error
19 - clear the fine
20 - run the cron
21 - patron is deleted, huzzah

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b32756a5d7819e13290c2a145f3f0009280785c4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8102f6dc70623786c3247e008a0601cfd234d1e6)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22052: Unit tests
Nick Clemens [Fri, 28 Dec 2018 18:48:15 +0000 (18:48 +0000)]
Bug 22052: Unit tests

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f44e37b201d0a8b95b1eee0ac0766bed9c386fc2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2bc4f25855819990f5d5fbcd244a0ef6dd3d89e6)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22030: DBRev 18.05.07.002
Jesse Maseto [Fri, 11 Jan 2019 19:07:16 +0000 (19:07 +0000)]
Bug 22030: DBRev 18.05.07.002

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 22030: Use preference to determine username sent to overdrive
Nick Clemens [Wed, 19 Dec 2018 17:53:08 +0000 (17:53 +0000)]
Bug 22030: Use preference to determine username sent to overdrive

Overdrive configuration generally defaults to cardnumber, however, they
have confirmed that some libraries use usernames. We need to allow for
both scenarios.

To test:
1 - Have an OverDrive account setup with SIP authentication
    Note: You can apply for a testing account at developer.overdrive.com
    and setup an environment
2 - Fill in all your OverDrive system preferences
3 - Test with a patron whose username is their cardnumber
4 - Confirm their overdrive account tab on opac loads
5 - Change the username to be another value like "borked_wont_work"
6 - Note the overdrive account tab won't load
7 - Apply patch, update database, not new system preference
OverDriveUsername (default to 'cardnumber)
8 - Note the OD account loads successfully
9 - Change the system preference to 'user name' - the account load fails

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 96adab7af8999da7f351169e1265d4be5e59742f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 274271b59d5491dc44ebe7bbfb12da13e96d2ceb)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
5 years agoBug 21605: (follow-up) Simple ternary boolean to number conversion
Marcel de Rooy [Thu, 13 Dec 2018 13:59:38 +0000 (14:59 +0100)]
Bug 21605: (follow-up) Simple ternary boolean to number conversion

Imo it is much easier to do just "$a ? 1 : 0" than testing defined($a) etc.
in the additional loop.
Less code, more readable?

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>