]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 22246: Fix indexing of large fields with Elasticsearch
Ere Maijala [Fri, 1 Feb 2019 11:18:11 +0000 (13:18 +0200)]
Bug 22246: Fix indexing of large fields with Elasticsearch

Deduplicate multivalued fields and make sure sort fields are not excessively long. Also updates default mappings so that sort fields are not created for item fields where it doesn't make sense.

Test plan:
1. Reset ES mappings in administration
2. Check that sort is '0' for local-classification in biblio mappings.
3. Change sort back to '1' for local-classification for the next steps.
4. Create a record with 20 items, each with a 100 character long call number
5. Check that when indexed, the record in ES does not have duplicates in any of the item fields and local-classification__sort is truncated to 255 characters.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bd68e2f75b2bd0cae7935715f4aa03342809cb9f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22416: (bug 22140 follow-up) Remove warnings in Search.t
Jonathan Druart [Tue, 5 Mar 2019 17:29:58 +0000 (14:29 -0300)]
Bug 22416: (bug 22140 follow-up) Remove warnings in Search.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eb7b2907c55d896a7c5b8bccf31daeae8bc5720b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22419: Records listed twice when select/unselect all from the cart
Jonathan Druart [Tue, 5 Mar 2019 18:16:44 +0000 (15:16 -0300)]
Bug 22419: Records listed twice when select/unselect all from the cart

It fixes a browser timeout when records are removed from the cart.
The onchange event already call selRecord.

Test plan:
Launch a search
Add all the result to your cart
Open the cart
Click "select all"
Then remove them all from your cart
=> Without this patch the action will timeout
=> With this patch applied the action is immediate

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a0e10d97223ae2945f6ac64b7d86f4ac2fea9e03)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22275: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation
Jonathan Druart [Wed, 27 Feb 2019 12:38:57 +0000 (09:38 -0300)]
Bug 22275: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation

18.06.00.060 will fail if custom Classification sources were created.

In that case we should use the 'generic' split rule.

Test plan:
% git checkout -b bug_22395_pre 3a0cba67f1387595f570ab9d9efdeabc856345b4
Reset the DB
Go to  Home › Administration › Classification sources
Create a custom "Classification filing rules"
Create a custom "Classification sources" using this filing rules
% git checkout master
% perl installer/data/mysql/updatedatabase.pl
=> Without this patch you will get:
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`#sql-33a_67`, CONSTRAINT `class_source_ibfk_2` FOREIGN KEY (`class_split_rule`) REFERENCES `class_split
_rules` (`class_split_rule`)) [for Statement "
            ALTER TABLE class_sources
            ADD CONSTRAINT class_source_ibfk_2 FOREIGN KEY (class_split_rule)
            REFERENCES class_split_rules (class_split_rule)
        "] at installer/data/mysql/updatedatabase.pl line 17104.

=> With this patch applied the FK will be created successfully
class_sources.class_split_rule will be set to "generic" for these custom values.

Signed-off-by: Oliver Behnke <oliver.behnke@aei.mpg.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 29bc2b583264a62c29a0f39dd79a5b3a64721ae6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20535: ModZebra called with $record with items stripped
David Gustafsson [Fri, 6 Apr 2018 09:15:07 +0000 (11:15 +0200)]
Bug 20535: ModZebra called with $record with items stripped

ModZebra called with $record with items stripped in
ModBiblioMarc. Remove $record argument to force
record to be loaded again from database with items
embedded.

How to test:
1) Make sure biblios are indexed (with
   rebuild_elastic_search.pl).
2) Perform a search that will produce a sample result
   containing at least one biblio with items.
3) Edit and save a biblio with items.
4) Perform the same search again, the updated biblio
   should now have no items when viewed in the search
   results (No items).
5) Apply patch.
6) Repeat step 1-3.
7) The updated biblio should now have items when viewed
   in the search results.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ebf1a26dae62651d1749a2df2e54ee6d1af148a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16251: Fix value of material select for Rancor 008 widget
Julian Maurice [Wed, 6 Mar 2019 07:58:03 +0000 (08:58 +0100)]
Bug 16251: Fix value of material select for Rancor 008 widget

The material type is selected in accordance with the leader (06-07)

Test plan:
1. Create a new record using the advanced editor
2. Set the leader 6th position to 'c'
3. Save the record and reload the page
4. 'Music' should be automatically selected for 008
5. Try other values for the leader 6th and 7th positions

See comment 0 of this bug for the complete mapping

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>
(cherry picked from commit 926d7c4ba11ad6cd768c884ec4b2dc71d864b64c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22466: Replace existing occurrences
Jonathan Druart [Wed, 6 Mar 2019 14:59:58 +0000 (11:59 -0300)]
Bug 22466: Replace existing occurrences

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9ff997eda7582dbb68d599ab1436b162dd1559da)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22466: Do not ask for TT methods to be filtered
Jonathan Druart [Wed, 6 Mar 2019 14:59:55 +0000 (11:59 -0300)]
Bug 22466: Do not ask for TT methods to be filtered

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 158b3c3a4cfc8a97cc98a3473ca70395fdb398e1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22466: Add tests
Jonathan Druart [Wed, 6 Mar 2019 14:59:35 +0000 (11:59 -0300)]
Bug 22466: Add tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c7ef8e6b2db5830745759ad15fe9d6379f6f62b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18584: remove trailing space from C4/XSLT.pm
Hayley Mapley [Sun, 3 Mar 2019 22:26:54 +0000 (22:26 +0000)]
Bug 18584: remove trailing space from C4/XSLT.pm

Test plan:
1) Open C4/XSLT.pm and confirm that the trailing space at line 313 is
gone.
2) Sign off.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 62b4fbb9dd6b440630251fd6686bf7af83b6d5e2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22404: Fix parameter "for" of labels in subscription add form
Josef Moravec [Mon, 25 Feb 2019 08:46:11 +0000 (08:46 +0000)]
Bug 22404: Fix parameter "for" of labels in subscription add form

Attribute "for" of tag labelshould contain input id, not name.

Test plan:
1) Go to serials -> add subscription second step
2) Click on labels of these three fields:
    - First issue publication date
    - Subscription start date
    - Subscription end date

