]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 20912: (QA follow-up): Fix up Koha::Fees
Kyle M Hall [Fri, 25 Jan 2019 16:16:41 +0000 (11:16 -0500)]
Bug 20912: (QA follow-up): Fix up 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>
5 years agoBug 20912: Move calculation to Koha::Fees
Kyle M Hall [Fri, 9 Nov 2018 18:34:05 +0000 (13:34 -0500)]
Bug 20912: Move calculation 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>
5 years agoBug 20912: (QA follow-up) Make unit tests reliable and get rid of perl warnings
Kyle M Hall [Wed, 31 Oct 2018 19:29:55 +0000 (15:29 -0400)]
Bug 20912: (QA follow-up) Make unit tests reliable and get rid of perl warnings

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>
5 years agoBug 20912: (QA follow-up) Set daily charge to 0 for item type not being used for...
Kyle M Hall [Wed, 31 Oct 2018 19:14:03 +0000 (15:14 -0400)]
Bug 20912: (QA follow-up) Set daily charge to 0 for item type not being used for test

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>
5 years agoBug 20912: (QA follow-up) Fix number of tests and correct typos
Katrin Fischer [Sun, 28 Oct 2018 17:06:33 +0000 (17:06 +0000)]
Bug 20912: (QA follow-up) Fix number of tests and correct typos

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>
5 years agoBug 20912: Rental Fees based on Time Period
Kyle M Hall [Thu, 14 Jun 2018 13:36:51 +0000 (13:36 +0000)]
Bug 20912: Rental Fees based on Time Period

Some libraries would like to be able to charge a rental fee based on the
number of days an item will be checked out, as opposed to the flat fee
currently offered by Koha.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Edit an itemtype, add a daily rental fee of 1.00
4) Check an item of that itemtype out for 7 days
5) Verify the patron now has rental fee of 7.00

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>
5 years agoBug 20912: Update database
Kyle M Hall [Thu, 14 Jun 2018 11:13:19 +0000 (11:13 +0000)]
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>
5 years agoBug 21721: Use Koha::Account->add_debit in AddRenewal
Martin Renvoize [Thu, 1 Nov 2018 13:28:25 +0000 (13:28 +0000)]
Bug 21721: Use Koha::Account->add_debit in AddRenewal

Known Side Effect: Prior to this patch renewal charges were not
recorded in the FinesLog. After this patch, if the FinesLog is
enabled then the 'action' will be recorded as `create_rent`.

Sponsored-by: PTFS Europe
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18925: (RM follow-up) Remove maxissueqty from issuingrule in SIP tests
Nick Clemens [Wed, 6 Mar 2019 14:29:18 +0000 (09:29 -0500)]
Bug 18925: (RM follow-up) Remove maxissueqty from issuingrule in SIP tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18925: (RM follow-up) Remove schema files for deletedtables
Nick Clemens [Wed, 6 Mar 2019 14:28:08 +0000 (09:28 -0500)]
Bug 18925: (RM follow-up) Remove schema files for deletedtables

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18925: (QA follow-up) Remove weird 'Null' values for integer column
Tomas Cohen Arazi [Wed, 6 Mar 2019 13:09:05 +0000 (10:09 -0300)]
Bug 18925: (QA follow-up) Remove weird 'Null' values for integer column

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18925: DBRev 18.12.00.020
Nick Clemens [Tue, 5 Mar 2019 20:59:07 +0000 (20:59 +0000)]
Bug 18925: DBRev 18.12.00.020

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18925: (RM follow-up) Remove issuingrules columns for new installs
Nick Clemens [Tue, 5 Mar 2019 20:53:04 +0000 (20:53 +0000)]
Bug 18925: (RM follow-up) Remove issuingrules columns for new installs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18925: (QA follow-up) Fix Circulation.t
Josef Moravec [Tue, 5 Mar 2019 14:08:34 +0000 (14:08 +0000)]
Bug 18925: (QA follow-up) Fix Circulation.t

Test plan:
t/db_dependent/Circulation.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18925: Fix 'Default checkout, hold policy by patron category' block
Jonathan Druart [Sat, 2 Mar 2019 17:14:11 +0000 (14:14 -0300)]
Bug 18925: Fix 'Default checkout, hold policy by patron category' block

