]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 20979: Fix confirm deletion popup when deleting a biblio
Jonathan Druart [Thu, 21 Jun 2018 21:06:00 +0000 (18:06 -0300)]
Bug 20979: Fix confirm deletion popup when deleting a biblio

When deleting an empty bib, error messages pops up "1 order(s) are
using this record. You need order managing permissions to delete this
record." even though user has superlibrarian permissions.  Prevents the
deletion of the bib record.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21046: Return the correct borrowernumber when there is empty cardnumber(s)
Alex Arnaud [Fri, 6 Jul 2018 13:40:53 +0000 (13:40 +0000)]
Bug 21046: Return the correct borrowernumber when there is empty cardnumber(s)

Test plan:
  - Use a patron with an empty cardnumber to authenticate with ILSDI
    AuthenticatePatron
    (cgi-bin/koha/ilsdi.pl?service=AuthenticatePatron&username=userid&password=pass),
  - make sure you have other patron(s) with empty cardnumber and there
    borrowernumber is
    smaller than the one you authenticate with,
  - you should get a wrong borrowernumber,
  - apply this patch,
  - test again, you should get the right one

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19617: (QA follow-up) Fix typo for type
Tomas Cohen Arazi [Mon, 2 Jul 2018 18:30:57 +0000 (15:30 -0300)]
Bug 19617: (QA follow-up) Fix typo for type

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19617: Allow 'writeoff of selected'
Kyle M Hall [Mon, 30 Apr 2018 16:47:26 +0000 (12:47 -0400)]
Bug 19617: Allow 'writeoff of selected'

This patch adds a writeoff equivilent to 'Pay selected'

Test Plan:
1) Apply this patch
2) Find a patron with fines
3) On the "Pay fines" tab, select one or more fines and use the
   "Write off selected" button.
4) Note the fine amount you used was written off for those fines.

Signed-off-by: Kyle M Hall <kyle@bywatetsolutions.com>
Signed-off-by: Martha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12395: (RM follow-up) Make updatedatabase statements idempotent
Nick Clemens [Fri, 6 Jul 2018 14:25:20 +0000 (14:25 +0000)]
Bug 12395: (RM follow-up) Make updatedatabase statements idempotent

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12395: DBRev 18.06.00.005
Nick Clemens [Fri, 6 Jul 2018 14:19:22 +0000 (14:19 +0000)]
Bug 12395: DBRev 18.06.00.005

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12395: Add FK constraint and use patron-title.inc
Julian Maurice [Fri, 8 Jun 2018 08:24:19 +0000 (10:24 +0200)]
Bug 12395: Add FK constraint and use patron-title.inc

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12395: (QA follow-up) Change wording for consistency and fix use CGI;
Katrin Fischer [Mon, 16 Apr 2018 21:10:15 +0000 (21:10 +0000)]
Bug 12395: (QA follow-up) Change wording for consistency and fix use CGI;

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12395: Use standard <fieldset> + <ol> markup for showorder.tt
Owen Leonard [Thu, 3 Dec 2015 18:01:46 +0000 (13:01 -0500)]
Bug 12395: Use standard <fieldset> + <ol> markup for showorder.tt

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12395: (QA follow-up) Add class/id to body tag
Katrin Fischer [Sun, 25 Oct 2015 11:32:45 +0000 (12:32 +0100)]
Bug 12395: (QA follow-up) Add class/id to body tag

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12395: Make received orders table consistent with pending orders table
Alex Arnaud [Tue, 16 Jun 2015 08:05:16 +0000 (10:05 +0200)]
Bug 12395: Make received orders table consistent with pending orders table

(links of More column)

Also change "Created by" with "Ordered by" in receive page.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12395: Display created_by even if firstname is missing on receiving
Jonathan Druart [Fri, 20 Feb 2015 10:31:52 +0000 (11:31 +0100)]
Bug 12395: Display created_by even if firstname is missing on receiving

On receiving orders, "no name" was displayed if the firstname of creator
was not filled.
The surname should be displayed.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12395: Add unit test to check created_by is correctly set
Julian Maurice [Tue, 10 Feb 2015 09:23:25 +0000 (10:23 +0100)]
Bug 12395: Add unit test to check created_by is correctly set

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12395: Save order line's creator
Julian Maurice [Mon, 9 Jun 2014 14:15:17 +0000 (16:15 +0200)]
Bug 12395: Save order line's creator

New MySQL column: aqorders.createdby

Creator's name is displayed on order's receive pages (acqui/orderreceive.pl
and acqui/parcel.pl)

On acqui/orderreceive.pl it replace the name of basket's creator
On acqui/parcel.pl, to avoid adding more data in the table of pending
orders, it is shown in a popup like MARC and Card views

Test plan:
1/ Run updatedatabase.pl
2/ Create a new order and go to the receipt page (acqui/parcel.pl)
3/ Click on "Order" link in column "More" (previously "View record")
4/ A javascript popup should appear with your name in it. Close the
popup.
5/ Click on "Receive" link
6/ Your name should appear in front of "Created by" label, to the right
of the page.

Patch updated with use of atomic update.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20650: Remove unused virtualshelves/merge.tt
Owen Leonard [Tue, 19 Jun 2018 13:02:26 +0000 (10:02 -0300)]
Bug 20650: Remove unused virtualshelves/merge.tt

Committed by Jonathan Druart, get out from first patch of this patchset.

It's a follow-up of bug 4019 which removed virtualshelves/merge.pl

Moving this change to its own commit to make it clear in the git log and
easier to backport if needed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20650: (follow-up) Add missing include file
Owen Leonard [Tue, 19 Jun 2018 12:45:07 +0000 (12:45 +0000)]
Bug 20650: (follow-up) Add missing include file

This patch adds a missing include of doc-head-open.inc.

To test, apply the patch and export a batch of patron cards. The modal
view for downloading the card batch PDF should work correctly.
Validating the iframe's source should show no relevant errors.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20650: Switch single-column templates to Bootstrap grid: Various, part 3
Owen Leonard [Tue, 24 Apr 2018 13:37:07 +0000 (13:37 +0000)]
Bug 20650: Switch single-column templates to Bootstrap grid: Various, part 3

This patch updates various unrelated templates to use the Bootstrap
grid. In each case, confirm that the indicated page looks correct.

