]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 22006: Add tests
Jonathan Druart [Fri, 14 Dec 2018 19:14:42 +0000 (16:14 -0300)]
Bug 22006: Add tests

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22082: ambiguous column in patron stats
Fridolin Somers [Tue, 8 Jan 2019 13:32:19 +0000 (14:32 +0100)]
Bug 22082: ambiguous column in patron stats

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

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22002: (QA follow-up) Remove some debugging code from template
Katrin Fischer [Sun, 13 Jan 2019 21:26:12 +0000 (21:26 +0000)]
Bug 22002: (QA follow-up) Remove some debugging code from template

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22002: (bug 21621 follow-up) Re-add GROUP BY in letter.pl and fix it
Jonathan Druart [Sun, 16 Dec 2018 14:02:56 +0000 (11:02 -0300)]
Bug 22002: (bug 21621 follow-up) Re-add GROUP BY in letter.pl and fix it

Caused by
  commit 0cffb0f7589aa52d65bda9a8a4934790a141f3a0
  Bug 21621: Remove incorrect GROUP BY from tools/letter.pl
The test plan was not complete enough.

Test plan:
1) Go to Home › Tools › Notices & slips
2) Choose a letter to edit, e.g. PREDUE. Note that there is only a
single row.
3) Click the edit button on the notice.
4) Expand the 'Print' section. Put text into the Message subject and
Message body text areas.
5) Click save, this will take you back to the 'Notices & slips' page.
6) Clone PREDUE for a specific library
7) The 'all libraries' option must list the templates for all libraries,
but without duplicate
8) Select a library in the dropdown list: only the templates for the
given library is listed, without duplicate

Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21084: Fix automatic truncation in authority search
Ere Maijala [Wed, 5 Dec 2018 14:27:43 +0000 (16:27 +0200)]
Bug 21084: Fix automatic truncation in authority search

- Makes token splitting work like in biblio search
- Only adds right hand truncation since that's what Zebra also does
- Only adds truncation if the token is not a phrase and ends in a word character
- Adds tests to existing and new QueryBuilder functions

Test plan:

1. Create an authority record for "Duck, Donald"
2. Try contains type authority searches with the following terms and make sure they find the record:
Duck, Donald
donald duck
don duck
"Duck, Donald"
3. Make sure the following search works but does not find anything:
"Duck, Don"

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22058: Fix display of empty table cells in OPAC MARC view holdings
Katrin Fischer [Wed, 2 Jan 2019 06:23:57 +0000 (06:23 +0000)]
Bug 22058: Fix display of empty table cells in OPAC MARC view holdings

I compared the template logic to the MARC detail page in staff.
We use $raw there instead of html, which will also make notes and other
fields with HTML in them display correctly. I am proposing to use the
$raw filter in OPAC as well.

To test:
- Go to the OPAC
- Search for a record with items
- Switch to the MARC view
- Verify empty cells show &nbsp; (html entity for space)
- Apply patch
- Repeat test
- Verify empty table cells now show as empty

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>
5 years agoBug 21491: Display 'Yes' as selected if no refundlostitemfee rules are set
Nick Clemens [Wed, 21 Nov 2018 13:40:35 +0000 (13:40 +0000)]
Bug 21491: Display 'Yes' as selected if no refundlostitemfee rules are set

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22085: fix UNIMARC default XSLT broken by Bug 14716
Fridolin Somers [Wed, 9 Jan 2019 14:51:48 +0000 (15:51 +0100)]
Bug 22085: fix UNIMARC default XSLT broken by Bug 14716

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

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

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

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7143: Fix typo in adding new dev
Nick Clemens [Fri, 18 Jan 2019 20:12:08 +0000 (20:12 +0000)]
Bug 7143: Fix typo in adding new dev

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7143: Update about page for new devs (Academy)wq
Nick Clemens [Thu, 17 Jan 2019 02:20:56 +0000 (02:20 +0000)]
Bug 7143: Update about page for new devs (Academy)wq

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21637: Fixed upercase letter in EasyAnalyticalRecords syspref
Mackey Johnstone [Tue, 15 Jan 2019 02:56:25 +0000 (02:56 +0000)]
Bug 21637: Fixed upercase letter in EasyAnalyticalRecords syspref

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

To find fix:

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22036: Indented code where '^I' was written rather than an indent.
Jasmine Amohia [Tue, 15 Jan 2019 03:30:52 +0000 (03:30 +0000)]
Bug 22036: Indented code where '^I' was written rather than an indent.

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20865: Removed space before : on order receive filters
Jasmine Amohia [Tue, 15 Jan 2019 20:59:16 +0000 (20:59 +0000)]
Bug 20865: Removed space before : on order receive filters

