koha.git
4 years agoBug 23390: (QA follow-up) Don't redeclare variable
Nick Clemens [Tue, 30 Jul 2019 15:40:54 +0000]
Bug 23390: (QA follow-up) Don't redeclare variable

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23390: Introduce placeholder syntax for report column names
Nick Clemens [Sat, 27 Jul 2019 13:07:18 +0000]
Bug 23390: Introduce placeholder syntax for report column names

This patch adds the ability to rename columns in MySQL reports using a syntax:
[[column|alias]]

To test:
 1 - Write a report like:
     SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9'
 2 - Run report
 3 - Note you can batch modify the patrons
 4 - Update report:
     SELECT cardnumber AS library_barcode FROM borrowers WHERE cardnumber LIKE '%9'
 5 - Run report
 6 - Note batch options are no longer present
 7 - Apply patch
 8 - Run report, no change
 9 - Update report like:
     SELECT [[cardnumber|library_barcode]] FROM borrowers WHERE cardnumber LIKE '%9'
10 - Run report
11 - Batch options work!
12 - Update report like:
    SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9'
13 - Verify batch options still work
14 - Set report 'public'
15 - Verify report can be run via JSON URLs:
     http://kohadev.mydnsname.org:8080/cgi-bin/koha/svc/report?id=1
     http://kohadev.mydnsname.org:8081/cgi-bin/koha/svc/report?id=1

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23385: (follow-up) Update link
Owen Leonard [Mon, 29 Jul 2019 12:57:21 +0000]
Bug 23385: (follow-up) Update link

This follow-up adds a dummy href attribute to the link for showing and
hiding the default values form so that it behaves more like a link.

I removed "click to" from the link text and added Font Awesome icons
common to "show/hide" links.

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23385: Hide 'Default values' fields by default
Nick Clemens [Fri, 26 Jul 2019 14:48:51 +0000]
Bug 23385: Hide 'Default values' fields by default

To test:
1 - Go to Tools->Import patrons
2 - Choose a file
3 - Scroll a long way to submit
4 - Apply patch
5 - Choose a file
6 - Can submit easily
7 - Click to expand and enter default fields
8 - Confirm can still submit and that values entered are used

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23438: Compiled CSS
Martin Renvoize [Tue, 13 Aug 2019 10:42:46 +0000]
Bug 23438: Compiled CSS

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

4 years agoBug 23438: Use Font Awesome icons in intranet search results browser
Fridolin Somers [Wed, 7 Aug 2019 13:33:52 +0000]
Bug 23438: Use Font Awesome icons in intranet search results browser

In intranet after a search you see a results browser top left of biblio record details.

Actually this uses text for links next and previous with a character for the arrows.
I propose to use Font Awesome icons arrows.

In fact the translated text is often too large for those buttons.
For example "Previous" is "Préédant" in french and it causes the next and previous buttons to display on two lines.
Using icons is more compact and easy to use.

This patch also adds the list icon to back to results link and changes for a minimal text "Results".

1) Go to intranet
2) Perform a search with a few results
3) Click on first record
4) Check browser displays well
5) Click on next icon, check you go to next search result
6) Click on revious icon, check you go to previous search result
7) Click on "Results", you come back to search results
8) Clik on "Last" and click on last record
9) Check browser displays well

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23413: (QA follow-up) Fix terminology
Katrin Fischer [Fri, 9 Aug 2019 09:05:08 +0000]
Bug 23413: (QA follow-up) Fix terminology

Changed the POD of the new method to use holds.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23413: Add a holds method to Koha::Items
Nick Clemens [Thu, 1 Aug 2019 18:11:19 +0000]
Bug 23413: Add a holds method to Koha::Items

To test;
1 - prove -v t/db_dependent/Koha/Items.t

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23408: Move relatives-issues-table to an include
Nick Clemens [Thu, 1 Aug 2019 11:44:39 +0000]
Bug 23408: Move relatives-issues-table to an include

TO test:
1 - Find and adult patron
2 - Add a child account
3 - Check out some things to the child
4 - View the adults account, click 'Relatives checkouts'
5 - Observe table is oddly formatted
6 - View on both the 'Check out' and 'Details' tabs
7 - Apply patch
8 - Tables are displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23319: Implement blocking errors for neworderbiblio and basket.pl
Nick Clemens [Mon, 15 Jul 2019 17:46:36 +0000]
Bug 23319: Implement blocking errors for neworderbiblio and basket.pl

To test:
1 - Hit neworderbiblio with a query and no vendor
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat
    Or, add to basket from existing record with a search
    Refresh the page (url has no parameters)
2 - Get an internal server error
3 - Add bookseller
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat&booksellerid=1
4 - Click 'Order' on a result
5 - Internal server error
6 - Apply patch
7 - Repeat 1-4, you get 'Vendor not found' or 'Basket not found'

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23441: Export should not include the 'actions' column in Z3950 results.
Owen Leonard [Fri, 9 Aug 2019 11:43:42 +0000]
Bug 23441: Export should not include the 'actions' column in Z3950 results.

This patch adds the "noExport" class to the table header for the Z39.50
search results "Actions" column. This class prevents the column from
being included in DataTables export operations.

To test, apply the patch and perform a Z39.50 search from Cataloging. On
the search results page, click the "Export or print" button. Choose one
of the export options and verify that in the resulting data there is no
"Actions" column.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23436: add a label for duplicate backend
Alex Arnaud [Wed, 7 Aug 2019 08:57:01 +0000]
Bug 23436: add a label for duplicate backend

Reproduce issue:
 - Enable "EnableAdvancedCatalogingEditor" preference
 - Go to cataloguing and click on advanced editor
 - Click on the down arrow in "Save to catalog" menu
 - You should see an undefined named save backend