This patch also corrects a couple of capitalization errors and removes
an unused template: virtualshelves/merge.tt.

 - Tools -> Patron card creator -> Manage -> Card batches
   - Export a batch
   - The pages inside the modal window should look correct: Both the "X
     batch(es) to export" screen and the "download exported batch(es)"
     one.

 - Tools -> Patron lists -> Edit list
   - The patron list add/edit form should look correct.

 - Disable plugins in koha-conf.xml.
   - Tools -> Plugins
   - The "Plugins disabled" page should look correct.

 - Enable plugins in koha-conf.xml
   - Tools -> Plugins -> Upload plugins.
     - This page should look correct.

 - Tools
   - The tools home page should show three columns: Patrons and
     Circulation, Catalog, Additional tools.
   - At viewport width below 768 pixels content should reflow into one
     column.

 - virtualshelves/merge.tt has been removed as it is unused. Search the
   codebase for references to it. There should be none.

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>
6 years agoBug 20641: Switch single-column templates to Bootstrap grid: Various, part 2
Owen Leonard [Mon, 23 Apr 2018 18:26:14 +0000 (18:26 +0000)]
Bug 20641: Switch single-column templates to Bootstrap grid: Various, part 2

This patch updates various unrelated templates to use the Bootstrap
grid. In each case, confirm that the indicated page looks correct.

 - Acquisitions -> Vendor -> Add to basket -> From a staged file.
 - Logged-in user menu (in the upper right) -> Search history.
 - With plugins disabled in koha-conf.xml, go to Tools -> Tools plugins.
 - With the EasyAnalyticalRecords system preference set to 'Display,'
   view a bibliographic record.
   - Choose Edit -> Link to host item.
   - Submit a barcode to be linked.
 - Configure a MARC subfield (e.g. 100$a) to use the
   unimarc_field_225a_bis plugin.
   From the MARC edit page, trigger the plugin and confirm that the
   page in the popup window looks correct. Confirm that changes made in
   the popup window are saved to the corresponding field in the editor.
 - Administration -> Funds -> Edit a fund.
   - Click 'Select owner.'
   - Search for a patron.

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>
6 years agoBug 20220: Move template JavaScript to the footer: Holds
Owen Leonard [Wed, 25 Apr 2018 18:07:42 +0000 (18:07 +0000)]
Bug 20220: Move template JavaScript to the footer: Holds

This patch modifies the holds template so that JavaScript is included in
the footer.

To test, apply the patch and initiate the process of placing a hold.
Throughout the process JavaScript-based interactions should work: Patron
autocomplete, datepickers, DataTables, cancel confirmations, etc.

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>
6 years agoBug 19709: Move template JavaScript to the footer: Labels
Owen Leonard [Tue, 8 May 2018 13:45:37 +0000 (13:45 +0000)]
Bug 19709: Move template JavaScript to the footer: Labels

This patch modifies the staff client label creator templates so that
JavaScript is included in the footer instead of the header.

To test, apply the patch and test the JavaScript-driven features of
each modified template: All button controls, DataTables functionality,
form validation, etc.

This patch also modifies the templates to use the Bootstrap grid instead
of YUI, and 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 test the following interactions:

- Creating and managing layouts
- Creating and managing batches
- Creating and managing templates
- Creating and managing printer profiles
- Creating quick spine labels

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>
6 years agoBug 20668: Update two-column templates with Bootstrap grid: Acquisitions part 2
Owen Leonard [Thu, 26 Apr 2018 18:54:44 +0000 (18:54 +0000)]
Bug 20668: Update two-column templates with Bootstrap grid: Acquisitions part 2

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

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

Staff client CSS is modified in this patch so that elements which were
styled based on the sidebar's "yui-b" class will work with <aside>.

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

- I don't have EDI set up, so to test acqui/edi_ean.tt I navigate
  directly to /cgi-bin/koha/acqui/edi_ean.pl. It's only the page
  structure we're worried about.
- Acquisitions -> Orders search
- Acquisitions -> Vendor -> Invoices -> Invoice search
  - View an invoice
  - Manage invoice files (Preference AcqEnableFiles must be enabled).
- Acquisitions -> Late orders

Patch applies and operates as described.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20667: Update two-column templates with Bootstrap grid: Acquisitions part 1
Owen Leonard [Thu, 26 Apr 2018 18:34:31 +0000 (18:34 +0000)]
Bug 20667: Update two-column templates with Bootstrap grid: Acquisitions part 1

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

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

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

- Acquisitions -> Home page
- Acquisitions -> Vendor search results
- Acquisitions -> Vendor -> Basket groups
  -> Edit
- Acquisitions -> EDIFACT messages
  -> View EDIFACT message

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20731: Move template JavaScript to the footer: Call number browser MARC plugin
Owen Leonard [Wed, 3 Jan 2018 17:41:09 +0000 (17:41 +0000)]
Bug 20731: Move template JavaScript to the footer: Call number browser MARC plugin

This patch modifies the call number browser plugin so that JavaScript is
in the footer instead of the header.

This patch also makes some unrelated changes: The page title has been
corrected; DataTables code has been removed as it was unused.

To test, apply the patch and configure a MARC framework to use
cn_browser.pl as the plugin for tag 952 subfield o.

Open an item for editing. The "Full call number" field should have an
active "..." link next to it. Clicking this should trigger a popup
window with the Call number browser. Confirm that submitting a new
search from this window works correctly.

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>
6 years agoBug 20980: DBRev 18.06.00.004
Nick Clemens [Fri, 6 Jul 2018 12:56:54 +0000 (12:56 +0000)]
Bug 20980: DBRev 18.06.00.004

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20980: (QA follow-up) Do not delete existing data on tests fix
Tomas Cohen Arazi [Fri, 6 Jul 2018 12:22:29 +0000 (09:22 -0300)]
Bug 20980: (QA follow-up) Do not delete existing data on tests fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20980: (follow-up) Offset name consistency
Tomas Cohen Arazi [Sat, 23 Jun 2018 10:41:15 +0000 (07:41 -0300)]
Bug 20980: (follow-up) Offset name consistency