I removed space before : on order receive filters

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20165: Changed uppercase letter to a lowercase letter in the patron search search...
Olivia Lu [Tue, 15 Jan 2019 03:15:37 +0000 (03:15 +0000)]
Bug 20165: Changed uppercase letter to a lowercase letter in the patron search search fields under the plus option.

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

To find this change:

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22054: Updated the error message for attempting to renew an onsite checkout
helene hickey [Tue, 15 Jan 2019 03:47:58 +0000 (03:47 +0000)]
Bug 22054: Updated the error message for attempting to renew an onsite checkout

To test:

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

onsite_checkout  Continue without renewing

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

Item cannot be renewed because it's an onsite checkout

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22095: Replaced dead links with working links
Ethan Amohia [Tue, 15 Jan 2019 21:45:01 +0000 (21:45 +0000)]
Bug 22095: Replaced dead links with working links

I have updated the broken link everywhere it occurs.

Confirm that the new link works in the installer.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21866: Changed "report" to "plugins" for the warning "This report was written...
Olivia Lu [Tue, 15 Jan 2019 03:52:30 +0000 (03:52 +0000)]
Bug 21866: Changed "report" to "plugins" for the warning "This report was written for an older version of Koha. Run at your own risk"

To find this change:

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22107: patrons.t doesn't need to delete existing data
Tomas Cohen Arazi [Fri, 11 Jan 2019 18:14:04 +0000 (15:14 -0300)]
Bug 22107: patrons.t doesn't need to delete existing data

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21727: (QA follow-up) Fix POD encoding
Tomas Cohen Arazi [Fri, 11 Jan 2019 18:19:02 +0000 (15:19 -0300)]
Bug 21727: (QA follow-up) Fix POD encoding

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21785: Add columns configuration to hold ratios report
Owen Leonard [Wed, 7 Nov 2018 19:01:16 +0000 (19:01 +0000)]
Bug 21785: Add columns configuration to hold ratios report

This patch adds column configuration to the hold ratios report
DataTable.

This patch also amends some JavaScript and markup related to some
obsolete jQuery syntax: A hover function was being used to change an
element's style on hover. It has been removed in favor of using a link
and CSS>

To test, apply the patch and view the hold ratios report using a ratio
which will return multiple results. Confirm that DataTables controls
work correctly: Paging, search, column visibility, export and print.

Click a number in the "hold ratio" column of the table and verify that
it populates the "hold ratio" field in the "refine results" form in the
sidebar.

Test setting default column configurations in Administration -> Columns
settings.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21442: Update two-column templates with Bootstrap grid: Circulation part 1
Owen Leonard [Wed, 2 May 2018 15:14:03 +0000 (15:14 +0000)]
Bug 21442: Update two-column templates with Bootstrap grid: Circulation part 1

This patch modifies several circulation templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Circulation -> Pending on-site checkouts (enable OnSiteCheckouts
   preference).
    - Test with the CircSidebar system preference both on and off
 - Circulation -> Overdues
 - Circulation -> Holds to pull
 - Circulation -> Renew
    - Test with the CircSidebar system preference both on and off
 - Circulation -> Bibliographic detail page -> Request article (enable
   ArticleRequests system preferences)
 - Circulation -> Hold ratios

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5
Owen Leonard [Thu, 8 Nov 2018 19:57:36 +0000 (19:57 +0000)]
Bug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5

This patch adds or corrects Bootstrap grids on three
acquisitions-related templates.

To test, apply the patch and confirm that these pages look correct and
adjust well to various browser widths:

- Acquisitions -> Vendor -> Basket -> View
- Acquisitions -> Vendor -> Details
- Acquisitions -> Vendor -> Basket -> Add to basket -> From a new
  (empty) record

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21999: Move attributes to a variable to not dup them
Jonathan Druart [Mon, 17 Dec 2018 21:26:47 +0000 (18:26 -0300)]
Bug 21999: Move attributes to a variable to not dup them

Avoid c/p as much as possible :)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21999: FIXMEs are fixed!
Jonathan Druart [Mon, 17 Dec 2018 21:21:04 +0000 (18:21 -0300)]
Bug 21999: FIXMEs are fixed!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21999: Update Tests to reflect new return value of AddIssue
Martin Renvoize [Fri, 14 Dec 2018 15:03:46 +0000 (15:03 +0000)]
Bug 21999: Update Tests to reflect new return value of AddIssue

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21999: Use Koha::Checkout in C4::Circulation::AddIssue
Martin Renvoize [Fri, 14 Dec 2018 12:27:01 +0000 (12:27 +0000)]
Bug 21999: Use Koha::Checkout in C4::Circulation::AddIssue

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21803: Redesign authorized values interface
Owen Leonard [Wed, 18 May 2016 13:24:21 +0000 (09:24 -0400)]
Bug 21803: Redesign authorized values interface

