koha.git
3 years agoBug 25852: Add tests
Jonathan Druart [Thu, 30 Jul 2020 09:59:44 +0000]
Bug 25852: Add tests

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25852: Improve C4::Creators::Lib reliability under plack
Jonathan Druart [Thu, 30 Jul 2020 10:00:03 +0000]
Bug 25852: Improve C4::Creators::Lib reliability under plack

This is certainly a major issue that leads to many side-effects.
Under plack, the structure of the default values are not handled
correctly.
Package variables are used to store stuff like the "layout type". They
are complex structures (arrays of hashes) and returned without being
copied.
When the caller (the controller script) retrieve them then modify the
returned structures, it actually modifies the package's variables.

One of the issue is:
Create a new layout
The script retrieve a structure with all "selected" flags are set to 0
It select the first one as default (BAR as selected => 1)
The user creates the new layout and will selected BIBBAR (for instance)
If you then edit this new layout, the script will retrieve the
"label_types" and set "selected" for BIBBAR. However BAR is still
selected!
The UI receives 2 selected and display the first selected one that has
the selected option.

Test plan:
1. Create a layout type for Barcode/Biblio
2. Choose fields to print and size of font
3. Save
4. Edit existing Layout
=> Withtout this patch "Barcode" is the preselected option
=> With this patch applied, the correct "Barcode/Biblio" option is
selected

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26108: (bug 25855 follow-up) Call after_circ_action hook only if issue exists
Jonathan Druart [Fri, 31 Jul 2020 07:49:06 +0000]
Bug 26108: (bug 25855 follow-up) Call after_circ_action hook only if issue exists

AddReturn can be called on an item even if it's not checked out (to
trigger holds for instance).
The hook should (?) not be called in that situation

Test plan:
Confirm the above and that the following tests are now passing:
 t/db_dependent/SIP/Message.t
 t/db_dependent/Reserves.t
 t/db_dependent/Circulation/issue.t
 t/db_dependent/SIP/Transaction.t
 t/db_dependent/Circulation.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26083: Item editor defaults to lost
Kyle M Hall [Wed, 29 Jul 2020 17:03:57 +0000]
Bug 26083: Item editor defaults to lost

When editing an item via additem.pl, koha defaults to the first
available lost status, rather than defaulting to not-lost.

Test Plan:
1) Ensure you do not have a value ClaimReturnedLostValue
2) Edit an existing item that is not lost
3) Note the lost value is set even though it is not lost
4) Apply this patch
5) Edit a different item that is not lost
6) Note the lost value is not set!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26061: Compiled CSS
Jonathan Druart [Thu, 30 Jul 2020 15:40:28 +0000]
Bug 26061: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26061: Improve style of sidebar datepickers
Owen Leonard [Fri, 24 Jul 2020 15:59:42 +0000]
Bug 26061: Improve style of sidebar datepickers

This patch makes a small change to the staff interface CSS so that
datepicker form fields in sidebar forms don't force the datepicker icon
onto a second line.

The change uses the CSS calc() function to specify that form fields with
a .hasDatepicker class (dynamically added by jqueryUI) have a width of
100% minus 20 pixels, leaving room for the datepicker icon.

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

- View a page in the staff interface which has a datepicker field in a
  sidebar form and confirm that the icon stays on the same line as the
  firm field at varying browser widths. Examples:

  - Reports -> Saved SQL reports
  - Circulation -> Overdues
  - Acquisitions -> Late orders

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25953: Add ID to installed plugins table on plugins-home.pl
David Cook [Wed, 8 Jul 2020 12:36:46 +0000]
Bug 25953: Add ID to installed plugins table on plugins-home.pl

This patch adds a "installed_plugins" ID to the table
of installed plugins.

The idea is that it will ease styling and DOM mods through Javascript.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26070: DBRev 20.06.00.020
Jonathan Druart [Thu, 30 Jul 2020 15:21:50 +0000]
Bug 26070: DBRev 20.06.00.020

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26070: Remove GoogleIndicTransliteration system preference
Owen Leonard [Mon, 27 Jul 2020 19:16:07 +0000]
Bug 26070: Remove GoogleIndicTransliteration system preference

The Google Transliterate API was deprecated on May 26, 2011. This patch
removes the feature and associated system preference.

To test, apply the patch and run the database update process.

 - Go to Administration -> System preferences and search for
   'GoogleIndicTransliteration.' There should be no results.
 - Search the Koha codebase for references to
   'GoogleIndicTransliteration.' There should be no current references..

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22660: DBRev 20.06.00.019
Jonathan Druart [Thu, 30 Jul 2020 15:21:50 +0000]
Bug 22660: DBRev 20.06.00.019

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22660: (QA follow-up) Fix capitalization in system preference
Katrin Fischer [Wed, 29 Jul 2020 22:51:34 +0000]
Bug 22660: (QA follow-up) Fix capitalization in system preference

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22660: (follow-up) Re-word system preference description
Owen Leonard [Thu, 23 Jul 2020 18:20:51 +0000]
Bug 22660: (follow-up) Re-word system preference description