--> without patch, nothing happen
--> with path, the datepicker is shown

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d6d91ac32fdd6c8f3e5fad19a29a943044ec0214)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22228: Update test for updated mappings
Nick Clemens [Mon, 4 Mar 2019 18:37:43 +0000 (18:37 +0000)]
Bug 22228: Update test for updated mappings

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ec4ea59ec55de1816b47ab13f33597e4eb9c7664)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22228: Escape lone colons and make sure term is balanced
Ere Maijala [Thu, 31 Jan 2019 11:43:00 +0000 (13:43 +0200)]
Bug 22228: Escape lone colons and make sure term is balanced

Escapes unquoted colons that have whitespace on either side. Removed unbalanced quotes.

Test plan:

1. Make sure the test case described in the bug works
2. Make sure tests pass:
  prove t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Björn Nylén <bjorn.nylen(at)ub.lu.se>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit dd98584c8572b85afbd68ff98423605df9b18822)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: DBRev 18.11.03.002
Nick Clemens [Mon, 4 Mar 2019 18:30:55 +0000 (13:30 -0500)]
Bug 19575: DBRev 18.11.03.002

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ff20d029e397acbac2ddaf9d11e6a0a7dc184ce2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: Don't lower case fields in db and use update script instead of raw SQL
David Gustafsson [Mon, 18 Feb 2019 13:56:17 +0000 (14:56 +0100)]
Bug 19575: Don't lower case fields in db and use update script instead of raw SQL

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a17c2d9c9fb08ce362b07c3ea1420ae30f0527e8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: (RM follow-up) Fix mapping typo
Nick Clemens [Fri, 15 Feb 2019 14:49:33 +0000 (14:49 +0000)]
Bug 19575: (RM follow-up) Fix mapping typo

Found with QA tools, simple fix

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7df5b35a36e859f745f42b5c857cd965c83b55f3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: Keep authority-number as alias and fix query
David Gustafsson [Thu, 14 Feb 2019 15:52:04 +0000 (16:52 +0100)]
Bug 19575: Keep authority-number as alias and fix query

Keep authority-number as alias and change field name
from alias to real field in hard coded Elasticsearch query

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eeda2afd3a710cbf4115b96f1386294df7693252)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: Fix an search field
Nick Clemens [Thu, 14 Feb 2019 12:44:13 +0000 (12:44 +0000)]
Bug 19575: Fix an search field

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ef2a03a09249ee53ff2c431085673aca3f7c9863)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: Rebase and fix tests
root [Tue, 12 Feb 2019 21:52:39 +0000 (21:52 +0000)]
Bug 19575: Rebase and fix tests

This patch lower cases the sort by fields to normalize checking them and adjusts
some existing tests to meet the new expectations.

The regex for splitting terms has been moved into a subroutine so that adjustment was made

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c2061adc8be1a6843c0e082c18629f4a6b8fac78)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: Use canonical field names and resolve aliased fields
David Gustafsson [Fri, 3 Nov 2017 12:21:22 +0000 (13:21 +0100)]
Bug 19575: Use canonical field names and resolve aliased fields

Adjust elastic search mappings to more closely match Zebra equivalents
resolving serveral issues with coded Zebra searches in templates and
sorting of search results in UI. Also make field names in search strings
case insensitive to accept case variations in template links and user input.

Sponsored-by: Gothenburg University Library
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6d53910f0ca05ae41b0d10ce6f3eb274efd3aca4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22360: (bug 21205 follow-up) Restore OPACAcquisitionDetails behavior
Jonathan Druart [Thu, 21 Feb 2019 18:28:10 +0000 (15:28 -0300)]
Bug 22360: (bug 21205 follow-up) Restore OPACAcquisitionDetails behavior

Caused by
  commit 7d10549ae8632e6640d3a99014268a2a1e46b3c4
  Bug 21205: Replace C4::Items::GetOrderFromItemnumber calls

At this point $order is a Koha::Acquisition::Order object, not a hashref
anymore.

Test plan:
Create an order, receive items
Enable OPACAcquisitionDetails
At the detail page of the bibliographic record you should see
"X items are on order." at the bottom of the items list

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2331b8a295ce3db011b88bf3d42eacd42c9df4ee)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22300: Compiled CSS
Martin Renvoize [Tue, 5 Mar 2019 14:36:46 +0000 (14:36 +0000)]
Bug 22300: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22300: Staff search results: Opt groups in 'sort' pull down are not well formatted
Owen Leonard [Mon, 11 Feb 2019 15:09:36 +0000 (15:09 +0000)]
Bug 22300: Staff search results: Opt groups in 'sort' pull down are not well formatted

This patch adds some CSS to style the staff client search results sort
menu headings. Formerly these were <optgroup> tags with a default
browser style.

To test, apply the patch and regenerate the staff client CSS.

 - Perform a catalog search in the staff client.
 - On the search results page, test the "Sort" menu. Confirm that the
   menu headers more clearly indicate the sections.
 - Test the "Add to list" button menu too, where the same style will be
   in use.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0375414c04e97ce21270c114311a3d96403f8da5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22084: Plugin upgrade method and database plugin version storage will never be...
Kyle M Hall [Tue, 8 Jan 2019 18:10:53 +0000 (13:10 -0500)]
Bug 22084: Plugin upgrade method and database plugin version storage will never be triggered for existing installs

If an existing plugin begins using the upgrade() method, it will never actually get triggered because the installation has already occurred and no database plugin version was stored at the time. Without that database version, the upgrade method will never be triggered.

In addition, if the plugin has no upgrade method, the installed version is never updated in the database!

Lastly, when an upgrade succeeds it prints a warning that the upgrade failed.

Test Plan:
1) Install an older version of the Kitchen sink plugin:
   * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/download/v2.1.0/koha-plugin-kitchen-sink-v2.1.0.kpz
2) Delete the "__INSTALLED_VERSION__" key, and the "last_upgraded" key from plugin_data for this plugin, to simulate having installed from an earlier version of Koha
3) Upgrade to the latest version of the Kitchen sink plugin:
   * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/download/v2.1.22/koha-plugin-kitchen-sink-v2.1.22.kpz
