Commit graph

3405 commits

Author SHA1 Message Date
e43e972ec5 Bug 21683: Database update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-21 18:19:22 +00:00
bc36d8e06b Bug 18736: DBRev 18.12.00.029
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-21 18:19:17 +00:00
7fe5f8cd2c Bug 18736: Use rounding syspref to determine correct prices in calculations
To test:
Place an order (no tax just for simplicity)
 listprice/rrp = 16.99
 discount = 42%
 quantity = 8
 estimated calculated at 9.85
 but order total is 78.83, but 8 times 9.85 = 78.80
Apply patches, set OrderPriceRounding syspref to 'Nearest cent'
Not order total is now as expected
View ordered.pl and confirm values are correct
Complete order, view invoice and confirm values
View spent.pl and confirm values
Go through acquisitions module and confirm prices throughout are
correct.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-21 16:27:09 +00:00
aea90223d6 Bug 18736: Add OrderPriceRounding syspref
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-21 16:27:09 +00:00
4fdf3c9849 Bug 21756: DBRev 18.12.00.028
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-13 05:31:18 +00:00
31ed9cf8bf Bug 21756: (QA follow-up) Add offest types to installer file
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-13 03:58:32 +00:00
cc8e0b904e Bug 21756: (QA follow-up) Add offset_types to database
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-13 03:58:32 +00:00
6979847e86 Bug 18837: DBRev 18.12.00.027
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 19:33:37 +00:00
8fef5120f3 Bug 18837: (QA follow-up) Fix order of sysprefa.sql
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 19:33:36 +00:00
Andrew Isherwood
b1e076fab0 Bug 18837: Add ILL Unmediated syspref stuff
This patch adds the syspref requirements for unmediated ILL requests. It
is a recreation of
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66628&action=diff
which had diverged sufficiently as to make it impossible to apply.

* installer/data/mysql/atomicupdate/illunmediated_tables.sql: New
  file.
* installer/data/mysql/sysprefs.sql: Add `ILLModuleUnmediated`.
* koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref:
    Add `ILLModuleUnmediated` handling.

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Signed-off-by: David Peacock <d.m.peacock@herts.ac.uk>
Signed-off-by: Jayne Maisey <j.maisey@herts.ac.uk>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 19:33:36 +00:00
d777714a57 Bug 20750: DBRev 18.12.00.026
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 19:33:26 +00:00
Andrew Isherwood
79d64a37a0 Bug 20750: Allow logging of arbitrary actions
This patch allows logging of arbitrary actions on request objects. A
chronological summary of these actions can then be displayed when
viewing a request.

This patch also adds logging of request status changes. Additional work
has been done on the BLDSS backend to log requests to the BLDSS request
status check API.

To test:
- Apply patch
- Ensure the Illlog logging preference is turned on
- Create an ILL request and perform actions on it that change it's
status.
- Navigate to the "Manage ILL request" screen
- Click the "Display request log" button
- Observe that a modal opens displaying a summary of the status changes.

Signed-off-by: Niamh Walker <Niamh.Walker-Headon@it-tallaght.ie>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Since this bug now is dependent on Bug 20581, it should be aware of the
custom statuses provided in 20581. This patch enables logging of request
statuses being changed to custom ones. As such the test plan is
modified:

To test:
- Apply patch
- Ensure the Illlog logging preference is turned on
- Ensure you have some custom request statuses defined in the
Authorised Values ILLSTATUS category
- Create an ILL request and perform actions on it that change it's
status.
- Edit the request and change status to a custom one
- Navigate to the "Manage ILL request" screen
- Click the "Display request log" button
- Observe that a modal opens displaying a summary of the status changes.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 19:07:08 +00:00
3d462af21f Bug 21846: DBRev 18.12.00.025
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 12:32:49 +00:00
fa4aeaa87e Bug 21846: (QA follow-up) Fix maintenance script path
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 12:27:44 +00:00
293eee9959 Bug 21846: (follow-up) Add maintenance script
This patch adds a maintenance script that generates the missing
tags_approval entries based on the tags_all table, and then recalculates
the weights for both tags_approval and tags_index tables.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 12:27:44 +00:00
04f1b0ca95 Bug 21846: Make 'term' use utf8mb_bin collation on tags tables
This patch makes the utf8mb4_bin collation preferred for comparing tags.
Otherwise suppolemental unicode characters all match.