We want ->Search to return undef if the rule does not exist.

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>
5 years agoBug 18925: Move existing rules
Jonathan Druart [Sat, 2 Mar 2019 16:45:14 +0000 (13:45 -0300)]
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>
5 years agoBug 18925: (QA follow-up) Fix basic_workflow.t
Tomas Cohen Arazi [Sat, 2 Mar 2019 14:03:01 +0000 (11:03 -0300)]
Bug 18925: (QA follow-up) Fix basic_workflow.t

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>
5 years agoBug 18925: (QA follow-up) Fix indentation characters in smart-rules.tt
Tomas Cohen Arazi [Sat, 2 Mar 2019 13:20:23 +0000 (10:20 -0300)]
Bug 18925: (QA follow-up) Fix indentation characters in smart-rules.tt

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>
5 years agoBug 18925: (QA follow-up) Make DB update idempotent
Tomas Cohen Arazi [Sat, 2 Mar 2019 13:14:48 +0000 (10:14 -0300)]
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>
5 years agoBug 18925: Update new occurrences
Jonathan Druart [Thu, 21 Feb 2019 20:04:38 +0000 (17:04 -0300)]
Bug 18925: Update new occurrences

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>
5 years agoBug 18925: Fix null/empty behavior, again
Jonathan Druart [Thu, 21 Feb 2019 20:04:36 +0000 (17:04 -0300)]
Bug 18925: Fix null/empty behavior, again

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>
5 years agoBug 18925: Replace logic in GetBranchBorrowerCircRule with get_effective_rule
Jonathan Druart [Sat, 15 Sep 2018 20:19:04 +0000 (13:19 -0700)]
Bug 18925: Replace logic in GetBranchBorrowerCircRule with get_effective_rule

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>
5 years agoBug 18925: (follow-up) Fix null/empty behavior
Jesse Weaver [Mon, 29 Jan 2018 22:30:29 +0000 (15:30 -0700)]
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>
5 years agoBug 18925: (follow-up) Change name of rule to fix ambiguity
Jesse Weaver [Sat, 16 Sep 2017 23:23:01 +0000 (17:23 -0600)]
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>
5 years agoBug 18925: Move maxissueqty and maxonsiteissueqty to circulation_rules
Kyle M Hall [Mon, 10 Jul 2017 15:00:44 +0000 (11:00 -0400)]
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>
5 years agoBug 21728: (RM follow-up) Add 'Reserve Fee' for new installs
Nick Clemens [Mon, 4 Mar 2019 20:26:04 +0000 (20:26 +0000)]
Bug 21728: (RM follow-up) Add 'Reserve Fee' for new installs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21720: Update Tests
Martin Renvoize [Fri, 30 Nov 2018 13:30:24 +0000 (13:30 +0000)]
Bug 21720: Update Tests

AddIssuing charge is always called in void context, but the tests
checked that the return value was a Koha::Account::Offset and we now
return a Koha::Account::Line.

This patch changes the test to accept a Koha::Account::Line as returned,
adds a test to ensure a Koha::Account::Offset is also created and
corrects the logic that tests that only one accountline is added.

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>
5 years agoBug 21720: Use Koha::Account->add_debit in AddIssuingCharge
Martin Renvoize [Thu, 1 Nov 2018 12:42:31 +0000 (12:42 +0000)]
Bug 21720: Use Koha::Account->add_debit in AddIssuingCharge

Known Side Effect: Prior to this patch issuing charges were not
recorded in the FinesLog. After this patch, if the FinesLog is
enabled then the 'action' will be recorded as `create_rent`.

Sponsored-by: PTFS Europe
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>
5 years agoBug 21728: DBRev 18.12.00.019
Nick Clemens [Mon, 4 Mar 2019 19:10:56 +0000 (19:10 +0000)]
Bug 21728: DBRev 18.12.00.019

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21728: Add 'Reserve Fee' to the account_offset_types
Martin Renvoize [Fri, 30 Nov 2018 19:45:19 +0000 (19:45 +0000)]
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>
5 years agoBug 21728: Use Koha::Account->add_debit in ChargeReserveFee
Martin Renvoize [Thu, 1 Nov 2018 11:08:51 +0000 (11:08 +0000)]
Bug 21728: Use Koha::Account->add_debit in ChargeReserveFee

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>
5 years agoBug 21722: Use Koha::Account->add_debit in chargelostitem
Martin Renvoize [Thu, 1 Nov 2018 12:26:35 +0000 (12:26 +0000)]
Bug 21722: Use Koha::Account->add_debit in chargelostitem

This patch updates C4::Accounts::chargelostitem to use the newly
available add_debit method from Koha::Account.

Known Side Effects: If the FinesLog is enabled then the 'action'
recorded will change from the generic `create_fee` (for both the lost
charge and any associated processing charge) to the more descriptive
terms `create_processing` and `create_lost_item`.

Sponsored-by: PTFS Europe
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>
5 years agoBug 21722: Tidy up tests and increase coverage
Martin Renvoize [Thu, 13 Dec 2018 19:23:07 +0000 (19:23 +0000)]
Bug 21722: Tidy up tests and increase coverage