This patch rewords the system preference description to focus on the
generic description of the editor rather than the name of the plugin:

    tinymce: "a WYSIWYG editor (TinyMCE)"
    codemirror: "a text editor (CodeMirror)"

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22660: (follow-up) Improve asset handling, add linting
Owen Leonard [Thu, 23 Jul 2020 17:58:22 +0000]
Bug 22660: (follow-up) Improve asset handling, add linting

This patch makes some changes to the way assets are included based on
the value of the system preferece in order to minimize unnecessary
JavaScript includes.

The patch also adds HTML syntax-highlighting and linting like we have in
the system preferences editor.

Removed are two JS files which were not required.

To test, apply the patch and set the NewsToolEditor preference to
"CodeMirror."

 - Edit a news item and confirm that the contents of the
   editor show HTML syntax highlighting.
 - Test HTML linting by adding some malformed HTML (missing closing tag,
   for instance). The error should be highlighted.
 - Set the NewsToolEditor to "TinyMCE" and confirm that WYSIWYG editing
   still works correctly.

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

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22660: Add system pref to allow switching of editors in News Tool
Lucas Gass [Fri, 8 May 2020 22:57:40 +0000]
Bug 22660: Add system pref to allow switching of editors in News Tool

This patch adds a system preference called 'NewsToolEditor' which allows for the choice between TinyMCE and CodeMirror in the News Feature.

TEST PLAN:
1. Apply patch and run updatedatabase
2. Go to Tools > News and make a new entry or edit an existing News item.
3. When you initially load you should gte the TinyMCE editor (WYSIWYG)
4. Search for the NewsToolEditor system preference and switch to CodeMirror.
5. Reload your News item and now you should see the CodeMirror editor.
6. Try saving content with both and maki sure it works.
7. Try adding some different HTML tags in CodeMirror mode, saving, and making sure it looks right when you switch back to TinyMCE

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25968: Make logs sort by date descending as a default
Owen Leonard [Fri, 10 Jul 2020 13:19:14 +0000]
Bug 25968: Make logs sort by date descending as a default

This patch adds DataTables with columns configuration to the log viewer.
The table of log entries is now sorted by default by date descending.

To test, apply the patch and go to Administration -> Table settings.

 - Expand the "Tools" section and confirm that there is a section for
   "logviewer."
 - Go to Tools -> Log viewer.
 - Perform a search which will return multiple results.
 - Confirm that the results are sorted by date descending.
 - Test that the table controls work correctly: Paging, columns, export.
 - Return to the Table settings administration page and test that
   changes to those settings are correctly reflected in the log viewer
   table.

Signed-off-by: barbara <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

JD amended patch: Fix indentation in .yml to match other entries

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22087: Compiled CSS
Jonathan Druart [Thu, 30 Jul 2020 15:40:18 +0000]
Bug 22087: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22087: Add missing filters
Jonathan Druart [Mon, 27 Jul 2020 13:37:21 +0000]
Bug 22087: Add missing filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22087: Move the email into the list
Jonathan Druart [Tue, 7 Apr 2020 10:40:26 +0000]
Bug 22087: Move the email into the list

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22087: Remove padding on li's
Jonathan Druart [Tue, 7 Apr 2020 10:40:24 +0000]
Bug 22087: Remove padding on li's

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22087: Prevent variable names colision
Jonathan Druart [Tue, 7 Apr 2020 10:01:05 +0000]
Bug 22087: Prevent variable names colision

We should not use PROCESS:
http://www.template-toolkit.org/docs/manual/Directives.html

" The PROCESS directive is slightly faster than INCLUDE because it
avoids the need to localise (i.e. copy) the variable stash before
processing the template. "

The 'patron' variable is reused by patron-title.inc

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22087: Add a no_line_break parameter to prevent new lines
Jonathan Druart [Mon, 6 Apr 2020 14:25:34 +0000]
Bug 22087: Add a no_line_break parameter to prevent new lines

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22087: Add space between zipcode and country
Jonathan Druart [Mon, 6 Apr 2020 14:14:04 +0000]
Bug 22087: Add space between zipcode and country

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 22087: Use include file to display patrons address in search result
Jonathan Druart [Mon, 6 Apr 2020 14:00:13 +0000]
Bug 22087: Use include file to display patrons address in search result

In order to display the city and country in the patron search result, we
need to use the member-display-address-style include file, to satisfy
AddressFormat.

Test plan:
Modify some patrons and fill the different address info
Search for them and notice that the city, zipcode and country are now
displayed.
Modify the value of AddressFormat and confirm that the display is
modified according to its value

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26060: Compiled CSS
Jonathan Druart [Thu, 30 Jul 2020 15:40:02 +0000]
Bug 26060: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26060: Replace staff interface table sort icons with SVG
Owen Leonard [Fri, 24 Jul 2020 14:07:29 +0000]
Bug 26060: Replace staff interface table sort icons with SVG

This patch modifies the staff interface CSS to convert table sorting
icons from PNG to SVG. These icons are added via background-image
data-urls, so only the SCSS file is modified.

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

 - Clear your browser cache if necessary
 - View any DataTable in the staff interface, for instance when checking
   out to a patron with existing checkouts, the catalog detail page for
   a title with holdings, the table of saved reports.
 - Confirm that the sorting icons in the table headers look correct in
   each state: Sorted ascending, sorted descending, and unsorted.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25982: OPAC shelves RSS link output is xml
