Commit Graph

32452 Commits

Author SHA1 Message Date
Jonathan Druart abaefea418 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 6c8089b40f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 07cd6560b5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-01-23 23:11:49 +00:00
Jonathan Druart 9b29c0ed84 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 58f04600f0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4d3510f89c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-01-23 23:11:30 +00:00
Fridolin Somers cf3df9058a 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 8d2324e6de)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bccbb54491)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-01-23 23:03:48 +00:00
Nick Clemens 86cc395636 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 7028cb8aea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b940797800)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 19:08:29 +00:00
Fridolin Somers 51ffaa8a0c 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 76c10a5dcd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c494f474ec)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 19:06:52 +00:00
Jack Kelliher 6d75a7cf36 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 8ae738785d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2ae4cd4bc9)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:38:36 +00:00
Mackey Johnstone 1ec07aa782 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 7009ef624a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 266b3389b6)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:35:26 +00:00
Jasmine Amohia 910649769c 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 c29512266d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e97ce49ba7)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:32:47 +00:00
Jasmine Amohia 5622b66359 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 3c328b9cf8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2cfff2272e)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:30:23 +00:00
Olivia Lu e4eb89d1f0 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 f1748bda42)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 59a38379b2)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:24:23 +00:00
helene hickey c0b2ad7da5 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 4eab830835)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3dd7d9dfad)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:22:06 +00:00
Ethan Amohia d822288763 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 dc8e663c9e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 726c0e4bc4)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:15:44 +00:00
Olivia Lu c6762426d4 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 5e2e101037)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2c6b8230b8)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:11:20 +00:00
Tomas Cohen Arazi 7dda73dd26 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 21676d7b87)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fb455d9b8d)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:06:14 +00:00
Tomas Cohen Arazi 73147064bb 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 528e09cf15)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a59826288b)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:05:58 +00:00
Tomas Cohen Arazi 91fbe63d18 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 8e6c789255)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9b6b80488a)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 17:45:58 +00:00
Tomas Cohen Arazi dc096dafe6 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 7669697732)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 464dcd7d9e)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 17:45:39 +00:00
Lucas Gass 34ddd742f9 Update release notes for 18.05.08 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-01-22 17:08:37 +00:00
Lucas Gass 32140a275f Increment version for 18.05.08 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-01-22 17:02:15 +00:00
Koha translators 379a4e4d76 Translation updates for Koha 18.05.08
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-01-22 11:41:55 -03:00
Tomas Cohen Arazi 08ab9cc291 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 551626ce1e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f8bd298a08)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:33:08 +00:00
Tomas Cohen Arazi 053eb7a4e7 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 0d5058b7b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a6dc145ce9)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:32:51 +00:00
Tomas Cohen Arazi 8793c0e591 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 613a0034e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 84ddb45e88)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:32:34 +00:00
Tomas Cohen Arazi be5c32a5b5 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 2067b8e3f8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d830a2f097)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:32:17 +00:00
Nick Clemens 85374828e9 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 5c313bc554)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aee127e639)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:29:54 +00:00
Jonathan Druart dbef6e17de 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 17a8eb1879)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a02a19ffea)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:21:46 +00:00
Nick Clemens d95301763e 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 b32756a5d7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8102f6dc70)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:11:25 +00:00
Nick Clemens 054819fb8e 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 f44e37b201)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2bc4f25855)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:11:03 +00:00
Jesse Maseto 456bcee356 Bug 22030: DBRev 18.05.07.002
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:07:16 +00:00
Nick Clemens eb13d9dccc 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 96adab7af8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 274271b59d)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 18:54:41 +00:00
Marcel de Rooy e1050653fb 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 482b323da1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fee85191b0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-01-10 01:35:16 +00:00
Colin Campbell 4360ba1a24 Bug 21605: Ensure EDI acct fields set to boolean val
Validate the input to the fields indicating account
functionality. The only valid values are 1 and 0
non-integer (or integers other than 0/1) are invalid

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-01-10 01:34:59 +00:00
Jonathan Druart 03631164c5 Bug 21990: Replace dialog .error with .alert
<div class="dialog error"> will display a div without background color, the correct class is "dialog alert".

https://wiki.koha-community.org/wiki/Interface_patterns#Error_messages

Test plan:
Hit /cgi-bin/koha/acqui/parcel.pl
Notice the background color change with and without this patch

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

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-09 12:49:38 +00:00
Jonathan Druart 2c15a838be Bug 22034: Handle default framework for MARC view with framework
To test:

- Create a record in any framework that is not default
- Search for the record in your catalog
- Switch to the MARC tab
- Change framework pull down to default on top
- Note the page reloads and the framework stay default
- Verify it works for other frameworks

Also test the "labeled MARC" view (you will need the pref viewLabeledMARC turned on)

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 54e295e4c1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 270138aa67)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-09 12:42:31 +00:00
Jonathan Druart 5f1ed5e86f Bug 21928: (bug 18789 follow-up) Fix CircAutoPrintQuickSlip=clear
caused by commit 105b3e10e8

bug 18789

To recreate:
1 - Set CircAutoPrintQuickSlip to 'clear'
2 - Bring up a patron in circulation
3 - Click in checkout box and hit enter to submit empty
4 - Patron is partially loaded
5 - Apply patch
6 - Restart all the things
7 - Test again
8 - Patron is cleared correctly

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-01-08 23:27:36 +00:00
Andrew Isherwood 42c69b2ca6 Bug 21929: Typo in orderreceive.tt
lass -> class

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3c14a0d352)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 66502804d2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-29 14:55:29 +00:00
Jonathan Druart 3d3a3bbe92 Bug 21571: Make ACCTDETAILS translatable
This patch makes the notice "ACCTDETAILS" translatable.