4) Note "__INSTALLED_VERSION__" still doesn't exist for the plugin, in the plugin_data table
5) Apply this patch
6) Restart all the things
7) Browse to the Kitchen sink configuration page, this should trigger the upgrade method
8) Note the "__INSTALLED_VERSION__" and "last_upgraded" keys exist in plugin_data for the Kitchen Sink plugin

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8c2e03020dc02519dec70b9697794a3624c73937)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22084: Regression tests
Tomas Cohen Arazi [Wed, 9 Jan 2019 10:33:15 +0000 (07:33 -0300)]
Bug 22084: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 57f4c01b9a09d1c2e0fc8a3449ba86574775b840)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume
Tomas Cohen Arazi [Mon, 11 Feb 2019 19:05:23 +0000 (16:05 -0300)]
Bug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume

This patch makes the mentioned method use the biult-in method for
resuming a suspended hold, instead of manually setting the specific
attributes using the accessors.

The side effect for this is that HoldsLog is now honoured.

This patchset also refactors the tests a bit so they rely on the exposed
methods and thus don't rely on specific implementation details (like
suspended hold means a date in suspended_until plus suspended=1).

To test:
- Apply the regression tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Reserves/AutoUnsuspendReserves.t
=> FAIL: It fails loudly because things are done manually
- Apply this patch
- Run:
 k$ prove t/db_dependent/Reserves/AutoUnsuspendReserves.t
=> SUCCESS: Tests pass!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7c3a5c78c1aacbdb0ad7eb758cb9880ecefcce3a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21765: Regression tests
Tomas Cohen Arazi [Mon, 11 Feb 2019 19:04:59 +0000 (16:04 -0300)]
Bug 21765: Regression tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d441ce5cdadba7a87570162b9f54600c82f150e2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22397: Wrong message in koha-sip --start
Tomas Cohen Arazi [Fri, 22 Feb 2019 14:31:52 +0000 (11:31 -0300)]
Bug 22397: Wrong message in koha-sip --start

This patch makes koha-sip --start calls mention 'SIP server' instead of
the wrong 'Zebra daemon'.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e47fa012f6e1ecf94712e0cb759625f136703c03)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22378: Fix audio alerts on SCO
Nick Clemens [Wed, 20 Feb 2019 20:00:01 +0000 (20:00 +0000)]
Bug 22378: Fix audio alerts on SCO

Note: The SCO only supports sounds with a full URL, not KOha built in sounds

To test:
1 - Enable audio alerts
2 -  Enable SCO
3 - Note JS error on loading the alerts
4 - Apply patch
5 - No more error
6 - Test with bug 18251

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fb4707b97cec006e0e6f5c4b4dd430146e97f16a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22411: Date and time in log viewer should respect
Josef Moravec [Mon, 25 Feb 2019 18:21:26 +0000 (18:21 +0000)]
Bug 22411: Date and time in log viewer should respect

Test plan:
Go to log viewer and show some log
-- without patch the date ant time in first column is formatted as
yyyy-mm-dd hh:mm
-- with patch the date is formatted according to your dateformat system
preference

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit dd8749661ce7e48e86fc4eeba3c7c42e0321184e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15149: Serial test prediction pattern does not consider end date
Fridolin Somers [Thu, 21 Feb 2019 16:21:58 +0000 (17:21 +0100)]
Bug 15149: Serial test prediction pattern does not consider end date

To reproduce:

1) add a serial.
2) set first issue = today
3) set frequency = 1/month
4) dont set subscription length
5) set subscription start date = today
6) set subscription start date = today + 1 year
7) set numbering pattern = Number
8) test prediction pattern.
=> Without patch : you will get a list of 1000 issues, going well beyond subscripton end date.
=> With patch : shows only the issues within the date range.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: zhihui <zhihui@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e3212c8a969ff17783e50d564aaa412bd01a99b1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18957: Record the time part of the last renewed date
Jonathan Druart [Fri, 22 Feb 2019 14:06:46 +0000 (11:06 -0300)]
Bug 18957: Record the time part of the last renewed date

issues.lastreneweddate is a datetime and we could record the time part
of the date.

Test plan:
Renew an issue
note that the time part of the last renewed date is set correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4585228ea9b5cc407dcec8e4bae499d59007ea96)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18957: Add tests
Jonathan Druart [Fri, 22 Feb 2019 14:01:38 +0000 (11:01 -0300)]
Bug 18957: Add tests

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 54fd0718da1bd27531c7f3ac4ea16d04fb15e634)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14850: (QA follow-up) Remove debugging code
Josef Moravec [Mon, 25 Feb 2019 09:18:50 +0000 (09:18 +0000)]
Bug 14850: (QA follow-up) Remove debugging code

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e99a6de09335fdbe227292835b5231b13d9c1f18)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14850: Funds from inactive budgets appear in 'Funds' dropdown on acqui/invoice.pl
Kyle M Hall [Fri, 22 Feb 2019 12:12:10 +0000 (07:12 -0500)]
Bug 14850: Funds from inactive budgets appear in 'Funds' dropdown on acqui/invoice.pl

Test Plan:
1) Create some inactive and active budgets
2) View an invoice in acquisitions
4) Note the shipping fund dropdown behaves like acqui/parcels.pl

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 831531d3bbd0e440693595d0b4fadc704b020d68)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22396: Make koha-sip set KOHA_HOME and KOHA_CONF correctly
Tomas Cohen Arazi [Fri, 22 Feb 2019 15:00:35 +0000 (12:00 -0300)]
Bug 22396: Make koha-sip set KOHA_HOME and KOHA_CONF correctly

This patch corrects a typo, and exports KOHA_CONF as other scripts do.

To test:
- Apply this patch
- Run:
  $ # in kohadevbox
  $ perl misc4dev/cp_debian_files.pl
- Try the new script
  $ sudo koha-sip --start kohadev
=> SUCCESS: tail -f /var/log/koha/kohadev/sip* doesn't show fatal errors
anymore
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7128db531c18d3c75a4bad3424bd77732c0d4687)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13515: (RMaint follow-up) Correction to Database Version
Martin Renvoize [Wed, 27 Feb 2019 08:53:55 +0000 (08:53 +0000)]
Bug 13515: (RMaint follow-up) Correction to Database Version

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22170: Improve display of add/edit library group modal
Katrin Fischer [Tue, 5 Feb 2019 21:44:58 +0000 (21:44 +0000)]
Bug 22170: Improve display of add/edit library group modal