This patch makes 'credit' account types generate 'Manual Credit' offset.
The original patch used 'Payment' but I think the code wants to
distinguish between payments and manually added credits (otherwise they
would've picked the same accounttype value, and they don't.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20980: (follow-up) Only use UpdateStats for 'payment' and 'writeoff'
Tomas Cohen Arazi [Fri, 22 Jun 2018 15:24:33 +0000 (12:24 -0300)]
Bug 20980: (follow-up) Only use UpdateStats for 'payment' and 'writeoff'

This patch makes Koha::Account::add_credit record statistics logs
(through C4::Stats::UpdateStats) only for the 'payment' and 'writeoff'
credit types.

Both credit types are whitelisted in UpdateStats, so we keep the current
behaviour. Another option would've been to add new account types to the
white list, but with the account offsets it seems that using the
statistics table for account changes won't be useful for too long, as
offsets contain the same (and more) information.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20980: Make mancredit.pl use Koha::Account::add_credit
Tomas Cohen Arazi [Fri, 22 Jun 2018 15:23:47 +0000 (12:23 -0300)]
Bug 20980: Make mancredit.pl use Koha::Account::add_credit

This patch makes creating a manual credit from the UI record the account
offset as 'Manual Credit', and properly set account_offsets.credit_id
instead of account_offsets.debit_id.

To test:
- Create a manual credit (of 'Credit' type) for a known patron (acevedo?)
- Run:
  $ sudo koha-mysql kohadev
  > SELECT * FROM account_offsets;
=> FAIL: The account offset for the manual credit has type=Manual Debit,
    credit_id=NULL and debit_id=accountlines_id
- Run the atomic update:
  $ updatedatabase
- Run:
  $ sudo koha-mysql kohadev
  > SELECT * FROM account_offsets;
=> SUCCESS: The account offset has been corrected and now has
type=Manual Credit, credit_id=accountlines_id and debit_id=NULL
- Create a new manual credit (of 'Forgiven' type) for a known patron
- Run:
  $ sudo koha-mysql kohadev
  > SELECT * FROM account_offsets;
=> SUCCESS: The account offset has been stored correctly as a credit!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20980: Add 'Manual Credit' and fix existing offsets
Tomas Cohen Arazi [Thu, 21 Jun 2018 17:43:34 +0000 (14:43 -0300)]
Bug 20980: Add 'Manual Credit' and fix existing offsets

This patch adds a new offset type 'Manual Credit'. And adds an atomic
update for fixing existing offsets.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20978: (QA follow-up) Do not delete existing data on tests
Tomas Cohen Arazi [Fri, 6 Jul 2018 12:11:32 +0000 (09:11 -0300)]
Bug 20978: (QA follow-up) Do not delete existing data on tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20978: (follow-up) POD completeness
Tomas Cohen Arazi [Wed, 27 Jun 2018 13:37:24 +0000 (10:37 -0300)]
Bug 20978: (follow-up) POD completeness

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20978: (follow-up) Another use case from C4::Circulation
Tomas Cohen Arazi [Thu, 21 Jun 2018 16:33:46 +0000 (13:33 -0300)]
Bug 20978: (follow-up) Another use case from C4::Circulation

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20978: Add Koha::Account::add_credit
Tomas Cohen Arazi [Thu, 21 Jun 2018 16:04:01 +0000 (13:04 -0300)]
Bug 20978: Add Koha::Account::add_credit

This patch adds:
- Koha::Account::add_credit
- A single source of truth for accounttype and offset_type values

To test:
- Apply the first patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> FAIL: Tests fail!
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Account.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20978: Unit tests
Tomas Cohen Arazi [Thu, 21 Jun 2018 16:03:13 +0000 (13:03 -0300)]
Bug 20978: Unit tests

This patch adds unit tests for Koha::Account::add_credit.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20969: (follow-up) Move focus to textarea whe modal is shown
Owen Leonard [Tue, 26 Jun 2018 13:40:22 +0000 (13:40 +0000)]
Bug 20969: (follow-up) Move focus to textarea whe modal is shown

This follow-up adds code to move the mouse cursor to the modal window's
textarea when the modal is displayed.

To test, apply the patch and test the process of adding/editing notes on
an order. Confirm that the focus moves to the textarea when the note
editor modal window is shown.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20969: Use modal to add and edit notes from basket
Owen Leonard [Wed, 20 Jun 2018 12:39:05 +0000 (12:39 +0000)]
Bug 20969: Use modal to add and edit notes from basket

This patch modifies the acquisitions basket page so that links to add or
edit vendor or internal notes trigger a modal with the notes edit form
instead of redirecting to a different page. This is a markup change only
-- The form still submits to modordernotes.pl.

To test, apply the patch and view a basket in acquisitions which has
multiple orders. Test various note controls:  Add internal note, Add
vendor note, Edit internal note, edit vendor note.

Confirm that the operations work correctly with multiple orders in the
basket.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20710: Update MARC21 frameworks to Update 26 (April 2018)
Bernardo Gonzalez Kriegel [Fri, 4 May 2018 22:49:07 +0000 (19:49 -0300)]
Bug 20710: Update MARC21 frameworks to Update 26 (April 2018)

This bug add update 26 changes.

Update 26
http://www.loc.gov/marc/bibliographic/bdapndxg.html

New subfields 377$3, 380$3, 381$3, 383$3, 730$4

Codes
    Map 007/04 'x' new
    Map 007/06 'c' renamed

No auth changes

To test:
1) Apply Bug 19835
2) Apply this patch
3) Reload marc21 bibliografic frameworks, check loads ok
4) Clean your browser cache
5) Edit a new bib record, fire 007 plugin,
    for Map, 04 position, check new 'x'
    for Map, 06 position, check renamed 'c'

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>
6 years agoBug 19849: Make a string translatable again after a rebase error
Victor Grousset [Wed, 20 Dec 2017 16:13:40 +0000 (17:13 +0100)]
Bug 19849: Make a string translatable again after a rebase error

Bug 16621 reverted part of bug 12509
1. Log in the OPAC and staff interface
2. Restrict the user logged in the OPAC (restricting yourself works)
   Staff interface → Patron page → Restrictions → Add manual restriction
   Put this comment the "OVERDUES_PROCESS Give the books back or we're comming!"
3. Install the fr_FR locale and switch the interface to it
4. Go to OPAC: /cgi-bin/koha/opac-user.pl
5. Then you should see the ugly comment with "OVERDUES_PROCESS"
6. Apply this patch
7. Update the translation: ./translate update or equivalent
8. Open misc/translator/po/fr-FR-opac-bootstrap.po
9. Find the string containing "Restriction added by overdues process"
10. Remove the fuzzy flag
11. Install the language
12. Refresh the page in the OPAC
13. Then you should see the translation + the comment instead of "OVERDUES_PROCESS" + the comment

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>
6 years agoBug 19849: Minor fixes & refactor of opac-reserve.tt & opac-user.tt
Victor Grousset [Wed, 20 Dec 2017 14:15:49 +0000 (15:15 +0100)]
Bug 19849: Minor fixes & refactor of opac-reserve.tt & opac-user.tt