Test plan:
1. Switch on TranslateNotices and AutoEmailOpacUser
2. Define templates for different languages for ACCTDETAILS
3. Create a new patron, define an email address, userid and password.
Also pick a different "preferred language" then the default value
4. You should receive the email with the correct, translated, email.

Signed-off-by: Hugo Agud <hagud@orex.es>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-29 14:47:00 +00:00
Marcel de Rooy 939db7252a Bug 21848: Remove Text::Unaccent from C4::Members
At refactoring time the unac_string call was moved to Koha::Patron.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5e17032700)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7f4a7c42ad)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-28 06:37:13 +00:00
Marcel de Rooy f8bebfc09a Bug 21848: Resolve unac_string warning from Circulation.t
Just add "use utf8".

Test plan:
Run Circulation.t; verify there are no warnings.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3e731ce094)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4dbb5e6360)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-28 06:36:54 +00:00
Nick Clemens 0f63a76f4e Bug 22022: Correct ordering for authorised values
To test:
1 - Add a shelving location with code "ZZZZ" and lib "Awake"
2 - Load some items in batch modification
3 - Note shelving location dropdown is wrong
4 - Apply patch
5 - Reload page
6 - Note order is correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-28 03:35:07 +00:00
Nick Clemens 1a2f6d10b9 Bug 21984: Pass param_name in pagination URL
To test:
 1 - Create a report like:
    SELECT <<cat>>,<<dog>>,<<cat>> FROM items
 2 - Run the report, enter 'CATS' and 'DOGS'
 3 - Get results LIKE "CAT | DOG | CAT"
 4 - Try to go to page 2
 5 - FAIL! (last column is blank)
 6 - Apply patch
 7 - Run the repot, enter 'CATS' and 'DOGS'
 8 - Verify first page looks right
 9 - Go to page 2
10 - Results are correct!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-27 21:58:51 +00:00
Lucas Gass 041dd3e060 Bug 21065: DBRev 18.05.07.001
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-27 21:19:51 +00:00
Martin Renvoize f74cae4160 Bug 21065: (QA follow-up) Make the update idempotent
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-27 21:19:51 +00:00
Jonathan Druart 58f0ba8a86 Bug 21065: Set ON DELETE SET NULL on accountlines.borrowernumber
Note: Why do we have ON UPDATE SET NULL on accountlines.itemnumber?
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-27 21:19:50 +00:00
Jonathan Druart 4335e35f0c Bug 21065: Add koha_object(s)_class methods to accountline
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Conflicts:
	Koha/Schema/Result/Accountline.pm

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-27 21:19:50 +00:00
Jonathan Druart a630acd720 Bug 21065: Add tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 09ef91653b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 554cee5b3c)

Conflicts:
	t/db_dependent/Koha/Account/Lines.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-27 21:19:49 +00:00
Jonathan Druart 61784f5e26 Bug 14334: Remove AutoCommit from tests
And use a DBIx transaction instead.

Test plan:
prove that the test files modified by this patch are passing

Signed-off-by: Josef Moravec <josef.moravec@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 64242cabea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 10148dc26b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-22 22:03:55 +00:00
Jonathan Druart e2cfc2615c Bug 21986: Do not escape quotation marks when cataloguing
In several places we escape quotation marks using
  $value =~ s/"/&quot;/g;
All the occurrences are wrong and must be removed.
Most of them are leftover of bug 11638 (Remove HTML from
addbiblio.pl), which removes the construction of html from pl scripts.

The problem has been highlighted by bug 13618, I did not track down why
the issue did not exist before (?)

Test plan:
0/ Use strings with quotation marks, like:
'Fiddle tune history : "bad" tunes'
You can also use other html characters to make the tests more complete,
like 'Fiddle tune history : <"bad" tunes>'
1/ authorities/authorities.pl
a. Edit an authority filling different fields with quotation marks
b. Edit it again
=> The display (inputs' values) is wrong, if you save the escaped quotes
will be inserted
2/ cataloguing/addbiblio.pl
Same editing a bibliographic record
3/ cataloguing/additem.pl
Same editing items
4/ members/memberentry.pl
Edit a patron's record and fill some fields with quotation marks
+ fields borrowernotes and opacnotes
=> The quotes are inserted directly in DB (escape is done before the
insert!)
5/ opac/opac-review.pl
For QA only: $js_ok_review is never used
6/ tools/batchMod.pl
For QA only: $value is always undefined at that point

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-22 20:46:39 +00:00
Jonathan Druart b89e7f3a27 Bug 21931: Do not reset the ES mapping on 3.23.00.050
This update DB entry uses DBIx schema which does not make it crashes if
the table structure is changed.
Which happens on 18.06.00.054, that added search_field.weight

The entry 3.23.00.050 fails with
  Unknown column 'me.weight' in 'field list'

This patch removes the reset of the mapping and display a warning to
tell the administrator the mapping must be reset/inserted

Test plan:
Use a 3.22 dump and upgrade it

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-22 20:11:18 +00:00
Nick Clemens 273b2068a4 Bug 21991: Pass param names to report limit tool
To test:
1 - Define a report like:
SELECT barcode, itemnumber
FROM items
WHERE (homebranch = <<Branch|branches>> AND 0 ) OR
<<Branch|branches>>=<<Branch|branches>>
2 - Run it, you get results
3 - Select 'Rows to display' 50
4 - No results
5 - Apply patch
6 - Run report
7 - Change display rows
8 - Results remain!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 702c727470)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4de2ad9839)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-22 17:37:59 +00:00