Didier Gautheron [Sun, 12 Jul 2020 12:09:15 +0000]
Bug 25982: OPAC shelves RSS link output is xml

Output rss feed as text/xml

Test plan:
1) have books entered
2) log in create a list
3) add books to list
4) display list in OPAC
5) click the RSS link button.
   -- output is displayed as html text
6) apply patch
7) repeat steps 4&5
   -- output is displayed as xml tree

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25351: Move cart-related strings out of opac-bottom.inc and into basket.js
Owen Leonard [Thu, 18 Jun 2020 13:10:35 +0000]
Bug 25351: Move cart-related strings out of opac-bottom.inc and into basket.js

This patch adds the necessary JavaScript includes to the OPAC to
enable translation of strings in JavaScript. It also updates the
translation of cart-related strings by removing the strings from
opac-bottom.inc and putting them in basket.js where they are used.

To test, apply the patch and test that the correct strings are
translatable. In this example I'm testing fr-FR:

 - Update a translation:

   > cd misc/translator
   > perl translate update fr-FR

 - Open the corresponding .po file for the strings pulled from
   JavaScript  e.g.  misc/translator/po/fr-FR-messages-js.po
 - Locate strings pulled from bootstrap/js/basket.js for
   translation, e.g.:

   #: koha-tmpl/opac-tmpl/bootstrap/js/basket.js:89
   msgid "Your cart is currently empty"
   msgstr ""

 - Edit the "msgstr" string however you want (it's just for testing)
 - Install the updated translation:

   > perl translate install fr-FR

In the OPAC, switch to the language you're testing. Confirm that your
translated string appears. In the above example, by clicking the "Cart"
icon in the header when there are no items in the cart.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21268: Don't remove 0 allocated funds from fund list
Jonathan Druart [Tue, 28 Jul 2020 07:23:35 +0000]
Bug 21268: Don't remove 0 allocated funds from fund list

If a fund is created with a amount of 0, it will not appear in the fund
list (when a new order is created for instance).
0 allocated funds can be used to track donations and other situations
where there is not an expected amount for the year.

Test plan:
0. Do not apply the patch
1. Create 1 active and 1 inactive budgets
2. Create some funds for each budgets, with amount > 0 and amount == 0
3. Add orders to basket
=> Note that the funds with amount == 0 are not displayed
4. Apply the patch
5. Add orders to basket (using the different possible ways we have)
=> Note that the funds with amount == 0 are displayed

This change is applied to the different views of the acquisition module.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25499: Fix fund code column when closing a budget
Katrin Fischer [Fri, 22 May 2020 23:12:22 +0000]
Bug 25499: Fix fund code column when closing a budget

When closing a budget the fund code column in the table is
always empty. This is due to a TT variable not being correct.

To test:
- Create a budget and fund
- Order anything, leave basket open or not, but don't receive
- Duplicate your existing budget
- Close the first budget in order to move the pending orders
- Verify the fund code is not showing in the table
- Apply patch and reload the patch
- Verify fund codes are now showing correctly

Bonus: Changes the column heading Fund id to Fund ID.

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25920: Add liblocale-codes-perl package to fix ubuntu-stable (focal)
Mason James [Fri, 3 Jul 2020 11:42:02 +0000]
Bug 25920: Add liblocale-codes-perl package to fix ubuntu-stable (focal)

to test on ubuntu-20...

1/ install koha-common pkg
 $ sudo apt install koha-common

2/ confirm liblocale-codes-perl pkg is not installed :(
 $ apt-cache policy  liblocale-codes-perl | grep Installed
 Installed: (none)

3/ apply patch

4/ build and install new koha-common pkg

5/ confirm liblocale-codes-perl pkg is now installed :)
 $ apt-cache policy  liblocale-codes-perl | grep Installed
 Installed: 3.62-1

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26063: Use Koha::Plugins->call for some other hooks
Jonathan Druart [Wed, 29 Jul 2020 13:11:24 +0000]
Bug 26063: Use Koha::Plugins->call for some other hooks

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26063: Use Koha::Plugins->call for circulation hooks
Tomas Cohen Arazi [Fri, 24 Jul 2020 19:00:52 +0000]
Bug 26063: Use Koha::Plugins->call for circulation hooks

This patch gets rid of a helper method used for calling the plugin
hooks.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Plugins/Circulation_hooks.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

Sponsored-by: ByWater Solutions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21468: (QA follow-up) Simplify payload
Tomas Cohen Arazi [Thu, 23 Jul 2020 14:52:57 +0000]
Bug 21468: (QA follow-up) Simplify payload

This patch simplifies the payload as suggested on bug 25855. It also
keeps some specific params that cannot be deduced from the passed
checkout object, (e.g. if it is an onsite checkout).

Tests are cleared and added for this special exceptions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21468: (QA follow-up) Enhance tests
Tomas Cohen Arazi [Wed, 15 Jul 2020 05:26:20 +0000]
Bug 21468: (QA follow-up) Enhance tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21468: Add 'checkin' action for _after_circ_actions
Martin Renvoize [Mon, 6 Jul 2020 12:46:47 +0000]
Bug 21468: Add 'checkin' action for _after_circ_actions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21468: Unit tests for AddReturn
Martin Renvoize [Mon, 6 Jul 2020 12:46:15 +0000]
Bug 21468: Unit tests for AddReturn

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21468: Add 'checkout' action for _after_circ_actions
Martin Renvoize [Mon, 6 Jul 2020 08:44:11 +0000]
Bug 21468: Add 'checkout' action for _after_circ_actions

This patch adds a call to _after_circ_actions into AddIssue and passes
an appropriate payload for plugins to utilise after issuing items.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 21468: Unit tests for AddIssue
Martin Renvoize [Mon, 6 Jul 2020 10:43:25 +0000]
Bug 21468: Unit tests for AddIssue

This patch adds a unit test for the addition of a call to the
_after_circ_action hook in AddIssue.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24031: (QA follow-up) Add tests for the AddReserve intervention
Tomas Cohen Arazi [Fri, 24 Jul 2020 18:42:17 +0000]
Bug 24031: (QA follow-up) Add tests for the AddReserve intervention

This patch adds tests for AddReserve

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24031: Add hook to test plugin with unit test
Kyle M Hall [Fri, 17 Jul 2020 15:32:57 +0000]
Bug 24031: Add hook to test plugin with unit test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24031: Add safety checks in Koha::Plugins::call
Julian Maurice [Fri, 22 May 2020 10:29:11 +0000]
Bug 24031: Add safety checks in Koha::Plugins::call

- Check that the plugin has the method before calling it
- Call the method in an eval block to prevent fatal errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24031: Remove check for syspref UseKohaPlugins
Julian Maurice [Fri, 22 May 2020 10:28:17 +0000]
Bug 24031: Remove check for syspref UseKohaPlugins

UseKohaPlugins has been removed by bug 20415

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24031: Fix warnings
Kyle M Hall [Thu, 21 Nov 2019 13:08:38 +0000]
Bug 24031: Fix warnings

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24031: Add plugin hook after_hold_create
Julian Maurice [Wed, 13 Nov 2019 10:11:54 +0000]
Bug 24031: Add plugin hook after_hold_create

It is called after a hold has been placed

Test plan:
1. Write a plugin that implements only after_hold_create (see
   `perldoc Koha::Plugins` for implementation details). Install it and
   enable it
2. Place a hold and verify that your plugin method has been called with
   the right parameters

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25855: (QA follow-up) Simplify payload
Tomas Cohen Arazi [Thu, 23 Jul 2020 14:00:11 +0000]
Bug 25855: (QA follow-up) Simplify payload

This patch makes the hook be passed the Koha::Checkout object instead
of a hand-crafted list of attributes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25855: (QA follow-up) Generalize hook and simplify tests
Tomas Cohen Arazi [Fri, 3 Jul 2020 13:26:06 +0000]
Bug 25855: (QA follow-up) Generalize hook and simplify tests

This patch generalizes the hook so it can be used by other circulation
actions.

Tests are also simplified by mocking some of the (extensive) plugin
hooks.

To test:
1. Repeat the test plan on the original patch
=> SUCCESS: All good
2. Sign off :-D

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25855: Add a post_renewal_action plugin hook
Tomas Cohen Arazi [Tue, 23 Jun 2020 19:23:06 +0000]
Bug 25855: Add a post_renewal_action plugin hook

This patch adds a new hook to notify plugins about renewal actions. To
test it:

1. Apply the unit tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Plugins/Circulation_hooks.t
=> FAIL: The tests expect some warnings to show, and they don't (i.e.
        the sample plugin hook is not being called).
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! The hook is being called on renewal!
5. Sign off :-D

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25855: Unit tests
Tomas Cohen Arazi [Tue, 23 Jun 2020 19:18:54 +0000]
Bug 25855: Unit tests