This patch redesigns the authorized values management interface. The
primary change is that the initial view of authorized values is now a
table listing all authorized values categories and their descriptions.
Descriptions have been added or updated according to the text of the
manual.

To test, apply the patch and go to Administration -> Authorized values.

 - You should see a table of authorized values displayed in a
   DataTables-formatted table.
   - Click a category. You should be taken to the list of authorized
     values for that category. If there are none defined you should see
     a message saying so, including a button to add one.
   - Click the "Add" button next to an authorized value category. It
     should take you to the form for adding an authorized value to that
     category.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21912: (QA follow-up) Do not delete existing patrons
Tomas Cohen Arazi [Wed, 26 Dec 2018 17:55:53 +0000 (14:55 -0300)]
Bug 21912: (QA follow-up) Do not delete existing patrons

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

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

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19458: (follow-up) Self-check module highlighting
Agustin Moyano [Thu, 13 Dec 2018 23:01:24 +0000 (20:01 -0300)]
Bug 19458: (follow-up) Self-check module highlighting

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19458: Self-check module highlighting
Agustin Moyano [Thu, 13 Dec 2018 04:51:38 +0000 (01:51 -0300)]
Bug 19458: Self-check module highlighting

In SCO Module there is no difference on how new checkouts and renewals are shown from previous ones. This commit is done to address that issue.

How to test:
1. Go to /cgi-bin/koha/sco/sco-main.pl and login.
2. Checkout a new item.
3. In checkout's table new checkouts should be easily identifiable.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21963: Update two-column templates with Bootstrap grid: Patrons part 1
Owen Leonard [Wed, 2 May 2018 16:38:08 +0000 (16:38 +0000)]
Bug 21963: Update two-column templates with Bootstrap grid: Patrons part 1

This patch modifies several patron templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags in the modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Patrons -> View patron
   - Fines
     - Account
     - Create manual credit
   - Delete
     - Try to delete a patron with checkouts
   - Discharges
   - Housebound
   - Files
   - Holds history

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21569: Update two-column templates with Bootstrap grid: Circulation part 3
Owen Leonard [Wed, 2 May 2018 15:51:21 +0000 (15:51 +0000)]
Bug 21569: Update two-column templates with Bootstrap grid: Circulation part 3

This patch modifies several circulation templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

With each of these pages, test with CircSidebar preference both on
and off

 - Circulation -> Returns
 - Circulation -> Set library
 - Circulation -> Transfers to receive
 - Circulation -> Holds queue
 - Circulation -> Holds awaiting pickup

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22003: Remove unused subroutines displaylog and GetLogStatus from C4::Log
Josef Moravec [Fri, 14 Dec 2018 16:50:39 +0000 (16:50 +0000)]
Bug 22003: Remove unused subroutines displaylog and GetLogStatus from C4::Log

These two routines are not used

Test plan:
0) Apply the patch
1) git grep GetLogStatus should return no occurence
2) git grep displaylog should return no occurence
3) prove t/Log.t should return green

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21727: Add handling for cases requireing patron refunds
Martin Renvoize [Wed, 12 Dec 2018 12:09:46 +0000 (12:09 +0000)]
Bug 21727: Add handling for cases requireing patron refunds

As it is possible to partially pay off a fine that is still incrementing
we can end up in a position (when dropbox mode is enabled) where the
patron may be owed money by the library should they have paid off the
fine between dropping the item off in dropbox mode and the increment
that reverts the increase on the dropbox day.

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 21727: Unit tests for the refund case
Tomas Cohen Arazi [Wed, 12 Dec 2018 13:49:18 +0000 (10:49 -0300)]
Bug 21727: Unit tests for the refund case

This patch introduces tests for the behaviour when the negative adjust
exceedes the amount that was already paid. In this case, the line amount
is expected to be set to 0, and a credit with the payed amount created.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account/Lines.t
=> SUCCESS: tests pass!

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 21727: Add clarifications to the POD of adjust
Martin Renvoize [Tue, 11 Dec 2018 17:45:15 +0000 (17:45 +0000)]
Bug 21727: Add clarifications to the POD of adjust