This patch moves the chargelostitem 'branchcode' test to within the
'chargelostitem' subtest block in t/db_dependent/Accounts.t. It also
adds tests for additional accountline fields that should be getting
set by this method and adds tests for ProcessingFeeNote before removing
t/db_dependent/Circulation/Chargelostitem.t which covered this
previously.

Sponsored-by: PTFS Europe
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>
5 years agoBug 18584: remove trailing space from C4/XSLT.pm
Hayley Mapley [Sun, 3 Mar 2019 22:26:54 +0000 (22:26 +0000)]
Bug 18584: remove trailing space from C4/XSLT.pm

Test plan:
1) Open C4/XSLT.pm and confirm that the trailing space at line 313 is
gone.
2) Sign off.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22404: Fix parameter "for" of labels in subscription add form
Josef Moravec [Mon, 25 Feb 2019 08:46:11 +0000 (08:46 +0000)]
Bug 22404: Fix parameter "for" of labels in subscription add form

Attribute "for" of tag labelshould contain input id, not name.

Test plan:
1) Go to serials -> add subscription second step
2) Click on labels of these three fields:
    - First issue publication date
    - Subscription start date
    - Subscription end date

--> without patch, nothing happen
--> with path, the datepicker is shown

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22228: Update test for updated mappings
Nick Clemens [Mon, 4 Mar 2019 18:37:43 +0000 (18:37 +0000)]
Bug 22228: Update test for updated mappings

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22228: Escape lone colons and make sure term is balanced
Ere Maijala [Thu, 31 Jan 2019 11:43:00 +0000 (13:43 +0200)]
Bug 22228: Escape lone colons and make sure term is balanced

Escapes unquoted colons that have whitespace on either side. Removed unbalanced quotes.

Test plan:

1. Make sure the test case described in the bug works
2. Make sure tests pass:
  prove t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Björn Nylén <bjorn.nylen(at)ub.lu.se>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19575: DBRev 18.12.00.018
Nick Clemens [Mon, 4 Mar 2019 18:30:55 +0000 (13:30 -0500)]
Bug 19575: DBRev 18.12.00.018

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19575: Don't lower case fields in db and use update script instead of raw SQL
David Gustafsson [Mon, 18 Feb 2019 13:56:17 +0000 (14:56 +0100)]
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>
5 years agoBug 19575: (RM follow-up) Fix mapping typo
Nick Clemens [Fri, 15 Feb 2019 14:49:33 +0000 (14:49 +0000)]
Bug 19575: (RM follow-up) Fix mapping typo

Found with QA tools, simple fix

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19575: Keep authority-number as alias and fix query
David Gustafsson [Thu, 14 Feb 2019 15:52:04 +0000 (16:52 +0100)]
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>
5 years agoBug 19575: Fix an search field
Nick Clemens [Thu, 14 Feb 2019 12:44:13 +0000 (12:44 +0000)]
Bug 19575: Fix an search field

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19575: Rebase and fix tests
root [Tue, 12 Feb 2019 21:52:39 +0000 (21:52 +0000)]
Bug 19575: Rebase and fix tests

This patch lower cases the sort by fields to normalize checking them and adjusts
some existing tests to meet the new expectations.

The regex for splitting terms has been moved into a subroutine so that adjustment was made

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19575: Use canonical field names and resolve aliased fields
David Gustafsson [Fri, 3 Nov 2017 12:21:22 +0000 (13:21 +0100)]
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>
5 years agoBug 22360: (bug 21205 follow-up) Restore OPACAcquisitionDetails behavior
Jonathan Druart [Thu, 21 Feb 2019 18:28:10 +0000 (15:28 -0300)]
Bug 22360: (bug 21205 follow-up) Restore OPACAcquisitionDetails behavior

Caused by
  commit 7d10549ae8632e6640d3a99014268a2a1e46b3c4
  Bug 21205: Replace C4::Items::GetOrderFromItemnumber calls

At this point $order is a Koha::Acquisition::Order object, not a hashref
anymore.

Test plan:
Create an order, receive items
Enable OPACAcquisitionDetails
At the detail page of the bibliographic record you should see
"X items are on order." at the bottom of the items list

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22370: Prevent OPAC users from seeing staff news from URL
Aleisha Amohia [Tue, 19 Feb 2019 21:00:31 +0000 (21:00 +0000)]
Bug 22370: Prevent OPAC users from seeing staff news from URL

To test:
1) Have some OPAC and staff only news items
2) On the OPAC view a single news item
3) Change the ID in the URL to the ID of a staff news item
4) Notice you can view the news item without any problems
5) Apply the patch and refresh the page
6) An error should show that the news item doesn't exist
7) Confirm you can still view OPAC news items individually