Test patch:
 - Enable "EnableAdvancedCatalogingEditor" preference
 - Go to cataloguing and click on advanced editor to save preference to
   the cookie
 - Click on the down arrow in "Save to catalog" menu
 - You should see a "Duplicate" named backend

Test Bug 16232 for no regression:
 - Search for a biblio in catalog
 - Click in "Edit record"
 - Advanced editor should appear.
   SUCCESS => browser url ends with #duplicate/{original biblionumber}
           => Title above toolbar is "Editing duplicate record of
              #{original biblionumber}"
 - Save
   SUCCESS => browser url ends with #catalog/{new biblionumber}
           => Title above toolbar is "Editing catalog record #{new
biblionumber}"

More test:
 - Search for a biblio in catalog
 - Click on "Edit record"
 - Advanced editor should appear
 - Click on the down arrow in "Save to catalog" menu and click on
   Duplicate,
 - Record should be saved as a new one (same behavior)

Signed-off-by: cori <corilynn.arnold@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22142: Do not revert data if 'unchanged' was set
Jonathan Druart [Mon, 5 Aug 2019 15:54:57 +0000]
Bug 22142: Do not revert data if 'unchanged' was set

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22142: Highlight the issue
Nick Clemens [Thu, 13 Jun 2019 14:20:25 +0000]
Bug 22142: Highlight the issue

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23416: DBRev 19.06.00.020
Martin Renvoize [Mon, 12 Aug 2019 13:37:23 +0000]
Bug 23416: DBRev 19.06.00.020

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

4 years agoBug 23416: (QA follow-up) Add IGNORE to updatedatabase SQL statement
Katrin Fischer [Thu, 8 Aug 2019 13:37:58 +0000]
Bug 23416: (QA follow-up) Add IGNORE to updatedatabase SQL statement

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23416: Add PreserveSerialNotes system preference
Nick Clemens [Fri, 2 Aug 2019 13:22:37 +0000]
Bug 23416: Add PreserveSerialNotes system preference

Bug 11492 intended to pass routinglists forward. It also passed forward serial notes.
This may or not me desired behvaiour, to avoid changing functionality twice I add a syspref
to control this behaviour.

To test:
 1 - Have or create a subscription in the serials module
 2 - Recieve an issue, making sure ot ad a note
 3 - Go to receive again, note the note from the last serial is set for the expected issue
 4 - Apply patch
 5 - Update database, restart all the things
 6 - Receive the issue leaving the note in place
 7 - Note the next expected issue has the note
 8 - Find the syspref PreserveSerialNotes
 9 - Confirm it defaulted to Do
10 - Set it to 'Do not'
11 - Receive the expected serial leavign the note
12 - Note the newly generated expected serial has no note
13 - prove -v t/db_dependent/Serials.t

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23434: Hold confirmation dialog problem if HoldsAutoFill is enabled
Owen Leonard [Tue, 6 Aug 2019 13:25:24 +0000]
Bug 23434: Hold confirmation dialog problem if HoldsAutoFill is enabled

This patch corrects a problem with hold confirmation dialogs on the
checkin page when the HoldsAutoFill system preference is enabled and the
item being checked in has a hold at another library.

The confirmation dialog is converted to a modal to match other
confirmation information.

As part of this process two whole sections of the template have been
removed because they were redundant.

To test, apply the patch and test the following circumstances both with
HoldsAutoFill enabled AND disabled:

 - A hold for a patron at your library
 - A hold for a patron not at your library
   - With HoldsAutoFill ON, both the "OK" and "Print slip and confirm"
     buttons should dismiss the modal without reloading the page.
 - A hold which is already marked 'Waiting'
 - An item which needs to be transferred
 - An item which has already been transferred

In all cases the confirmation modal should appear with correct
information.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23307: (RM follow-up) Fix breaking change to columns_settings.inc
Martin Renvoize [Mon, 12 Aug 2019 13:29:58 +0000]
Bug 23307: (RM follow-up) Fix breaking change to columns_settings.inc

The changes to columns_settings.inc in bug 23307 inadvertantly change
the return from an updated jQuery datatable object to a plain jQuery
object and as such broke a number of tables in Koha.  This patch simply
reverts the change whilst continuing to allow the new functionality to
work as expeced.

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

4 years agoBug 23307: Add columns configuration to cataloguing/z3950_search.tt
Owen Leonard [Fri, 12 Jul 2019 14:13:50 +0000]
Bug 23307: Add columns configuration to cataloguing/z3950_search.tt

This patch adds columns configuration to the DataTable which displays
Z39.50 search results in the cataloging module.

The Z39.50 results screen has its own server-side paging system, so I
added some code to copy the page number information ("Page 2 / 6") to
the DataTable toolbar for a more consistent appearance. The wording of
that information has also been modified for consistency's sake.

To test, apply the patch and restart Plack (or restart_all on
kohadevbox)

 - Go to Cataloging -> New from Z39.50/SRU.
 - Perform a Z39.50 search which will return multiple pages of results.
 - Confirm that the DataTable controls work correctly: Search, columns
   show/hide, export.
 - Confirm that the page number information is correct as you navigate
   through pages of results.

 - Go to Administration -> Columns settings.
 - Confirm that the columns configuration settings for the z3950_search
   table in the "Cataloging" section works correctly. Changes made here
   should be reflected in the table of Z39.50 search results.

 - Test other tables which use columns configuration to confirm that the
   changes made in this patch doesn't disrupt their behavior. Test that
   any custom columns configuration are applied. For example:

   - Administration -> Libraries
   - Reports -> Saved reports
   - Circulation -> Holds queue

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22209: Move stock rotation stage and item forms into modals
Owen Leonard [Mon, 8 Jul 2019 18:27:52 +0000]
Bug 22209: Move stock rotation stage and item forms into modals

