]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 15395: Do not use nl_putenv, use $ENV instead
Julian Maurice [Thu, 25 Oct 2018 09:22:24 +0000 (11:22 +0200)]
Bug 15395: Do not use nl_putenv, use $ENV instead

nl_putenv is only useful on Windows systems

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15395: Make msgmerge quiet
Julian Maurice [Thu, 25 Oct 2018 08:48:23 +0000 (10:48 +0200)]
Bug 15395: Make msgmerge quiet

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15395: Allow correct handling of plural translation
Julian Maurice [Tue, 15 Dec 2015 01:31:03 +0000 (02:31 +0100)]
Bug 15395: Allow correct handling of plural translation

Locale::Maketext does not allow correct handling of plural translation
for languages that have more than one plural forms.
Locale::Messages does.

So Koha::I18N is now a wrapper around Locale::Messages, just like
Locale::TextDomain, and export the same symbols as Locale::TextDomain.
You can refer to documentation of Locale::TextDomain to know how to use
exported subroutines.

Example usage:
  __("Hi")
  __x("Hi {name}", name => 'Bob')
  __n("item", "items", $num_items)
  __nx("one item", "{count} items", $num_items, count => $num_items)
  __p("Bibliographic record", "item")

This patch also brings Koha::I18N power to Template::Toolkit templates
by adding a TT plugin.
This plugin can be used like this:

[%# USE the plugin and define some macros %]
[% PROCESS 'i18n.inc' %]

[%# tn is the equivalent of __n %]
[%# macro names can't start with underscore, t is for "translate" %]
[% tn('item', 'items', num_items) %]
Extraction of strings from templates is a bit complicated and use
Template::Parser and PPI. Template is compiled into Perl code and then
analyzed by PPI. It is slow, but should be correct even with complex
constructions.

Remove dependency to Locale::Maketext and Locale::Maketext::Lexicon
Add dependency to Locale::Messages and PPI

Test plan for translation in Perl code:
1. Open a .pl script or .pm module with your favorite text editor
2. Add 'use Koha::I18N;' in the beginning of file
3. Use one of the subroutines exported by Koha::I18N and be sure to have
   a way to visualize the result (pass result to the template for
   example, or simply warn and watch the log file)
4. cd misc/translator && ./translate update fr-FR # try other languages
5. Open misc/translator/po/fr-FR-messages.po and translate your
   string(s)
   You may need to change the "Plural-Forms" header. See
   https://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html
6. ./translate install fr-FR
7. Use your web browser to go to the page that should display the
   translation, change language and verify the translation is correct
8. prove t/Koha/I18N.t

Test plan for translation in templates:
1. Open a template file (.tt or .inc) with your favorite text editor
2. Add the PROCESS directive mentioned above in the beginning of file
3. Use one of the t* macros defined in i18n.inc. They are used like
   their "__" equivalent, with one difference: the 'x' variants take a
   hashref instead of a hash as last parameter
4. cd misc/translator && ./translate update fr-FR
5. Open misc/translator/po/fr-FR-messages.po and translate your
   string(s)
6. ./translate install fr-FR
7. Use your web browser to go to the page that should display the
   translation, change language and verify the translation is
   correct

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15184: Fix bad merge conflict with created_by
Jonathan Druart [Thu, 8 Nov 2018 14:03:15 +0000 (11:03 -0300)]
Bug 15184: Fix bad merge conflict with created_by

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15184: Fix TT filter
Katrin Fischer [Sun, 28 Oct 2018 16:35:09 +0000 (16:35 +0000)]
Bug 15184: Fix TT filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15184: Add missing html filters
Jonathan Druart [Mon, 15 Oct 2018 19:52:41 +0000 (16:52 -0300)]
Bug 15184: Add missing html filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15184: Improve styling
Jonathan Druart [Sun, 16 Sep 2018 16:25:16 +0000 (09:25 -0700)]
Bug 15184: Improve styling

- Move "Show inactive" checkbox closer to the "Show inactive" text.
- Put more space between the "Show inactive" checkbox and the "The
original..." text
- Add "Check boxes to duplicate the original values" at the top of the
fieldset

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>
5 years agoBug 15184: Change permission (+x) on .pl
Jonathan Druart [Sat, 15 Sep 2018 21:00:31 +0000 (14:00 -0700)]
Bug 15184: Change permission (+x) on .pl

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>
5 years agoBug 15184: Set created_by to the logged in user
Jonathan Druart [Fri, 7 Sep 2018 16:46:12 +0000 (13:46 -0300)]
Bug 15184: Set created_by to the logged in user

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>
5 years agoBug 15184: Do copy items for not a serial OR if items are created on ordering
Jonathan Druart [Fri, 7 Sep 2018 16:43:15 +0000 (13:43 -0300)]
Bug 15184: Do copy items for not a serial OR if items are created on ordering

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>
5 years agoBug 15184: Remove the checkboxes on the last step
Jonathan Druart [Fri, 31 Aug 2018 16:40:08 +0000 (13:40 -0300)]
Bug 15184: Remove the checkboxes on the last step

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>
5 years agoBug 15184: add missing filters
Jonathan Druart [Wed, 29 Aug 2018 18:17:40 +0000 (15:17 -0300)]
Bug 15184: add missing filters

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>
5 years agoBug 15184: Add POD
Jonathan Druart [Wed, 29 Aug 2018 18:06:42 +0000 (15:06 -0300)]
Bug 15184: Add POD

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>
5 years agoBug 15184: Add the ability to duplicate existing order lines
Jonathan Druart [Fri, 27 Jul 2018 18:48:31 +0000 (15:48 -0300)]
Bug 15184: Add the ability to duplicate existing order lines

This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.

The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
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>
5 years agoBug 15184: Add the ordernumbers filters to GetHistory
Jonathan Druart [Fri, 27 Jul 2018 18:48:23 +0000 (15:48 -0300)]
Bug 15184: Add the ordernumbers filters to GetHistory

It adds the ability to return the result of GetHistory given a list a
ordernumbers

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
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>
5 years agoBug 15184: Prepare the ground - Move funds and sort fields autoupdate
Jonathan Druart [Fri, 27 Jul 2018 18:47:06 +0000 (15:47 -0300)]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate

We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
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>
5 years agoBug 15184: Prepare the ground - Move order search filters
Jonathan Druart [Fri, 27 Jul 2018 18:46:32 +0000 (15:46 -0300)]
Bug 15184: Prepare the ground - Move order search filters

We are going to reuse these filters so we move it to a separate include
file.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
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>
5 years agoBug 20312: DBRev 18.06.00.057
Nick Clemens [Thu, 8 Nov 2018 15:42:53 +0000 (15:42 +0000)]
Bug 20312: DBRev 18.06.00.057

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20312: Add missing filters
Nick Clemens [Thu, 8 Nov 2018 15:51:37 +0000 (15:51 +0000)]
Bug 20312: Add missing filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20312: Compiled CSS
Nick Clemens [Thu, 8 Nov 2018 15:41:18 +0000 (15:41 +0000)]
Bug 20312: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20312: (QA follow-up) Make display syspref driven
Martin Renvoize [Wed, 31 Oct 2018 13:53:16 +0000 (13:53 +0000)]
Bug 20312: (QA follow-up) Make display syspref driven

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20312: Add a link to last consulted patron
Pierre-Luc Lapointe [Fri, 17 Aug 2018 20:45:23 +0000 (16:45 -0400)]
Bug 20312: Add a link to last consulted patron

This new feature adds a link to the last patron consulted
in the staff site. It uses cookies to save this information.
When a staff site user accesses a patron record, the ID, name
and card number of the patron will be saved in the cookie.

To test:
1- Apply the patch
2- Go to a patron details' page
4- Go to another page
4- Verify that the link "Last patron" appears on the top-right
   corner of the screen
5- Click on the link
6- Verify that you are at the patron's checkout page
7- Click on the "X" button next to the "Last patron" link
8- The link should be gone
9- Go to another page
10- The link shouldn't appear (until the next patron detail's
    page)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12365: Fix GetHardDueDate.t test
Jonathan Druart [Thu, 8 Nov 2018 14:15:04 +0000 (11:15 -0300)]
Bug 12365: Fix GetHardDueDate.t test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21079: DBRev 18.06.00.056
Nick Clemens [Thu, 8 Nov 2018 15:35:50 +0000 (15:35 +0000)]
Bug 21079: DBRev 18.06.00.056

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21079: (follow-up) Move from Try::Tiny to eval
Andrew Isherwood [Thu, 8 Nov 2018 14:28:48 +0000 (14:28 +0000)]
Bug 21079: (follow-up) Move from Try::Tiny to eval

In line with similar examples already in Koha, we now eval the
transaction, instead of putting it in a try/catch block.

This patch also addressed the other comments made in
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21079#c10

- AutoCommit & RaiseError are now reset
- Don't set the version if the update fails

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21079: Unify metadata schema across backends
Andrew Isherwood [Tue, 17 Jul 2018 13:49:47 +0000 (14:49 +0100)]
Bug 21079: Unify metadata schema across backends

This patch contains a database upgrade that takes appropriate metadata
properties relating to articles in the FreeForm backend and creates
metadata that corresponds with the metadata being created by the BLDSS
backend. This enables us to create templates that can display metadata
equally across any backends that contain this metadata;

To test:
- Ensure you have at least one article request created with the FreeForm backend
- Check the metadata for the request:
  => TEST: You should have properties such as 'article_title', 'article_author' populated
  => TEST: You should NOT have properties such as 'container_title' &
  'pages'
- Run the upgrade
  => TEST: For the same requests you should now have the following
  properties (if their values were originally populated):
    - container_title (this should correspond with what *was* 'title')
    - title (this should correspond with 'article_title')
    - pages (this should correspond with 'article_pages')
    - author (this should correspond with 'article_author')

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21413: Fix condition to avoid operator bnding isssues
Tomas Cohen Arazi [Wed, 7 Nov 2018 16:43:52 +0000 (13:43 -0300)]
Bug 21413: Fix condition to avoid operator bnding isssues

The original WHERE condition wasn't enclosed in parenthesis, and hence
was subject to binding precedence issues in some situations.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21413: (QA follow-up) Rename new option
Katrin Fischer [Sat, 27 Oct 2018 13:08:18 +0000 (13:08 +0000)]
Bug 21413: (QA follow-up) Rename new option

Trying to make the terminology a little more consistent
as we already use items instead of copies directly
above and leaning on the description of the page it
refers to.

Old:
Skip copies marked as waiting holds

New:
Skip items on hold awaiting pickup

Skip items on hold awaiting pickup

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21413: Inventory - Skip items with waiting holds
Kyle M Hall [Wed, 26 Sep 2018 14:41:14 +0000 (11:41 -0300)]
Bug 21413: Inventory - Skip items with waiting holds

This patch enables items to be skipped for inventory stocktaking
if the item is currently a waiting hold. The intention is to skip
items that should be on the holds waiting shelf in the library.

Test Plan:
1) Apply this patch
2) Generate a list of barcodes ordered by callnumber
3) Select one of those items and place it on hold, then confirm the hold
4) Remove that barcode from the list of barcodes
5) Browse to the inventory tool, choose your barcodes file
6) Run the inventory tool with that barcode file.
7) Note the tool says that item should have been scanned
8) Click the browsers back button to return to the previous page
9) Check the checkbox for "Skip copies marked as waiting holds"
10) Run the tool again, not it does not flag that item as previously

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21413: Unit tests
Tomas Cohen Arazi [Wed, 26 Sep 2018 14:08:59 +0000 (11:08 -0300)]
Bug 21413: Unit tests

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Items/GetItemsForInventory.t
=> FAIL: Tests fail!
- Apply the next patches on the bug
- Run:
 k$ prove t/db_dependent/Items/GetItemsForInventory.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12365: DBRev 18.06.00.055