Sponsored-by: Catalyst IT
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21747: Insert fine_increase and fine_decrease for new installs
Jonathan Druart [Wed, 27 Feb 2019 19:05:20 +0000 (16:05 -0300)]
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>
5 years agoBug 21747: DBRev 18.12.00.017
Nick Clemens [Wed, 27 Feb 2019 14:07:28 +0000 (09:07 -0500)]
Bug 21747: DBRev 18.12.00.017

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21747: (follow-up) Intelligent rename of offsets
Martin Renvoize [Mon, 4 Feb 2019 14:29:08 +0000 (14:29 +0000)]
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>
5 years agoBug 21747: Use Koha::Account:: routines in UpdateFine
Martin Renvoize [Thu, 1 Nov 2018 14:55:15 +0000 (14:55 +0000)]
Bug 21747: Use Koha::Account:: routines in UpdateFine

Set to use Koha::Account->add_debit and Koha::Account::Line->adjust

Known Side Effect: The format of the FinesLog, if enabled, is changed
after this patch. Prior to this patch the $actionname was left undefined
and the $infos field contained the string:

`"due=".$due."  amount=".$amount." itemnumber=".$itemnum`

After this patch, the logs are more consistent with other FINES logs,
with an $actionname of 'CREATE' or 'UPDATE' and the $infos field
containing a Dumper of fine data.

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>
5 years agoBug 22084: Plugin upgrade method and database plugin version storage will never be...
Kyle M Hall [Tue, 8 Jan 2019 18:10:53 +0000 (13:10 -0500)]
Bug 22084: Plugin upgrade method and database plugin version storage will never be triggered for existing installs

If an existing plugin begins using the upgrade() method, it will never actually get triggered because the installation has already occurred and no database plugin version was stored at the time. Without that database version, the upgrade method will never be triggered.

In addition, if the plugin has no upgrade method, the installed version is never updated in the database!

Lastly, when an upgrade succeeds it prints a warning that the upgrade failed.

Test Plan:
1) Install an older version of the Kitchen sink plugin:
   * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/download/v2.1.0/koha-plugin-kitchen-sink-v2.1.0.kpz
2) Delete the "__INSTALLED_VERSION__" key, and the "last_upgraded" key from plugin_data for this plugin, to simulate having installed from an earlier version of Koha
3) Upgrade to the latest version of the Kitchen sink plugin:
   * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/download/v2.1.22/koha-plugin-kitchen-sink-v2.1.22.kpz
4) Note "__INSTALLED_VERSION__" still doesn't exist for the plugin, in the plugin_data table
5) Apply this patch
6) Restart all the things
7) Browse to the Kitchen sink configuration page, this should trigger the upgrade method
8) Note the "__INSTALLED_VERSION__" and "last_upgraded" keys exist in plugin_data for the Kitchen Sink plugin

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22084: Regression tests
Tomas Cohen Arazi [Wed, 9 Jan 2019 10:33:15 +0000 (07:33 -0300)]
Bug 22084: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume
Tomas Cohen Arazi [Mon, 11 Feb 2019 19:05:23 +0000 (16:05 -0300)]
Bug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume

This patch makes the mentioned method use the biult-in method for
resuming a suspended hold, instead of manually setting the specific
attributes using the accessors.

The side effect for this is that HoldsLog is now honoured.

This patchset also refactors the tests a bit so they rely on the exposed
methods and thus don't rely on specific implementation details (like
suspended hold means a date in suspended_until plus suspended=1).

To test:
- Apply the regression tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Reserves/AutoUnsuspendReserves.t
=> FAIL: It fails loudly because things are done manually
- Apply this patch
- Run:
 k$ prove t/db_dependent/Reserves/AutoUnsuspendReserves.t
=> SUCCESS: Tests pass!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21765: Regression tests
Tomas Cohen Arazi [Mon, 11 Feb 2019 19:04:59 +0000 (16:04 -0300)]
Bug 21765: Regression tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12318: Show shelving location on subscription tab in OPAC and staff
Katrin Fischer [Mon, 4 Feb 2019 06:09:32 +0000 (06:09 +0000)]
Bug 12318: Show shelving location on subscription tab in OPAC and staff

The shelving location can be helpful to locate an item in the library.
Especially, if the library has decided not to create items for a
subscription this information is currently not visible to the patron.

To test:
- Apply patch
- Create a subscription, set location
- View the subscription tab in detail and staff
- Verify that the location now shows above the callnumber
- Unset location in the subscription
- Verify that the page still looks ok

Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21875: Handling subject line in Letters.pm
Marcel de Rooy [Fri, 23 Nov 2018 10:36:49 +0000 (11:36 +0100)]
Bug 21875: Handling subject line in Letters.pm