Tries to bring the emodal for adding/editing library root
and sub groups more in line with the rest of Koha.

To test:
 - Go to Administration > Library groups
 - With and without patch test following actions:
   - Add a new root group
   - Edit root group
   - Add sub-group entry
   - Edit sub-group entry
- Verify that with the patch the display of the labels
  is more standard (bold and aligned to the right) and
  the input fields are a bit longer to allow for
  easier data entry.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 90b43c6e5fceda3d6bcc4fb24c99934331df1acc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22130: (follow-up) Show not for loan authorised values in batch checkout
Josef Moravec [Tue, 12 Feb 2019 21:33:50 +0000 (21:33 +0000)]
Bug 22130: (follow-up) Show not for loan authorised values in batch checkout

TEST PLAN
1) In Koha administration, search "BatchCheckouts".
2) Make sure "BatchCheckouts" is set at "Allow".
3) Make sure "BatchCheckoutsValidCategories" contains at least one
patron category.
5) Copy the barcode of an item and change the status document so it
cannot be loaned.
4) Choose a patron which belongs to the patron category at 3).
(their account should not be expired and they should not have active
 fees preferably)
5) Go to the patron details page.
6) Click on "Batch check out".
7) Enter the item barcode.
8) Notice a number is in brackets under the column "Information".
9) Apply patch.
10) Notice the status description has replaced the number.
11) Try it with both: AllowNotForLoanOverride on and off

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit abb1b4a75053aa026740e16cc0197d86f417818e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22130: Correct parameter to get authorized value description.
Pierre-Marc Thibault [Mon, 14 Jan 2019 19:02:49 +0000 (14:02 -0500)]
Bug 22130: Correct parameter to get authorized value description.

This patch corrects the error that shows an authorized value instead of the obvious description of the document status.

TEST PLAN
1) In Koha administration, search "BatchCheckouts".
2) Make sure "BatchCheckouts" is set at "Allow".
3) Make sure "BatchCheckoutsValidCategories" contains at least one patron category.
5) Copy the barcode of an item and change the status document so it cannot be loaned.
4) Choose a patron which belongs to the patron category at 3).
(their account should not be expired and they should not have active fees preferably)
5) Go to the patron details page.
6) Click on "Batch check out".
7) Enter the item barcode.
8) Notice a number is in brackets under the column "Information".
9) Apply patch.
10) Notice the status description has replaced the number.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9d69a4238269073fd03961e091b5099b85fea6e6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22080: (QA follow-up) Add filters
Kyle M Hall [Thu, 21 Feb 2019 12:16:24 +0000 (07:16 -0500)]
Bug 22080: (QA follow-up) Add filters

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d90d7a6ce7187016698c280adedf1cb892d320cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22080: Easier translation of ElasticSearch mappings page
Fridolin Somers [Fri, 11 Jan 2019 13:28:07 +0000 (14:28 +0100)]
Bug 22080: Easier translation of ElasticSearch mappings page

Actual translation of ElasticSearch mappings page contains a huge block with a lot of %s.
It makes translation hard.

This patch uses new method from Bug 15395 to split into several translation blocks.

Test plan :
1) Apply patch "Bug 22080: [DO NOT PUSH] test code"
2) Apply this patch
3) Enable ElasticSearch in SearchEngine preference
4) Go to Administration > Search engine configuration
5) Check page is OK
6) Update the PO files of a language : perl translate update xx-YY
7) Write translation strings in misc/translator/po/xx-YY-messages.po
8) Install translation : perl translate install xx-YY
9) Check translated page

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>
(cherry picked from commit da85289767975938e9e0778a8f64e6ef1eca8d97)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21335: Remove redundant includes of right-to-left.css
Katrin Fischer [Wed, 6 Feb 2019 04:31:28 +0000 (04:31 +0000)]
Bug 21335: Remove redundant includes of right-to-left.css

Fixes redundant includes of the right-to-left.css file.
There is no need to include it in the .tt files as it's part
of the doc-head-close.inc.

Note:
  Make sure your *BaseURL preferences are correctly set as
  this will make the switching between languages work
  correctly and throw you back to the start page otherwise
  every time you switch

Test:
- Install an RTL language like Arabic (ar-Arab)
- Test various pages with English and RTL language:
  - Authorities home page
  - Adding a new bibliographic record
  - Adding a new item or editing items
  - Advanced cataloguing (Rancor) editor
  - Labels start page
  - OPAC detail page
- Verify display is correct and right-to-left.css is available

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cdd14f05ae8672786e5306c41ff0f15ec9fed26f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18166: Show internal and vendor notes for receivied orders
Katrin Fischer [Wed, 6 Feb 2019 12:13:12 +0000 (12:13 +0000)]
Bug 18166: Show internal and vendor notes for receivied orders

This copies the logic for showing, adding and editing vendor
and internal notes from the pending orders to the received
orders.

To test:
- In acquisitions create a basket with orders
- Make your you have some internal and vendor notes
- Close the basket and receive shipment
- Create or reuse an invoice
- Receive some of your orders
- Verify that the notes don't show for received orders
- Apply patch
- Verify that the edit/change vendor/internal note links
  work the same on pending and received orders

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fe0a2474c9b6702e7d452032f7657da9b990e81a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16276: (RM follow-up) Fix update statement output
Nick Clemens [Fri, 22 Feb 2019 13:28:50 +0000 (13:28 +0000)]
Bug 16276: (RM follow-up) Fix update statement output

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 55332977bf4d70de9d78c324ad88b302d2174c10)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17236: Add minute and hours to last checked out item on circulation for hourly...
Katrin Fischer [Wed, 6 Feb 2019 12:27:53 +0000 (12:27 +0000)]
Bug 17236: Add minute and hours to last checked out item on circulation for hourly loans

This is a simple fix using the right TT filter:
[% issue.date_due | $KohaDates as_due_date => 1 %]

The time part of the due date will only display if it's an hourly loan (!=23:59)

To test:
- Check out 2 items
  - One with a loan period in days
  - One with a loan period in hours