- make next patch easely reviewable.
- fix lone quote. (Replace by <strong>
- add forgotten condition for 9999-12-31

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>
6 years agoBug 7136: Correct description of Grace period for subscriptions
Katrin Fischer [Wed, 16 May 2018 02:25:38 +0000 (02:25 +0000)]
Bug 7136: Correct description of Grace period for subscriptions

The grace period is used with the serialsUpdate.pl cronjob. It will
generate the next issue and set the one before to 'Late' with
an optional note.

There is on trace of a 'waiting' status for serials.

To test:
- check help file on the subscription edit form for
  the description of the 'Grace period'.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20507: Shelf browser does not update image sources when paging
Owen Leonard [Tue, 26 Jun 2018 13:05:42 +0000 (13:05 +0000)]
Bug 20507: Shelf browser does not update image sources when paging

This patch updates the shelfbrowser include so that the system
preference check for Coce will function correctly.

To test, apply the patch and test the OPAC shelf browser with each of
the enhanced content options enabled: Coce, Amazon, Google. In each
case, page through the shelf browser to confirm that covers load
correctly.

Signed-off-by: Cab Vinton <bibliwho@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20703: (RM follow-up) Remove the word 'Payment' from void
Nick Clemens [Fri, 6 Jul 2018 11:13:49 +0000 (11:13 +0000)]
Bug 20703: (RM follow-up) Remove the word 'Payment' from void

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20703: Add confirmation modal when making a credit void
Tomas Cohen Arazi [Tue, 22 May 2018 14:46:10 +0000 (11:46 -0300)]
Bug 20703: Add confirmation modal when making a credit void

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20703: Add ability to void any credit
Kyle M Hall [Thu, 3 May 2018 13:17:06 +0000 (09:17 -0400)]
Bug 20703: Add ability to void any credit

At this time, only payments may be voided. There is no reason to have this limitation. There are situations where a librarian may need to void an accidental writeoff, or perhaps void an automatic credit that was created by Koha. For illustration, this is directly from a partner library:

"For example a lost book refund becomes a credit on account.  Presently the credit may be applied to a fine for a different item charged to patron. We perform a write off to clear the remaining credit, then add the fine back to the account and give the patron a refund for the lost/refunded amount. Our accounting system ask that we keep the Lost funds/refunds separate from all fines."

Test Plan:
1) Create a fine and write it off
2) Note there is no 'void' button for the writeoff
3) Apply this patch
4) Note the buttons now show
5) Test each button on a writeoff

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20946: (QA follow-up) make outstanding_debits return the account lines only
Tomas Cohen Arazi [Mon, 2 Jul 2018 15:05:55 +0000 (12:05 -0300)]
Bug 20946: (QA follow-up) make outstanding_debits return the account lines only

This patch was discussed with Jonathan on a QA conversation. It is
better to keep this simpler and more reusable. And is the right approach
in this case.

This patch makes Koha::Account::outstanding_debits return the account
lines, and a method is added to Koha::Account::Lines so the outstanding
amount is calculated on the resultset. This is done the dame way it was
done before, and the tests got adjusted.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20946: (RM follow-up) Additional tests and fix addition to undef
Nick Clemens [Wed, 27 Jun 2018 03:53:27 +0000 (03:53 +0000)]
Bug 20946: (RM follow-up) Additional tests and fix addition to undef

Added a few tests with credit lines and found we got warnings, adjusted
the routine to avoid this

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20946: Additional unit tests for 0 lines edge case
Kyle M Hall [Tue, 26 Jun 2018 13:20:26 +0000 (13:20 +0000)]
Bug 20946: Additional unit tests for 0 lines edge case

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20946: Reduce number of db calls
Kyle M Hall [Tue, 26 Jun 2018 13:08:36 +0000 (13:08 +0000)]
Bug 20946: Reduce number of db calls

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20946: Use K::Account->outstanding_debits in pay.pl and paycollect.pl
Tomas Cohen Arazi [Sat, 16 Jun 2018 12:44:19 +0000 (09:44 -0300)]
Bug 20946: Use K::Account->outstanding_debits in pay.pl and paycollect.pl

This patch changes the how account lines are fetched (using
Koha::Account->outstanding_debits) so credits are not picked.

To test:
- Add a $5 credit to a patron
- Add a $1 fine
- Go to the 'Pay fines' tab
=> FAIL: Credit is displayed
- Try to pay all fines
=> FAIL: You are told to enter a value less than or equal to -4.00
         (Observe you cannot do that)
- Apply this patch
- Reload
=> SUCCESS: Credit is not displayed
=> SUCCESS: You are able to pay all fines
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20946: Add Koha::Account::outstanding_debits
Tomas Cohen Arazi [Sat, 23 Jun 2018 08:41:00 +0000 (05:41 -0300)]
Bug 20946: Add Koha::Account::outstanding_debits

This patch adds a handy method that returns the total for outstanding
debits (i.e. those that haven't been canceled with credits), and the
corresponding Koha::Account::Line objects.

Unit tests are added.

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21029: Make "Suspend until:" translatable
Jonathan Druart [Wed, 4 Jul 2018 17:55:14 +0000 (14:55 -0300)]
Bug 21029: Make "Suspend until:" translatable

The label was part of the holds.js file. As .js files are never
translatable it needs to be moved to template level.

Test plan:
- Place a hold on an item
- Go to the patron account
- Click on the Suspend button on the holds tab
- View the modal, the label before the date field "Suspend until:" is
now translatable.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21020: Fix return branch on transfer - SIP
Jonathan Druart [Fri, 29 Jun 2018 13:06:31 +0000 (10:06 -0300)]
Bug 21020: Fix return branch on transfer - SIP

Caused by
  commit 546379cc92b733cb29a0b70247a72c770afdad26
  Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls

Since this commit AddReturn return a Koha::Issue object, not a hashref
with item's info.

Test plan:
1 - Enable SIP server on your test instance
   For kohadevbox:
   cp /etc/koha/SIPConfig.xml /etc/koha/sites/kohadev/
   create patron with user/pass term1/term1 and grant circulation
   privileges
2 - enable AutomaticItemReturn
3 - Checkin an item which will generate a transfer via SIP2:
   perl /home/vagrant/kohaclone/misc/sip_cli_emulator.pl -a localhost -p
   6001 -su term1 -sp term1 -l LPL --item {BARCODE} -m checkin -t
   CR
4 - Note no CT field
5 - Apply patch
6 - Repeate checkin via SIP2
7 - Transfer destination is correctly returned in CT

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoRevert "Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated"
Jonathan Druart [Fri, 29 Jun 2018 18:39:19 +0000 (15:39 -0300)]
Revert "Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated"

This reverts commit ce6ec1e7faef217950e3450788ea444dad26d7c0.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20651: Improve full supplier metadata display
Andrew Isherwood [Tue, 24 Apr 2018 15:03:40 +0000 (16:03 +0100)]
Bug 20651: Improve full supplier metadata display

This patch improves the display of the extra metadata that may be
returned by an ILL supplier.

The display of the metadata has been moved from the "Toggle full
supplier metadata" link at the bottom of the page to a button on the
right of the request toolbar, labelled "Display supplier metadata".
Clicking this button opens a modal displaying the metadata.

To test:
1) Ensure ILL is enabled and you have at least one request
2) From the "View ILL requests" page, click "Manage request" on a
request
3) Click the "Display supplier metadata" button on the right of the
toolbar
4) Observe that a modal opens containing the metadata

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
The modal looks good!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20467: (QA follow-up) Display error if no or invalid course id is passed
Kyle M Hall [Fri, 6 Apr 2018 18:50:38 +0000 (14:50 -0400)]
Bug 20467: (QA follow-up) Display error if no or invalid course id is passed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20467: Remove useless use statements
Jonathan Druart [Thu, 5 Apr 2018 16:52:12 +0000 (13:52 -0300)]
Bug 20467: Remove useless use statements

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20467: (QA follow-up) Filter barcodes, remove selector code, use template plugins
Kyle M Hall [Tue, 3 Apr 2018 10:35:01 +0000 (06:35 -0400)]
Bug 20467: (QA follow-up) Filter barcodes, remove selector code, use template plugins