Nick Clemens [Thu, 8 Nov 2018 12:09:37 +0000 (12:09 +0000)]
Bug 12365: DBRev 18.06.00.055

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12365: (follow-up) Fixing broken circ rules table
Aleisha Amohia [Mon, 22 Oct 2018 23:31:29 +0000 (23:31 +0000)]
Bug 12365: (follow-up) Fixing broken circ rules table

Adding filters to note to satisfy qa test tools

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12365: (follow-up) Putting backticks in atomicupdate
Aleisha Amohia [Thu, 18 Oct 2018 02:36:35 +0000 (02:36 +0000)]
Bug 12365: (follow-up) Putting backticks in atomicupdate

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12365: (follow-up) Adding maxlength attribute and popover
Aleisha Amohia [Wed, 4 Jul 2018 00:12:21 +0000 (00:12 +0000)]
Bug 12365: (follow-up) Adding maxlength attribute and popover

Test that you can't add a note of more than 100 characters.
Test notes with rules, notes are hidden by 'View note' and the
popover correctly displays note.
View the note by hovering over the link
I've moved the Note column so the popover displays nicely and doesn't
cover the buttons. I've also changed the placement so that it doesn't
cover information in the row.

Update: Test that you can edit the note when clicking 'Edit' and that
behaviour is the same for editing all other fields

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12365: Notes for rules
Aleisha Amohia [Mon, 19 Jun 2017 19:47:52 +0000 (19:47 +0000)]
Bug 12365: Notes for rules

This patch adds a note column to the circ and fine rules to act as a
description line for the rule.

To test:
1) Apply patch, update database (may have to also update schema)
2) Go to Admin -> Circ and fine rules
3) Scroll to the right, notice new Note column
4) Confirm it works to create a brand new rule with a Note
5) Confirm it works to modify an existing rule with a Note

Sponsored-by: Catalyst IT
Lee Jamison <ldjamison@marywood.edu> rescued this patch.
It is a clean re-build of attachments 61865 and 63902
to fix the merge conflict introduced during application of both
attachments.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: macon lauren KohaCon17 <caballeromaricon@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21770: Allow html_entity for href
Jonathan Druart [Tue, 6 Nov 2018 14:03:28 +0000 (11:03 -0300)]
Bug 21770: Allow html_entity for href

We certainly should not expect this filter to be used much for href, but
we have one occurrence that needs it.

Test plan:
t/template_filters.t and xt/find-missing-filters.t must return green

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21770: Add tests for html_entity
Jonathan Druart [Tue, 6 Nov 2018 13:55:50 +0000 (10:55 -0300)]
Bug 21770: Add tests for html_entity

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20486: Add --marc_conditions option to export_records.pl
David Gustafsson [Fri, 23 Mar 2018 16:32:30 +0000 (17:32 +0100)]
Bug 20486: Add --marc_conditions option to export_records.pl

Add --marc_conditions option to export_records.pl script, for
excluding records based on conditions applied to MARC-record
data.

How to test:
1) Run tests in t/db_dependent/Exporter/Record.t
2) All tests should pass

Sponsored-by: Gothenburg University Library
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21755: Show patron updated date in circ menu
Fridolin Somers [Fri, 2 Nov 2018 08:58:06 +0000 (09:58 +0100)]
Bug 21755: Show patron updated date in circ menu