To test:

- Enable tags and disable moderation (or plan to moderate and accept tags)
- Tag 3 records:
   a - with 🐋
   b - with 🌮
   c - with 👍
- Note the weight on each says '3'
- Click the tag to search, you get back all the records
- Apply the previous patches from this bug report
- Run:
  $ kshell
 k$ prove t/db_dependent/Tags.t
=> FAIL: Tests fail, related to counting stuffs
- Apply this patch and
(a) Run updatedatabase to upgrade the schema
- Run:
 k$ prove t/db_dependent/Tags.t
=> SUCCESS: Tests pass!
(b) reset_all to get a fresh DB using kohastructure.sql
- Run:
 k$ prove t/db_dependent/Tags.t
=> SUCCESS: Tests pass too!
- Sign off :-D

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 12:27:44 +00:00
9682cc7d21 Bug 22476: Correct default for MarkLostItemsAsReturned
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 12:07:57 +00:00
c3f28829e5 Bug 22368: DBRev 18.12.00.024
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-11 13:03:37 +00:00
1083256d41 Bug 22368: (QA follow-up) Changed to LEFT JOIN as requested
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-11 12:53:29 +00:00
8856f3933b Bug 22368: (QA follow-up) Switch to using foreign_key_exists
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-11 12:53:29 +00:00
e024c38c77 Bug 22368: (QA follow-up) Missing comma in kohastructure.sql
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-11 12:53:29 +00:00
f8466fcc6a Bug 22368: Add missing constraints to suggestions
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-11 12:53:29 +00:00
1f2685f7d4 Bug 20639: DBRev 18.12.00.023
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 20:52:59 +00:00
ef6ad443a8 Bug 20639: Add ILLOpacbackends syspref
This adds the ILLOpacbackends syspref, allowing users to refine the ill
backends available to opac users for initiating ill requests

Remove default assignment for backends

We don't need a default assignment for the ILLOpacbackends assignment,
if the pref isn't set, it returns undef anyway. Also, having this
default assignment actually breaks the fetching of the preference

Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 20:51:11 +00:00
29bc2b5832 Bug 22275: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation
18.06.00.060 will fail if custom Classification sources were created.

In that case we should use the 'generic' split rule.