Removes selector code as batch changes cannot have a previous selection.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20467: (QA follow-up) Add Branches plugin to template
Kyle M Hall [Thu, 29 Mar 2018 11:33:16 +0000 (07:33 -0400)]
Bug 20467: (QA follow-up) Add Branches plugin to template

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20467: Add ability to batch add items to a course
Kyle M Hall [Fri, 23 Mar 2018 01:03:00 +0000 (01:03 +0000)]
Bug 20467: Add ability to batch add items to a course

Some librarians have requested the ability to batch add items to a
course using the same settings for all items.

Test Plan:
1) Apply this patch
2) Create a new course
3) Click the new 'Batch add reserves' button
4) Enter some valid and invalid barcodes in the text box, add some settings
5) Submit the batch, note the results list added items and invalid barcodes
6) Note the valid items were added to the course

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20709: (follow-up) Update GERMAN MARC frameworks to Update 26 (April 2018)
Katrin Fischer [Fri, 11 May 2018 05:52:51 +0000 (07:52 +0200)]
Bug 20709: (follow-up) Update GERMAN MARC frameworks to Update 26 (April 2018)

A follow-up in line with bug 20710.

Again, the files used here have been generated automatically
from the po files on translate.koha-community.org.

To test:
- Make sure the de-DE installer can install all mandatory files cleanly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested using de-DE installer, all files load Ok
No errors

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20709: Update GERMAN MARC frameworks to Updates 23+24+25 (Nov 2016, May and Dec...
Katrin Fischer [Thu, 3 May 2018 22:32:26 +0000 (22:32 +0000)]
Bug 20709: Update GERMAN MARC frameworks to Updates 23+24+25 (Nov 2016, May and Dec 2017)

Translation of bibliographic and authority frameworks can be done
using translate.koha-community.org.

Updated and translated files will then be provided for download.

See: http://lists.koha-community.org/pipermail/koha-translate/2018-April/002721.html

To test:
- Verify SQL is correct and frameworks load without problem

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19835: (follow-up) Correct formatting in a few places
Katrin Fischer [Sat, 28 Apr 2018 20:54:14 +0000 (20:54 +0000)]
Bug 19835: (follow-up) Correct formatting in a few places

In some places - was used insted of --, changed for
consistency with existing descriptions.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19835: Fix MARC21 frameworks revision date
Bernardo Gonzalez Kriegel [Thu, 26 Apr 2018 15:36:35 +0000 (12:36 -0300)]
Bug 19835: Fix MARC21 frameworks revision date

This followup updates revison number and date

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>
6 years agoBug 19835: Fix repeatability on MARC21 subfields
Bernardo Gonzalez Kriegel [Thu, 26 Apr 2018 13:52:50 +0000 (10:52 -0300)]
Bug 19835: Fix repeatability on MARC21 subfields

This followup fixes all repeatability cases, from
updates 23+24+25 and a few older ones.

To test:
0) Apply both patches
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check repeatability...

Bibs and auth frameworks checked against LOC description.

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>
6 years agoBug 19835: Update MARC frameworks to Updates 23+24+25 (Nov 2016, May and Dec 2017)
Bernardo Gonzalez Kriegel [Thu, 26 Apr 2018 02:57:40 +0000 (23:57 -0300)]
Bug 19835: Update MARC frameworks to Updates 23+24+25 (Nov 2016, May and Dec 2017)

There are a bunch of updates, summary below

1) Update 23
1.a) Bibs
New fields: 647 885
New subfields
e in 752
0 in 257 377
3 in 382
4 in 752

Changes
028 redefined
a renamed in 028
b renamed in 046
d renamed in 046

1.b) Auth
New Fields: 075 147 447 547 677 747 885
New Subfields: 0 in 377

2) Update 24
2.a) Bibs
New subfields
b in 567
g in 340
i in 370 386
0 in many fields
2 in 567
3 in 370
4 in 370 386

Changes
g renamed in 370
4 'Relationship code' -> 'Relationship' many fields
4 'Relator code'      -> 'Relationship' many fields

2.b) Auth
New subfields
i in 370 386
0 in 050 052 053 055 060 065 070 080 087
3 in 370
4 in 370 386

Changes
g in 370
4 'Relationship code' -> 'Relationship' many fields
4 'Relator code'      -> 'Relationship' in 371

3) Update 25
3.a) Bibs
New fields: 758
New subfields
r in 777
u in 777
z in 777
1 in many fields

Changes
d renamed in 111 611 711 811
s repeatable in many fields

3.b) Auth
New subfields
1 in many fields

Changes
d in 111 411 511 711
s repeatable in many fields

For more detail:
Update 23
bibs https://www.loc.gov/marc/up23bibliographic/bdapndxg.html
auth https://www.loc.gov/marc/up23authority/adapndxf.html

Update 24
bibs https://www.loc.gov/marc/up24bibliographic/bdapndxg.html
auth https://www.loc.gov/marc/up24authority/adapndxf.html

Update 25
bibs https://www.loc.gov/marc/bibliographic/bdapndxg.html
auth https://www.loc.gov/marc/authority/adapndxf.html

To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check new fields/subfields

Repeatability checks on followup

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>
6 years agoBug 20272: Changes for Breeding.pm and Record.pm
Marcel de Rooy [Thu, 22 Feb 2018 14:46:12 +0000 (15:46 +0100)]
Bug 20272: Changes for Breeding.pm and Record.pm

In Breeding.pm we let Z3950Search return the xslt handler error codes back
to the template. They are converted to text messages by using an new include
file (added for opac and intranet now). The generic xslt_err code is now
obsoleted.

In Record.pm the errstr call is removed. The croak is done with the new
error code in err. This seems sufficient.