The variable name $utf8 is very misleading: it contains MIME-Header encoding.
$message->{subject} comes from the database and is in perl internal format;
it should NOT be decoded as a MIME-Header.
After encoding to MIME-Header, previously another (useless) encoding to
UTF-8 was done. Since the string is plain ASCII, this is useless and
theoretically wrong. We should stay in MIME-Header.

Test plan:
See Bugzilla comment5.

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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22016: Unit tests
Kyle M Hall [Tue, 19 Feb 2019 17:46:38 +0000 (12:46 -0500)]
Bug 22016: Unit tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22016: Always send CT field for SIP checkin, even if empty
Kyle M Hall [Mon, 17 Dec 2018 19:41:48 +0000 (14:41 -0500)]
Bug 22016: Always send CT field for SIP checkin, even if empty

Some SIP devices ( in this particular case, bin sorting machines from RFID Library Solutions ) require a CT field to be sent, even if that field is empty. Koha should be able to support this behavior.

Test Plan:
1) Apply this patch
2) Enable the new option ct_always_send for a SIP2 account
3) Restart SIP
4) Check in an item successfully via SIP, which will not be transferred
5) Note the response contains a CT field with no value

Sponsored-by: Pueblo City-County Library District
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jill Kleven <jill.kleven@pueblolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22014: Unit tests
Kyle M Hall [Tue, 19 Feb 2019 17:41:30 +0000 (12:41 -0500)]
Bug 22014: Unit tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22014: Add ability to send "00" in SIP CV field on checkin success
Kyle M Hall [Mon, 17 Dec 2018 17:34:14 +0000 (12:34 -0500)]
Bug 22014: Add ability to send "00" in SIP CV field on checkin success

Some SIP devices ( in this particular case, bin sorting machines from RFID Library Solutions ) require a checkin success to return a CV field of the value "00" rather than no CV field at all. Koha should be able to support this behavior.

Test Plan:
1) Apply this patch
2) Enable the new option cv_send_00_on_success for a SIP2 account
3) Restart SIP
4) Check in an item successfully via SIP
5) Note the response contains a CV field with the value '00'

Sponsored-by: Pueblo City-County Library District
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jill Kleven <jill.kleven@pueblolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22337: Make it clearer that language preferences can be re-ordered
Owen Leonard [Wed, 13 Feb 2019 20:00:17 +0000 (20:00 +0000)]
Bug 22337: Make it clearer that language preferences can be re-ordered

This patch makes markup and CSS changes to the system preference
interface so that it is visually clearer that language preferences
(language and opaclanguages) can be re-ordered by the user to control
the sequence of their appearance in language-selection menus.

This patch makes some minor markup changes (including some whitespace
fixes -- diff accordingly) in order to make it easier to apply these CSS
changes.

To test you should have more than one translation installed. Apply the
patch and clear your browser cache if necessary.

 - Go to Administration -> System preferences -> I18N/L10N
 - The 'language' and 'opaclanguages' system preferences should show the
   new style.
   - Each language should show a "move" cursor when the mouse hovers
     over the "box."
   - Dragging and dropping the languages should work correctly, and
     changes should be reflected in language menus.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
5 years agoBug 22349: Remove overzealous database deletions from test
Martin Renvoize [Fri, 15 Feb 2019 14:40:34 +0000 (14:40 +0000)]
Bug 22349: Remove overzealous database deletions from test

For no apparent reason a whole lot of data was being deleted inside a
transaction for each of the subtests in Koha/Acquisitions/Booksellers.t

This patch simply remove the deletions. To test, run the test before and
after applying the patch and they should all continue to pass.. If you
have a large number of booksellers, baskets, orders or subscriptions in
your database you may also see an decrease in the time it takes to run
the test.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21241: (RM follow-up) Fix error in update description
Nick Clemens [Wed, 27 Feb 2019 12:47:00 +0000 (07:47 -0500)]
Bug 21241: (RM follow-up) Fix error in update description

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoRevert "Bug 22026: Removed 'use Modern::Perl;' from Koha::REST::classes"
Nick Clemens [Tue, 26 Feb 2019 16:04:08 +0000 (11:04 -0500)]
Revert "Bug 22026: Removed 'use Modern::Perl;' from Koha::REST::classes"

This causes test failures in D8 and would require packaging our own perlcritic
Reverting until future date when consequences do not outweigh benefits

This reverts commit ecc94da6b258e423799e58558a5b02c8f2fcefec.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21870: Convert browser alerts to modals: OPAC user summary
Owen Leonard [Wed, 27 Jun 2018 17:01:02 +0000 (17:01 +0000)]
Bug 21870: Convert browser alerts to modals: OPAC user summary