This patch makes a number of interface changes to the Stock Rotation
management interface:

 - "Add stage" and "Add items" forms are now triggered by clicking new
   buttons in the toolbar.
 - "Manage stages" and "Manage items" menu items have been added to a
   sidebar menu to be displayed when stages or items are being managed.
 - JavaScript has been added to move focus to the first form field in
   the modal when it is displayed. The "autofocus" attribute is not
   sufficent here because the modal is hidden by default.
 - Add messages to be shown when there are no items or stages to be
   displayed.
 - Correct "selected" attributes to use XHTML-style: selected="selected"
  (https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML_Templates)

To test, apply the patch and go to Tools -> Stock rotation.

 - Create a rota if you don't already have one.
   - Manage stages for your rota.
     - If your rota has no stages you should see a message along with an
       "Add stage" button. The button should trigger the "Add stage"
       modal.
     - Test the "Add stage" button in the toolbar. It should trigger a
       modal dialog containing the form for adding a new stage. The
       cursor focus should automatically be on the "library" field.
     - Submitting the form should correctly add the stage.
     - Verify that there is a new menu in the sidebar, "Manage stages"
       and "Manage items."
   - Manage items for your rota.
     - If your rota has no items you should see a message along with an
       "Add items" button. The button should trigger the "Add items"
       modal.
     - Test the "Add items" button in the toolbar. It should trigger a
       modal dialog containing the form for adding new items. The cursor
       focus should automatically be on the "barcode" field.
     - Submitting either a barcode or a file of barcodes should work
       correctly.
     - Verify that the new menu items are shown in the sidebar.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23228: DBRev 19.06.00.019
Martin Renvoize [Thu, 8 Aug 2019 14:30:14 +0000]
Bug 23228: DBRev 19.06.00.019

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

4 years agoBug 23228: (QA follow-up) Add required filters
Martin Renvoize [Thu, 8 Aug 2019 14:13:33 +0000]
Bug 23228: (QA follow-up) Add required filters

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

4 years agoBug 23228: (QA follow-up) Fix the DB update
Martin Renvoize [Thu, 8 Aug 2019 13:57:25 +0000]
Bug 23228: (QA follow-up) Fix the DB update

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

4 years agoBug 23228: Add option to automatically display payment receipt for printing after...
Kyle M Hall [Thu, 27 Jun 2019 16:12:46 +0000]
Bug 23228: Add option to automatically display payment receipt for printing after making a payment

Some libraries would like an auto-popup after making a payment so librarians don't have
to navigate to the accounts page, locate the new payment, then click the print button.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Make a payment, note no difference in behavior
4) Enable the new syspref FinePaymentAutoPopup
5) Make a payment, note the popup for the payment receipt

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23399: (follow-up) Markup comments and corrections
Owen Leonard [Tue, 30 Jul 2019 13:48:02 +0000]
Bug 23399: (follow-up) Markup comments and corrections

This patch adds comments to the template to highlight the markup
structure. It also corrects some minor markup errors.

This patch should have no effect on the interface or functionality.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23399: Reindent returns.tt
Owen Leonard [Tue, 30 Jul 2019 13:12:18 +0000]
Bug 23399: Reindent returns.tt

This patch reindents circulation/returns.tt to use four spaces,
following coding guidelines.

To test, apply the patch and use your preferred method for checking the
differences between files while ignoring whitespace. I use diff with the
"-w" flag, but each must take their own journey.

Test the checkin process to confirm that everything still works
correctly.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23286: Compiled CSS
Martin Renvoize [Thu, 8 Aug 2019 12:09:13 +0000]
Bug 23286: Compiled CSS

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

4 years agoBug 23286: Improve style of hold confirmation modal
Owen Leonard [Wed, 10 Apr 2019 11:30:47 +0000]
Bug 23286: Improve style of hold confirmation modal

This patch makes minor changes to the hold confirmation modal in the
check-in template and adds some additional style. The goal is to make
the information a little more readable.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Check in items with the following hold statuses:

 - On hold for a patron at your library
 - On hold for a patron at another library
 - On hold and already marked 'Waiting'

Confirm that the hold confirmation modal is clear and well-styled.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23322: Correct case for boolean in ES search
Nick Clemens [Tue, 16 Jul 2019 12:08:47 +0000]
Bug 23322: Correct case for boolean in ES search

I did not include tests only because this is a very small reasonable change and routine has no tests.
It does not affect behaviour, it only touches syntax lightly.

To test:
  0 - Set SearchEngine to ElasticSearch
  1 - Import the example record (a version is included in sample data in devbox/testing docker so you can skip)
  2 - Stage the attached example record
  3 - Match using 'ISBN' rule
  4 - No matches found
  5 - Apply patch
  6 - Restart all the things
  7 - Reapply matching with no rule
  8 - Reapply with ISBN matcing
  9 - It matches!
 10 - Set SearchEngine to Zebra
 11 - Reapply matching with no rule
 12 - Reapply with ISBN matching
 13 - Matching works as before in Zebra

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23431: Don't nullify DOB if it's hidden by sysprefs
Liz Rea [Mon, 5 Aug 2019 22:39:37 +0000]
Bug 23431: Don't nullify DOB if it's hidden by sysprefs

To test:

Turn on  OPACPatronDetails
put dateofbirth in PatronSelfModificationBorrowerUnwantedField
Have a patron with a set date of birth
Attempt any modification on that patron through the OPAC
The date of birth will be one of the fields changed for that borrower
when you check it in the staff intranet.

Apply this patch, repeat the above.
Date of birth will not be one of the changed fields.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23405: Circulation autocomplete for patron lookup broken if cardnumber is empty
Owen Leonard [Wed, 31 Jul 2019 16:01:39 +0000]
Bug 23405: Circulation autocomplete for patron lookup broken if cardnumber is empty

This patch modifies the JavaScript behind the patron search
results autocomplete widget which is displayed when typing in the search
header's "Check out" tab.

The script is modified to use the patron's borrowernumber instead of
cardnumber when redirecting to the checkout page.