In borrowers table the column updated_on stores the last updated date and time.
Display this in the circ menu.

Test plan:
1) Go to a patron details page /cgi-bin/koha/members/moremember.pl
2) Look at left menu, you see "Updated on" and a date and time
3) Edit this patron and save
4) Check that "Updated on" changed
5) Click on each tab of menu to check this date is displayed

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21015: Remove unecessary 'use Koha::Schema' statements in t/
Jonathan Druart [Wed, 17 Oct 2018 18:47:29 +0000 (15:47 -0300)]
Bug 21015: Remove unecessary 'use Koha::Schema' statements in t/

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21015: fix performance issue with C4::Members
Joonas Kylmälä [Fri, 29 Jun 2018 08:09:41 +0000 (11:09 +0300)]
Bug 21015: fix performance issue with C4::Members

loading Koha::Schema ("use Koha::Schema;") takes significantly time as
it loads almost a couple hundred classes. Koha::Database has done that
already once and we can use it to get the ResultSet "Borrower" as
well, so let's use that. This also make the code more unified because
Koha::Database is used throughout the code instead of Koha::Schema.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12258: (QA follow-up) Add some missing rrrrrrs
Katrin Fischer [Thu, 1 Nov 2018 12:11:35 +0000 (13:11 +0100)]
Bug 12258: (QA follow-up) Add some missing rrrrrrs

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21158

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21158: Add cronjob references to the system preference descriptions if a cronjob...
Caroline Cyr La Rose [Fri, 3 Aug 2018 20:03:10 +0000 (16:03 -0400)]
Bug 21158: Add cronjob references to the system preference descriptions if a cronjob is required

This patch adds references to cronjobs in the description of some system preferences.

The following system preference description were modified:
- StaticHoldsQueueWeight
- ExpireReservesMaxPickUpDelay
- AutoResumeSuspendedHolds
- finesMode
- DefaultLongOverdueLostValue
- DefaultLongOverdueChargeValue
- PatronSelfRegistrationExpireTemporaryAccountsDelay
- PatronSelfRegistrationVerifyByEmail
- EnhancedMessagingPreferences
- NewItemsDefaultLocation
- InProcessingToShelvingCart
- ReturnToShelvingCart
- ReturnToShelvingCart
- AuthorityMergeLimit
- OpacBrowser
- OpacCloud
- UsageStats
- PurgeSuggestionsOlderThan
- MembershipExpiryDaysNotice

To test, check the above mentioned system preferences to make sure the sentence is there and it is correct.

Followed test plan and patch is as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=12258

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21628: (follow-up) Indentation and filter corrections
Owen Leonard [Mon, 29 Oct 2018 12:32:58 +0000 (12:32 +0000)]
Bug 21628: (follow-up) Indentation and filter corrections

This patch modifies the new waiting_holds.inc to fix the indentation. A
template variable filter has been added to quiet QA tool warnings.
Buttons are now styled as Bootstrap buttons.

To test, apply the patch and view the holds report. Confirm that
everything looks correct. Validate the HTML and confirm that there are
no errors in the HTML of the body of the page.

Followed test plan, everything looked correct and no HTML errors on
waitingreserves.tt found by HTML validator

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21628: Simplify holds awating pickup report
Nick Clemens [Mon, 22 Oct 2018 15:20:45 +0000 (15:20 +0000)]
Bug 21628: Simplify holds awating pickup report

To test:
1 - Place a number of holds
2 - Check in the items and confirm the holds
3 - Visit /cgi-bin/koha/circ/waitingreserves.pl
4 - View the report
5 - Apply patch
6 - Confirm that the report looks the same
7 - Confirm cancelling holds works as before

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Followed test plan, patch worked as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21715: Ease translation of account and account offset type descriptions
Tomas Cohen Arazi [Mon, 29 Oct 2018 15:15:19 +0000 (12:15 -0300)]
Bug 21715: Ease translation of account and account offset type descriptions

This patch moves accounts-related descriptions into a single file to
ease finding them, and also encloses descriptions inside <span> tags to
make it easier to translate.

To test:
- Apply this patch
- Verify the templates work as expected
=> SUCCESS: No behaviour change
- Sign off :-D

Bonus: there were two cases in which the INCLUDE line used 'accountline'
as parameter, making it fail to pick the right account type!

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>
5 years agoBug 21719: Fix typos
Josef Moravec [Mon, 29 Oct 2018 23:36:11 +0000 (23:36 +0000)]
Bug 21719: Fix typos

This patch was generated using codespell

Test plan:
Read through changes and confirm they make sense

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21706

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21433: Update two-column templates with Bootstrap grid: Tools part 1
Owen Leonard [Thu, 3 May 2018 16:06:37 +0000 (16:06 +0000)]
Bug 21433: Update two-column templates with Bootstrap grid: Tools part 1

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

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

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

 - Tools -> Automatic item modifications by age
   - View and edit rules
 - Tools -> Batch item modification start page
 - Tools -> Batch delete records
   - Starting page
   - Confirmation page
   - Completion page
 - Tools -> Batch record modification
   - Starting page
   - Confirmation page
   - Completion page
 - Tools -> Batch patron deletion/anonymization
   - Starting page
   - Confirmation page
   - Completion page
 - Tools -> CSV profiles
   - View and edit CSV profiles