This patch updates the user summary page in the OPAC so that JavaScript
alerts are replaced with Bootstrap modals. This provides us the ability
to more carefully control the content of confirmation dialogs and their
control buttons.

A global function for defining a modal confirmation boxes has been
added, to which one can pass:

 - The modal title
 - Body
 - Text for submit and cancel buttons
 - A callback function to trigger on submit

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

 - Log in to the OPAC as a user who has holds and article requests.
 - Test the following interactions, both the confirmation and cancel
   options for each:
     - Cancel a hold
     - Suspend all holds
     - Resume all holds
     - Cancel an article request

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22300: Compiled CSS
Nick Clemens [Tue, 26 Feb 2019 14:34:11 +0000 (09:34 -0500)]
Bug 22300: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22300: Staff search results: Opt groups in 'sort' pull down are not well formatted
Owen Leonard [Mon, 11 Feb 2019 15:09:36 +0000 (15:09 +0000)]
Bug 22300: Staff search results: Opt groups in 'sort' pull down are not well formatted

This patch adds some CSS to style the staff client search results sort
menu headings. Formerly these were <optgroup> tags with a default
browser style.

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

 - Perform a catalog search in the staff client.
 - On the search results page, test the "Sort" menu. Confirm that the
   menu headers more clearly indicate the sections.
 - Test the "Add to list" button menu too, where the same style will be
   in use.

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>
5 years agoBug 21206: Fix SwitchOnSiteCheckouts.t
Jonathan Druart [Fri, 15 Feb 2019 13:38:14 +0000 (10:38 -0300)]
Bug 21206: Fix SwitchOnSiteCheckouts.t

Fix conflict with
  commit f8544ba5799c457057d42aefc63c88e15a08b096
  Bug 21999: Move attributes to a variable to not dup them

Thanks tests!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21206: (QA follow-up) Rebase problem and leftover mocked GetItem
Tomas Cohen Arazi [Tue, 15 Jan 2019 19:32:57 +0000 (16:32 -0300)]
Bug 21206: (QA follow-up) Rebase problem and leftover mocked GetItem

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21206: (follow-up) Fix Circulation.t
Josef Moravec [Tue, 4 Dec 2018 11:40:17 +0000 (11:40 +0000)]
Bug 21206: (follow-up) Fix Circulation.t

Test plan:
prove t/db_dependent/Circulation.t

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>
5 years agoBug 21206: Fix Returns.t
Jonathan Druart [Tue, 7 Aug 2018 15:55:52 +0000 (12:55 -0300)]
Bug 21206: Fix Returns.t

we are calling several times effective_itemtype
Must be fixed later

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>
5 years agoBug 21206: Remove GetItem
Jonathan Druart [Tue, 7 Aug 2018 15:52:28 +0000 (12:52 -0300)]
Bug 21206: Remove GetItem

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>
5 years agoBug 21206: Replace C4::Items::GetItem
Jonathan Druart [Mon, 6 Aug 2018 22:50:41 +0000 (19:50 -0300)]
Bug 21206: Replace C4::Items::GetItem

Note: This is here for information purpose, feel free to test it if you
wan to play with it.

TODO: C4::Reserves::_get_itype is not longer in use

No more GetItem must be returned by:
git grep GetItem|grep -v GetItemsAvailableToFillHoldRequestsForBib|grep
-v GetItemsForInventory|grep -v GetItemsInfo|grep -v
GetItemsLocationInfo|grep -v GetItemsInCollection|grep -v
GetItemCourseReservesInfo|grep -v GetItemnumbersFromOrder|grep -v
GetItemSearchField|grep -v GetItemTypesCategorized|grep -v
GetItemNumbersFromImportBatch|cut -d':' -f1|sort|uniq

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22397: Wrong message in koha-sip --start
Tomas Cohen Arazi [Fri, 22 Feb 2019 14:31:52 +0000 (11:31 -0300)]
Bug 22397: Wrong message in koha-sip --start

This patch makes koha-sip --start calls mention 'SIP server' instead of
the wrong 'Zebra daemon'.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18251: (follow-up) fix rebase error
Nick Clemens [Wed, 20 Feb 2019 19:55:36 +0000 (19:55 +0000)]
Bug 18251: (follow-up) fix rebase error

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18251: (QA follow-up) Add 'renew' operation and check renewal vs checkout
Nick Clemens [Tue, 28 Mar 2017 18:21:29 +0000 (14:21 -0400)]
Bug 18251: (QA follow-up) Add 'renew' operation and check renewal vs checkout

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18251: (QA follow-up) Add alerts for all SCO actions
Nick Clemens [Mon, 20 Mar 2017 14:48:21 +0000 (10:48 -0400)]
Bug 18251: (QA follow-up) Add alerts for all SCO actions