Instead of copying the patron's card number into the search form and
triggering a submit, the autocomplete output uses direct links to each
result.

To better handle patrons with no card number, the output is modified to
show card number with parentheses only if card number is present.

To test you should have a patron in your database which has no card
number. Make sure CircAutocompl is enabled.

- From the circulation home page, type a patron name in the "Check out"
  form and wait for autocomplete search results to display.

- Patrons with a card number should be listed in the format: Surname,
  First name (Card number) Address.

- Patrons without a card number should be listed as: Surname, First
  name Address.

- Clicking on either kind of result should link you the checkout screen
  for that patron.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Ian Walls <ian@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22741: Add a test
Jonathan Druart [Tue, 6 Aug 2019 14:44:40 +0000]
Bug 22741: Add a test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22741: Make updated_on timezone aware in Koha::Patron
Martin Renvoize [Thu, 20 Jun 2019 15:00:59 +0000]
Bug 22741: Make updated_on timezone aware in Koha::Patron

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 11529: (RM follow-up) Add WHILE to directive list
Martin Renvoize [Mon, 5 Aug 2019 17:34:55 +0000]
Bug 11529: (RM follow-up) Add WHILE to directive list

The QA tools don't current recognise the WHILE directive used in this
template update. This patch adds the keyword to the list of recognised
directives and thus allows through unfiltered variables during QA runs.

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

4 years agoBug 11529: Prevent too many spaces/break lines in the title tag
Jonathan Druart [Mon, 5 Aug 2019 17:12:02 +0000]
Bug 11529: Prevent too many spaces/break lines in the title tag

Caught by t/db_dependent/www/batch.t

Before this patch:
"""
<title>Koha &rsaquo; Catalog &rsaquo;

    Details for
    Bleak House /

</title>
"""

After this patch:
"""
<title>Koha &rsaquo; Catalog &rsaquo;

    Details for Bleak House /

</title>
"""

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

4 years agoBug 11529: (RM follow-up) Fix missing comma in query
Martin Renvoize [Mon, 5 Aug 2019 16:23:45 +0000]
Bug 11529: (RM follow-up) Fix missing comma in query

Looks like we introduced an error during a rebase somewhere on bug
11529. This patch siply replaces a missng comma in the SQL query for
C4::HoldsQueue::GetHoldsQueueItems.

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

4 years agoBug 23339: (follow-up) Markup comments and corrections
Owen Leonard [Thu, 18 Jul 2019 15:42:22 +0000]
Bug 23339: (follow-up) Markup comments and corrections

This patch adds comments to the template to highlight the markup
structure. It also removes the obsolete "type" attribute from the
<script> tag.

This patch should have no effect on the interface or functionality.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23339: Reindent addbooks.tt
Owen Leonard [Thu, 18 Jul 2019 14:58:45 +0000]
Bug 23339: Reindent addbooks.tt

This patch reindents cataloguing/addbooks.tt to use four spaces,
following coding guidelines.

To test, apply the patch and use your preferred method for checking the
differences between files while ignoring whitespace. I use diff with the
"-w" flag, but you should look into your own heart for the
right solution.

Go to Cataloging. Test that the initial page and search results view
look correct and work correctly.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23237: Fix POD and typos
Nick Clemens [Tue, 30 Jul 2019 13:52:05 +0000]
Bug 23237: Fix POD and typos

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

4 years agoBug 23237: Plugin allow [% INCLUDE %] from template
Frédéric Demians [Sat, 29 Jun 2019 06:55:34 +0000]
Bug 23237: Plugin allow [% INCLUDE %] from template

From a plugin template it is useful to be able to include other templates with
[% INCLUDE %] directives. But TT module is used by Koha with absolute paths.
Relative paths are forbidden for security reasons. A new param [% PLUGIN_DIR %]
allow plugin templates to know where to find plugin home directory.

How to test:

1. Install kitchen-sink plugin.

2. Find tool-step1.tt file, and add this at the begining of the file:
   [% INCLUDE "$PLUGIN_DIR/header.tt" %]
   It ask to include a template header.tt which doesn't exit.

3. Run kitchen-sink plugin tool. You must have this error message:

   Template process failed: file error - _path to plugin
   directory_/Koha/Plugin/Com/ByWaterSolutions/KitchenSink/header.tt: not found

   quod erat demonstrandum

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23328: Some check-in messages should be dismissable
Owen Leonard [Thu, 18 Jul 2019 13:05:48 +0000]
Bug 23328: Some check-in messages should be dismissable

There are several cases where the check-in process displays a modal
asking for confirmation. There are several cases where confirming or
dismissing the modal unnecessarily reloads the page. In cases where no
server-side action is necessary, the modal should be dismissed without
submitting a form.

To test, apply the patch and go to Circulation -> Check in

With AutomaticItemReturn enabled and AllowReturnToBranch set to "any
library,"

 - Check in an item which belongs at another library and is not already
   in-transit. In the confirmation modal which appears, clicking the
   "OK" button should close the modal without reloading the page.
 - Check in another item from anther branch. In the confirmation modal
   clicking the "Print slip" button should trigger a pop-up window for
   printing a slip but the modal should be dismissed without reloading
   the page.
 - Check in an item which is already in-transit to another branch. In
   the confirmation modal, clicking either the "OK" or "Print transfer
   slip" buttons should dismiss the modal without reloading the page.
   - Clicking the "Cancel transfer" button should work as before: The
     page reloads and the transfer is canceled.

With AutomaticItemReturn disabled,

 - Check in an item belonging to another library. The confirmation modal
   should ask you whether you want to "Transfer now?" Clicking "No"
   should dismiss the modal without reloading the page. The other
   options should reload the page and initiate the transfer.

With AllowReturnToBranch set to "only the library the item is from,"

 - Check in an item belonging to another library. You should see a
   "Cannot check in" modal. Clicking the "OK" button should close the
   modal without reloading the page.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23386: Add language of original in advanced search
