]> git.koha-community.org Git - koha.git/log
koha.git
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>
5 years agoBug 21909: Make Koha::Account::outstanding_* preserve context
Tomas Cohen Arazi [Thu, 29 Nov 2018 15:10:21 +0000 (12:10 -0300)]
Bug 21909: Make Koha::Account::outstanding_* preserve context

This patch modifies the methods so they preserve the caller's context
(list and scalar).

To test:
- Apply the first patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> FAIL: outstanding_credits and outstanding_debits tests fail
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Account.t
=> SUCCESS: We are so happy now :-D
- Sign off :-D

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 21909: Unit tests
Tomas Cohen Arazi [Thu, 29 Nov 2018 15:08:03 +0000 (12:08 -0300)]
Bug 21909: Unit tests

This patch introduces regression tests for the behaviour to be
introduced. Both outstanding_credits and outstanding_debits methods
should return a Koha::Account::Lines object in scalar context, and a
list of Koha::Account::Line objects in list context.

To test:
- Apply this patch
- Run
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> FAIL: The current behaviour doesn't match the described

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 21817: Fix 2 failing tests
Jonathan Druart [Tue, 11 Dec 2018 15:28:53 +0000 (12:28 -0300)]
Bug 21817: Fix 2 failing tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21817: Centralize the mock of userenv from tests
Jonathan Druart [Mon, 12 Nov 2018 21:21:58 +0000 (18:21 -0300)]
Bug 21817: Centralize the mock of userenv from tests

This patch adds a new method mock_userenv from t::lib::Mocks in order to
simplify the mock of the userenv.

Test plan:
prove all the test files modified by this patch

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 21547: (follow-up) Rely on Koha::Patron->set_password checks
Tomas Cohen Arazi [Wed, 26 Dec 2018 15:25:54 +0000 (12:25 -0300)]
Bug 21547: (follow-up) Rely on Koha::Patron->set_password checks

This patch makes the controller just call $patron->set_password and use
the exceptions it might raise instead of manually checking the passwor
strength.

No behaviour change should be expected. It also removes some leftovers.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21547: Use set_password in opac-passwd and remove sub goodkey
Marcel de Rooy [Thu, 11 Oct 2018 10:00:31 +0000 (12:00 +0200)]
Bug 21547: Use set_password in opac-passwd and remove sub goodkey

Remove sql statement to change password by calling set_password.
Remove sub goodkey by calling C4::Auth::checkpw_hash.
Adding the scalar before param Oldkey (from bug 21036).

Rebased on top of 21178 (using set_password instead of update_password).

Test plan:
Try to change password in OPAC with good and bad pw.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 21754: Automatically clean up outstanding transfers on lost items
Alex Buckley [Wed, 31 Oct 2018 10:27:41 +0000 (10:27 +0000)]
Bug 21754: Automatically clean up outstanding transfers on lost items

This is an alternative to bug 21732 as transfers are automatically cancelled on marking an item lost, and the items holding rbanch is set to the transfers source ('from') branch.

When an item is marked as lost, the routine should also clean up any
outstanding transfers.

Also added tests to t/db_dependent/Circulation.t which check:
* If transfer is automatically deleted when item is marked as lost
* If the items holdingbranch automatically changes when item with
transfers on it is marked as lost.

Test plan:
1. Find a item which is in transfer, i.e. find an item with the text in
the 'Status' field of the table in detail.pl that indicates it is in
transfer
2. Set the item to 'Lost' either by clicking on Edit->Edit items from
the detail.pl page
OR
clicking on the Items tab on the left side of the detail.pl page
3. Notice that the transfer is now cancelled for the item and the items
holdingbranch is the transfers source ('from') branch
4. Run t/db_dependent/Circulation.t

Sponsored-by: Brimbank Library, Australia
Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
(fixed the introduction of a whitespace line and removed a double
declare warning from the new tests as part of QA)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21929: Typo in orderreceive.tt
Andrew Isherwood [Sat, 1 Dec 2018 10:05:38 +0000 (10:05 +0000)]
Bug 21929: Typo in orderreceive.tt

lass -> class

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21571: Make ACCTDETAILS translatable
Jonathan Druart [Tue, 16 Oct 2018 14:51:40 +0000 (11:51 -0300)]
Bug 21571: Make ACCTDETAILS translatable

This patch makes the notice "ACCTDETAILS" translatable.

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

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21844: Include itemcallnumber in lost fine description
Nick Clemens [Thu, 15 Nov 2018 18:56:00 +0000 (18:56 +0000)]
Bug 21844: Include itemcallnumber in lost fine description

To test:
 1 - Make sure WhenLostChargeReplacementFee is set to charge
 2 - Find an item with a replacement cost (or default) and a call number
 3 - Checkout the item to a patron
 4 - Mark the item lost
 5 - View the fine - the description includes title and barcode
 6 - Apply patch
 7 - Check the item in
 8 - Check it out again
 9 - Mark it lost
10 - Note the fine includes the callnumber

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21693: Make page title consistent with other pages
Katrin Fischer [Sat, 27 Oct 2018 11:49:11 +0000 (11:49 +0000)]
Bug 21693: Make page title consistent with other pages

For some reason we use 'Home' in the bread crumbs, but
'Koha' as starting point in the page title.

Changed to make consistent with other pages in Circulation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21693: Clean up checkout notes template
Owen Leonard [Fri, 26 Oct 2018 16:15:39 +0000 (16:15 +0000)]
Bug 21693: Clean up checkout notes template

This patch modifies the checkout notes template to help compliance with
coding guidelines and interface patterns:

 - Convert to Bootstrap grid
 - Improve DataTables configuration
 - Put buttons into a toolbar and move above selection links

Also corrected: Minor markup error in circ-nav.inc

To test, apply the patch and enable the AllowCheckoutNotes system
preference. Add a few checkout notes via the OPAC.

 - Go to Circulation -> Checkout notes.
   - Confirm that the page looks correct at various browser widths.
   - Confirm that the first and last columns of the table of notes are
     not sortable.
   - The table should be sorted by default by title.
   - Title sorting should ignore articles "a," "an," and "the."
   - Test with the CircSidebar preference both on and off.
     - With CircSidebar turn on, the checkout notes menu item in the
       left hand sidebar should show a count of checkout notes.

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 21695: Clean up access files template
Owen Leonard [Fri, 26 Oct 2018 18:36:59 +0000 (18:36 +0000)]
Bug 21695: Clean up access files template

This patch modifies the access files template to help
compliance with several coding guidelines:

- Bootstrap grid
- Improve DataTables configuration
- Move date formatting from the script to the template
- Markup corrections

To test you must modify koha-conf.xml to contain something like the
following:

<access_dirs>
    <access_dir>/tmp/koha-public</access_dir>
</access_dirs>

Make sure the directory exists and contains multiple files.

 - Go to Tools -> Access files
 - Confirm that the page looks correct and the layout adjusts at various
   browser widths.
 - Confirm that DataTables functionality works correctly, including
   correct sorting by date.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>