- Verify the the due date only shows the date part
- Apply patch
- Return items and repeat
- Verify that now the time part will show for the hourly loan

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8211aad8c7ad772685b5e3624b3b55b738fe18a2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21692: (QA follow-up) Enhance test for new
Martin Renvoize [Tue, 19 Feb 2019 19:34:04 +0000 (19:34 +0000)]
Bug 21692: (QA follow-up) Enhance test for new

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 569c64252eba27607deb9eccefe7d72678c7bbb9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21692: created a test for Koha::Account->new
Jasmine Amohia [Thu, 17 Jan 2019 03:33:49 +0000 (03:33 +0000)]
Bug 21692: created a test for Koha::Account->new

Test plan:
1) Run test for /Koha/Account.t and confirm that all tests were
successful

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 34c36a32a057c3a9be062e4ea8b6ec46c41859a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21997: SIP patron information requests can lock patron out of account
Kyle M Hall [Thu, 13 Dec 2018 19:56:22 +0000 (14:56 -0500)]
Bug 21997: SIP patron information requests can lock patron out of account

Many SIP services send an empty password field (AD). Even if allow_empty_passwords is enabled for the given SIP account, this empty password is run though Koha's password checker which increments the number of login attempts for a patron. Thus repeated patron information requests can lock a patron out! Empty password fields in SIP should not call for a password check if allow_empty_passwords is enabled.

Test Plan:
1) Enable a patron password attempt with a limit of 3
2) Send 4 patron information requests with an empty AD field
3) Note the patron's account is now locked
4) Apply this patch
5) Repeat step 2 with a different patron
6) Note the patron's account does not get locked!

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fac2c172143b31255767684e4b22c0ba1ae0aaaf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21997: Unit tests
Kyle M Hall [Mon, 11 Feb 2019 18:16:10 +0000 (13:16 -0500)]
Bug 21997: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d0a6469ad58ccd6067bdfbb6cfb0e28dabc5862a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21622: Adjust incorrect GROUP BY clauses in acqui script
Jonathan Druart [Fri, 19 Oct 2018 15:18:19 +0000 (12:18 -0300)]
Bug 21622: Adjust incorrect GROUP BY clauses in acqui script

acqui/ordered.pl:    GROUP BY aqorders.ordernumber
acqui/spent.pl:    GROUP BY aqorders.ordernumbe

'koha_kohadev.aqorders.biblionumber' isn't in GROUP BY

Test plan:
- Create orders for different basket and using different funds
- Receive some of them
- Hit the ordered and spent pages (from the acqui home page)
=> The tables must contain the same data with and without this patch

Signed-off-by: Jasmine Amohia <jasmineamohia.student@wegc.school.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2d904a55e7f0d5da23d61e5272e36a75e4b68af2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22386: Remove debug statements
Jonathan Druart [Thu, 21 Feb 2019 16:25:22 +0000 (13:25 -0300)]
Bug 22386: Remove debug statements

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 25006c04da500078b2af1b14824b67076f2f9df5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22386: Define patron variable when matchign on extended attributes
Nick Clemens [Thu, 21 Feb 2019 14:30:22 +0000 (14:30 +0000)]
Bug 22386: Define patron variable when matchign on extended attributes

For all other methods we define a patron object and check the userid,
we just need to define the $patron here

To test:
0 - Apply unit test patch alone
1 - prove t/db_dependent/Koha/Patrons/Import.t
2 - It dies
3 - Apply this patch
4 - repeat tests
5 - It passes!

Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8a9c82c3ec42fb5c2937fa523170b3710288d7fd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22386: Unit tests
Nick Clemens [Thu, 21 Feb 2019 14:29:59 +0000 (14:29 +0000)]
Bug 22386: Unit tests

Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9f27a63b9ad770ac56e32a3e79d1ecb657534482)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22389: (bug 15836 follow-up) Add Delete regex links on creating splitting source
Jonathan Druart [Thu, 21 Feb 2019 16:42:30 +0000 (13:42 -0300)]
Bug 22389: (bug 15836 follow-up) Add Delete regex links on creating splitting source

The "Delete" link does not exist when the form is empty.

Test plan:
Create a new classification splitting source
Select "Regex" for routine
=> The delete link does not appear (you cannot remove if there is only
one input)
=> It a regex
=> The 2 delete links appear

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 63c5a813c994a4893eaef2cb87fcd26bc594c3e4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22391: Remove group by clause in ajax-getauthvaluedropbox.pl
Nick Clemens [Thu, 21 Feb 2019 16:48:22 +0000 (16:48 +0000)]
Bug 22391: Remove group by clause in ajax-getauthvaluedropbox.pl

To test:
1 - Enable strict sql modes
2 - Tail the error log
3 - Add an item to a basket - note that when fund selected you get an error
4 - Apply patch
5 - Repeat, no error

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ba7c3f51ccf72565fb721403e1b24c6a56284b49)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22388: Add missing +x flag to split_callnumbers
Jonathan Druart [Thu, 21 Feb 2019 15:23:05 +0000 (12:23 -0300)]
Bug 22388: Add missing +x flag to split_callnumbers

The following commit added this svc script but did not set the correct
permissions, +x was missing
  commit 328046e59cbf7c858b9218ac2adf27bb42784776
  Bug 15836: Add missing svc script

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e429c4b84d662fcc9466a5ed4ee38ba704881507)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18143: Silence ods MARC framework export flood
Mark Tompsett [Sun, 19 Feb 2017 00:50:32 +0000 (19:50 -0500)]
Bug 18143: Silence ods MARC framework export flood

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b0eb51c8066abbd645731593572277ca5b46715)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18143: Silence XML MARC Framework export flood
Mark Tompsett [Sun, 19 Feb 2017 00:21:59 +0000 (19:21 -0500)]
Bug 18143: Silence XML MARC Framework export flood

TEST PLAN
---------
1) Log in to staff client
2) Click Koha administration
3) Click MARC bibliographic framework
4) export default as xml
5) Read the error log
   -- it's floody and export is default framework
6) export another framework as xml
7) Read the error log
   -- it's floody and export is the correct framework
8) apply the patch
9) repeat steps 4-7
   -- expected frameworks exported, and no flooding.
10) run koha qa test tools

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 719153455c8c58fb8b1a8e9123acef5052dbd462)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20102: Remove attribute "text/css" for <style> element used in staff client templates
Owen Leonard [Thu, 29 Nov 2018 17:53:37 +0000 (17:53 +0000)]
Bug 20102: Remove attribute "text/css" for <style> element used in staff client templates