Signed-off-by: “Lucas Gass” <lucas@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21666: Replace unsupported use attribute with more widely supported attribute
David Cook [Thu, 25 Oct 2018 23:52:45 +0000 (10:52 +1100)]
Bug 21666: Replace unsupported use attribute with more widely supported attribute

search.js uses the 1=1004
author personal attribute which isn't supported by libraries like
Seattle Public Library.

This patch aligns search.js
with C4/Breeding.pm which uses the more widely supported 1=1003
author attribute.

To test:
1. Set up Seattle Public Library as a Z39.50 target
2. Try to search author using the Advanced Editor advanced search
3. Observe failure
4. Apply the patch
5. Try to search again
6. Observe successful retrieval of records

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
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>
5 years agoBug 18316: (follow-up) Don't let 'fields' be undef and adjust tests
Nick Clemens [Thu, 8 Nov 2018 01:50:34 +0000 (01:50 +0000)]
Bug 18316: (follow-up) Don't let 'fields' be undef and adjust tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20602: Use weighted fields in OPAC simple search
Alex Arnaud [Wed, 18 Apr 2018 14:19:34 +0000 (14:19 +0000)]
Bug 20602: Use weighted fields in OPAC simple search

Test plan (having Koha working with Elasticsearch):
  - apply this patch,
  - try searches with and without weight defined on search fields

https://bugs.koha-community.org/show_bug.cgi?id=20262
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18316: DBRev 18.06.00.054
Nick Clemens [Wed, 7 Nov 2018 23:08:03 +0000 (23:08 +0000)]
Bug 18316: DBRev 18.06.00.054

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18316: (QA follow-up) Add final missing filter
Martin Renvoize [Mon, 29 Oct 2018 14:40:06 +0000 (14:40 +0000)]
Bug 18316: (QA follow-up) Add final missing filter

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18316: (follow-up) remove use_dis_max
Alex Arnaud [Tue, 9 Oct 2018 14:27:20 +0000 (14:27 +0000)]
Bug 18316: (follow-up) remove use_dis_max

It is true by default on ES 5 and has been removed on ES 6

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>
5 years agoBug 18316: (follow-up) Fix tests and update statement
Nick Clemens [Tue, 4 Sep 2018 12:46:30 +0000 (12:46 +0000)]
Bug 18316: (follow-up) Fix tests and update statement

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>
5 years agoBug 18316: Fix field weight validation/deletion bug
David Gustafsson [Fri, 1 Jun 2018 09:39:45 +0000 (11:39 +0200)]
Bug 18316: Fix field weight validation/deletion bug

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>
5 years agoBug 18316: Change search field weight field to decimal
David Gustafsson [Mon, 21 May 2018 12:24:36 +0000 (14:24 +0200)]
Bug 18316: Change search field weight field to decimal

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>
5 years agoBug 18316: (follow-up) Koha::SearchField::search_marc_maps return a result set -...
Alex Arnaud [Mon, 23 Apr 2018 10:25:14 +0000 (10:25 +0000)]
Bug 18316: (follow-up) Koha::SearchField::search_marc_maps return a result set - code refactoring for gettings weighted fields - Koha::SearchFields::weighted_fields return a result set

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.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>
5 years agoBug 18316: String changes
Alex Arnaud [Thu, 12 Apr 2018 16:13:29 +0000 (16:13 +0000)]
Bug 18316: String changes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.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>
5 years agoBug 18316: Add weighting/relevancy options to ES query on simple search
Nick Clemens [Wed, 21 Mar 2018 13:27:12 +0000 (13:27 +0000)]
Bug 18316: Add weighting/relevancy options to ES query on simple search

The idea is the following: if some search field(s) are weighted in
search engine config page, Koha will query ES on all fields plus those with
the coresponding weights. Else, search is done on the entire record with
no weighting. The advanced search page is unaffected by these changes

Test plan (having Koha working with Elasticsearch):
  - apply this patch
  - have some weights defined for various fields
  - try searches from the search bar and from the advanced search page
  - confirm weighting affects the relevancy (in expected ways)
      e.g.
      1. search for 'a' from advanced search, note results
      2. give 'title' a weight
      3. search for 'a' using the simple search bar
      4. results with 'a' in the title should now be more relevant
  - confirm search results on advanced search page are unaffected

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.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>
5 years agoBug 18316: Ability to weight search fields
Alex Arnaud [Thu, 29 Mar 2018 14:20:59 +0000 (14:20 +0000)]
Bug 18316: Ability to weight search fields

Weight can be defined between 1 and 99.
only search fields mapped with biblios can be weighted

Test plan:
  - apply this patch,
  - update schema file (perl misc/devel/update_dbix_class_files.pl),
  - go to Administration > Search engine configuration,
  - in search fields tab, define weights for some fields and save,
  - check weights has been saved,
  - reset some weights (empty) and save,
  - check weights has been reset

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.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>
5 years agoBug 21299: (QA follow-up) Rename module and subroutine
Marcel de Rooy [Thu, 13 Sep 2018 06:41:10 +0000 (08:41 +0200)]
Bug 21299: (QA follow-up) Rename module and subroutine