This patch adds tests fr a new circulation hook for plugins.
In this case the post_renewal_action hook,

The tests add the hook to the Test plugin, and verify that all the
required parameters are passed for the plugin hook to use them.
It relies on throwing an exception that is to be caught.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25961: Add hooks for plugins to inject variables to OPAC XSLT
Tomas Cohen Arazi [Wed, 8 Jul 2020 19:54:51 +0000]
Bug 25961: Add hooks for plugins to inject variables to OPAC XSLT

This patch adds the following plugin hooks:
- opac_results_xslt_variables
- opac_detail_xslt_variables

This hooks will inject variables returned by the plugin in the form of a
hashref, into the ones that are passed to the XSLT processing code.

To test:
1. Apply the 'DO NOT PUSH' commit
2. Install the Kitchensink plugin
3. Restart all
4. Search biblios in the OPAC
=> SUCCESS: A text is injected in front of the biblio title
5. Enter the detail page of any of the results
=> SUCCESS: A text is injected in front of the biblio title
6. Sign off :-D

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24157: DBRev 20.06.00.018
Jonathan Druart [Thu, 30 Jul 2020 15:21:50 +0000]
Bug 24157: DBRev 20.06.00.018

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24157: Handle the case where logged in user does not have edit_invoices
Jonathan Druart [Fri, 24 Jul 2020 11:03:31 +0000]
Bug 24157: Handle the case where logged in user does not have edit_invoices