Test plan:
% git checkout -b bug_22395_pre 3a0cba67f1
Reset the DB
Go to  Home › Administration › Classification sources
Create a custom "Classification filing rules"
Create a custom "Classification sources" using this filing rules
% git checkout master
% perl installer/data/mysql/updatedatabase.pl
=> Without this patch you will get:
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`#sql-33a_67`, CONSTRAINT `class_source_ibfk_2` FOREIGN KEY (`class_split_rule`) REFERENCES `class_split
_rules` (`class_split_rule`)) [for Statement "
            ALTER TABLE class_sources
            ADD CONSTRAINT class_source_ibfk_2 FOREIGN KEY (class_split_rule)
            REFERENCES class_split_rules (class_split_rule)
        "] at installer/data/mysql/updatedatabase.pl line 17104.

=> With this patch applied the FK will be created successfully
class_sources.class_split_rule will be set to "generic" for these custom values.

Signed-off-by: Oliver Behnke <oliver.behnke@aei.mpg.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 20:50:07 +00:00
eeaf59a31f Bug 15774: DBRev 18.12.00.022
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 20:40:53 +00:00
9cfcd21f24 Bug 15774: Add permission for managing additional fields
To test:
 1 - Have three borrowers, one with order_manage permission, one with
 edit_subscription permisson, andone with both
 2 - Apply patch, updatedatabase
 3 - Verify all three now have the manage_additional_fields permission
 4 - Visit the admin page with these users, they should all see the
 'Manage additional fields' link
 5 - Click the link
 6 - User with order_manage should see 'Order baskest'
 7 - User with edit_subscription should see 'Subscriptions'
 8 - User with both should see both
 9 - Remove the additional permissions from a user - they should see a
 note about needing additional permissions

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 20:37:06 +00:00
cfe4d0e295 Bug 20912: DBRev 18.12.00.021
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 17:34:31 +00:00
f5380b4014 Bug 20912: (follow-up) Add hourly support
It seemed strange to only add support for Daily loans in the feature
when Koha also support loan periods in hours. This patch adds parallel
functionaliy for hourly loan periods.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 17:29:56 +00:00
a68926d9cb Bug 20912: (follow-up) Improve test coverage
Increase test coverage for CanBookBeIssued and fix a introduced during
the refactoring to Koha::Fees.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 17:29:00 +00:00
04ac65ba19 Bug 20912: (QA follow-up) Make DB Update idempotent
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 17:27:36 +00:00
e39541522c Bug 20912: Update database
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 17:22:43 +00:00
c53f907235 Bug 18925: DBRev 18.12.00.020
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-06 12:26:18 +00:00
60c51b9bb0 Bug 18925: (RM follow-up) Remove issuingrules columns for new installs
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-05 20:53:04 +00:00
13faff1250 Bug 18925: Move existing rules
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-05 20:42:22 +00:00
fc92437665 Bug 18925: (QA follow-up) Make DB update idempotent
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-05 20:42:22 +00:00
Jesse Weaver
d1303ca834 Bug 18925: (follow-up) Fix null/empty behavior
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-05 20:41:42 +00:00
Jesse Weaver
f9d90a2644 Bug 18925: (follow-up) Change name of rule to fix ambiguity
There was previously an ambiguity between the branch/category/itemtype
specific max{,onsite}issueqty and the total-per-patron max{,onsite}issueqty.
The latter has been renamed to patron_max{,onsite}issueqty.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-05 20:41:42 +00:00
26a779eded Bug 18925: Move maxissueqty and maxonsiteissueqty to circulation_rules
This patch set moves maxissueqty and maxonsiteissueqty to the
circulation_rules table.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) prove t/db_dependent/Circulation.t
4) prove t/db_dependent/Circulation/Branch.t
5) prove t/db_dependent/Circulation/GetHardDueDate.t
6) prove t/db_dependent/Circulation/Returns.t
7) prove t/db_dependent/Circulation/SwitchOnSiteCheckouts.t
8) prove t/db_dependent/Circulation/TooMany.t
9) prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
10) prove t/db_dependent/Reserves.t
11) Note no changes in circulation behavior related to check out limis
    both on and off site

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-05 20:41:42 +00:00
1e4f442442 Bug 21728: (RM follow-up) Add 'Reserve Fee' for new installs
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-04 20:28:18 +00:00
a639299c98 Bug 21728: DBRev 18.12.00.019
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-04 19:10:56 +00:00
6ca8b1eed2 Bug 21728: Add 'Reserve Fee' to the account_offset_types
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-04 19:08:29 +00:00
ff20d029e3 Bug 19575: DBRev 18.12.00.018
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-04 13:30:55 -05:00
David Gustafsson
a17c2d9c9f Bug 19575: Don't lower case fields in db and use update script instead of raw SQL
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-04 18:25:49 +00:00
David Gustafsson
eeda2afd3a Bug 19575: Keep authority-number as alias and fix query
Keep authority-number as alias and change field name
from alias to real field in hard coded Elasticsearch query

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-04 18:25:49 +00:00
David Gustafsson
6d53910f0c Bug 19575: Use canonical field names and resolve aliased fields
Adjust elastic search mappings to more closely match Zebra equivalents
resolving serveral issues with coded Zebra searches in templates and
sorting of search results in UI. Also make field names in search strings
case insensitive to accept case variations in template links and user input.

Sponsored-by: Gothenburg University Library

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-04 18:25:49 +00:00
f355788b34 Bug 21747: Insert fine_increase and fine_decrease for new installs
This fixes Circulation.t
koha_1       | DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`account_offsets`, CONSTRAINT `account_offsets_ibfk_t` FOREIGN KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement "INSERT INTO `account_offsets` ( `amount`, `debit_id`, `type`) VALUES ( ?, ?, ? )" with ParamValues: 0=1, 1='22', 2='fine_increase'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-27 20:50:46 +00:00
91435189fe Bug 21747: DBRev 18.12.00.017
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-27 09:14:21 -05:00
1a385cae8d Bug 21747: (follow-up) Intelligent rename of offsets
This patch intelligently renames the account_offset types for updateing
fines from `Fine Update` to `fine_increment` and `fine_decrement`
depending on the sign of the calculated difference of the adjustment.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-27 09:14:21 -05:00
ab1f9af117 Bug 21241: (RM follow-up) Fix error in update description
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-27 09:14:21 -05:00