Sponsored-by: PTFS Europe
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21727: (QA follow-up) Test lastincrement changes
Tomas Cohen Arazi [Tue, 11 Dec 2018 15:35:29 +0000 (12:35 -0300)]
Bug 21727: (QA follow-up) Test lastincrement changes

'adjust' changes the 'lastincrement column, and this behaviour should be
tested. This patch just adds tests for that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21727: Add ->adjust to Koha::Account::Line
Martin Renvoize [Thu, 1 Nov 2018 17:12:14 +0000 (17:12 +0000)]
Bug 21727: Add ->adjust to Koha::Account::Line

This patch introduces a high-level method for updating existing debits,
similar to Koha::Account::add_credit and Koha::Account::add_debit.

It updates the Koha::Account::Line object, and adds an offset. It also
logs if required.

It whitelists the account types that are allowed to be adjusted, just in
case some others require adjusting, having a single source for truth.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account/Lines.t
=> SUCCESS: Tests pass!

Sponsored-by: PTFS Europe
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 21727: Add tests for Koha::Account::Line->adjust
Martin Renvoize [Fri, 30 Nov 2018 11:52:12 +0000 (11:52 +0000)]
Bug 21727: Add tests for Koha::Account::Line->adjust

Sponsored-by: PTFS Europe
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 21753: DBRev 18.12.00.007
Nick Clemens [Fri, 4 Jan 2019 03:08:14 +0000 (03:08 +0000)]
Bug 21753: DBRev 18.12.00.007

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21753: (QA follow-up) Remove fourth %s in sprintf
Marcel de Rooy [Thu, 29 Nov 2018 11:49:50 +0000 (12:49 +0100)]
Bug 21753: (QA follow-up) Remove fourth %s in sprintf

Trivial.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21753: Update to remove the field from the database
Martin Renvoize [Fri, 2 Nov 2018 10:04:46 +0000 (10:04 +0000)]
Bug 21753: Update to remove the field from the database

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21753: Remove all reference of chargename from scripts
Martin Renvoize [Fri, 2 Nov 2018 09:42:53 +0000 (09:42 +0000)]
Bug 21753: Remove all reference of chargename from scripts

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21980: Add new exceptions for Koha::Account
Martin Renvoize [Mon, 10 Dec 2018 12:02:41 +0000 (12:02 +0000)]
Bug 21980: Add new exceptions for Koha::Account

He add two new exceptions here; One to be thrown when negative 'amount'
is passed into verious account methods that always expect positive
decimals and another to be thrown when a bad 'type' is passed into an
account method.

Sponsored-by: PTFS Europe
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21436: Update two-column templates with Bootstrap grid: Tools part 4
Owen Leonard [Fri, 4 May 2018 14:25:16 +0000 (14:25 +0000)]
Bug 21436: Update two-column templates with Bootstrap grid: Tools part 4

This patch modifies several tools templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Tools -> Task scheduler
 - Tools -> Staged MARC management -> View batch -> View diff of
   imported record which duplicates a record in the catalog
 - Tools -> Stage MARC for import
   - Test each step
 - Tools -> Upload local cover image
   - Test each step
 - Tools -> Upload any file
   - Test each step
 - Tools -> Log viewer
   - Test from the tools menu and from both the bibliographic
     patron details pages ("Modification log").

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21915: DBRev 18.12.00.006
Nick Clemens [Fri, 4 Jan 2019 02:51:03 +0000 (02:51 +0000)]
Bug 21915: DBRev 18.12.00.006

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21915: Add a cli script to reconcile balances
Tomas Cohen Arazi [Fri, 30 Nov 2018 13:28:48 +0000 (10:28 -0300)]
Bug 21915: Add a cli script to reconcile balances

This patch adds a CLI script, reconcile_balances.pl that takes care
of calling the reconcile operation for all patrons that have outstanding
credits.

A weird situation has been spotted in the wild, in which a debit ends up
actually being a credit, because amount outstanding is tweaked in
dropbox-mode returns. Until we figure what to do about that (probably a
new account type, etc), we catch any exceptions and warn about the
situation.

To test:
- Have patrons with outstanding credits and debits
- Run the script:
  $ kshell
 k$ perl misc/cronjobs/reconcile_balances.pl --verbose
=> SUCCESS: Notice patrons got their balances reconciled, and useful
            information is output.
- Add new outstanding credits and debits to patrons you con easily
identify
- Run:
 k$ perl misc/cronjobs/reconcile_balances.pl
=> SUCCESS: Notice balances are reconciled, but no output
- Run:
 k$ perl misc/cronjobs/reconcile_balances.pl --help