This patch make possible the reopening and merging of invoices even if
the logged in user does not have the edit_invoices permission

I don't think it really makes sense but at least it's now possible.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24157: (follow-up) New permission - delete_invoices
Jonathan Druart [Tue, 21 Jul 2020 09:09:50 +0000]
Bug 24157: (follow-up) New permission - delete_invoices

Hide the "Delete" invoice link if necessary on
/cgi-bin/koha/acqui/invoice.pl?invoiceid=X

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24157: New permission - merge_invoices
Jonathan Druart [Tue, 21 Jul 2020 09:03:07 +0000]
Bug 24157: New permission - merge_invoices

Add a new permission to merge invoices

Test plan:
- Remove the new permission "merge_invoices" for a given patron,
use it to log in into Koha
- Create 2 invoices, try to merge them
=> There is no way to merge it
- Add the permission
=> Now you can merge the invoices

Sponsored-by: Galway-Mayo Institute of Technology
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24157: (follow-up) Conditionally show controls to reopen and close invoice
Owen Leonard [Fri, 6 Mar 2020 19:13:35 +0000]
Bug 24157: (follow-up) Conditionally show controls to reopen and close invoice

This follow-up makes minor changes to the template so that the checkbox
for reopening or closing an invoice are not displayed when the user
doens't have the correct permissions.

To test, apply the patch and try the process of viewing or editing an
invoice as a user with these various permissions:

 - edit_invoices ON
 - edit_invoices OFF
 - reopen_closed_invoices ON
 - reopen_closed_invoices OFF

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24157: New permission - delete_baskets
Jonathan Druart [Wed, 11 Dec 2019 15:39:36 +0000]
Bug 24157: New permission - delete_baskets

Add a new permission to delete acquisition baskets

Test plan:
- Remove the new permission "delete_basket" for a given patron,
use it to log in into Koha
- Create basket, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the basket

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24157: New permission - delete_invoices
Jonathan Druart [Wed, 11 Dec 2019 15:37:46 +0000]
Bug 24157: New permission - delete_invoices

Add a new permission to delete invoices

Test plan:
- Remove the new permission "delete_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the invoice

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24157: Add new method Acq::Invoice::Adjustement->fund
Jonathan Druart [Fri, 13 Dec 2019 16:37:36 +0000]
Bug 24157: Add new method Acq::Invoice::Adjustement->fund

Moving to its own commit in case we want to cherry-pick or move it to
its own bug report.

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24157: New permission - edit_invoices
Jonathan Druart [Tue, 10 Dec 2019 20:05:40 +0000]
Bug 24157: New permission - edit_invoices

Add a new permission to edit invoices

Test plan:
- Remove the new permission "edit_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, edit it (click "detail")
=> You can see the detail of the invoice, but cannot edit it. It's a read-only view.
- Add the permission
=> The form is back and you can modify the invoices and save the changes.
Also, you are able to create adjustments.

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24157: New permission - reopen_closed_invoices
Jonathan Druart [Tue, 10 Dec 2019 19:03:28 +0000]
Bug 24157: New permission - reopen_closed_invoices

New permission to reopen a closed invoice.

Test plan:
- Remove the new permission "reopen_closed_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, close it
=> You are not able to reopen the invoice
- Add the permission
=> You are able to reopen the invoice

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25709: DBRev 20.06.00.017
Jonathan Druart [Thu, 30 Jul 2020 15:21:50 +0000]
Bug 25709: DBRev 20.06.00.017

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25709: Rename systempreference to NotesToHide
Nick Clemens [Mon, 6 Jul 2020 17:56:35 +0000]
Bug 25709: Rename systempreference to NotesToHide

In an effort to use more inclusive language we have added a new coding guideline:
https://wiki.koha-community.org/wiki/Coding_Guidelines#TERM3:_Inclusive_Language

This patchset renames a syspref to be clearer and follow the guideline

To test:
1 - Apply patch and updatedatabase
2 - git grep NotesBlacklist
3 - Note all remaining occurrences are translations, db updates, and release notes
4 - Add a field (e.g. '520' ) to the NotesToHide systempreference
5 - View a record with a 520 field on the opac
6 - Confirm the field does not show in the 'Title notes' tab

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25811: Debug - Paste the source of the page
Jonathan Druart [Mon, 27 Jul 2020 12:59:59 +0000]
Bug 25811: Debug - Paste the source of the page

I am really struggling finding the problem here.
Posting the source of the page may help.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23086: Search for collection is broken
Kyle M Hall [Wed, 18 Sep 2019 14:28:33 +0000]
Bug 23086: Search for collection is broken

It appears that we are quoting the ccode values deep in the search code.
Under ICU chains this breaks searching by limits

To recreate
 1 - Setup Koha using Zebra and icuchains
 2 - Add ccode to AdvancedSearchTypes
 3 - In koha-conf.xml set zebra debug level to include request
  <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 4 - Set some items into different ccodes
 5 - On opac perform a search for:
    ccode:NFIC
 6 - It works
 7 - tail -n 50 /var/log/koha/kohadev/zebra-output.log
 8 - Note search request like:
    Search biblios OK 26 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC
 9 - On opac go to advanced search, select Collection, and limit to smae code a s above