This patch modifies staff client templates to remove the "type"
attribute from <style> tags. The attribute is no longer valid.

To test, apply the patch and confirm the changes to the templates. The
appearance of the staff client should be unchanged.

Validating pages from the staff client should not return any errors
related to the <style> "type" attribute.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e55d16f0da01dc474dc2f4541926c1daf609aff0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21427: (QA follow-up) Fix for tabs
Martin Renvoize [Fri, 8 Feb 2019 16:54:37 +0000 (16:54 +0000)]
Bug 21427: (QA follow-up) Fix for tabs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d220725694302f187b3ff92c0eedda583919b735)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21427: Format prices on ordered/spent lists consistently
Katrin Fischer [Fri, 11 Jan 2019 21:55:35 +0000 (22:55 +0100)]
Bug 21427: Format prices on ordered/spent lists consistently

Some price information on the spent and ordered list already
used the $Price filter. With this patch all amounts should be
formatted according to the CurrencyFormat system preference.

Signed-off-by: Jack Kelliher <jke0429@stacmail.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 209570f89d050f22fa90eed6a8a70ad9eb56e8a2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22147: Hidden 'Batch modify' button on report print layout
Jasmine Amohia [Wed, 16 Jan 2019 21:26:10 +0000 (21:26 +0000)]
Bug 22147: Hidden 'Batch modify' button on report print layout

Test plan:
1) Create or run a report that has an itemnumber column
2) Notice the Batch modify button under the itemnumber heading
3) Print the page
4) Notice the button no longer shows on the printed page

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ea9fb91632d712a6f70f4a3382ba96b4db74f69)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21966: Fix descriptions of acquisition permissions to be more clear (again)
Katrin Fischer [Thu, 6 Dec 2018 14:17:37 +0000 (15:17 +0100)]
Bug 21966: Fix descriptions of acquisition permissions to be more clear (again)

This was already done and pushed on bug 3849, but some of it got
undone accidentally by a later patch.

To test:
- Check the acquisition permissions
- The *budget* permissions should clearly describe their
  use for 'funds'.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 940c5c0add3065d35f776a3a19ba87d936e84a0f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: Refactor tests using BASIC authentication
Tomas Cohen Arazi [Tue, 5 Feb 2019 11:24:31 +0000 (08:24 -0300)]
Bug 16497: Refactor tests using BASIC authentication

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 02aa348f653a46cae671f5949a27a205bd5cb4fa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: (follow-up) GET operations require staff access
Tomas Cohen Arazi [Fri, 18 Jan 2019 15:02:38 +0000 (12:02 -0300)]
Bug 16497: (follow-up) GET operations require staff access

With the introduction of the /public namespace all other endpoints, the
rest of the endpoints are restricted to privileged users.

This patch makes the GET /libraries and GET /libraries/:library_id
endpoints require 'catalogue' permissions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 562eaa154b9efa20431133db04823c4d36be742d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: (follow-up) Adapt to existing guidelines and RFC
Tomas Cohen Arazi [Fri, 11 Jan 2019 16:23:14 +0000 (13:23 -0300)]
Bug 16497: (follow-up) Adapt to existing guidelines and RFC

This patch makes the original implementation match what is specified on
the RFC [1].

The controller is updated, and so the tests.

To test:
- Apply this patches:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/libraries.t
=> SUCCESS: Tests pass!

[1] https://wiki.koha-community.org/wiki/Libraries_endpoint_RFC

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0718416ff1ca70a25bc12fa3b677fdeafd7854c8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: Add POD in Koha/REST/V1/Library.pm
Alex Arnaud [Tue, 5 Dec 2017 14:56:34 +0000 (14:56 +0000)]
Bug 16497: Add POD in Koha/REST/V1/Library.pm

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 311f5f38c328267244481c8e5419be01e7d0aa12)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: (follow-up) New column marcorgcode added
Tomas Cohen Arazi [Fri, 27 Oct 2017 15:07:50 +0000 (12:07 -0300)]
Bug 16497: (follow-up) New column marcorgcode added

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 145f578d267427fd7b0936918d988be1febe658c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: Add missing field in definitions due to bug 18066
Josef Moravec [Fri, 5 May 2017 10:49:37 +0000 (10:49 +0000)]
Bug 16497: Add missing field in definitions due to bug 18066

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 99ad829f991a30cd044995f3e93d52fc9b87dc1d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: Add /api/v1/libraries
Jiří Kozlovský [Sun, 31 Jul 2016 09:46:57 +0000 (11:46 +0200)]
Bug 16497: Add /api/v1/libraries

CRUD for libraries via REST API.

GET    /api/v1/libraries              - List all libraries
GET    /api/v1/libraries/{branchcode} - Get one Library
POST   /api/v1/libraries              - Add new Library
DELETE /api/v1/libraries/{branchcode} - Delete Library

Test plan:
  - apply patch
  - run tests: t/db_dependent/api/v1/libraries.t
  - test API with some API tool or simple curl

e.g.:
curl http://host:port/api/v1/libraries
curl http://host:port/api/v1/libraries/cpl

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 96456cadc28e7e4b442da76adb2c9b1ece5a68f1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 7143: (follow-up) Update about page for new devs (Academy)
Jonathan Druart [Fri, 15 Feb 2019 12:44:52 +0000 (09:44 -0300)]
Bug 7143: (follow-up) Update about page for new devs (Academy)

It's now 2019!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 47839084fb788d2d5339842dfb5c6029984f2928)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21845: Sort of issues in OPAC subscription table
Owen Leonard [Thu, 24 Jan 2019 16:13:47 +0000 (16:13 +0000)]
Bug 21845: Sort of issues in OPAC subscription table

This patch adds a default sort option to the table of subscriptions on
the OPAC detail page. This sorting option matches the sort of data
passed from GetLatestSerials.

To test, apply the patch and locate a subscription in the OPAC which has
multiple issues. They should be sorted by default on publication date.

Signed-off-by: mikael <mikael.Olangcay-Brisebois@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fd9ff6a4f012399fc8408aa25ab1185d8308ea45)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22156: Subscription result list sorts on "checkbox" by default
Owen Leonard [Thu, 17 Jan 2019 16:39:52 +0000 (16:39 +0000)]
Bug 22156: Subscription result list sorts on "checkbox" by default

