]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 11529: Add templates for biblio title display. Unify display.
Ere Maijala [Tue, 23 Apr 2019 08:15:31 +0000 (11:15 +0300)]
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>
5 years agoBug 11529: (follow-up) Remove manage_keywords2koha_mappings permission.
Ere Maijala [Thu, 18 Apr 2019 06:27:44 +0000 (09:27 +0300)]
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>
5 years agoBug 11529: Remove duplicate column name from select query
Ere Maijala [Fri, 12 Apr 2019 14:04:52 +0000 (17:04 +0300)]
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>
5 years agoBug 11529: Replace bibliosubtitle with biblio in all framework sql's.
Ere Maijala [Fri, 12 Apr 2019 14:00:39 +0000 (17:00 +0300)]
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>
5 years agoBug 11529: Update kohafield in default framework only if not already set.
Ere Maijala [Fri, 12 Apr 2019 13:59:39 +0000 (16:59 +0300)]
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>
5 years agoBug 11529: DBIx schema changes
Ere Maijala [Wed, 12 Dec 2018 12:05:36 +0000 (14:05 +0200)]
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>
5 years agoBug 11529: Remove field mapping table and admin page
Ere Maijala [Tue, 20 Nov 2018 11:23:29 +0000 (13:23 +0200)]
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>
5 years agoBug 11529: Clean up subtitle usage
Ere Maijala [Mon, 19 Nov 2018 08:37:08 +0000 (10:37 +0200)]
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>
5 years agoBug 11529: Simplify and optimize batchRebuildBiblioTables.pl
Ere Maijala [Thu, 8 Nov 2018 13:30:12 +0000 (15:30 +0200)]
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>
5 years agoBug 11529: Use new biblio fields whenever possible
Ere Maijala [Mon, 5 Nov 2018 12:22:27 +0000 (14:22 +0200)]
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>
5 years agoBug 11529: Add new fields to biblio table
Ere Maijala [Mon, 5 Nov 2018 12:22:01 +0000 (14:22 +0200)]
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>
5 years agoBug 22610: DBRev 19.06.017
Martin Renvoize [Mon, 5 Aug 2019 12:29:10 +0000 (13:29 +0100)]
Bug 22610: DBRev 19.06.017

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22610: (QA follow-up) Make upgrade query more accurate
Kyle M Hall [Thu, 9 May 2019 10:57:12 +0000 (06:57 -0400)]
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>
5 years agoBug 22610: (QA follow-up) Add unit tests for FeePayment
Martin Renvoize [Fri, 19 Jul 2019 11:27:33 +0000 (12:27 +0100)]
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>
5 years agoBug 22610: (follow-up) Correction to accounts tests
Martin Renvoize [Thu, 9 May 2019 08:37:01 +0000 (09:37 +0100)]
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>
5 years agoBug 22610: (follow-up) Catch non-standard SIP codes
Martin Renvoize [Wed, 8 May 2019 11:53:15 +0000 (12:53 +0100)]
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>
5 years agoBug 22610: Update SIP2 to use payment_type
Martin Renvoize [Wed, 24 Apr 2019 13:22:35 +0000 (14:22 +0100)]
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>
5 years agoBug 22610: Update SIP payment accounttypes
Martin Renvoize [Wed, 24 Apr 2019 13:20:49 +0000 (14:20 +0100)]
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>
5 years agoBug 14549: POD and variable cleanup
Nick Clemens [Fri, 28 Jun 2019 12:53:20 +0000 (12:53 +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>
5 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 (12:37 +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>
5 years agoBug 14549: Unit tests
Nick Clemens [Fri, 28 Jun 2019 12:36:16 +0000 (12:36 +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>
5 years agoBug 23396: DBRev 19.06.00.016
Martin Renvoize [Mon, 5 Aug 2019 10:36:40 +0000 (11:36 +0100)]
Bug 23396: DBRev 19.06.00.016

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23396: (QA follow-up) Add atomic update
Tomas Cohen Arazi [Fri, 2 Aug 2019 18:53:01 +0000 (15:53 -0300)]
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>
5 years agoBug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm
Nick Clemens [Tue, 30 Jul 2019 13:37:28 +0000 (13:37 +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>
5 years agoBug 10492: Translation problems with TT directives in po files
Bernardo Gonzalez Kriegel [Sun, 5 May 2019 18:12:15 +0000 (15:12 -0300)]
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>
5 years agoBug 21518: Material type "three-dimensional artifact" displays as "visual material"
Owen Leonard [Wed, 31 Jul 2019 12:38:16 +0000 (12:38 +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>
5 years agoBug 23251: Correct formatting of IMD data ending in apostrophe
Colin Campbell [Tue, 2 Jul 2019 09:58:41 +0000 (10:58 +0100)]
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>
5 years agoBug 23345: Rename include-indexes to exclude-indexes in koha-dump
Marcel de Rooy [Fri, 19 Jul 2019 09:55:41 +0000 (09:55 +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>
5 years agoBug 23226: Remove type attribute from script tags: Cataloging
Owen Leonard [Thu, 27 Jun 2019 13:24:36 +0000 (13:24 +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>
5 years agoBug 22524: DBRev 19.06.00.015
Martin Renvoize [Fri, 26 Jul 2019 15:21:58 +0000 (16:21 +0100)]
Bug 22524: DBRev 19.06.00.015

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22524: Fix date/time-last-modified search with Elasticsearch
Ere Maijala [Mon, 29 Apr 2019 08:03:22 +0000 (11:03 +0300)]
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>
5 years agoBug 22524: Fix publication date and year search with Elasticsearch
Ere Maijala [Tue, 16 Apr 2019 13:26:40 +0000 (16:26 +0300)]
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>
5 years agoBug 23217: Remove SQL error when batch patron mod and not attribute selected
Jonathan Druart [Sat, 29 Jun 2019 15:55:17 +0000 (10:55 -0500)]
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>
5 years agoBug 21716: Escape publisher in item search
Liz Rea [Thu, 25 Apr 2019 15:34:36 +0000 (15:34 +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>
5 years agoBug 11573: DBRev 19.06.00.014
Martin Renvoize [Fri, 26 Jul 2019 15:13:20 +0000 (16:13 +0100)]
Bug 11573: DBRev 19.06.00.014

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 11573: (QA follow-up) Correct spelling typo
Nick Clemens [Fri, 26 Jul 2019 12:31:39 +0000 (12:31 +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>
5 years agoBug 11573: (follow-up) Handle daily rental in db update
Martin Renvoize [Fri, 26 Jul 2019 11:52:44 +0000 (12:52 +0100)]
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>
5 years agoBug 11573: (follow-up) Correction to accountype search on opac-user.pl
Martin Renvoize [Tue, 4 Jun 2019 10:37:13 +0000 (11:37 +0100)]
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>
5 years agoBug 11573: Update of unit tests
Martin Renvoize [Wed, 24 Apr 2019 09:35:22 +0000 (10:35 +0100)]
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>
5 years agoBug 11573: Update existing accountlines for 'Rent'
Martin Renvoize [Wed, 24 Apr 2019 08:05:33 +0000 (09:05 +0100)]
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>
5 years agoBug 11573: Make rental accountlines translatable
Martin Renvoize [Tue, 23 Apr 2019 17:05:05 +0000 (18:05 +0100)]
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>
5 years agoBug 22249: Mana - Move comment process in a dedicated sub
Alex Arnaud [Thu, 6 Jun 2019 15:05:24 +0000 (17:05 +0200)]
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>
5 years agoBug 23316: (follow-up) for bug 22521 to fix GetFine
Martin Renvoize [Mon, 15 Jul 2019 14:06:14 +0000 (15:06 +0100)]
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>
5 years agoBug 23206: Batch patron modification from reports which return cardnumber
Owen Leonard [Tue, 25 Jun 2019 16:47:42 +0000 (16:47 +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>
5 years agoBug 23363: (QA follow-up) Fix indentation
Josef Moravec [Thu, 25 Jul 2019 17:50:57 +0000 (17:50 +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>
5 years agoBug 23363: Fix Internal Server Error when clicking on shipment cost invoice link
Liz Rea [Tue, 23 Jul 2019 15:22:20 +0000 (10:22 -0500)]
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>
5 years agoBug 23229: (QA follow-up) Fix indentation
Kyle M Hall [Fri, 28 Jun 2019 15:04:21 +0000 (11:04 -0400)]
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>
5 years agoBug 23229: Only load ILL table JS when needed
Andrew Isherwood [Fri, 28 Jun 2019 09:24:32 +0000 (10:24 +0100)]
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>
5 years agoBug 23078: (follow-up) Update self checkout help page
Owen Leonard [Tue, 9 Jul 2019 13:51:24 +0000 (13:51 +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>
5 years agoBug 23078: Use Koha.Preference in OPAC global header include
Owen Leonard [Fri, 7 Jun 2019 12:52:45 +0000 (12:52 +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>
5 years agoBug 23278: Reopen last panel upon "Save and continue" in notices
Owen Leonard [Fri, 5 Jul 2019 17:28:06 +0000 (17:28 +0000)]
Bug 23278: Reopen last panel upon "Save and continue" in notices

This patch modifies the Notices edit process so that if the user chooses
the "Save and continue" option the page reloads with the same panel open
which they were previously editing in.

To test, apply the patch and go to Tools -> Notices and Slips.

 - Open a notice for editing.
 - Expand one of the sections.
 - Choose "Save and continue" from the button menu in the toolbar.
   - When the page reloads, the section you expanded should be open
     again.
 - Test each section and test with no sections expanded.

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>
5 years agoBug 23304: (follow-up) Add markup structure comments
Owen Leonard [Fri, 12 Jul 2019 13:41:30 +0000 (13:41 +0000)]
Bug 23304: (follow-up) Add markup structure comments

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: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23304: Reindent cataloguing/z3950_search.tt
Owen Leonard [Thu, 11 Jul 2019 18:59:21 +0000 (18:59 +0000)]
Bug 23304: Reindent cataloguing/z3950_search.tt

This patch reindents cataloguing/z3950_search.tt to use four spaces and
to eliminate tabs, following coding guidelines. Trailing white space has
been removed, and some minor markup errors have been corrected for
validity.

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 I'm not giving orders, you do you.

Go to Cataloging -> New from Z39.50/SRU. Test that the search form and
results look correct and work correctly.

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>
5 years agoBug 23279: In news management interface, sort news by publication date descending
Owen Leonard [Mon, 8 Jul 2019 16:06:38 +0000 (16:06 +0000)]
Bug 23279: In news management interface, sort news by publication date descending

This patch makes a few changes to the configuration of the DataTable
showing news items in the staff client. It adds a default sort on
"Publication date," descending; It updates the way non-sortable columns
are configured; It modifies sorting on the title and content columns so
that articles are ignored.

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

 - When the page loads the table of news items should sort by default on
   publication date, descending.
 - There should be no sorting indicator on the first and last columns.
 - When sorting the "Title" or "News" columns, articles "A," "An," and
   "The" should be ignored.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22021: Improve item status display when placing holds in staff
Katrin Fischer [Sat, 13 Jul 2019 12:23:19 +0000 (14:23 +0200)]
Bug 22021: Improve item status display when placing holds in staff

This patch is a bit of a clean-up to bring the item status display
more in line with the display on the detail page:

- show descrpition of authorised value for not for loan instead of hardcoded text
- Show description of authorised value for lost instead of hardcoded text
  This is also a translatability fix, as the text came from the .pl
- Show description of authorised value damaged instead of hardcoded text
- Make sequence of status match display on details page:
  lost - damaged - not for loan

To test:
- On a record with multiple items
  - Add different status to the items
    damaged, lost, not for loan
  - Make sure you have items with one status and multiple status at the same time
- Look at how the status display on the detail page
- Place a hold, compare display
- Apply patch
- Repeat

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>
5 years agoBug 23218: (QA follow-up) Remove dummy value
Nick Clemens [Fri, 19 Jul 2019 10:49:00 +0000 (10:49 +0000)]
Bug 23218: (QA follow-up) Remove dummy value

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23218: Fix shift in patron's attributes in batch patron modification
Jonathan Druart [Sat, 29 Jun 2019 15:18:29 +0000 (10:18 -0500)]
Bug 23218: Fix shift in patron's attributes in batch patron modification

When the "new" button is clicked without selecting a patron's attribute, the update will have unexpected behaviors.

There is indeed a difference in the number of patron's attributes and the number of values.

Test plan:
Go to the batch patron modification
Enter a cardnumber
At the bottom of the page, click "new" without selecting an attribute
On the second line select one, and a value (different than an empty
string)
Save
=> The attribute will be updated with an empty string

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>
5 years agoBug 23048: Hide non-pickup branches from hold modification select
Pasi Kallinen [Thu, 27 Jun 2019 11:03:02 +0000 (14:03 +0300)]
Bug 23048: Hide non-pickup branches from hold modification select

When modifying holds in staff client via reserve/request.pl or
the holds-tab in members/moremember.pl, the pickup library dropdown
lists libraries not marked for pickup. Hide those branches,
unless the branch is marked as a pick-up branch for already
existing hold.

The reason for showing a non-pickup branch for the holds created
before the branch was marked as non-pickup: If the non-pickup branch
wasn't shown, the branch in those holds would get set to the first
branch in the select if the hold was modified.

Test plan:
1) Create a hold for a patron, to be picked up from a certain branch.
2) Edit the branch and another branch so they are no longer
   pickup locations.
3) Go to members/moremember.pl for that patron, check the Holds-tab
   Pickup library -drop down. It lists both of the non-pickup branches.
4) Go to reserve/request.pl for that biblio. The hold-table
   Pickup library -drop down lists both of the non-pickup branches.
5) Apply patch.
6) Repeat 3 & 4, drop down no longer lists the non-pickup branch, but
   should still list the branch where the hold was marked to be picked
   from.

Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23145: Confirming transfer during checkin clears the table of previously checked...
Owen Leonard [Tue, 16 Jul 2019 18:05:23 +0000 (18:05 +0000)]
Bug 23145: Confirming transfer during checkin clears the table of previously checked-in items

This patch corrects the checkin template so that checking in an item
with an existing transfer does not clear the page of previous checkouts.

To test, apply the patch and check in some items.

 - After each checkin the returned item should appear in the table of
   checkouts.
 - Check in an item which belongs to another branch. You will be asked
   to confirm that the items requires a transfer. When the page reloads
   you should see the same previous checkins in the table.
 - Check in that same item again. You will be again asked to confirm.

   Before this page, confirming the transfer would reload the page and
   clear the list of checkins. Now the page should reload and the table
   of checkins should still show the previously checked-in items.

Test all the actions when checking in an item which is already in
transit: OK, Print transfer slip, and Cancel transfer.

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20607: (QA follow-up) Test corrections
Nick Clemens [Tue, 16 Jul 2019 18:13:57 +0000 (18:13 +0000)]
Bug 20607: (QA follow-up) Test corrections

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20607: Make Koha::SearchEngine::Elasticsearch::reset_elasticsearch_mappings take...
Alex Arnaud [Tue, 24 Apr 2018 13:10:38 +0000 (13:10 +0000)]
Bug 20607: Make Koha::SearchEngine::Elasticsearch::reset_elasticsearch_mappings take weight into account

Test plan:
  - apply this patch,
  - edit admin/searchengine/elasticsearch/mappings.yaml
    to add weight for some fields,
  - go to admin > search engine configuration,
  - reset your mappings (add ?op=reset&i_know_what_i_am_doing=1 to url),
  - check that weights you've added are set

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23151: DBRev 19.06.00.013
Martin Renvoize [Fri, 19 Jul 2019 09:07:17 +0000 (10:07 +0100)]
Bug 23151: DBRev 19.06.00.013

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23151: (QA follow-up) Remove debug leftover
Marcel de Rooy [Fri, 19 Jul 2019 08:04:45 +0000 (08:04 +0000)]
Bug 23151: (QA follow-up) Remove debug leftover

Removes: Running... Running... Ran

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23151: (QA follow-up) Fix atomic update
Kyle M Hall [Fri, 28 Jun 2019 14:15:40 +0000 (10:15 -0400)]
Bug 23151: (QA follow-up) Fix atomic update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23151: (follow-up) tweaked tests
Mark Tompsett [Wed, 19 Jun 2019 16:31:17 +0000 (16:31 +0000)]
Bug 23151: (follow-up) tweaked tests

This forces the tests to use the new changed_fields
field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23151: Add tests
Jonathan Druart [Wed, 19 Jun 2019 03:54:27 +0000 (22:54 -0500)]
Bug 23151: Add tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23151: Tweak to use the new database structure
Mark Tompsett [Wed, 19 Jun 2019 16:29:59 +0000 (16:29 +0000)]
Bug 23151: Tweak to use the new database structure

This will use changed_fields to know whether a
borrower field is actually modified.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23151: Schema changes
Mark Tompsett [Wed, 19 Jun 2019 16:32:10 +0000 (16:32 +0000)]
Bug 23151: Schema changes

It is best to regenerate these from scratch.
On a kohadevbox:
$ misc/devel/update_dbix_class_files.pl --db_name=koha_kohadev --db_user=koha_kohadev --db_passwd=password

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23151: Modifiy database structure
Mark Tompsett [Wed, 19 Jun 2019 16:28:44 +0000 (16:28 +0000)]
Bug 23151: Modifiy database structure

This modifies a fresh install structure, and provides
an atomic update.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21316: Handle control fields in the ACQ frameworks
Jonathan Druart [Tue, 5 Mar 2019 19:09:07 +0000 (16:09 -0300)]
Bug 21316: Handle control fields in the ACQ frameworks

Test plan:
- Turn UseACQFrameworkForBiblioRecords on
- Add 003@ to the ACQ framework
- Create an order from an existing record
=> The 003 value will be displayed!

It fixes the following error:
Control fields (generally, just tags below 010) do not have subfields,
use data() at /home/vagrant/kohaclone/acqui/neworderempty.pl line 293.

Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23315: (follow-up) Add configuration to enable CodeMirror
Owen Leonard [Mon, 15 Jul 2019 13:11:13 +0000 (13:11 +0000)]
Bug 23315: (follow-up) Add configuration to enable CodeMirror

This patch adds the "syntax" parameter to the corrected system
preferences so that the textareas will be displayed as CodeMirror
editors.

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

Circulation -> SelfCheckHelpMessage
Staff client -> IntranetmainUserblock
Staff client -> IntranetCirculationHomeHTML
Staff client -> IntranetReportsHomeHTML
Staff client -> StaffLoginInstructions

With UseWYSIWYGinSystemPreferences disabled, the preferences should be
displayed as CodeMirror editors. With  UseWYSIWYGinSystemPreferences
enabled they should be WYSIWYG editors.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23315: Some systempreferences can not be edited
Chris Cormack [Mon, 15 Jul 2019 02:28:16 +0000 (14:28 +1200)]
Bug 23315: Some systempreferences can not be edited

To test
1/ Go to systempreferences
2/ Notice that SelfCheckHelpMessage IntranetmainUserblock
IntranetCirculationHomeHTML IntranetReportsHomeHTML
StaffLoginInstructions are not editable
3/ Apply patch, refresh page
4/ Now they can be edited

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23057: (QA follow-up) Remove new AddReturn message ReturnOfLostItemBlocked, use...
Kyle M Hall [Tue, 11 Jun 2019 11:46:57 +0000 (07:46 -0400)]
Bug 23057: (QA follow-up) Remove new AddReturn message ReturnOfLostItemBlocked, use existing pattern from returns.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23057: Update do_checkin
Kyle M Hall [Thu, 6 Jun 2019 16:42:46 +0000 (12:42 -0400)]
Bug 23057: Update do_checkin

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23057: Unit tests
Kyle M Hall [Thu, 6 Jun 2019 14:37:11 +0000 (10:37 -0400)]
Bug 23057: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23057: If checked_in_ok is set and item is not checked out, alert flag is supress...
David Cook [Thu, 6 Jun 2019 00:31:13 +0000 (10:31 +1000)]
Bug 23057: If checked_in_ok is set and item is not checked out, alert flag is supressed for *any* reason

This patch fixes a bug from Bug 15221 and hopefully also makes it so that the alert flag
is suppressed when checked_in_ok is set and an item is not checked out.

To test:

0) Create patron in web interface with a cardnumber and userid of "staff" with a password
that matches the account in SIPconfig.xml. Also set their branch to CPL
(also matching SIPconfig.xml).
1) Create an item with a barcode of 'test'
2) Choose a patron to check out to and record their borrowernumber

In one terminal:
3) cd to your git directory (e.g. /home/koha/koha)
4) perl ./C4/SIP/SIPServer.pm ~/koha-dev/etc/SIPconfig.xml

In another terminal:
5) cd to your git directory (e.g. /home/koha/koha)
6) perl ./misc/sip_cli_emulator.pl -l CPL -su staff -sp <password> --port=6001 --address=localhost --item test -m checkin --patron <borrowernumber>
NOTE: You need to replace <borrowernumber> with the borrowernumber from Step 2, and <password> with the password from Step 0.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18930: (RM follow-up) Restore primary key find
Martin Renvoize [Fri, 12 Jul 2019 13:55:09 +0000 (14:55 +0100)]
Bug 18930: (RM follow-up) Restore primary key find

The find method in RefundLostItemFeeRules had been overloaded to only
support a hash being passed, however find can be called with a bare
array of primary key values (i.e. id in this case).  TestBuilder relies
on this functionality and started to fail; This patch simply restores
the original behaviour for when a single value (or array of values) is
passed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23192: (RM follow-up) Add missing filters to waiting_holds.inc
Martin Renvoize [Mon, 15 Jul 2019 12:55:36 +0000 (13:55 +0100)]
Bug 23192: (RM follow-up) Add missing filters to waiting_holds.inc

Added a missing `html` filter to the 'tab' input which was added as part
of bug 23192

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18930: (RM follow-up) Drop refund_lost_item_fee_rules
Martin Renvoize [Fri, 12 Jul 2019 13:08:56 +0000 (14:08 +0100)]
Bug 18930: (RM follow-up) Drop refund_lost_item_fee_rules

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23299: Switch address1 and streetnumber for German address format on opac-memberentry
Marcel de Rooy [Thu, 11 Jul 2019 10:16:35 +0000 (10:16 +0000)]
Bug 23299: Switch address1 and streetnumber for German address format on opac-memberentry

Test plan:
Toggle value of pref AddressFormat and verify change on opac-memberentry.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
5 years agoBug 23219: (QA follow-up) Change wording of test slightly
Katrin Fischer [Fri, 12 Jul 2019 06:15:38 +0000 (06:15 +0000)]
Bug 23219: (QA follow-up) Change wording of test slightly

We no longer delete, but cancel the holds when deleting a patron.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23219: (QA Follow up) Cancel patrons holds when patron delete
Emmi [Tue, 9 Jul 2019 06:24:30 +0000 (09:24 +0300)]
Bug 23219: (QA Follow up) Cancel patrons holds when patron delete

Adds test for patrons holds cancelation when patron is deleted.

Test plan:
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23219: Cancel patrons holds when patron delete
Emmi [Tue, 2 Jul 2019 08:05:36 +0000 (11:05 +0300)]
Bug 23219: Cancel patrons holds when patron delete

Currently deleting a patron deletes all their holds and leaves
no record to the "old_reserves" table.

 Steps to reproduce:
- Create a patron
- Add holds for patron
- Holds are recorded to "reserves" table
- Delete patron
- Confirm delete
=>Patron and all holds are deleted and no record of holds is
left in "old_reserves" table

This patch displays alert text notifying user that deleting patron
cancels all their holds. Holds are cancelled instead of deleting them.
This patch also writes stringified datetime to holds cancel log instead
of whole datetime object.

To test:
- Apply this patch
- Create a patron
- Add holds for patron
- Holds are recorded to "reserves" table
- Delete patron
- Alert text of holds is displayed
- Confirm patron delete
=> Patron is deleted, their holds are cancelled and moved to
"old_reserves" table

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22768: Global search form keyboard navigation broken
Owen Leonard [Thu, 25 Apr 2019 11:45:58 +0000 (11:45 +0000)]
Bug 22768: Global search form keyboard navigation broken

Bug 22045 made changes to the global staff client JavaScript which
broken keyboard navigation for the most common forms in the resident
search form("Check out, Check in, Renew, Search). This patch
reimplements the tab selection code on the basic MARC editor page so
that the keyboard shortcut behavior can be restored.

To test, apply the patch go to Cataloging.

 - Search for an existing record and edit it in the basic MARC editor.
   - Test that the numbered tabs (0-9) at the top work correctly.
 - Select a tab other than 0 and choose Save -> Save and continue
   editing. When the page reloads you should be returned to the tab you
   were on when you saved.
 - Go to the Circulation home page. Test the keyboard shortcuts for
   switching tabs in header area:

   - Alt-u (Check out)
   - Alt-r (Check in)
   - Alt-w (Renew)
   - Alt-q (Search)

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22709: (RM follow-up) AddBiblio returns a list not a scalar
Martin Renvoize [Mon, 15 Jul 2019 11:37:42 +0000 (12:37 +0100)]
Bug 22709: (RM follow-up) AddBiblio returns a list not a scalar

AddBiblio was being called in scalar context in
Biblio_and_Items_plugin_hooks.t and this was leading to difficult to
reproduce test failures. If the tests was run after any other test that
also called AddBiblio then it would fail, but if it was run as the first
test it would pass. This is due to a fluke in processing which meant the
the final return value of the list (itemnumber) happened to match a
biblionumber.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 11642: change / to and in related tools menu
Mark Tompsett [Tue, 11 Jun 2019 14:31:48 +0000 (14:31 +0000)]
Bug 11642: change / to and in related tools menu

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 11642: (follow-up) Improve Batch patron deletion and anonymization GUI to make...
Owen Leonard [Mon, 10 Jun 2019 13:30:56 +0000 (13:30 +0000)]
Bug 11642: (follow-up) Improve Batch patron deletion and anonymization GUI to make consequences clearer

This patch makes some template changes to try to make this interface
more consistent with other areas of Koha and to make warnings more
clear.

I have also changed the phrase "deletion/anonymization" to "deletion and
anonymization."

To test, apply the patch and test the patron deletion and anonymization
process and confirm that the interface is clear and works well.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 11642: Add confirmation and tooltips to batch deletion tool
Nick Clemens [Thu, 6 Jun 2019 15:16:35 +0000 (15:16 +0000)]
Bug 11642: Add confirmation and tooltips to batch deletion tool

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21027: Fix checkout statistics if 1+ of the fields is not defined
Jonathan Druart [Mon, 29 Apr 2019 00:55:02 +0000 (20:55 -0400)]
Bug 21027: Fix checkout statistics if 1+ of the fields is not defined

TEST

- Use a patron who hasn't checked out items before
- Set  StatisticsFields to itype|ccode
- Check out some items without location
- Verify that statistics stable shows the correct number of checkouts
- Check out one item with a location or just change one of your checked out items
- Verify the total is still correct
- Change  StatisticsFields to location|itype|ccode
- Verify the total has changed now - it's only 1 (the one with a location)

Apply the patch and try again

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23308: Change html to filter to $raw
Andrew Isherwood [Fri, 12 Jul 2019 14:37:26 +0000 (15:37 +0100)]
Bug 23308: Change html to filter to $raw

This patch changes the erroneous html filter to $raw

Test plan:
- Apply patch
- Enter some HTML into the OpacMaintenanceNotice syspref
- View the OPAC front page
=> TEST: Observe that the notice displays correctly and the HTML is not
escaped

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls
Josef Moravec [Wed, 17 Apr 2019 06:02:59 +0000 (06:02 +0000)]
Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls

Test plan:
Run tests, at least:
    t/db_dependent/Biblio.t
    t/db_dependent/Biblio/TransformHtmlToMarc.t
    t/db_dependent/Charset.t
    t/db_dependent/Circulation/GetTopIssues.t
    t/db_dependent/Filter_MARC_ViewPolicy.t
    t/db_dependent/ImportBatch.t
    t/db_dependent/Items.t
    t/db_dependent/Items/AutomaticItemModificationByAge.t
    t/db_dependent/Items/GetItemsForInventory.t
    t/db_dependent/Koha/Filter/EmbedItemsAvailability.t
    t/db_dependent/Serials.t
    t/db_dependent/XISBN.t
    t/db_dependent/FrameworkPlugin.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20364: Show languages from MARC21 field 041 in intranet
Pasi Kallinen [Fri, 9 Mar 2018 09:05:52 +0000 (11:05 +0200)]
Bug 20364: Show languages from MARC21 field 041 in intranet

Show the language names coded in field 041, in intranet search
results and in detail view.

Test plan:
1) Apply patch
2) Do a search, and check the results look correct
3) Check some biblio detail pages that they look correct
4) Add some 041 subfields (a, b, d, h, j) in any combinations
5) Repeat 2 and 3

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23259: Compiled CSS
Martin Renvoize [Thu, 11 Jul 2019 15:18:51 +0000 (16:18 +0100)]
Bug 23259: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23259: Remove reset-fonts-grids.css
Owen Leonard [Wed, 3 Jul 2019 18:30:38 +0000 (18:30 +0000)]
Bug 23259: Remove reset-fonts-grids.css

This patch removes the CSS file reset-fonts-grids.css which was required
when the staff client templates used YUI grids. Now that all staff
client templates have been converted to Bootstrap grid markup the file
can be deleted.

Because the YUI CSS also did set some baseline properties for different
tags the global SCSS file is modified in this patch in order to keep
things looking consistent. Most of these updates change font-size
declarations to preserve the previous appearance.

Some styling has been added to (non Bootstrap-classed) <input> and
<button> tags in order to keep button style consistent.

Removed from staff-global.scss: YUI-specific CSS which has been made
obsolete by the template conversions.

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).
Clear your browser cache if necessary.

Browse through various pages of thes staff client to confirm that the
changes work well.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23197: Add more batch operation options to SQL report results
Owen Leonard [Mon, 24 Jun 2019 18:48:29 +0000 (18:48 +0000)]
Bug 23197: Add more batch operation options to SQL report results

This patch extends the feature which allows the user to send item
numbers from a page of report results to batch item modification. For
biblionumbers: Batch record modification, batch record deletion, and
add to list are now available. For item numbers: batch item deletion is
added.

A new menu button is added for these options at the top of report
results, removing the button from the item number column header.
Corresponding CSS has been removed.

To test, apply the patch and create a report which includes both
biblionumber and itemnumber columns in the results.

 - Run the report and confirm that a new "Batch operations" button
   appears at the top of the results. Test each option:
   - Batch record modification
   - Batch record deletion
   - Add to list
   - Batch item modification
   - Batch item deletion

In each case the correct set of parameters should be passed to the batch
operations. Test with reports which return only biblionumbers, only
itemnumbers, and neither.

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>
5 years agoBug 23094: Use Bootstrap-style pagination on staged MARC records page
Owen Leonard [Wed, 26 Jun 2019 14:57:18 +0000 (14:57 +0000)]
Bug 23094: Use Bootstrap-style pagination on staged MARC records page

This patch makes markup changes in order to make the pagination links on
the staged MARC records page consistent with the links on the catalog
search results page.

To test properly you should have enough staged marc record batches that
there are multiple pages to list.

Go to Tools -> Manage staged MARC records. Test that the pagination
links look consistent with the catalog search results page and that they
work correctly.

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>
5 years agoBug 23221: (follow-up) Add comments on markup structure
Owen Leonard [Wed, 26 Jun 2019 17:52:52 +0000 (17:52 +0000)]
Bug 23221: (follow-up) Add comments on markup structure

This patch adds a few comments to the markup in order to highlight the
structure of the page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23221: Reindent tools/manage-marc-import.tt
Owen Leonard [Wed, 26 Jun 2019 14:29:24 +0000 (14:29 +0000)]
Bug 23221: Reindent tools/manage-marc-import.tt

This patch reformats the template for the Manage staged MARC records
page. It makes only whitespace changes. It should have no effect on the
behavior of the page.

In addition to re-indentation, some lines have been broken up. These
should be the only changes highlighted when using diff while ignoring
whitespace.

To test, apply the patch and view the Manage staged MARC records page.
The page should look correct and work correctly:

 - Paging through results
 - Viewing batches
 - Cleaning batches
 - Deleting batches

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19919: Unit Tests
Martin Renvoize [Thu, 16 May 2019 07:49:22 +0000 (08:49 +0100)]
Bug 19919: Unit Tests

This patch adds unit tests for the addition of a patron accessor to the
Koha::Account::Line object.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19919: Stop using paidfor altogether
Martin Renvoize [Fri, 3 May 2019 14:44:35 +0000 (15:44 +0100)]
Bug 19919: Stop using paidfor altogether

This patch removed references to setting and getting the items.paidfor
field. Where it was used for display, in moredetail.pl, we replace it
with a query on the accountlines.

Test plan:
1) Apply patch
2) Pay off a LOST item
3) Check for the associated display of 'Paidfor?:' on the itemdetails
page
4) Writeoff a LOST item
5) Check that a 'Paidfor?:' is not displayed on the itemdetails page.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>