10 - No results
11 - Check the zebra-output.log:
    Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 'NFIC'
12 - Apply patch
13 - Restart all
14 - Repeat search by collection limit
15 - Success!
16 - Check the zebra-output.log:
    Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC
17 - Add a new ccode value: N)N
18 - Set some items to that ccode
19 - Confirm searching by that ccode works

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23086: Unit test
Nick Clemens [Wed, 15 Jul 2020 15:33:18 +0000]
Bug 23086: Unit test

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25940: Check for reserve_id before Dopop
Lucas Gass [Mon, 6 Jul 2020 20:38:42 +0000]
Bug 25940: Check for reserve_id before Dopop

TEST PLAN:
1. Have an item belonging to a different branch and check it in.
2. When the modal pops up hit 'Yes, print slip' or 'Print slip' if  AutomaticItemReturn is set to 'don't'
3. The first print dialog should appear with a URL like '/cgi-bin/koha/circ/transfer-slip.pl?transferitem=18&&branchcode=CPL&op=slip'
4. Close that print dialog and you will immediately see another one that says 'No slip template found'.
5. Notice the URL of the second pop-up is:  /cgi-bin/koha/circ/hold-transfer-slip.pl?reserve_id=
6. There is no reserve id so the template is not found.
7. Apply patch
8. Repeat 1-6
9. You should no longer have two print dialogs

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25724: Do not call ModReserveStatus when completing transfer
Nick Clemens [Fri, 12 Jun 2020 10:51:36 +0000]
Bug 25724: Do not call ModReserveStatus when completing transfer

I can not see how this code is useful here. It checks for a reserve with priority 0 and found = NULL
That is not a status that should occur when filling a transfer. Either the found is 'T' if we are transferring due
to the hold, or the hold was placed after the transfer was initiated, and so the priority is not 0

Additional, AddReturn checks for reserves later and asks the staff to confirm waiting status.

ModReserveStatus also calls CartToShelf regardless of what happens here.

To test:
1 - Set  UpdateItemLocationOnCheckin  to:
    _ALL_: CART
2 - SetAutomaticItemReturn = Do
3 - Check an item in at a different branch than it's homebranch to create a transfer
4 - Check the item in at it's homebranch
5 - View the item details page
6 - Item is not in CART location
7 - Apply patch
8 - Repeat
9 - Item is in CART location after completion of transfer

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Jason Robb <jrobb@sekls.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25724: Unit tests
Nick Clemens [Fri, 12 Jun 2020 11:11:26 +0000]
Bug 25724: Unit tests

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Jason Robb <jrobb@sekls.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24279: Disable editing lost status in items editor if item is a return claim
Kyle M Hall [Fri, 24 Jul 2020 11:26:14 +0000]
Bug 24279: Disable editing lost status in items editor if item is a return claim

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24279: Disable lost status select if item has a return claim
Kyle M Hall [Tue, 26 May 2020 11:27:28 +0000]
Bug 24279: Disable lost status select if item has a return claim

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24279: Display the tip in the title of the option
Jonathan Druart [Thu, 7 May 2020 10:33:17 +0000]
Bug 24279: Display the tip in the title of the option

This patch tells select2 to retrieve the title attribute from the
original option node.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24279: (QA follow-up) Show values disabled with tooltips
Kyle M Hall [Thu, 23 Apr 2020 13:04:25 +0000]
Bug 24279: (QA follow-up) Show values disabled with tooltips

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24279: Claims Returned does not work when set from additem.pl
Kyle M Hall [Mon, 30 Dec 2019 13:04:29 +0000]
Bug 24279: Claims Returned does not work when set from additem.pl

Test Plan:
1) Configure Claimes Returned
2) Apply this patch
3) Go to additem.pl for that item
4) Note the claims returned lost status does not show in the lost status pulldown

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24279: Claims Returned does not work when set from moredetail.pl
Kyle M Hall [Mon, 30 Dec 2019 12:51:23 +0000]
Bug 24279: Claims Returned does not work when set from moredetail.pl

Test Plan:
1) Configure Claimes Returned
2) Apply this patch
3) Go to moredetail.pl for that item
4) Note the claims returned lost status does not show in the lost status pulldown

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25729: Prevent Charges/Fees.t to fail on slow server
Jonathan Druart [Mon, 27 Jul 2020 13:15:44 +0000]
Bug 25729: Prevent Charges/Fees.t to fail on slow server

We must use t::lib::Dates::compare to compare dates

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoCompiled CSS (OPAC)
Jonathan Druart [Mon, 27 Jul 2020 08:12:35 +0000]
Compiled CSS (OPAC)

This RM task has not been done when it was needed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25889: Increase performance of debian/list-deps script
Mason James [Mon, 29 Jun 2020 01:40:36 +0000]
Bug 25889: Increase performance of debian/list-deps script

to test... (on a i7-2600 vm with 8 cores)

1/ run script, note execution time
    $ time ./debian/update-control
    real    8m5.000s

2/ copy old file
    $ cp ./debian/control control.old

3/ apply patch

4/ run updated script, note execution time is smaller
    $ time ./debian/update-control
    real    2m14.000s