This patch adds default sorting by title to the subscription search
results list. Previously no default sort was defined, so it defaulted to
sorting by the first column in the table.

To test, apply the patch and go to Serials.

- Perform a search of subscriptions which will return multiple results.
- Confirm that the table of open subscriptions is sorted by default by
  title ascending.
- Confirm the same for the table of closed subscriptions.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8a2d5fab95ae2db5adf8cca16524b7a231680dd3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22351: Compiled CSS
Martin Renvoize [Mon, 25 Feb 2019 18:38:46 +0000 (18:38 +0000)]
Bug 22351: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22351: SCSS conversion broke style on last checked out information
Owen Leonard [Fri, 15 Feb 2019 16:12:22 +0000 (16:12 +0000)]
Bug 22351: SCSS conversion broke style on last checked out information

This patch makes a minor change to the staff client SCSS to correct an
error which happened in the SCSS conversion.

To test, apply the patch and regenerate the staff client CSS. Check out
an item to a patron. The box showing information about the item you just
checked out should be flush with the checkout form box.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d000b4202fc7d8d1e80467c8c9890bd71d96cef0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22239: JavaScript error on subscription detail page when there are no orders
Owen Leonard [Wed, 30 Jan 2019 19:58:25 +0000 (19:58 +0000)]
Bug 22239: JavaScript error on subscription detail page when there are no orders

This page modifies the subscription detail page so that a JavaScript
error isn't triggered when a subscription has no acquisition details.

To test, apply the patch and go to Serials.

 - Locate a subscription which isn't tied to acquisitions. In the
   browser console there should be no errors.
 - Locate a subscription which is part of an order. There should be an
   'Acquisitions details' tab and the order information on that tab
   should be displayed as a collapsible tree.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a27a6e6d729cd3b6be0251c1c6bda5a763fea6bc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21798: (RMaint follow-up) Fix for circular dependancy breakage
Martin Renvoize [Mon, 25 Feb 2019 18:09:33 +0000 (18:09 +0000)]
Bug 21798: (RMaint follow-up) Fix for circular dependancy breakage

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22323: cronjob runreport.pl CSV add encoding
Fridolin Somers [Wed, 13 Feb 2019 12:25:20 +0000 (13:25 +0100)]
Bug 22323: cronjob runreport.pl CSV add encoding

Cronjob runreport.pl runs SQL reports and can export as CSV.
This export needs to be UTF-8 encoded.

This pathes replaces use of Text::CSV_XS by Text::CSV::Encoded like in other places like tools/viewlog.pl.
It adds a decode of headers bcause they will be encoded lika other lines.

Test plan:
1) Create a new item with itemnotes 'accentué'
2) Create a SQL report with :
SELECT barcode,itemnotes AS itè FROM items WHERE itemnotes LIKE 'accenté'
3) Run this report
4) You see well encoded header and content
5) Run from command line (replace X by report number) :
misc/cronjobs/runreport.pl X --format=csv --csv-header --store-results
6) You well encoded header and content
7) Go to saved reports table
8) Look at saved results of report
9) You well encoded header and content

Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 83fe95d0c5d404a2ffc6ed35e822ff0f5ee8b6e6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21904: Add missing PROCESS stt
Jonathan Druart [Sun, 17 Feb 2019 13:54:24 +0000 (10:54 -0300)]
Bug 21904: Add missing PROCESS stt

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fcc17549bee1d1f9d85815a5bab24ba4ffaac7b3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21904: Hide libraries outside of the group in the header
Jonathan Druart [Thu, 6 Dec 2018 16:58:44 +0000 (13:58 -0300)]
Bug 21904: Hide libraries outside of the group in the header

Fix typo

To test:
1 - Create a library group with two libraries
2 - Enable hiding patron info for that group
3 - Find or create a patron at one of those libraries without
view_borrower_infos_from_any_libraries permission (but with staff side
permission)
4 - Sign in as that staff person
5 - Click 'Patrons'
6 - Click the [+] to expand search options
7 - Set the 'Library' dropdown to a library outside of the group
8 - Search

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b225ffc559d22e7a373b92bf25a3a4162dc21be2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22171: Fix shipping cost display on invoice
Katrin Fischer [Tue, 5 Feb 2019 21:29:13 +0000 (21:29 +0000)]
Bug 22171: Fix shipping cost display on invoice

When not 0 the shipping cost on the invoice would display with
a lot of numbers after the comma. This fixed it to display with
only 2.

To test:
- Make sure you have an invoice with shipping cost set (example: 5.00)
- Open the invoice for editing (invoice.pl)
- Verify the shipping cost displays with too many decimals (5.000000)
- Apply patch
- Verify now the shipping cost displays correctly (5.00)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ae85590a323c468e1ffbe566fe1f916a2901b56b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21710: Fix typo in atributes in installer
Katrin Fischer [Tue, 5 Feb 2019 22:10:01 +0000 (22:10 +0000)]
Bug 21710: Fix typo in atributes in installer

Adds the missing t to some atributes in the web installer
files.

To test:
Easiest to verify by looking at the patches, changes
appear in comments and the text shown by the nb-NO and
English web installer.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a5ceb74102ef664dfa5cde20b049c924b1600c0b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20544: Wrong comment database documentation on itemnotes
Katrin Fischer [Sun, 10 Feb 2019 00:36:20 +0000 (01:36 +0100)]
Bug 20544: Wrong comment database documentation on itemnotes

Fixes the comments in kohastructure.sql to state the right
MARC21 fields for itemnotes (public and internal).

To test:
- Create a new Koha database and make sure it still installs
- Read the patch and check comments are correct

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 60347dcc0724ad354cfabb89ca024dfa269e62e5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20174: Remove xml_sax.pl target from Makefile.pl
Katrin Fischer [Sun, 10 Feb 2019 00:48:46 +0000 (01:48 +0100)]
Bug 20174: Remove xml_sax.pl target from Makefile.pl

There appears to be no xml_sax.pl in Koha, so the
reference should be removed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit daf47da8cd9c94829ff49ec2041d39b1510ae6da)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 8387: Hide headings in tools when user has no permissions for any listed below
Katrin Fischer [Mon, 4 Feb 2019 06:30:51 +0000 (06:30 +0000)]
Bug 8387: Hide headings in tools when user has no permissions for any listed below