=> SUCCESS: Usage information is printed.
- Sign off :-D

Sponsored-by: ByWater Solutions
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>
5 years agoBug 21915: Call reconcile_balance on manual credit creation
Tomas Cohen Arazi [Fri, 30 Nov 2018 12:54:56 +0000 (09:54 -0300)]
Bug 21915: Call reconcile_balance on manual credit creation

This patch makes the manual credit creation step call
Koha::Account::reconcile_balance when the AccountAutoReconcile syspref
is set.

To test:
- Apply the patch
- Have some outstanding debits
- Create a manual credit
=> SUCCESS: Same behaviour as always
- Set AccountAutoReconcile
- Create a manual credit
=> SUCCESS: Reconcillation happened
- Sign off :-D

Sponsored-by: ByWater Solutions
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>
5 years agoBug 21915: Call reconcile_balance on manual invoice creation
Tomas Cohen Arazi [Fri, 30 Nov 2018 12:45:19 +0000 (09:45 -0300)]
Bug 21915: Call reconcile_balance on manual invoice creation

This patch makes the manual invoice creation step call
Koha::Account::reconcile_balance when the AccountAutoReconcile syspref
is set.

To test:
- Apply the patch
- Have some outstanding credit
- Create a manual invoice
=> SUCCESS: Same behaviour as always
- Set AccountAutoReconcile
- Create a manual invoice
=> SUCCESS: Reconcillation happened
- Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
5 years agoBug 21915: Reconcile balance on _FixAccountForLostAndReturned call
Tomas Cohen Arazi [Thu, 29 Nov 2018 19:46:36 +0000 (16:46 -0300)]
Bug 21915: Reconcile balance on _FixAccountForLostAndReturned call

This patch makes _FixAccountForLostAndReturned reconcile the patron's
account balance, when the AccountAutoReconcile syspref is set.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation.t
=> SUCCESS: Tests pass, peace \o/
- Sign off :-D

Sponsored-by: ByWater Solutions
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>
5 years agoBug 21915: Add AccountAutoReconcile syspref
Tomas Cohen Arazi [Thu, 29 Nov 2018 17:55:53 +0000 (14:55 -0300)]
Bug 21915: Add AccountAutoReconcile syspref

This syspref will be used to call the reconcile_balance routing as
needed.

Sponsored-by: ByWater Solutions
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>
5 years agoBug 22071: (follow-up) Add POD for validate_query_parameters
Tomas Cohen Arazi [Mon, 7 Jan 2019 10:38:29 +0000 (07:38 -0300)]
Bug 22071: (follow-up) Add POD for validate_query_parameters

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22071: (follow-up) Simplify code
Tomas Cohen Arazi [Mon, 7 Jan 2019 10:31:43 +0000 (07:31 -0300)]
Bug 22071: (follow-up) Simplify code

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

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

Overall, the behaviour remains unchanged.

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22071: Make authenticate_api_request stash koha.user in OAuth use case
Tomas Cohen Arazi [Fri, 4 Jan 2019 15:46:37 +0000 (12:46 -0300)]
Bug 22071: Make authenticate_api_request stash koha.user in OAuth use case

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

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

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22071: Regression tests
Tomas Cohen Arazi [Fri, 4 Jan 2019 15:37:27 +0000 (12:37 -0300)]
Bug 22071: Regression tests

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

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

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21788: Make ProcessOfflinePayment pass the library_id parameter
Tomas Cohen Arazi [Thu, 8 Nov 2018 15:34:17 +0000 (12:34 -0300)]
Bug 21788: Make ProcessOfflinePayment pass the library_id parameter

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation.t
=> FAIL: branchcode is not set
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation.t
=> SUCCESS: Tests pass!
- Sign off :-D

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 21788: Unit tests
Tomas Cohen Arazi [Thu, 8 Nov 2018 15:31:59 +0000 (12:31 -0300)]
Bug 21788: Unit tests

This patch refactors the tests related to ProcessOfflinePayment and adds
checks for setting branchcode on the account line.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation.t
=> FAIL: branchcode is not set

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 22073: Add to diacritics mappings for Ž and ž
Nick Clemens [Wed, 31 Oct 2018 12:50:27 +0000 (12:50 +0000)]
Bug 22073: Add to diacritics mappings for Ž and ž

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

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

Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22020: (bug 21777 follow-up) Fix columns visibility for circulation.pl
Jonathan Druart [Wed, 19 Dec 2018 19:00:52 +0000 (16:00 -0300)]
Bug 22020: (bug 21777 follow-up) Fix columns visibility for circulation.pl

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21786: (QA follow-up) library_id can be null
Tomas Cohen Arazi [Thu, 27 Dec 2018 14:40:12 +0000 (11:40 -0300)]
Bug 21786: (QA follow-up) library_id can be null

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21786: Make balance and credits endpoints handle library_id
Tomas Cohen Arazi [Fri, 9 Nov 2018 19:29:43 +0000 (16:29 -0300)]
Bug 21786: Make balance and credits endpoints handle library_id