5/ copy new file
    $ cp ./debian/control control.new

6/ confirm old and new control files are identical
    $ diff control.old control.new | wc -l
    0

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26033: Use pic.infini.fr instead of framapic
Jonathan Druart [Tue, 21 Jul 2020 10:36:17 +0000]
Bug 26033: Use pic.infini.fr instead of framapic

https://framapic.org/ is closing
"""
Framapic will be closing its doors on Tuesday, January 12, 2021. You will find a similar service on this page.
Uploading images is now disabled, but you can still retrieve your images on the My images page.
"""

https://framablog.org/2019/09/26/lets-de-frama-tify-the-internet/
https://framablog.org/2020/03/03/10-bonnes-raisons-de-fermer-certains-services-framasoft-la-5e-est-un-peu-bizarre/
(French)

We can still use another service. However we may think about hosting the
service ourself!

Test plan:
Modify a selenium script to make it fail (for instance modify the path
for a find_element call)
Run it
Confirm that the screenshot has been uploaded correctly and that the
link works

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 26016: Fix capitalization for "MARC Preview"
Katrin Fischer [Fri, 17 Jul 2020 23:36:24 +0000]
Bug 26016: Fix capitalization for "MARC Preview"

To test:
- Go to any record in the staff catalog
- Check the display for the 'MARC Preview' link
- Apply patch
- It should have changed to 'MARC preview'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 20799: (QA follow-up) Move syspref check
Martin Renvoize [Wed, 22 Jul 2020 09:09:29 +0000]
Bug 20799: (QA follow-up) Move syspref check

This patch moves the syspref check into the controller to save a DB
query if the module is not enabled.

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

JD - amended patch: removing trailing parenthesis in the IF statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 20799: (follow-up) Add ILLModule system preference check and fix display for...
Katrin Fischer [Mon, 29 Jun 2020 15:56:31 +0000]
Bug 20799: (follow-up) Add ILLModule system preference check and fix display for no requests

When there were no requests the label would still display, using .count fixes this.
Also adds a check on the ILLModule system preference to prevent the information from
showing when the ILL module is deactivated.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 20799: Add link from biblio to ILL detail view
Magnus Enger [Mon, 9 Dec 2019 16:48:35 +0000]
Bug 20799: Add link from biblio to ILL detail view

Some ILL systems (e.g. Libris in Sweden) require a link between
a biblio and an ILL request. When such a link exists it is nice
to display an actual link from the biblio detail view to the
ILL request detail view. This patch adds such a link. For users
without ILL privileges, the requests should still show, but not
be clickable links.

To test:
- Make sure you have a couple of ILL requests created with the
  FreeForm backend. (FreeForm does not let you tie a request to
  a biblio through the UI, but we will add connections directly
  in the database.) Lets assume these have illrequest_id's a and b.
- Make sure you have a record, let's call the biblionumber x.
- Apply the patch and make sure there are no changes in the biblio
  detail view of biblionumber x.
- Log into the database and connect the biblio to the first request:
  UPDATE illrequests SET biblio_id = x where illrequest_id = a;
- Check that the biblio detail view now says this:
  "ILL requests: Request a"
- Verify that the "Request a" part is a working link to the detail
  view of ILL request a.
- Do this in the database:
  UPDATE illrequests SET biblio_id = x where illrequest_id = b;
- Check that the biblio detail view now says this:
  "ILL requests: Request a, Request b"
- Verify the links work as expected.
- Log in as a staff user and check that the requests are still
  listed, but not displayed as clickable links.
- Sign off

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23092: DBRev 20.06.00.016
Jonathan Druart [Fri, 24 Jul 2020 12:10:52 +0000]
Bug 23092: DBRev 20.06.00.016

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23092: Add unit tests
Martin Renvoize [Tue, 16 Jun 2020 12:51:00 +0000]
Bug 23092: Add unit tests

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23092: Add 'daterequested' to branchtransfers table
Martin Renvoize [Fri, 17 Jan 2020 12:04:07 +0000]
Bug 23092: Add 'daterequested' to branchtransfers table

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23696: take deleted biblios into account when building oai sets
Josef Moravec [Mon, 30 Sep 2019 09:28:40 +0000]
Bug 23696: take deleted biblios into account when building oai sets

Test plan:
0) do not apply the patch
1) set up OAI and create at least one set
2) run build_oai_sets.pl
3) remember/write down number of records added
4) delete a biblio, the is included in set
5) run buid_oai_sets.pl again
6) the set is 1 record smaller
7) apply the patch
8) run build_oai_sets.pl
9) the number of record should be the same as in 3)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25031: Compiled CSS
Jonathan Druart [Fri, 24 Jul 2020 12:09:03 +0000]
Bug 25031: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25031: (follow-up) Fix markup error and restore cover class
Owen Leonard [Fri, 24 Jul 2020 11:19:24 +0000]
Bug 25031: (follow-up) Fix markup error and restore cover class

This patch corrects a markup error that appears when no cover image
services are enabled. An unclosed <div> caused links on the page to
break.