To test:

Add sound alerts for sco-alert-warning
Test various actions (return,renew) and verify success/failure notices
and sounds
Note additional classes (return,renew,issue) to allow for more
specificity of sounds alerts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18251: (QA follow-up) Add alert box to checkout message
Nick Clemens [Mon, 20 Mar 2017 10:50:40 +0000 (06:50 -0400)]
Bug 18251: (QA follow-up) Add alert box to checkout message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18251: SCO alerts - need a trigger for successful checkouts
Nick Clemens [Mon, 13 Mar 2017 14:30:42 +0000 (14:30 +0000)]
Bug 18251: SCO alerts - need a trigger for successful checkouts

This patch adds simple text and a div to allow for sounds to be
configured upon successful SCO checkout

To test:
1 - Enable sco module
2 - Enable AudioAlerts
3 - Define alert with
     Selector: .sco-alert-success
     Sound:http://localhost:8081/intranet-tmpl/prog/sound/opening.ogg
4 - Checkout to patron using SCO
5 - Note only feedback is a addition of item to checkouts list
6 - Apply patch
7 - Checkout ot patron via SCO
8 - You should hear the sound specified above
9 - You should also see a note: Item checked out

Followed test plan, works as expected.
(Works with external sound only, see Bug 16732)
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22378: Fix audio alerts on SCO
Nick Clemens [Wed, 20 Feb 2019 20:00:01 +0000 (20:00 +0000)]
Bug 22378: Fix audio alerts on SCO

Note: The SCO only supports sounds with a full URL, not KOha built in sounds

To test:
1 - Enable audio alerts
2 -  Enable SCO
3 - Note JS error on loading the alerts
4 - Apply patch
5 - No more error
6 - Test with bug 18251

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22411: Date and time in log viewer should respect
Josef Moravec [Mon, 25 Feb 2019 18:21:26 +0000 (18:21 +0000)]
Bug 22411: Date and time in log viewer should respect

Test plan:
Go to log viewer and show some log
-- without patch the date ant time in first column is formatted as
yyyy-mm-dd hh:mm
-- with patch the date is formatted according to your dateformat system
preference

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15149: Serial test prediction pattern does not consider end date
Fridolin Somers [Thu, 21 Feb 2019 16:21:58 +0000 (17:21 +0100)]
Bug 15149: Serial test prediction pattern does not consider end date

To reproduce:

1) add a serial.
2) set first issue = today
3) set frequency = 1/month
4) dont set subscription length
5) set subscription start date = today
6) set subscription start date = today + 1 year
7) set numbering pattern = Number
8) test prediction pattern.
=> Without patch : you will get a list of 1000 issues, going well beyond subscripton end date.
=> With patch : shows only the issues within the date range.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: zhihui <zhihui@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18957: Record the time part of the last renewed date
Jonathan Druart [Fri, 22 Feb 2019 14:06:46 +0000 (11:06 -0300)]
Bug 18957: Record the time part of the last renewed date

issues.lastreneweddate is a datetime and we could record the time part
of the date.

Test plan:
Renew an issue
note that the time part of the last renewed date is set correctly

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>
5 years agoBug 18957: Add tests
Jonathan Druart [Fri, 22 Feb 2019 14:01:38 +0000 (11:01 -0300)]
Bug 18957: Add tests

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>
5 years agoBug 14850: (QA follow-up) Remove debugging code
Josef Moravec [Mon, 25 Feb 2019 09:18:50 +0000 (09:18 +0000)]
Bug 14850: (QA follow-up) Remove debugging code

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14850: Funds from inactive budgets appear in 'Funds' dropdown on acqui/invoice.pl
Kyle M Hall [Fri, 22 Feb 2019 12:12:10 +0000 (07:12 -0500)]
Bug 14850: Funds from inactive budgets appear in 'Funds' dropdown on acqui/invoice.pl

Test Plan:
1) Create some inactive and active budgets
2) View an invoice in acquisitions
4) Note the shipping fund dropdown behaves like acqui/parcels.pl

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22396: Make koha-sip set KOHA_HOME and KOHA_CONF correctly
Tomas Cohen Arazi [Fri, 22 Feb 2019 15:00:35 +0000 (12:00 -0300)]
Bug 22396: Make koha-sip set KOHA_HOME and KOHA_CONF correctly

This patch corrects a typo, and exports KOHA_CONF as other scripts do.

To test:
- Apply this patch
- Run:
  $ # in kohadevbox
  $ perl misc4dev/cp_debian_files.pl
- Try the new script
  $ sudo koha-sip --start kohadev