This patch:
- Adds the branchcode <-> library_id mapping in the controller
- Adds 'library_id' to the credit and account_line definitions
- Makes add_credit handle the library_id param, passing it to the
  underlying $account->add_credit method.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> FAIL: Tests fail, because library_id is not mapped
(balance) and because it is not handled when adding a credit.
- Apply this patch
- Run:
  k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21786: Unit tests
Tomas Cohen Arazi [Fri, 9 Nov 2018 19:29:15 +0000 (16:29 -0300)]
Bug 21786: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21786: Add library_id to the spec definitions
Tomas Cohen Arazi [Fri, 9 Nov 2018 19:35:31 +0000 (16:35 -0300)]
Bug 21786: Add library_id to the spec definitions

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21813: Compiled CSS
Nick Clemens [Tue, 8 Jan 2019 14:27:55 +0000 (14:27 +0000)]
Bug 21813: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21813: In-page JavaScript causes error on patron entry page
Owen Leonard [Mon, 12 Nov 2018 17:35:25 +0000 (17:35 +0000)]
Bug 21813: In-page JavaScript causes error on patron entry page

This patch removes a block of JavaScript from memberentrygen.tt which
was being included in the page before jQuery is loaded. This causes a
JavaScript error.

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

 - In Administration -> Patron categories, confirm that you have two
    patron categories with different default messaging preferences
    defined.
 - Go to Patrons -> New patron
   - Create a new patron using one of the categories with messaging
     preferences.
   - Confirm that when you switch the category selection to the other
     patron category, the patron messaging preference checkboxes are
     changed to the default for that category.
     - A "Loading" indicator should appear above the checkboxes to show
      that an operation is in process. It should disappear when new
      default prefs are loaded.
   - Manually change one or more patron messaging preference checkboxes.
   - Switch the patron category again and confirm that you are prompted
     to confirm resetting the preferences to the default for that
     category.
 - Perform the same set of tests when editing a patron.
   - Defaults should not be loaded during the edit process.
 - Confirm that there are no other JavaScript errors in the console.
 - Test again with EnhancedMessagingPreferences disabled.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22052: Refactor DeleteExpiredOpacReigstrations
Nick Clemens [Fri, 28 Dec 2018 18:48:25 +0000 (18:48 +0000)]
Bug 22052: Refactor DeleteExpiredOpacReigstrations

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

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

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22052: Unit tests
Nick Clemens [Fri, 28 Dec 2018 18:48:15 +0000 (18:48 +0000)]
Bug 22052: Unit tests

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22030: DBRev 18.12.00.005
Nick Clemens [Tue, 8 Jan 2019 14:01:45 +0000 (14:01 +0000)]
Bug 22030: DBRev 18.12.00.005

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

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

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21605: (follow-up) Simple ternary boolean to number conversion
Marcel de Rooy [Thu, 13 Dec 2018 13:59:38 +0000 (14:59 +0100)]
Bug 21605: (follow-up) Simple ternary boolean to number conversion

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21605: Ensure EDI acct fields set to boolean val
Colin Campbell [Fri, 26 Oct 2018 09:42:13 +0000 (10:42 +0100)]
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>
5 years agoBug 22059: Fix exception params in Koha::Patron->set_password
Tomas Cohen Arazi [Wed, 2 Jan 2019 12:56:52 +0000 (09:56 -0300)]
Bug 22059: Fix exception params in Koha::Patron->set_password

This simple patch fixes a wrong call to ->throw. Parameters shouldn't be
enclosed in curly brackets.