This patch also restores a part of the cover-handling script which adds
a bordered style to the cover image "tiles"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25031: (QA follow-up) Avoid displaying extra navigation
Owen Leonard [Thu, 23 Jul 2020 19:49:33 +0000]
Bug 25031: (QA follow-up) Avoid displaying extra navigation

This patch reworks the construction of the navigation links in such a
way that they are built during a loop over an updated jQuery object.
Previously the stored variable might not reflect that some elements
had been removed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25031: (QA follow-up) Improve handling of one or fewer images
Owen Leonard [Wed, 17 Jun 2020 21:45:00 +0000]
Bug 25031: (QA follow-up) Improve handling of one or fewer images

This patch addresses a few issues raised during QA:

1. If there are no images, avoid the momentary appearance of an empty
   borered box. The class controlling the appearance of the box is now
   added after initialization.
2. If there is only one image, remove the control for switching
   between covers.
3. Add "preventDefault" to cover naviation click handler.
4. Correct translation function in localcovers.js.

This patch modifies SCSS, so rebuilding the staff client CSS is
necessary for testing.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25031: Improve handling of multiple covers on the biblio detail page in the staff...
Owen Leonard [Tue, 31 Mar 2020 21:37:18 +0000]
Bug 25031: Improve handling of multiple covers on the biblio detail page in the staff client

This patch modifies the template, JS, and CSS for the bibliographic
detail page in order to gracefully handle multiple cover images.

The changed version loops through any cover images which might be
embedded and checks that they are successfully loaded. Only
successfully-loaded images are shown. Only the first image is shown, and
the others can be "paged through" using generated navigation controls.

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

Enable multiple cover image services. The patch was developed with these
services available:

 - Amazon
 - Local cover images (including multiple local cover images)
 - Coce (serving up Amazon, Google, and OpenLibrary images)
 - Images from the CustomCoverImages preference

View a variety of titles and confirm that the cover images are
displaying correctly, whether there be 0, 1, 2, or more covers
available.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 24151: (follow-up) Rename the config key with 'bcrypt_settings'
Jonathan Druart [Thu, 23 Jul 2020 10:14:56 +0000]
Bug 24151: (follow-up) Rename the config key with 'bcrypt_settings'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23797: DBIC schema changes
Jonathan Druart [Thu, 23 Jul 2020 08:51:32 +0000]
Bug 23797: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23797: Apply DB changes to kohastructure.sql
Jonathan Druart [Thu, 23 Jul 2020 08:50:27 +0000]
Bug 23797: Apply DB changes to kohastructure.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23797: DBRev 20.06.00.015
Jonathan Druart [Thu, 23 Jul 2020 08:41:23 +0000]
Bug 23797: DBRev 20.06.00.015

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23797: DBRev 20.06.00.014
Jonathan Druart [Thu, 23 Jul 2020 08:40:18 +0000]
Bug 23797: DBRev 20.06.00.014

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23797: (follow-up) Enable OpacLoginInstructions in header
Owen Leonard [Tue, 7 Jul 2020 18:36:32 +0000]
Bug 23797: (follow-up) Enable OpacLoginInstructions in header

The OpacLoginInstructions information should be available in the login
modal which is displayed when the login link in the header menu is
clicked.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23797: (follow-up) Increase the size of opac_news.lang
Owen Leonard [Mon, 29 Jun 2020 13:07:42 +0000]
Bug 23797: (follow-up) Increase the size of opac_news.lang

This patch adds a database update to increase the size of the
opac_news.lang column in order to accommodate longer values.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23797: Convert OpacLoginInstructions system preference to news block
Owen Leonard [Tue, 24 Mar 2020 15:06:30 +0000]
Bug 23797: Convert OpacLoginInstructions system preference to news block

This patch builds on Bug 22318 to move the OpacLoginInstructions system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the OpacLoginInstructions system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and click the login link.
 - In the login modal, confirm that the content which was previously in
   the OpacLoginInstructions system preference displays correctly
   below the login form.
 - While not logged in to the OPAC, navigate directly to
   /cgi-bin/koha/opac-user.pl. The OpacLoginInstructions content should
   display correctly here as well.
 - In the staff client, go to Tools -> News and verify that the content
   from OpacLoginInstructions is now stored in news items. There
   should be one entry for each of the enabled translations in your
   system, for instance 'OpacLoginInstructions_en',
   'OpacLoginInstructions_fr-FR', 'OpacLoginInstructions_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   OpacLoginInstructions preference has been removed.
 - To test the correct selection of language-specific content you must
   run the translation update/install process for the languages you're
   updating.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23796: DBRev 20.06.00.013
Jonathan Druart [Thu, 23 Jul 2020 08:36:54 +0000]
Bug 23796: DBRev 20.06.00.013

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 23796: Convert OpacCustomSearch system preference to news block
Owen Leonard [Wed, 11 Dec 2019 18:20:46 +0000]
Bug 23796: Convert OpacCustomSearch system preference to news block

This patch moves the OpacCustomSearch system preference into the Koha
news system, making it possible to have language- and library-specific
content.

To test you should have some content in the OpacCustomSearch system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the OpacCustomSearch system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from OpacCustomSearch is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'OpacCustomSearch_en', 'OpacCustomSearch_fr-FR',
   'OpacCustomSearch_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   OpacCustomSearch preference has been removed.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>