See QA request at comment7.
Removing camelcase from subroutinename.
Renaming module to Koha::Util::Navigation (after cmty feedback).

Test plan:
Run t/Koha/Util/Navigation.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21299: Introduce localReferer in [opac-]changelanguage.pl
Marcel de Rooy [Mon, 30 Jul 2018 10:57:58 +0000 (12:57 +0200)]
Bug 21299: Introduce localReferer in [opac-]changelanguage.pl

With the work from the former patch, we now have a nice and easy replace..

NOTE: The additional logic in opac-changelanguage.pl is now also applied
to the intranet counterpart (changelanguage.pl). This effectively makes
changelanguage.pl no longer refer to external URLs (as the opac already
did by testing the referer). Might be just theoretical, but consistent.

Test plan:
Test changing language from various OPAC and staff locations.
Include language=[some_language] in the URL before changing language.
[Bonus] Test calling changelanguage.pl from another server. You should no
longer be referred back to the calling server. (See below.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Added link <a href="[mystaffserver]/cgi-bin/koha/changelanguage.pl?language=en">link</a> somewhere on external server.
Verified that without this patch, it hits the staff server and refers back to the caller. But with this patch, it refers to staff homepage.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21299: Add localReferer function to Util module, add test
Marcel de Rooy [Mon, 30 Jul 2018 10:18:31 +0000 (12:18 +0200)]
Bug 21299: Add localReferer function to Util module, add test

Before implementing the change in [opac-]changelanguage, we define a new
function (in Koha/Util.pm) and add tests.

Test plan:
Run t/Koha/Util/localReferer.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15494: DBRev 18.06.00.053
Nick Clemens [Wed, 7 Nov 2018 21:49:07 +0000 (21:49 +0000)]
Bug 15494: DBRev 18.06.00.053

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15494: (follow-up) Update tests to generate their own data (no delete)
Nick Clemens [Mon, 24 Sep 2018 11:06:47 +0000 (11:06 +0000)]
Bug 15494: (follow-up) Update tests to generate their own data (no delete)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15494: (follow-up) Move yaml syspref code to its own sub in SySpref object
Nick Clemens [Fri, 21 Sep 2018 20:16:24 +0000 (20:16 +0000)]
Bug 15494: (follow-up) Move yaml syspref code to its own sub in SySpref object

To test:
1 - prove -v t/db_dependent/Koha/Config/SysPrefs.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15494: (QA follow-up) Additional polishing
Marcel de Rooy [Fri, 2 Feb 2018 07:11:55 +0000 (08:11 +0100)]
Bug 15494: (QA follow-up) Additional polishing

[1] Fix two typos in Circulation.t.
    Although the test does not fail, line 2127 contains two typos.
    Changing INVISILE to INVISIBLE :)
    And type should be itype.
[2] Remove $yaml as leftover from older code.
[3] Add a next when the split on /:/ does not give two results. This will
    prevent uninit warnings (although still disabled now in Circulation).
[4] For the same reason we should switch the lines for NULL and empty
    string. The undefs you insert should trigger a warn.
[5] The line for empty string should not insert undef, but empty string.
    For the same reason adding the condition defined($_) ...
    And proving it by adding two tests for the opposite values of
    callnumber and itemnotes.
[6] Adding a strip spaces around the fieldname. User friendly..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15494: Add syspref
Nick Clemens [Wed, 24 May 2017 13:47:34 +0000 (09:47 -0400)]
Bug 15494: Add syspref

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15494: Update display of renewal errors
Nick Clemens [Wed, 24 May 2017 13:31:59 +0000 (09:31 -0400)]
Bug 15494: Update display of renewal errors

To test:
1 - Define a rule to deny renewal
2 - Checkout an item meeting this rule
3 - Attempt renew an item via the OPAC
4 - Attempt renewal via SIP
5 - Attempt renewal via staff client
6 - Verify errors are reasonable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15494: Add _items_denied_renewal sub to C4:Circulation::CanBookBeRenewed
Nick Clemens [Wed, 24 May 2017 12:52:27 +0000 (08:52 -0400)]
Bug 15494: Add _items_denied_renewal sub to C4:Circulation::CanBookBeRenewed

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15494: Unit tests
Nick Clemens [Wed, 24 May 2017 12:50:16 +0000 (08:50 -0400)]
Bug 15494: Unit tests

prove -v t/db_dependent/Circulation.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21408: Enable checkbox on file selection
Tomas Cohen Arazi [Tue, 25 Sep 2018 13:54:04 +0000 (10:54 -0300)]
Bug 21408: Enable checkbox on file selection

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21408: Inventory - Warn of items possibly scanned out of order
Kyle M Hall [Tue, 25 Sep 2018 13:16:53 +0000 (10:16 -0300)]
Bug 21408: Inventory - Warn of items possibly scanned out of order

This patch addes the ability to choose to be warned if it's possible
an item was scanned out of order ( i.e. mis-shelved ).