To test:
- Apply the tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patrons.t
=> FAIL: Tests fail because the throw call is wrong
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Patrons.t
=> SUCCESS: Tests pass!
-Sign off :-D

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 22059: regression tests
Tomas Cohen Arazi [Wed, 2 Jan 2019 12:56:21 +0000 (09:56 -0300)]
Bug 22059: 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 19066: DBRev 18.12.00.004
Nick Clemens [Thu, 3 Jan 2019 18:56:14 +0000 (18:56 +0000)]
Bug 19066: DBRev 18.12.00.004

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19066: (RM follow-up) Fix test count and structure error
Nick Clemens [Thu, 3 Jan 2019 18:55:50 +0000 (18:55 +0000)]
Bug 19066: (RM follow-up) Fix test count and structure error

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19066: (QA follow-up) Define foreign key for branchcode
Martin Renvoize [Mon, 17 Dec 2018 11:15:50 +0000 (11:15 +0000)]
Bug 19066: (QA follow-up) Define foreign key for branchcode

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19066: Add tests for Koha::Account->pay
Tomas Cohen Arazi [Thu, 8 Nov 2018 14:15:25 +0000 (11:15 -0300)]
Bug 19066: Add tests for Koha::Account->pay

This patch adds tests for Koha::Account->pay, to make sure the
library_id param is used to set the branchcode attribute. The use of
userenv to set branchcode if library_id not passed is removed.
Responsability is left to the callers to pass library_id.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> SUCCESS: Tests pass!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19066: (QA follow-up) Fix ChargeReserveFee
Tomas Cohen Arazi [Wed, 7 Nov 2018 20:06:26 +0000 (17:06 -0300)]
Bug 19066: (QA follow-up) Fix ChargeReserveFee

This patch fixes a bug in ChargeReserveFee:

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Reserves.t
=> FAIL: Tests fail because branchcode is not set
- Apply this patch
- Run:
 k$ prove t/db_dependent/Reserves.t
=> SUCCESS: Tests pass!

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>
5 years agoBug 19066: Tests for AddRenewal AddIssuingCharge and ChargeReserveFee
Tomas Cohen Arazi [Wed, 7 Nov 2018 20:05:25 +0000 (17:05 -0300)]
Bug 19066: Tests for AddRenewal AddIssuingCharge and ChargeReserveFee

This patch adds some tests that cover functions changed by this
patchset. A bug in ChargeReserveFee is highlighted.

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>
5 years agoBug 19066: (QA follow-up) Remove bad and unecessary test
Kyle M Hall [Fri, 2 Nov 2018 18:38:56 +0000 (14:38 -0400)]
Bug 19066: (QA follow-up) Remove bad and unecessary test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19066: (QA follow-up) Add handling in add_credit
Martin Renvoize [Fri, 2 Nov 2018 15:10:44 +0000 (15:10 +0000)]
Bug 19066: (QA follow-up) Add handling in add_credit

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19066: Add branchcode to accountlines
Kyle M Hall [Wed, 9 Aug 2017 16:55:56 +0000 (16:55 +0000)]
Bug 19066: Add branchcode to accountlines

For the purposes of statistics, it appears that it would help many
libraries to have branchcode recorded in the accountlines table. For
payments, the field would contain the code for the branch the payment
was made at. For manual invoices, it would be the code of the library
that created the invoice.

Test Plan:
1) Apply this patch set
2) Create and pay some fees
3) Note the branchcode for those fees and payments is set
   to your logged in branch

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19066: Update Database
Kyle M Hall [Wed, 9 Aug 2017 13:50:21 +0000 (09:50 -0400)]
Bug 19066: Update Database

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Squashing for cleaner history

Bug 19066: (QA follow-up) Move db update to perl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21802: Compiled CSS
Nick Clemens [Wed, 2 Jan 2019 20:55:54 +0000 (20:55 +0000)]
Bug 21802: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21802: Align fieldset with accordion headers when editing notice's template
Jonathan Druart [Sun, 16 Dec 2018 15:58:14 +0000 (12:58 -0300)]
Bug 21802: Align fieldset with accordion headers when editing notice's template

Test plan:
Regenerate the css using `yarn css`
Edit a notice's template and confirm that the fieldsets are aligned with
the accordion headers

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21990: Replace dialog .error with .alert
Jonathan Druart [Wed, 12 Dec 2018 15:22:47 +0000 (12:22 -0300)]
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>
5 years agoBug 22034: Handle default framework for MARC view with framework
Jonathan Druart [Thu, 20 Dec 2018 22:55:46 +0000 (19:55 -0300)]
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>
5 years agoBug 21578: Terminology changes in patron's account section (staff)
Tomas Cohen Arazi [Thu, 6 Dec 2018 19:27:31 +0000 (16:27 -0300)]
Bug 21578: Terminology changes in patron's account section (staff)

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>
5 years agoBug 22007: Generated with add_missing_filters.pl
Jonathan Druart [Fri, 14 Dec 2018 20:34:59 +0000 (17:34 -0300)]
Bug 22007: Generated with add_missing_filters.pl

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>
5 years agoBug 22007: Also handle Price and HtmlTags
Jonathan Druart [Fri, 14 Dec 2018 20:34:52 +0000 (17:34 -0300)]
Bug 22007: Also handle Price and HtmlTags