Fridolin Somers [Fri, 26 Jul 2019 14:50:23 +0000]
Bug 23386: Add language of original in advanced search

In advanced search there is a language limit (UNIMARC 101$a), add language of original (UNIMARC 101$c).

This patch adds a TT BLOCK to avoid copy the code.

Test plan:
1) Create some records with language and language of original
2) Go to advanced search page
3) Check limit on language is OK
4) Check limit on language of the original is OK
5) Check using both is OK

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23099: Compiled CSS
Martin Renvoize [Mon, 5 Aug 2019 13:51:12 +0000]
Bug 23099: Compiled CSS

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

4 years agoBug 23099: OPAC Search result sorting "go" button flashes on page load
Owen Leonard [Tue, 11 Jun 2019 18:13:08 +0000]
Bug 23099: OPAC Search result sorting "go" button flashes on page load

There are a few places in the OPAC where we hide the submit button on a
sorting form because the form auto-submits when the selection changes.
These should be hidden using CSS instead of JS to prevent the temporary
appearance of the submit button while the page loads.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Test OPAC search results and OPAC checkout history. On both pages you
should not see a "Go" button next to the <select> input for changing the
sort order.

Disable JavaScript in your browser and test those pages again. The "Go"
button should appear.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 11529: Compiled CSS
Martin Renvoize [Mon, 5 Aug 2019 13:49:49 +0000]
Bug 11529: Compiled CSS

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

4 years agoBug 11529: DBRev 19.06.00.018
Martin Renvoize [Mon, 5 Aug 2019 13:36:55 +0000]
Bug 11529: DBRev 19.06.00.018

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

4 years agoBug 11529: (QA follow-up) Copy existing subtitle mappings and warn others
Nick Clemens [Fri, 26 Jul 2019 15:45:51 +0000]
Bug 11529: (QA follow-up) Copy existing subtitle mappings and warn others

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

4 years agoBug 11529: (follow-up) Fix QA issues
Ere Maijala [Thu, 2 May 2019 12:34:47 +0000]
Bug 11529: (follow-up) Fix QA issues

- Remove SplitKohaField
- Avoid using Stash in templates
- Improved display of part fields

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

4 years agoBug 11529: (follow-up) Fix link on hold request page
Josef Moravec [Fri, 26 Apr 2019 07:33:31 +0000]
Bug 11529: (follow-up) Fix link on hold request page

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

4 years agoBug 11529: Add templates for biblio title display. Unify display.
Ere Maijala [Tue, 23 Apr 2019 08:15:31 +0000]
Bug 11529: Add templates for biblio title display. Unify display.

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

4 years agoBug 11529: (follow-up) Remove manage_keywords2koha_mappings permission.
Ere Maijala [Thu, 18 Apr 2019 06:27:44 +0000]
Bug 11529: (follow-up) Remove manage_keywords2koha_mappings permission.

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

4 years agoBug 11529: Remove duplicate column name from select query
Ere Maijala [Fri, 12 Apr 2019 14:04:52 +0000]
Bug 11529: Remove duplicate column name from select query

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

4 years agoBug 11529: Replace bibliosubtitle with biblio in all framework sql's.
Ere Maijala [Fri, 12 Apr 2019 14:00:39 +0000]
Bug 11529: Replace bibliosubtitle with biblio in all framework sql's.

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

4 years agoBug 11529: Update kohafield in default framework only if not already set.
Ere Maijala [Fri, 12 Apr 2019 13:59:39 +0000]
Bug 11529: Update kohafield in default framework only if not already set.

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

4 years agoBug 11529: DBIx schema changes
Ere Maijala [Wed, 12 Dec 2018 12:05:36 +0000]
Bug 11529: DBIx schema changes

Updates to Biblio schema and removal of FieldMapping schema.

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

4 years agoBug 11529: Remove field mapping table and admin page
Ere Maijala [Tue, 20 Nov 2018 11:23:29 +0000]
Bug 11529: Remove field mapping table and admin page

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

4 years agoBug 11529: Clean up subtitle usage
Ere Maijala [Mon, 19 Nov 2018 08:37:08 +0000]
Bug 11529: Clean up subtitle usage

Unify and clean up subtitle usage so that it's always used as a simple array and not the old hash structure.

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

4 years agoBug 11529: Simplify and optimize batchRebuildBiblioTables.pl
Ere Maijala [Thu, 8 Nov 2018 13:30:12 +0000]
Bug 11529: Simplify and optimize batchRebuildBiblioTables.pl

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

4 years agoBug 11529: Use new biblio fields whenever possible
Ere Maijala [Mon, 5 Nov 2018 12:22:27 +0000]
Bug 11529: Use new biblio fields whenever possible

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

4 years agoBug 11529: Add new fields to biblio table
Ere Maijala [Mon, 5 Nov 2018 12:22:01 +0000]
Bug 11529: Add new fields to biblio table

Sponsored-by: National Library of Finland
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22610: DBRev 19.06.017
Martin Renvoize [Mon, 5 Aug 2019 12:29:10 +0000]
Bug 22610: DBRev 19.06.017

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

4 years agoBug 22610: (QA follow-up) Make upgrade query more accurate
Kyle M Hall [Thu, 9 May 2019 10:57:12 +0000]
Bug 22610: (QA follow-up) Make upgrade query more accurate

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22610: (QA follow-up) Add unit tests for FeePayment
Martin Renvoize [Fri, 19 Jul 2019 11:27:33 +0000]
Bug 22610: (QA follow-up) Add unit tests for FeePayment

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22610: (follow-up) Correction to accounts tests
Martin Renvoize [Thu, 9 May 2019 08:37:01 +0000]
Bug 22610: (follow-up) Correction to accounts tests

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22610: (follow-up) Catch non-standard SIP codes
Martin Renvoize [Wed, 8 May 2019 11:53:15 +0000]
Bug 22610: (follow-up) Catch non-standard SIP codes

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22610: Update SIP2 to use payment_type
Martin Renvoize [Wed, 24 Apr 2019 13:22:35 +0000]
Bug 22610: Update SIP2 to use payment_type