The headings for each column on the tools page will show, even if the
user has no permission for any tool below it. This patch tries to
correct this.

To test:
- Try various combinations of tool permissions
- On the tools module start page and for the tools sidebar
  visible on the left on a tool's page:
  - Make sure headings don't show when you have no permissions
    for any of the tools listed below
  - Make sure headings show correctly if you have one or
    many of the tools permissions needed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
The qa tool gives some warnings but I think they can be considered false
positives.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1fe43199b642fa575fd93131e1390c55d4631e52)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21971: (RMaint follow-up) Fix number of tests on backport
Martin Renvoize [Mon, 25 Feb 2019 15:04:00 +0000 (15:04 +0000)]
Bug 21971: (RMaint follow-up) Fix number of tests on backport

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21971: TestBuilder::build_sample_item
Jonathan Druart [Thu, 6 Dec 2018 22:51:39 +0000 (19:51 -0300)]
Bug 21971: TestBuilder::build_sample_item

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 046d5e12e4b5097516f2355f0ccc29da8af277e8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21798: (RMaint follow-up) Remove tests for features not backported
Martin Renvoize [Mon, 25 Feb 2019 14:57:47 +0000 (14:57 +0000)]
Bug 21798: (RMaint follow-up) Remove tests for features not backported

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21798: (RM follow-up) Fix a few added tests
Nick Clemens [Mon, 28 Jan 2019 20:14:27 +0000 (20:14 +0000)]
Bug 21798: (RM follow-up) Fix a few added tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5d7d741dc4043673202cc41e6e710cce81f57278)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21798: (QA follow-up) Fix Biblios.t
Marcel de Rooy [Thu, 13 Dec 2018 12:51:20 +0000 (13:51 +0100)]
Bug 21798: (QA follow-up) Fix Biblios.t

Global symbol "$bibnum" requires explicit package name

Test plan:
Run test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 94e64d3558cfaa776f93442d85ab69587e1b9b83)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21798: replace gimme_a_biblio with build_sample_biblio
Jonathan Druart [Wed, 12 Dec 2018 16:17:02 +0000 (13:17 -0300)]
Bug 21798: replace gimme_a_biblio with build_sample_biblio

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2b765487705fa90298f8e843b660df386bbc1730)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21798: Replace 2 more occurrences
Jonathan Druart [Thu, 6 Dec 2018 21:00:09 +0000 (18:00 -0300)]
Bug 21798: Replace 2 more occurrences

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0ffaea2c271b09139de2cd9002aa9e92bdb77ac3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21798: Fix another test
Jonathan Druart [Tue, 13 Nov 2018 14:24:14 +0000 (11:24 -0300)]
Bug 21798: Fix another test

We should correctly generate the data we need, here we expect 2 records
with title starting with "Silence in the".

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit caab154c393db8862b12dd2b568aff261e3bc34a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21798: Fix a wrong test
Jonathan Druart [Tue, 13 Nov 2018 14:22:15 +0000 (11:22 -0300)]
Bug 21798: Fix a wrong test

Now biblioitem.itemtype has a value, GetItem should fill itype with this
value if item-level_itypes it not set

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9a4d9129401433e74b9ef3c99fffde170e789008)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21798: Unify the creation of bibliographic record in tests
Jonathan Druart [Tue, 13 Nov 2018 14:20:45 +0000 (11:20 -0300)]
Bug 21798: Unify the creation of bibliographic record in tests

Using the newly created subroutine

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9ba6125f72fc4dc44421550561a815cb272b98b7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21798: We need t::lib::TestBuilder::gimme_a_biblio
Tomas Cohen Arazi [Thu, 8 Nov 2018 20:06:54 +0000 (17:06 -0300)]
Bug 21798: We need t::lib::TestBuilder::gimme_a_biblio

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ebce48a752a97245b6cdbd12c82d2cb6ea621bd5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18393: Acquisition statistics - Fix wrong template variable name for collection...
Katrin Fischer [Wed, 6 Feb 2019 11:43:52 +0000 (11:43 +0000)]
Bug 18393: Acquisition statistics - Fix wrong template variable name for collection filter

The template variable was wrong, so the filter never submitted the
collection code for the query.

Before:
<option value="">Fiction</option>
<option value="">Non-fiction</option>

After:
<option value="FIC">Fiction</option>
<option value="NFIC">Non-fiction</option>

To test:
- Go to Reports > Statistics wizards > Acquisitions
- Pick a row and column
- Compare results with and without collection filter
- Verify the table is always the same
- Apply patch
- Repeat comparison, verify the filter works now

https://bugs.koha-community.org/show_bug.cgi?id=18393
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f2746dd8fb1c4557ae56db4769a07fe663576ddc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 10676: Add unit tests - GetItemsInfo
Katrin Fischer [Fri, 4 Jan 2019 11:42:08 +0000 (11:42 +0000)]
Bug 10676: Add unit tests - GetItemsInfo

To test:
  prove t/db_dependent/Items.t

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e139a237b874df5fcd2169abba75eb3745239f5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 10676: Fix behaviour of OpacHiddenItems for items.restricted
Katrin Fischer [Fri, 4 Jan 2019 10:11:03 +0000 (10:11 +0000)]
Bug 10676: Fix behaviour of OpacHiddenItems for items.restricted

The numerical restricted value was overwritten in GetItemsInfo
with the description. So OpacHiddenItems would only work for
restricted using the description, not the numerical value
of the authorised value like for other similar status fields.

This changes GetItemsInfo to use a separate variable for
the description, as it's already done for notforloan and
changes the template files where the variable is used
accordingly.

To test
- Before applying patch
- Configure OpacHiddenItems with:
  restricted: [1]
- Find a record with more than one item and mark one of the items
  as "Restricted Access"
  (assume standard sample data - check authorised value if status doesn't exist)
- Verify the item is still shown in OPAC.
- Apply patch
- Verify that the item is now hidden
- Verify that the status still displays nicely in the staff detail page
- Delete OpacHiddenItems
- Verify that the status is showing nicely in the OPAC detail page

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 39d2885d1330afe825e1881f5fc8033d459f6006)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>