Those 2 filters should return safe output as well

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>
5 years agoBug 22007: Handle safe filtered output (KohaDates)
Jonathan Druart [Fri, 14 Dec 2018 20:29:18 +0000 (17:29 -0300)]
Bug 22007: Handle safe filtered output (KohaDates)

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>
5 years agoBug 22007: Remove html filters when KohaDates called with a parameter
Jonathan Druart [Fri, 14 Dec 2018 20:20:52 +0000 (17:20 -0300)]
Bug 22007: Remove html filters when KohaDates called with a parameter

Bug 13618 took care of the KohaDates output but not if it is called
with a parameter (eg. [% var | $KohaDates with_hours => 1 %]).

We could avoid unnecessary processing by removing the extra html filter.

Patch generated with the following command:
  % perl -p -i -e 's/KohaDates([^%\|]*)\s?\|\s?html\s?/KohaDates $1/g' **/*.inc **/*.tt

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>
5 years agoBug 21928: (bug 18789 follow-up) Fix CircAutoPrintQuickSlip=clear
Jonathan Druart [Wed, 5 Dec 2018 21:17:14 +0000 (18:17 -0300)]
Bug 21928: (bug 18789 follow-up) Fix CircAutoPrintQuickSlip=clear

caused by commit 105b3e10e8b31b7de6d733e676c3e661a39b1280

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>
5 years agoBug 16939: (follow-up) Adding missing bracket
Aleisha Amohia [Tue, 23 Oct 2018 00:06:27 +0000 (00:06 +0000)]
Bug 16939: (follow-up) Adding missing bracket

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>
5 years agoBug 16939: (follow-up) Correction for orderreceive.tt
Owen Leonard [Tue, 29 May 2018 18:09:44 +0000 (18:09 +0000)]
Bug 16939: (follow-up) Correction for orderreceive.tt

This patch makes a change to orderreceive.tt which corresponds to the
changes made in the previous patch.

To test, apply the patch and set the AcqCreateItem system preference to
"receiving an order."

- Go to Acquisitions -> Vendor -> Receive shipment.
- Submit the "Receive a new shipment" form.
- Click "Receive" for an order line.
- Fill out the item form and click "Add item."
- The table of existing items should display correctly, with a single
  "Actions" column containing an "Edit" and "Delete" button.

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>
5 years agoBug 16939: Making all 'add to basket' actions buttons
Aleisha [Tue, 19 Jul 2016 05:03:45 +0000 (05:03 +0000)]
Bug 16939: Making all 'add to basket' actions buttons

Edit: Fixing 'clas' typo in addorderiso2709.tt
Edit: Adding actions class to td
Edit: Fixing js error
Edit: circ/reserveratios.tt updated so that the plus icon doesn't show
      if there is no link
Edit: fixing logic in circ/reserveratios.tt
Edit: merge conflicts
Edit: updating buttons to bootstrap 3, which i believe fixes the problem
      in comment 16

To test:

1) Go to Acqui -> find a vendor -> view a basket
2) Click add to basket -> fill in 'for an existing record' and hit search
3) 'View MARC' and 'Order' buttons should show under an Actions column with appropriate icons
4) Click Order
5) Click add item when you are redirected to the New order page (no need to fill in any details)
6) Confirm that 'Edit' and 'Delete' buttons now show under an Actions column with appropriate icons
7) Go back to your basket and click add to basket -> from a subscription (we are skipping from a suggestion because this already has a button before my patch)
8) Confirm that 'Order' shows as a button with appropriate icon
9) Go back to your basket and click add to basket -> from an external source
10) fill in any fields and click search to bring up results
11) 'Order' should now show as a button with appropriate icons. MARC and Card preview have been moved into a dropdown menu - confirm this works as expected. Links have not been changed when clicking on a row
12) Go back to your basket and click add to basket -> from a staged file
13) 'Add orders' should now show as a button with appropriate icon
14) Go back to your basket and click add to basket -> from titles with highest hold ratios
15) 'X to order' should now show as a button with appropriate icon

Sponsored-by: Catalyst IT
Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
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>
5 years agoBug 21909: Add return type explanation to POD
Tomas Cohen Arazi [Thu, 29 Nov 2018 15:15:33 +0000 (12:15 -0300)]
Bug 21909: Add return type explanation to POD

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>