The SIP2 interface has long used a set of accounttypes to denote payment
types. Now we have an authorised list of payment_types and a
payment_type field in accountlines this patch alters the logic to use
it.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22610: Update SIP payment accounttypes
Martin Renvoize [Wed, 24 Apr 2019 13:20:49 +0000]
Bug 22610: Update SIP payment accounttypes

This DB update updates the Pay00, Pay01 and Pay02 accounttypes to all
be 'Pay' and adds the corresponding payment_types into the
authorised_values

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 14549: POD and variable cleanup
Nick Clemens [Fri, 28 Jun 2019 12:53:20 +0000]
Bug 14549: POD and variable cleanup

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 14549: Check patrons reserves for any holds on a bib when checking out an item
Nick Clemens [Fri, 28 Jun 2019 12:37:25 +0000]
Bug 14549: Check patrons reserves for any holds on a bib when checking out an item

MoveReserve uses CheckReserves to see if the current patron has any holds
on the title they are checking out, however, CheckReserves doesn't return
all holds on a biblio, it returns holds on the item from the holdsqueue
if they exist

This can create a condition where we check holds on an item, find we have it planned for
another borrower, confirm checkout to the current borrower, but don't fill their hold

To test:
  1) Find record
  2) place record level holds for 2 different patrons (record level)
  3) Run holds queue builder, check the queue to confirm an item was selected for patron 1
     Circulation->Holds queue->Library="All"
  4) Check out the item queued for patron with priority 1 to the second patron
  5) You should be asked to confirm, do so
  6) Note the item checks out, but both holds remain
  7) Apply patch
  8) Check in the item
  9) Don't confirm the hold
 10) Check the holds on the record and the holds queue
 11) Patron 1 should be priority 1 with an item selected from the holds queue
 12) Checkout to patron 2 as before
 13) Note the hold for patron 2 is filled this time
 14) Prove -v t/db_dependent/Reserves.t

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 14549: Unit tests
Nick Clemens [Fri, 28 Jun 2019 12:36:16 +0000]
Bug 14549: Unit tests

To test:
1 - Apply just this patch
2 - prove -v t/db_dependent/Reserves.t
3 - Failure
4 - Apply second patch
5 - prove -v t/db_dependent/Reserves.t
6 - Success!

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23396: DBRev 19.06.00.016
Martin Renvoize [Mon, 5 Aug 2019 10:36:40 +0000]
Bug 23396: DBRev 19.06.00.016

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

4 years agoBug 23396: (QA follow-up) Add atomic update
Tomas Cohen Arazi [Fri, 2 Aug 2019 18:53:01 +0000]
Bug 23396: (QA follow-up) Add atomic update

New installs before the fix won't have the table populated, this patch
adds a fix for that, including the shortcut added by bug 17178.

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

4 years agoBug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm
Nick Clemens [Tue, 30 Jul 2019 13:37:28 +0000]
Bug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm

To test:
1 - Back up your DB if you want to save it
2 - sudo koha-mysql kohadev
    DROP database koha_kohadev;
    CREATE database koha_kohadev;
3 - http://localhost:8081
4 - Go through the web installer
5 - Enable AdvancedCatalogingEditor
6 - Try to load it, fails with JS console error: insert_copyright is not defined
7 - Apply patch
8 - Repeat
9 - This time editor loads

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 10492: Translation problems with TT directives in po files
Bernardo Gonzalez Kriegel [Sun, 5 May 2019 18:12:15 +0000]
Bug 10492: Translation problems with TT directives in po files

This patch implements the replacement of TTvariables
'[%...%]' with normal placeholders '%s' for text
inside HTML tags (eg. img, meta, input)

The replacement is done in two files:
* xgettext.pl, used on create/update, so TTvars are not
found on the text to translate (msgid)
* tmpl_proccess3.pl, used on install time, so the correct
translation is found (msgstr) and the right TTvar is put on
the translated text.

To test:
Before applying the patch
1) Update your favorite language
   cd misc/traslator
   perl translate update xx-YY

2) Build a list (ini.txt) of 'msgid' to do a comparison
   msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > ini.txt

3) Apply the patch

4) Update your favorite language, again
   cd misc/traslator
   perl translate update xx-YY

5) Build a final list (end.txt) of 'msgid' to do a comparison
   msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > end.txt

6) Compare both files, you must find (most) TTvars replaced by '%s'
   diff ini.txt end.txt

   for example:
   < msgid "Translate item type [% itemtype.itemtype | html %]"
   > msgid "Translate item type %s"

   < msgid "Holds on this item: [% item_loo.item_holds | html %] / Total holds on this record: [% item_loo.holds | html -%]"
   > msgid "Holds on this item: %s / Total holds on this record: %s"

   < msgid "tag_anchor_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]"
   > msgid "tag_anchor_%s_%s%s"

   < msgid "[% innerloo.tag_lib | html %] - Click to Expand this Tag"
   > msgid "%s - Click to Expand this Tag"

7) Translate one of the examples, with more than one variable if
possible, for example this text in xx-YY-staff-prog.po
   > msgid "Holds on this item: %s / Total holds on this record: %s"
Check it's not marked as 'fuzzy'

8) Apply the translation
   perl translate install xx-YY

9) Check the translated string has all variables in the right order
   edit koha-tmpl/intranet-tmpl/prog/es-ES/modules/tools/batchMod-edit.tt
   around line '187', first '[% item_loo.item_holds | html %]', then
   '[% item_loo.holds | html -%]' on this case,
   or use another example