=> SUCCESS: tail -f /var/log/koha/kohadev/sip* doesn't show fatal errors
anymore
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22049: Do not pass Koha::Patron to AddIssue
Jonathan Druart [Thu, 21 Feb 2019 21:03:21 +0000 (18:03 -0300)]
Bug 22049: Do not pass Koha::Patron to AddIssue

The tests are not supposed to pass with such obvious mistake (?)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20639: DBRev 18.12.00.016
Nick Clemens [Fri, 22 Feb 2019 14:53:41 +0000 (14:53 +0000)]
Bug 20639: DBRev 18.12.00.016

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20581: (follow-up) Fix status_alias -1 bug
Andrew Isherwood [Mon, 11 Feb 2019 11:08:52 +0000 (11:08 +0000)]
Bug 20581: (follow-up) Fix status_alias -1 bug

Stupid bug, we need to pass NULL not -1 when unsetting status_alias

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20581: (follow-up) Passed value to status_alias
Andrew Isherwood [Thu, 7 Feb 2019 10:43:51 +0000 (10:43 +0000)]
Bug 20581: (follow-up) Passed value to status_alias

Now we have overloaded status_alias, we can no longer pass it undef (as
it uses that to determine if it's being used as a getter or setter). So
we now pass it -1 to indicate it should actually be setting undef (a
hack, I know, but what are you going to do...)

This patch makes sure ill-request.pl conforms to that. It also fixes the
testing of the passed parameter, which was wrong.

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>
5 years agoBug 20581: (follow-up) Fix unit test
Andrew Isherwood [Wed, 6 Feb 2019 14:18:59 +0000 (14:18 +0000)]
Bug 20581: (follow-up) Fix unit test

Since we're now storing the authorised_value column as the foreign key,
rather than the id, we need to account for this in the test

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>
5 years agoBug 20581: (follow-up) Fix status_alias comparison
Andrew Isherwood [Wed, 6 Feb 2019 14:17:01 +0000 (14:17 +0000)]
Bug 20581: (follow-up) Fix status_alias comparison

status_alias will arrive in the Koha object as a string, so when we
special case it, we should also pass a string

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>
5 years agoBug 20581: (follow-up) Overload status_alias
Andrew Isherwood [Wed, 6 Feb 2019 12:54:30 +0000 (12:54 +0000)]
Bug 20581: (follow-up) Overload status_alias

We need Koha::Illrequest->status_alias to return the correct authorised value.
Since the foreign key uses a non-unique column, we need to take into
account the authorised value category too.

This patch overloads status_alias with some additional logic that
considers the request's branch and the authorised value category to
attempt to return the correct value.

The same logic is applied to the custom statusalias method, which
returns the entire AuthorisedValue object

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>
5 years agoBug 20581: (follow-up) Fix typo in DB upgrade
Andrew Isherwood [Tue, 5 Feb 2019 15:19:12 +0000 (15:19 +0000)]
Bug 20581: (follow-up) Fix typo in DB upgrade

IN -> ON

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>
5 years agoBug 20581: (follow-up) Do not use PK for AV FK
Andrew Isherwood [Tue, 5 Feb 2019 14:10:36 +0000 (14:10 +0000)]
Bug 20581: (follow-up) Do not use PK for AV FK

As per:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20581#c133

We switch from using authorised_values.id when creating the foreign key
illrequests.status_alias, we now use authorised_values.authorised_value

I have added a migration from using id -> authorised_value, so when
existing users of this bug get this version, their DB migrates nicely
instead of just breaking.

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>
5 years agoBug 20581: (follow-up) Fix dependency requirement
Andrew Isherwood [Fri, 25 Jan 2019 11:55:47 +0000 (11:55 +0000)]
Bug 20581: (follow-up) Fix dependency requirement

Since this bug is now dependent on Bug 20600 (Provide the ability for
users to filter ILL requests) we need to make the status filtering aware
of the custom statuses. This patch does that.

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>
5 years agoBug 20581: (follow-up) Fix QA errors
Andrew Isherwood [Fri, 18 Jan 2019 15:31:25 +0000 (15:31 +0000)]
Bug 20581: (follow-up) Fix QA errors

This patch fixes the "missing_filter" errors on ill-requests.tt

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>
5 years agoBug 20581: (follow-up) Fix typo in kohastructure
Andrew Isherwood [Thu, 29 Nov 2018 12:05:46 +0000 (12:05 +0000)]
Bug 20581: (follow-up) Fix typo in kohastructure

Fix the missing comma

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>
5 years agoBug 20581: (follow-up) Modify POD
Andrew Isherwood [Mon, 15 Oct 2018 13:23:02 +0000 (14:23 +0100)]
Bug 20581: (follow-up) Modify POD

As per:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20581#c69

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>