Test plan:
[1] Run Breeding.t
[2] Run Record.t
[3] Add a nonexisting xslt file to one of your Z3950 targets. Search on that
    target and check if you see a error 'XSLT file not found'.

The bonus is these error messages are now translatable as they are in
the templates

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20272: Replace error numbers by codes in XSLT_Handler
Marcel de Rooy [Thu, 22 Feb 2018 13:52:29 +0000 (14:52 +0100)]
Bug 20272: Replace error numbers by codes in XSLT_Handler

We remove the error numbers 1 to 7 by readable codes.
And remove the errstr attribute (not used widely).
Make XSLT_Handler a little bit less noisy by defaulting print_warns to
false unless $ENV{DEBUG} is set. (See also bug 19018).

The unit has been changed accordingly.
(A few warnings are no longer tested.)

Test plan:
Run t/db_dependent/XSLT_Handler.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20495: (follow-up) Correct search for report by name
Nick Clemens [Fri, 25 May 2018 03:01:48 +0000 (03:01 +0000)]
Bug 20495: (follow-up) Correct search for report by name

Ultimately we should probably remove name access as it is not a unique
id, but this should preserve existing behaviour

To test:
Create a report
Use the service link to confirm the report runs
Replace id=# parameter with name=XXXXXX
Confirm URL works

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note: We should not remove the param "name", it's a feature, see bug 8256.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20495: Remove get_saved_report
Nick Clemens [Thu, 29 Mar 2018 13:32:19 +0000 (13:32 +0000)]
Bug 20495: Remove get_saved_report

To test:
1 - prove t/db_dependent/Reports/Guided.t
2 - grep "get_saved_report" - ensure there are no occurences of the
singular form
3 - create, save, edit, and convert a report
4 - access a public report and report json from opac and staff client
5 - Ensure all function as expected

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20793: (follow-up) Add style to the non-link hold count on detail page
Owen Leonard [Tue, 22 May 2018 16:29:09 +0000 (16:29 +0000)]
Bug 20793: (follow-up) Add style to the non-link hold count on detail page

This small follow-up changes the style on the bibliographic detail page
of the hold count so that it looks similar whether it's a link to holds
or not.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20793: Don't show a holds link in staff for users without permission
Katrin Fischer [Sun, 20 May 2018 00:42:28 +0000 (02:42 +0200)]
Bug 20793: Don't show a holds link in staff for users without permission

On the results list in staff the 'Holds (x)' link always shows
independent of the permissions of the staff user.

This patch tightens the permission checks on the result page
to explicitly check for the place_holds permission.

To test:
- Create a staff user with place_holds permission
- Check the result list, you should see 2 links to the
  holds page:
  - 'Place holds' on top of the results list
  - 'Holds (x)' at the bottom of each entry in the results
     list
  - Verify both links work
- Create a staff user without place_holds_permission
  - Without the patch you'll see the second link,
    but it will lead to a permission error
  - With the patch you'll still see the 'Holds (x)', but
    it will no longer be a link.
- Go to the detail page of a record with an existing hold.
  - Repeat test with both staff users.
  - One time the Hold information in the bibliographic information
    should show as a link, the other time as a simple text.

Displaying the information about existing holds still make sense
as this is the current beheviour.

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>
6 years agoBug 7547: (RM follow-up) Compiled css
Nick Clemens [Mon, 2 Jul 2018 11:51:20 +0000 (11:51 +0000)]
Bug 7547: (RM follow-up) Compiled css

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7547: (QA follow-up) Make button background transparent for consistency
Josef Moravec [Wed, 27 Jun 2018 13:00:17 +0000 (13:00 +0000)]
Bug 7547: (QA follow-up) Make button background transparent for consistency

Test plan:
Add some records to cart in opac and show the cart, look at the print button/link
--> without patch it has darker background than other buttons
--> with this patch it has the same background

Note: tested wir firefox 45, firefox 60 and chromium 66

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7547: printing a sorted cart
Owen Leonard [Thu, 21 Jun 2018 17:31:44 +0000 (17:31 +0000)]
Bug 7547: printing a sorted cart

This patch adds a DataTables-generated print button to the OPAC cart. To
make that process easier, the DataTables plugin has been upgraded to the
latest version (1.10.18) with the Buttons plugin included.

Changes to the OPAC LESS file style the DataTables button to look like
the static version.

Other templates in the OPAC which use the DataTables plugin have been
modified to use up-to-date option names.