Test Plan:
1) Apply this patch
2) Generate a list of barcodes ordered by callnumber
3) "Misplace" one callnumber by moving it to another area of the list
4) Browse to the inventory tool, choose your barcodes file
5) Check the checkbox for "Check barcodes list for items shelved out of order"
6) Click "submit", note the item has been flagged as possibly out of order

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14391: (follow-up) check for correct patron categories permission
Nick Clemens [Wed, 7 Nov 2018 14:01:59 +0000 (14:01 +0000)]
Bug 14391: (follow-up) check for correct patron categories permission

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14391: DBRev 18.06.00.052
Nick Clemens [Wed, 7 Nov 2018 13:04:51 +0000 (13:04 +0000)]
Bug 14391: DBRev 18.06.00.052

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14391: (RM follow-up) Adjust a few template conditions
Nick Clemens [Wed, 7 Nov 2018 12:54:54 +0000 (12:54 +0000)]
Bug 14391: (RM follow-up) Adjust a few template conditions

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14391: (QA follow-up) Correct database update for manage_item_search_fields permi...
Katrin Fischer [Sun, 28 Oct 2018 19:03:56 +0000 (19:03 +0000)]
Bug 14391: (QA follow-up) Correct database update for manage_item_search_fields permission

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14391: Move udpate to perl
Nick Clemens [Sat, 27 Oct 2018 14:10:11 +0000 (14:10 +0000)]
Bug 14391: Move udpate to perl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14391: Keep parameters_remaining_permissions for now
Katrin Fischer [Fri, 12 Oct 2018 18:21:39 +0000 (20:21 +0200)]
Bug 14391: Keep parameters_remaining_permissions for now

Since this patch has been written, new references to this
permission have been added to the code:

- t/db_dependent/api/v1/stockrotationstage.t
- t/db_dependent/api/v1/cities.t
- admin/overdrive.pl

Instead of removing the permission, let's keep it for now
and do more clean-up later in separate patches if required.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14391: (QA follow-up) Fix some typos
Katrin Fischer [Fri, 28 Sep 2018 01:51:05 +0000 (01:51 +0000)]
Bug 14391: (QA follow-up) Fix some typos

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14391: (QA follow-up) Resolve POD warn on svc..systempreferences
Marcel de Rooy [Fri, 24 Aug 2018 07:19:48 +0000 (09:19 +0200)]
Bug 14391: (QA follow-up) Resolve POD warn on svc..systempreferences

*** WARNING: No items in =over (at line 48) / =back list at line 54 in file svc/config/systempreferences
*** WARNING: No items in =over (at line 73) / =back list at line 79 in file svc/config/systempreferences

=> If you use 'over', you should add 'item'-s.

Test plan:
Run perldoc svc/config/systempreferences

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14391: Add granular permissions to the administration module
Katrin Fischer [Sat, 19 May 2018 05:32:14 +0000 (05:32 +0000)]
Bug 14391: Add granular permissions to the administration module

So far the administration module only allowed for 2 permissions:
- circulation conditions (manage_circ_rules)
- everything else (parameters_remaining_permissions)

With this patch almost every section of the administration page
will have its own granular permission.

To test:
- Create different staff users:
  1) One with parameters_remaining_permissions
  2) One with parameters
  3) One with catalogue and no parameters
  4) One superlibrarian
- Apply the patch
- Run the database update
- Check the staff users:
  1) All subpermissions, but manage_circ_rules
     should be checked
  2) Nothing should have changed
  3) manage_item_serach_fields shoudl be checked
     (page had catalogue permission before)
  4) Nothing should have changed
- Try different settings of the permissions and
  verify that
  - Administration page behaves correctly
  - Administration menu behaves correctly
  ! You shoudl only see what you have permission for

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21474: Add the Koha::Subscription->frequency method
Jonathan Druart [Tue, 2 Oct 2018 15:34:25 +0000 (12:34 -0300)]
Bug 21474: Add the Koha::Subscription->frequency method

And the 2 modules for the subscriptions' frequencies

Test plan:
  prove t/db_dependent/Koha/Subscription.t
must return green

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21475

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21619: Expand tax abreviations in acquisitions form hints
Martin Renvoize [Fri, 19 Oct 2018 11:49:05 +0000 (12:49 +0100)]
Bug 21619: Expand tax abreviations in acquisitions form hints

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21387: Receive items from - form should include tax hints
Martin Renvoize [Fri, 21 Sep 2018 10:42:28 +0000 (11:42 +0100)]
Bug 21387: Receive items from - form should include tax hints

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20996: Remove warning 'Un-mocked method'
Jonathan Druart [Tue, 6 Nov 2018 17:25:02 +0000 (14:25 -0300)]
Bug 20996: Remove warning 'Un-mocked method'

t/db_dependent/api/v1/illrequests.t .. Un-mocked method 'status_graph()'
called at /home/vagrant/kohaclone/Koha/Illrequest.pm line 439.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20996: (RM follow-up) Fix the api tests
Martin Renvoize [Tue, 6 Nov 2018 16:36:03 +0000 (16:36 +0000)]
Bug 20996: (RM follow-up) Fix the api tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20435: Allow lowercase prefix in inventory value builder
Fridolin Somers [Fri, 16 Mar 2018 10:59:04 +0000 (11:59 +0100)]
Bug 20435: Allow lowercase prefix in inventory value builder