If approved this patch can be backported to current stable
versions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21518: Material type "three-dimensional artifact" displays as "visual material"
Owen Leonard [Wed, 31 Jul 2019 12:38:16 +0000]
Bug 21518: Material type "three-dimensional artifact" displays as "visual material"

This patch makes a few corrections to the staff client MARC21 XSLT so
that the correct material type icons are displayed for pictures and
realia. The more-specific material type handling has been adapted from
the corresponding XSL files in the OPAC.

To test you must have default XSLT enabled and the DisplayIconsXSLT and
DisplayOPACiconsXSLT system preferences enabled.

 - Apply the patch and locate records with "type of record" specified in
   the leader as 'g', 'k', and 'r'.

   A sample MARC file will be attached to the bug report with one of
   each type of record. Import the records and search your catalog for
   "Bug_21518."

 - View the records in search results and their detail pages, both in
   the OPAC and the staff client. In all cases the correct material type
   icon should be displayed.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23251: Correct formatting of IMD data ending in apostrophe
Colin Campbell [Tue, 2 Jul 2019 09:58:41 +0000]
Bug 23251: Correct formatting of IMD data ending in apostrophe

IMD text data may end in an apostrophe (e.g. dreamin' )
This was causing the segment to be incorrectly formatted
as only the last character was checked, not the preceding
character to check whether it was quoted

add a test for this specific occurence

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23345: Rename include-indexes to exclude-indexes in koha-dump
Marcel de Rooy [Fri, 19 Jul 2019 09:55:41 +0000]
Bug 23345: Rename include-indexes to exclude-indexes in koha-dump

Trivial edit. The usage statement is wrong.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23226: Remove type attribute from script tags: Cataloging
Owen Leonard [Thu, 27 Jun 2019 13:24:36 +0000]
Bug 23226: Remove type attribute from script tags: Cataloging

This patch removes the "type" attribute from <script> tags one
cataloging and one authorities template.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Cataloging -> Cataloging home page
 - Cataloging -> Cataloging home page -> Search results
 - Authorities -> New authority -> New from Z39.50/SRU

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22524: DBRev 19.06.00.015
Martin Renvoize [Fri, 26 Jul 2019 15:21:58 +0000]
Bug 22524: DBRev 19.06.00.015

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

4 years agoBug 22524: Fix date/time-last-modified search with Elasticsearch
Ere Maijala [Mon, 29 Apr 2019 08:03:22 +0000]
Bug 22524: Fix date/time-last-modified search with Elasticsearch

Avoid using slash in the field name since it would need to be escaped. Fix conversion of dtlm and any existing mapping.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22524: Fix publication date and year search with Elasticsearch
Ere Maijala [Tue, 16 Apr 2019 13:26:40 +0000]
Bug 22524: Fix publication date and year search with Elasticsearch

Also fixes the mappings.yaml to use correct field name (left over issue from bug 19575), so reset mappings and reindex before testing.

Test plan:
1. Reset mappings and reindex biblios.
2. Check that tests in t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t pass.
3. Try that all of the following year range type work in publication date search and year limit in advanced search:
yyyy
yyyy-yyyy
-yyyy
yyyy-

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23217: Remove SQL error when batch patron mod and not attribute selected
Jonathan Druart [Sat, 29 Jun 2019 15:55:17 +0000]
Bug 23217: Remove SQL error when batch patron mod and not attribute selected

On the batch patron modification tool, if no patron attribute is selected then
an UPDATE query will be executed anyway. Indeed the form will send a
an empty "patron_attributes" parameter. We need to handle it.

Test plan:
Go to the patron modification tool
Enter a cardnumber
Change a field (like city)
Do not change anything in the patron's attributes
Save
=> Without this patch a SQL error is generated:

DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`borrower_attributes`, CONSTRAINT `borrower_attributes_ibfk_2` FOREIGN KEY (`code`) REFERENCES `borrower_attribute_types` (`code`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement "INSERT INTO borrower_attributes SET attribute = ?, code = ?, borrowernumber = ?" with ParamValues: 0=undef, 1="", 2="51"] at /home/vagrant/kohaclone/C4/Members/Attributes.pm line 287.

=> With this patch applied you will not see it

You should also test that you can modify patron's attributes ;)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21716: Escape publisher in item search
Liz Rea [Thu, 25 Apr 2019 15:34:36 +0000]
Bug 21716: Escape publisher in item search

To prevent endless processing errors.

To test:

* create a biblio with a publisher with a backslash - i.e. 260$b with
graham\lineham
* do an item search that will include that title in the results
* wait forever, because it won't work.
* apply this patch
* repeat steps, notice that you
    a. get results
    b. your result is listed with it's correct publisher
* rejoice

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 11573: DBRev 19.06.00.014
Martin Renvoize [Fri, 26 Jul 2019 15:13:20 +0000]
Bug 11573: DBRev 19.06.00.014

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

4 years agoBug 11573: (QA follow-up) Correct spelling typo
Nick Clemens [Fri, 26 Jul 2019 12:31:39 +0000]
Bug 11573: (QA follow-up) Correct spelling typo

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

4 years agoBug 11573: (follow-up) Handle daily rental in db update
Martin Renvoize [Fri, 26 Jul 2019 11:52:44 +0000]
Bug 11573: (follow-up) Handle daily rental in db update

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

4 years agoBug 11573: (follow-up) Correction to accountype search on opac-user.pl
Martin Renvoize [Tue, 4 Jun 2019 10:37:13 +0000]
Bug 11573: (follow-up) Correction to accountype search on opac-user.pl

With the update of accountype from 'Rent' to four distinct accountypes
we need to update the search here to catch all four types of charge.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 11573: Update of unit tests
Martin Renvoize [Wed, 24 Apr 2019 09:35:22 +0000]
Bug 11573: Update of unit tests

This patch updates the unit tests to reflect the changes to the core
routines.  The relevant changes are the removal of a hard coded
'description' and the splitting up of the 'Rent' accounttype into
'RENT', 'RENT_RENEW', 'RENT_DAILY' and 'RENT_DAILY_RENEW'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 11573: Update existing accountlines for 'Rent'
Martin Renvoize [Wed, 24 Apr 2019 08:05:33 +0000]
Bug 11573: Update existing accountlines for 'Rent'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 11573: Make rental accountlines translatable
Martin Renvoize [Tue, 23 Apr 2019 17:05:05 +0000]
Bug 11573: Make rental accountlines translatable

To test:

1. Set up an item type with a rental charge
2. Issue an item with that item type
3. Check fines, a charge of type 'Rent' will be visible with a
description of 'Rental'.
4. Renew the item
5. Check fines, a charge of type 'Rent' will be visible with a
description of 'Renewal of Rental Item TITLE BARCODE' where TITLE and
BARCODE are the items title and barcode.
5. Apply the patch
6. Repeat steps 1-4, charge descriptions should now be empty and charge
types should display 'Rental fee' and 'Renewal of rental item'.
7. Repeat steps 1-6 for an item type with a daily rental charge and note
the charge types are now 'Daily rental fee' and 'Renewal of daily rental
item'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22249: Mana - Move comment process in a dedicated sub
Alex Arnaud [Thu, 6 Jun 2019 15:05:24 +0000]
Bug 22249: Mana - Move comment process in a dedicated sub

Test plan:
  - Go to a subscription's detail page,
  - click on "Report mistake" => "New comment",
  - check Koha logs file,
  - you can see the following warning:
    Can't locate object method "find" via package "Koha::Resource_comments"
  - Apply this patch,
  - same test again,
  - no wraning

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23316: (follow-up) for bug 22521 to fix GetFine
Martin Renvoize [Mon, 15 Jul 2019 14:06:14 +0000]
Bug 23316: (follow-up) for bug 22521 to fix GetFine

We changed the way we classify fines with bug 22521 but missed one
instance.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23206: Batch patron modification from reports which return cardnumber
Owen Leonard [Tue, 25 Jun 2019 16:47:42 +0000]
Bug 23206: Batch patron modification from reports which return cardnumber

This patch adds an option to submit patron card numbers from report
results to the batch patron modification tool.

As with a report which returns biblionumbers or itemnumbers, a button
appears at the top of report results which triggers a menu of batch
operation options.

To test, apply the patch and create a report which includes patron card
number in the results.

 - Run the report and confirm that under the "Batch operations" button
   a batch patron modification menu item appears.
   - Confirm that selecting this option sends the correct patrons to the
     batch patron modification tool.
 - Test also with a report which returns both patron cardnumber and
   biblionumber or itemnumber.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: George <george@nekls.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23363: (QA follow-up) Fix indentation
Josef Moravec [Thu, 25 Jul 2019 17:50:57 +0000]
Bug 23363: (QA follow-up) Fix indentation

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

4 years agoBug 23363: Fix Internal Server Error when clicking on shipment cost invoice link
Liz Rea [Tue, 23 Jul 2019 15:22:20 +0000]
Bug 23363: Fix Internal Server Error when clicking on shipment cost invoice link

To test:

On the fund detail page, have some shipment costs associated with a fund

an example would be cgi-bin/koha/acqui/spent.pl?fund=<your fund>&fund_code=<your
code>

Click the link for the fund, without this patch it will give an internal
server error.

With this patch, the shipment invoice will be loaded.
Signed-off-by: Jason DeShaw <JDeShaw@fargolibrary.org>
Signed-off-by: Laurel Moran <lmoran@sdlawlibrary.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23229: (QA follow-up) Fix indentation
Kyle M Hall [Fri, 28 Jun 2019 15:04:21 +0000]
Bug 23229: (QA follow-up) Fix indentation

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23229: Only load ILL table JS when needed
Andrew Isherwood [Fri, 28 Jun 2019 09:24:32 +0000]
Bug 23229: Only load ILL table JS when needed

This patch prevents the JS associated with the ILL table from loading
unless we're actually displaying the table. This has the knock on effect
of not causing the "get all ILL requests" API request to fire when
loading any ILL page.

Test plan:

- Go to "ILL requests" page
- TEST: Observe that the table loads all ILL requests
- Go to the "New ILL request" page for any installed backend
- TEST: Check the browser dev tools "Network" panel, observe that the
/api/v1/illrequests?embed=metadata,patron,capabilities,library,status_alias,comments,requested_partners
request is not made.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23078: (follow-up) Update self checkout help page
Owen Leonard [Tue, 9 Jul 2019 13:51:24 +0000]
Bug 23078: (follow-up) Update self checkout help page

This patch takes care of some preference instances I missed in the self
checkout module's help page. It also removes some obsolete lines from
Auth.pm.

To test, apply the patch and re-test based on the previous test plan.
Also test in the self-checkout module by logging into self checkout and
clicking the "Help" link in the upper right of the screen.

The settings of the following preferences should be shown correctly:

 - OpacFavicon
 - OPACUserCSS

Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23078: Use Koha.Preference in OPAC global header include
Owen Leonard [Fri, 7 Jun 2019 12:52:45 +0000]
Bug 23078: Use Koha.Preference in OPAC global header include

This patch updates the OPAC's doc-head-close.inc so that it uses
'Koha.Preference' syntax to output system preference data. The patch
removes handling of two preferences from Auth.pm which which are covered
by this template change.

This patch also makes some minor changes to consolidate multiple
template checks for "bidi"

To test, apply the patch and test the affected OPAC system preferences:

 - OpacFavicon
 - opaclayoutstylesheet
 - OPACUserCSS
 - OPACBaseURL

Confirm that changes made to these preferences are reflected in the
OPAC.

Signed-off-by: frederik <frederik@inlibro.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>