To test, apply the patch and add several titles to the cart.

 - Open the cart
 - Re-sort the cart using something other than the default sort
 - Click the 'Print' button.
   - A print view should open in a separate window, sorted correctly,
     and automatically show the print dialog.
 - Click the cart's 'More details' button and click the print button.
   - This should trigger the print dialog directly.

 - Test DataTables sorting on other modified pages:
    - Bibliographic detail page (holdings table)
    - Course reserves (table of courses)
      - Course details (table of titles)
    - Full subscription history
      - Detail page for a subscription -> More details -> Full history
    - Most popular
    - Purchase suggestions
    - Self checkouts
    - Tag cloud
    - Your fines
    - Your interlibrary loan requests
    - Your reading history
    - Your search history
    - Your search IDREF for ppn (I don't know how to test this)

The DataTables plugin is removed from "Your routing lists" and Self
check-in because it is unused.

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>
6 years agoBug 20999: Remove invalid 'style="block"' from OPAC templates
Owen Leonard [Tue, 26 Jun 2018 15:17:21 +0000 (15:17 +0000)]
Bug 20999: Remove invalid 'style="block"' from OPAC templates

This patch removes an invalid attribute from OPAC template markup. There
should be no visible change to the OPAC.

To test, apply the patch and confirm that the following pages still look
correct when using various cover image sources: Coce, Amazon, Google:

 - Bibliographic detail page (opac-detail.pl)
   - The shelf browser
 - Catalog search results
 - Recent comments

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15360: Incorrect or mislabeled behavior on Authorities "New from Z39.50" Button
Owen Leonard [Thu, 31 May 2018 13:29:33 +0000 (13:29 +0000)]
Bug 15360: Incorrect or mislabeled behavior on Authorities "New from Z39.50" Button

This patch makes a third stab at resolving this issue by reorganizing
the authorities toolbar buttons to more closely match the bibliographic
toolbar buttons:

 - "New from Z39.50" has been added to the "New authority" dropdown.
 - "Edit" is now a dropdown, like on the bibliographic detail page:
    - Edit record
    - Edit as new (duplicate)
    - Replace record via Z39.50/SRU
    - Delete record

To test, apply the patch and go to the authorities module. Testing with
existing Z39.50 authority sources configured:

  - On the authorities home page and the authorities search results
    page, the "New authority" menu should have a "New from Z39.50" link.
  - View the details for an authority record. The menus should appear as
    described above. Test each option.

Remove all Z39.50 authority servers and test again. The "New from
Z39.50" link should no longer appear.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20920: (follow-up) generated d/control
Mirko Tietgen [Fri, 29 Jun 2018 20:25:33 +0000 (22:25 +0200)]
Bug 20920: (follow-up) generated d/control

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20920: Add missing dependency on CGI::Compile
Jérôme Charaoui [Wed, 20 Jun 2018 18:25:20 +0000 (14:25 -0400)]
Bug 20920: Add missing dependency on CGI::Compile

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20559: Compiled CSS
Owen Leonard [Mon, 25 Jun 2018 15:00:42 +0000 (15:00 +0000)]
Bug 20559: Compiled CSS

This patch contains the compiled OPAC CSS.

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>
6 years agoBug 20559: Occurrences of loading-small.gif still exist
Owen Leonard [Mon, 25 Jun 2018 14:54:08 +0000 (14:54 +0000)]
Bug 20559: Occurrences of loading-small.gif still exist

This patch removes some leftover references to a file which no longer
exists. In the OPAC, loading-small.gif was included in CSS which was
never used. In the staff client, loading-small.gif should have been
corrected to spinner-small.gif.

To test, apply the patch and go to Tools -> Batch record modification.

 - Submit a batch of records to modify
 - In the table of titles which will be modified, click the 'Show MARC'
   button.
   - The modal preview window should show "Loading" and an animated
     spinner before the MARC record is loaded.

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>
6 years agoBug 20931: JS error "ReferenceError: $ is not defined" when CircSidebar is turned on
Owen Leonard [Wed, 20 Jun 2018 17:16:16 +0000 (17:16 +0000)]
Bug 20931: JS error "ReferenceError: $ is not defined" when CircSidebar is turned on

This patch reorganizes the way sidebar menus get highlighted based on
the current page. A global function is added to handle most cases.
Individual menu-handling scripts have been modified to handle only the
edge cases which aren't covered by the global one.

A new class is added to the global CSS file so that highlighted menu
links can be custom-styled.

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

View various pages to confirm that current-page-highlighting in the
sidebar menu is working correctly and that there are no JS errors in the
browser console. For example:

 - Administration -> Currencies and exchange rates.
 - Acquisitions -> Invoices
 - Tools -> Patron lists
 - Tools -> Export

And with CircSidebar turned on test various circulation pages, e.g.

 - Circulation -> Set library

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20977: Javascript vars used in confirm_deletion in catalog.js do not match string...
Kyle M Hall [Thu, 21 Jun 2018 15:11:54 +0000 (11:11 -0400)]
Bug 20977: Javascript vars used in confirm_deletion in catalog.js do not match strings in catalog-strings.inc

The naming mismatch can cause javascript errors.

Test Plan:
1) Confirm the string vars used in catalog.js match the ones in
   catalog-strings.inc

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17153: Redirect to search when logging in from search
Lee Jamison [Wed, 30 May 2018 00:26:56 +0000 (00:26 +0000)]
Bug 17153: Redirect to search when logging in from search

This patch is a fresh attempt at redirecting back to search
results after logging in on opac-search.pl

To test:
- Perform an OPAC search
- Login on opac-search.pl with the search results displayed
- The page is redirected to opac-user.pl
- Log out
- Apply the patch
- Perform a new OPAC search
- Note the URL query string
- Login on opac-search.pl with the search results displayed
- The opac-search.pl page should be displayed with the correct
  query string and the page should indicate a logged in status

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20921: (RM follow-up) Fix QA pod errors
Nick Clemens [Fri, 29 Jun 2018 20:46:08 +0000 (20:46 +0000)]
Bug 20921: (RM follow-up) Fix QA pod errors

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20921: Add selenium tests for .loggedinusername
Jonathan Druart [Mon, 25 Jun 2018 19:48:59 +0000 (16:48 -0300)]
Bug 20921: Add selenium tests for .loggedinusername

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20921: Fix opac_auth for selenium
Jonathan Druart [Mon, 25 Jun 2018 19:48:21 +0000 (16:48 -0300)]
Bug 20921: Fix opac_auth for selenium

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20921: Add borrowernumber and branchcode as html attributes
Nick Clemens [Tue, 12 Jun 2018 15:57:56 +0000 (15:57 +0000)]
Bug 20921: Add borrowernumber and branchcode as html attributes

To test:
1 - Apply patch
2 - Visit the opac
3 - Sign in
4 - You should not see any difference
5 - Inspect the element  'Welcome, {username}'
6 - Note the attributes for borrowernumber and branchcode
7 - Add to OPACUserJS:
$(document).ready(function(){
    console.log( $(".loggedinusername").attr('data-branchcode'));
    console.log( $(".loggedinusername").attr('data-borrowernumber'));
});
8 - Check the console and note you can see the info expected

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20585: Label surname as name for organisation type patrons
Owen Leonard [Thu, 21 Jun 2018 18:33:23 +0000 (18:33 +0000)]
Bug 20585: Label surname as name for organisation type patrons

This patch modifies the patron edit page so that the label for an
organization name is "Name" instead of "Surname."

To test, apply the patch and edit both an institutional patron and a
regular patron. Confirm that the name/surname label is correct in each
case.

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>
6 years agoBug 20520: Re-indent moremember.tt
Owen Leonard [Wed, 4 Apr 2018 17:50:48 +0000 (17:50 +0000)]
Bug 20520: Re-indent moremember.tt

This patch reindents the template for the patron detail page,
moremember.tt:

- Trailing spaces removed
- Indentation changed to a consistent 4 spaces
- Markup indentation made more consistent

To test, view the patron detail page. There should be no visible
difference before and after the applying the patch.

HTML validation before and after the patch should return the same
results.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 10348: Show number of items on tab headings in the staff client
Owen Leonard [Mon, 25 Jun 2018 19:55:03 +0000 (15:55 -0400)]
Bug 10348: Show number of items on tab headings in the staff client

This patch uses Template Toolkit's size() method to add a count to
the bibliographic detail page's holdings and images tabs.

To test, apply the patch and view the detail page for a record in
the staff client. Check under the following conditions:

- The SeparateHoldings system preference is set to "Don't separate"
  - The holdings tab should show the correct item count.
- The SeparateHoldings system preference is set to "Separate"
  - The "[Library] holdings" tab and "Other holdings" tabs should
    have the correct item counts.