Cataloging value builders for inventory stocknumberAV.pl and stocknumberam123.pl use a regexp to define if entered text is a prefix or not.
It actually only allows uppercase characters. A library may want to catalog with lowercase characters in inventory number and using those value builders.
Note that in database the text is not case-sensitive.

Test plan:
1) Configure stocknumberAV.pl value builder on an item subfield
2) Create an autorized value category 'INVENTORY'
3) Create in this category a value with code 'UC' and description '10'
4) Create in this category a value with code 'lc' and description '20'
5) Create a new item
6) Focus on stocknumber subfield
7) Enter '123' and click on value builder, the entry stays '123'
8) Enter 'UC' and click on value builder, the entry turn to 'UC 0000000011'
9) Enter 'lc' and click on value builder, the entry turn to 'lc 0000000021'
Same for stocknumberam123.pl

To elaborate on step #1:

Go to Administration->MARC Bibliographic framework
Click on the "Action" button to view the framework
for the item you will be creating, view MARC structure.
Search for Tag 952 (LOCATION AND ITEM INFORMATION (KOHA))
Select Actions->Subfields
Edit subfield i for "Inventory Number"
In the "Other options" pane, select the plugin to test.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21771: (follow-up) Revert the shift statement
Marcel de Rooy [Tue, 6 Nov 2018 14:02:47 +0000 (15:02 +0100)]
Bug 21771: (follow-up) Revert the shift statement

Obviously you should never shift an items from an array if you need that
item later on :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with entering userid as well as entering email..

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21647: Clean up SRU fields mapping templates
Owen Leonard [Wed, 24 Oct 2018 15:39:13 +0000 (15:39 +0000)]
Bug 21647: Clean up SRU fields mapping templates

This patch makes corrections to the SRU field mapping templates
(bibliographic and authority):

 - Bootstrap grid
 - JavaScript to the footer
 - Other markup corrections

To test, apply the patch and go to Administration -> Z39.50/SRU servers

- Add or edit an SRU server
  - Click "Modify" next to the SRU search fields mapping field.
    - Confirm that the popup window layout is correct.
    - Confirm that adding information to the form is correctly saved to
      the SRU server form.
    - Test this process with SRU server record type set to both
      "Authority" and "Bibliographic."

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>
5 years agoBug 21696: Use Koha::Account->lines from Koha::Account
Jonathan Druart [Fri, 26 Oct 2018 18:50:59 +0000 (15:50 -0300)]
Bug 21696: Use Koha::Account->lines from Koha::Account

There is now Koha::Account->lines, we should use it instead of
Koha::Account::Lines->search

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21673: (QA follow-up) Fix typo and remove unused library
Tomas Cohen Arazi [Sat, 27 Oct 2018 11:42:52 +0000 (08:42 -0300)]
Bug 21673: (QA follow-up) Fix typo and remove unused library

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed
Jonathan Druart [Thu, 25 Oct 2018 19:55:32 +0000 (16:55 -0300)]
Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed

There are several times the same pattern to retrieve the sum of
amountoutstanding columns for Koha::Account::Line set.
We should use Koha::Account::Lines->total_outstanding instead.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20629: (QA follow-up) Remove actions_col
Tomas Cohen Arazi [Fri, 26 Oct 2018 16:01:30 +0000 (13:01 -0300)]
Bug 20629: (QA follow-up) Remove actions_col

The actions_col template param requires a DB search, only to display the
'Actions' column header vs. an empty string. But there will always be
buttons in there, that were added *after*.
It made sense when only the 'Reverse' button was displayed, but now both
'Print' and 'Details' are displayed anyway.

This patch removes it for good :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20629: Rename reverse_col to actions_col
Kyle M Hall [Wed, 17 Oct 2018 10:12:37 +0000 (06:12 -0400)]
Bug 20629: Rename reverse_col to actions_col

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20629: (follow-up) fix reverse_col value
Mark Tompsett [Mon, 15 Oct 2018 18:50:09 +0000 (18:50 +0000)]
Bug 20629: (follow-up) fix reverse_col value

Before this patch the Void button didn't appear.
After this patch the Void button appears on payments.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20629: Pass accountline objects to template instead of hashref
Kyle M Hall [Mon, 15 Oct 2018 16:53:27 +0000 (12:53 -0400)]
Bug 20629: Pass accountline objects to template instead of hashref

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20629: Remove ability to 'reverse' payments
Kyle M Hall [Mon, 15 Oct 2018 12:02:31 +0000 (08:02 -0400)]
Bug 20629: Remove ability to 'reverse' payments

Test Plan:
1) Apply this patch
2) Note all references to reversing payments have been removed
3) Note ability to void payments remains unchanged

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20078: (QA follow-up) Correct attribute in PQF.pm
Koha instance kohadev-koha [Fri, 26 Oct 2018 16:03:20 +0000 (16:03 +0000)]
Bug 20078: (QA follow-up) Correct attribute in PQF.pm

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>