- With LocalCoverImages enabled the "Images" tab should show the
  correct count of attached images. Test with zero or more attached
  images.

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>
6 years agoBug 20991: Do not lost patron's category when editing a patron
Jonathan Druart [Tue, 26 Jun 2018 16:04:01 +0000 (13:04 -0300)]
Bug 20991: Do not lost patron's category when editing a patron

If there is an error in the edit patron form the patron's category is
lost.
This seems to be a long standing bug.

Test plan:
- Edit an existing patron
- Change the patron category to a category that triggers the error that
the user is not in the right age range for that new category
- Save, error is triggered
=> Without this patch the patron category has been reset

You should also test different ways to edit/add a patron (quick add,
step 1)

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>
6 years agoBug 17886: Don't show option to add to existing list if there are no lists
Caitlin Goodger [Tue, 29 May 2018 17:32:12 +0000 (17:32 +0000)]
Bug 17886: Don't show option to add to existing list if there are no lists

This patch modifies the page for adding a title to a list so that the
"Add to existing list" option doesn't appear if there are no lists
defined.

TEST PLAN
---------
1) Make sure no lists exist at all.
2) Make there is at least one findable biblio record entered
3) Find that biblio record in the OPAC
4) Click 'Save to your lists'
   -- Notice that the whole save to list section is there.
5) Apply this patch
6) Click 'Cancel'
7) Click 'Save to your lists'
   -- Notice you can only add now, which makes sense.
8) Run koha qa test tools.

Perform the same tests in the staff client.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 14222: Sort holds in OPAC by priority
Owen Leonard [Thu, 21 Jun 2018 14:32:52 +0000 (14:32 +0000)]
Bug 14222: Sort holds in OPAC by priority

This patch modifies the markup of the users's holds table in the OPAC so
that if hold priority is displayed, the table will be sorted by that
number.

To test, apply the patch and set the OPACShowHoldQueueDetails system
preference to "Show priority level" or "Show holds and their priority
level."

 - Log in to the OPAC as a user who has multiple holds with various
   priorities. Include priorities which could be sorted incorrectly
   using a text sort, e.g. 1, 10.
 - View the holds tab on the "your summary" page. Confirm that the
   priority column is sorted by default with the lowest priority holds
   first.
 - Set the  OPACShowHoldQueueDetails preference to "Show holds" and
   confirm that the holds table still displays correctly, sorted by
   "Placed on" ascending.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20945: (RM follow-up) Escape param_name too
Nick Clemens [Fri, 29 Jun 2018 20:09:38 +0000 (20:09 +0000)]
Bug 20945: (RM follow-up) Escape param_name too

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20945: Escape SQL parameters when constructing download links
Nick Clemens [Thu, 14 Jun 2018 14:20:44 +0000 (14:20 +0000)]
Bug 20945: Escape SQL parameters when constructing download links

TO test:
1 - Create a report that takes a parameter
2 - Enter a parameter containing '%'
3 - Attempt to download report, note link is misconstructed
4 - Apply patch
5 - Reload
6 - Note URL is now correct

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20697: Bind calling GetAnalyticsCount to pref EasyAnalyticalRecords
Marcel de Rooy [Thu, 3 May 2018 10:33:19 +0000 (12:33 +0200)]
Bug 20697: Bind calling GetAnalyticsCount to pref EasyAnalyticalRecords

If you do not use the EasyAnalyticalRecords feature (introduced with
bug 5528), you will have a lot of warnings in zebra-output.log like:

zebrasrv(1096) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @attr 1=8911 259186

They come from C4::Items::GetAnalyticsCount called by catalogue/detail.pl.
This sub starts a Zebra search on index 'hi' (Host-Item-Number).
If you do not use this field at all (related to 773$9 in MARC21), Zebra
returns an Unsupported Use attribute error (114).

In making this change, I added one minor change:
[1] Remove the commented GetAnalyticsCount in additem.pl and correcting
    indentation in that loop (removing tabs). So no change at all there.

NOTE: I will propose to bind the GetHostItemsInfo call in detail.pl and two
other scripts to this preference too on report 20702.

Test plan:
[1] If you use EasyAnalytics, verify that there is no change.
[2] If you do not, check the zebra-output.log. You should no longer see
    searches for Host-Item-Number with 1=8911. (As well as ERROR 114 on
    this index.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
6 years agoBug 17869: Don't show pick-up library for list of holds in OPAC account when there...
Owen Leonard [Mon, 18 Jun 2018 18:29:57 +0000 (18:29 +0000)]
Bug 17869: Don't show pick-up library for list of holds in OPAC account when there is only one branch

This patch modifies the user summary page in the OPAC so that the
"pick up location" column isn't shown in the table of holds if there is
only one library defined.

To test, apply the patch and log into the OPAC as a user with one or
more holds.

 - In a system with more than one library defined the "Holds" tab of
   opac-user.pl should show a "Pick up location" column.

 - In a system with only one library defined there should be now "Pick
   up location" column.

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>
6 years agoBug 20893: batchRebuildItemsTables.pl has incorrect parameter
Nick Clemens [Thu, 7 Jun 2018 14:03:11 +0000 (14:03 +0000)]
Bug 20893: batchRebuildItemsTables.pl has incorrect parameter

To test:
1 - run batchRebuildItemsTables.pl with a valid biblionumber
   perl /usr/share/koha/bin/batchRebuildItemsTables.pl --where biblio.biblionumber=38483  -c
2 - Note it says 'undefined biblionumber
3 - Apply patch
4 - Do it again
5 - It works!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16653: (QA follow-up) Avoid a warning and remove unused variables
Julian Maurice [Mon, 25 Jun 2018 12:58:17 +0000 (14:58 +0200)]
Bug 16653: (QA follow-up) Avoid a warning and remove unused variables

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16653: Display number of checkouts when exporting 'Most-circulated items' as CSV
Jonathan Druart [Thu, 7 Jun 2018 14:47:46 +0000 (11:47 -0300)]
Bug 16653: Display number of checkouts when exporting 'Most-circulated items' as CSV

reports/cat_issues_top.pl does not export "Count of checkouts" column as CSV

To replicate:

1/ Make sure that test instance has circulation in a given date range
2/ Go to Home › Reports › Most-circulated items
3/ Select a date range
4/ Select 'To screen into the browser' radio button, click submit.
5/ Note that Columns 'Rank/Biblioitemnumbers', 'Global' and 'Count of checkouts' appear in screen output.
6/ Click the browser's back button
7/ Change output to 'To a file', click submit.

Without this patch:
the columns "100/", "Global" and "Total" are exported to the CSV file.
"100/" contains the rank, "Global" is still global, and the "Total" column is empty.

With this patch patch applied, the last column is filled and the "Total" line is removed

(This script is really dirty)

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
(Yes it is)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>