]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 26143: Make the API handle per_page=-1
Tomas Cohen Arazi [Wed, 5 Aug 2020 15:09:40 +0000 (12:09 -0300)]
Bug 26143: Make the API handle per_page=-1

This patch introduces handling for per_page=-1 and actually adds a
missing feature to the API: being able to request all resources on a
route.

To test this:
1. Visit the libraries admin page
2. On the table, choose to display 'All' rows
=> FAIL: it doesn't refresh, the browser console displays a 500 error
code and so the logs
3. Apply the tests patches
4. Run:
   $ kshell
  k$ prove t/Koha/REST/Plugin/Pagination.t \
           t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Tests fail loudly
5. Apply this patch
6. Restart plack
7. Repeat 2
=> SUCCESS: choosing to display all, works
8. Repeat 4
=> SUCCESS: Tests pass now!
9. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e4cae99f7ec76e40a57e4066e088b9b01caed744)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26143: Regression tests
Tomas Cohen Arazi [Wed, 5 Aug 2020 15:04:47 +0000 (12:04 -0300)]
Bug 26143: Regression tests

This patch introduces tests for the per_page=-1 handling use case. From
now on per_page=-1 means 'all resources'.

On writing this I noticed that we always paginate results no matter
what, but there was a weird condition under which on pagination headers
were sent back to the API consumer. This is highlighted in the precedent
patch, which is not the -1 situation this one tries to tackle.

Both pagination and searching are broken with per_page=-1, which is a
standard, and we actually didn't explicitly set a way to request all
resources.

To verify this:
1. Apply the previous tests patch and this one
2. Run:
   $ kshell
  k$ prove t/Koha/REST/Plugin/Pagination.t \
           t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Things are damn broken

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d20bc39d759bc9321b1b7accb952f90351a14caa)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26143: The API is always paginated
Tomas Cohen Arazi [Wed, 5 Aug 2020 14:55:28 +0000 (11:55 -0300)]
Bug 26143: The API is always paginated

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 61e8dc8c7d489329c27aca3b6b10137c289161cb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26133: Remove GetMarcHosts
Jonathan Druart [Tue, 4 Aug 2020 11:55:13 +0000 (13:55 +0200)]
Bug 26133: Remove GetMarcHosts

We removed the single occurrence of this subroutine in the previous
patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 88ecaa54cdfec5d35091237821097877b0edb4eb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26133: Remove GetMarc* calls in detail.pl
Jonathan Druart [Tue, 4 Aug 2020 11:54:28 +0000 (13:54 +0200)]
Bug 26133: Remove GetMarc* calls in detail.pl

There are several calls in catalogue/detail.pl that can be removed:
GetMarcISBN, GetMarcAuthors, GetMarcSubjects, GetMarcSeries, GetMarcUrls and GetMarcHosts
They pass a variable to the template that is never used.

Test plan:
Confirm that this TT variable is never used.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5c190388ae1b69889e28c2dae80e0d9ea9baff1a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26141: Remove duplicated code from search.pl
Jonathan Druart [Wed, 5 Aug 2020 07:57:56 +0000 (09:57 +0200)]
Bug 26141: Remove duplicated code from search.pl

commit 417553a9e47bf31f4cb785162e3dced856a2ac2a
  Bug 12478: starting to add search to staff client

This commit added code related to the itemtypes to the advanced search, but this code already existed.

The weird bit is:
$template->param(advancedsearchesloop => \@advancedsearchesloop);
my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes";
my $advancedsearchesloop = prepare_adv_search_types($types);
$template->param(advancedsearchesloop => $advancedsearchesloop);

We are passing twice advancedsearchesloop to the template.

Test plan (for QA):
Review the changes and confirm that we can safely remove this code

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a51a4f117d13739687f7be47d56cae0352914901)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26043: Fix random failure from Holds.t
Jonathan Druart [Wed, 22 Jul 2020 12:11:03 +0000 (14:11 +0200)]
Bug 26043: Fix random failure from Holds.t

 #   Failed test 'Test ModReserveMinusPriority()'
 #   at t/db_dependent/Holds.t line 202.
 #          got: undef
 #     expected: '1605'
 # Looks like you failed 1 test of 66.

It is coming from Koha::Patron->holds that is ordering by reservedate,
so "sometimes" they are ordered in reverse (at least it's my
understanding of the problem).

Test plan:
Run the test file several times (from 20 to 60x), it must never fail
with this patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 80a611797bf67b263b6b84a6e931833ea336b6a5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25762: Typo in linkitem.tt
Owen Leonard [Wed, 29 Jul 2020 12:21:29 +0000 (12:21 +0000)]
Bug 25762: Typo in linkitem.tt

This patch corrects the same typo in two different templates:

&rsquo; -> &rsaquo;

If you want to test beyond examining the patch, apply the patch
and go to Tools -> Rotating collections.

- Add an item to a rotating collection.
- In the browser's title bar (or the tab title if the title bar isn't
  shown) the separator between the rotating collection name and "Add or
  remove items" should be ">" instead of "`"
- Enable the EasyAnalyticalRecords system preference.
- View the detail page for a bibliographic record.
- From the "Edit" menu, choose "Link to host record"
- Check the title bar as you did previously.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 19f9bc0528ec0f5cdf000b5120138652b3ece57c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26085: Add the copy, print and export DataTables buttons to lost items report
Owen Leonard [Wed, 29 Jul 2020 12:58:22 +0000 (12:58 +0000)]
Bug 26085: Add the copy, print and export DataTables buttons to lost items report

This patch removes the in-page DataTables DOM configuration option so
that the default option is used. This will allow all the standard
controls to appear, including copy/print/export.

Since the default DataTables information includes the number of results
in the table, the template markup showing this information is removed.

To test, apply the patch and go to Reports.

- Run the "Items lost" report using parameters which will return
  multiple results.
- On the results page confirm that the standard controls are present:
  Result count, search form, columns filter, export buttons.
- Confirm that the "Activate filters" feature works, and that selecting
  results activates the option to download a CSV using a CSV export
  profile.

  Note that the "Activate filters" feature doesn't play well with hidden
  columns. However this issue predates the patch.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a7c85ad16303bb1a041663a13336f8446c26ee64)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26094: Add class to the "Suggest for purchase" button
Jonathan Druart [Thu, 30 Jul 2020 12:39:17 +0000 (14:39 +0200)]
Bug 26094: Add class to the "Suggest for purchase" button

Bug 14963 added a new "Suggest for purchase" button on the detail page
of bibliographic records at the OPAC.
This patch adds a specific CSS class to make it reachable easily

Like others button in this action list

Test plan:
Go to the detail page of a bibliographic record at the OPAc
Notice the new CSS class

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9f11ba114e13aee10e05ccb83096c7f02908085b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26004: Remove unused jQuery plugin jquery.hoverIntent.minified.js from the OPAC
Owen Leonard [Fri, 17 Jul 2020 13:20:45 +0000 (13:20 +0000)]
Bug 26004: Remove unused jQuery plugin jquery.hoverIntent.minified.js from the OPAC

The jQuery plugin jquery.hoverIntent.minified.js hasn't been used in
Koha in long time. This patch removes it from the OPAC.

To test, apply the patch and search for instances of "hoverIntent."
There should be none.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5d69ae18b5727d122575eb12a34f1712cb96b5b3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26011: Remove unused jQuery plugin jquery.metadata.min.js from the OPAC
Owen Leonard [Fri, 17 Jul 2020 18:09:30 +0000 (18:09 +0000)]
Bug 26011: Remove unused jQuery plugin jquery.metadata.min.js from the OPAC

The jQuery plugin jquery.metadata.min.js hasn't been used in
Koha in long time. This patch removes it from the OPAC.

To test, apply the patch and search for instances of "jquery.metadata."
There should be none.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7c100a7fd21bd4497be87df4b8cc94674a19c5f5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25873: Ignore malformed data for Elasticsearch integer fields
Julian Maurice [Thu, 25 Jun 2020 07:25:41 +0000 (11:25 +0400)]
Bug 25873: Ignore malformed data for Elasticsearch integer fields

If we try to put malformed data into an integer field, Elasticsearch
rejects the whole document.
Setting 'ignore_malformed' to true allows to ignore malformed data and
process the other fields of the document normally

https://www.elastic.co/guide/en/elasticsearch/reference/7.8/ignore-malformed.html

Test plan:
* Without the patch
  1. In search engine configuration, change the type of a text field to
  'Number' (for instance 'title')
  2. misc/search_tools/rebuild_elasticsearch.pl -d -b
  3. See that the index is empty (unless you have titles consisting only
  of digits)
* With the patch
  1. misc/search_tools/rebuild_elasticsearch.pl -d -b
  2. Now records are correctly indexed

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cb5acdc6702cef4668921ccf2537797358981fff)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26084: Clarify language on ConsiderOnSiteCheckoutsAsNormalCheckouts
Andrew Fuerste-Henry [Wed, 29 Jul 2020 15:58:42 +0000 (15:58 +0000)]
Bug 26084: Clarify language on ConsiderOnSiteCheckoutsAsNormalCheckouts

To test:
- apply patch
- confirm explanation reads as suggested

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 622ea4627ae50c49f7547ee3a3a8b4bde18e17a3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26111: Add "Serials" (SER) to the reports dictionnary
Jonathan Druart [Fri, 31 Jul 2020 09:53:53 +0000 (11:53 +0200)]
Bug 26111: Add "Serials" (SER) to the reports dictionnary

It's missing in the template

Test plan:
Go go Home › Reports › Guided reports wizard › Dictionary
At step 2, notice that with this patch you have "Serials" in the
dropdown list (instead of an empty entry)

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b0eee4d2e1359050cee3dd23a121e75195b0ce11)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25887: Keep library filter on the fund list view
Jonathan Druart [Thu, 30 Jul 2020 08:57:53 +0000 (10:57 +0200)]
Bug 25887: Keep library filter on the fund list view

The problem:
When filtering funds by library, the pull down for libraries resets to "empty" when the page is reloaded,
although the filter criteria is visible in the URL.

Test plan:
Create a fund for library A
Create a fund for library B
Go to the fund list view
=> All funds are listed
Select library A in the library filter, click "Go"
=> Funds for library A are listed
=> Library filter has "library A" selected
Edit fund for library B
=> The edit form has "library B" selected

Signed-off-by: Holly Cooper <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 09ed4c0dd7277931c1e631c5b1329463fc9751e5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25852: Add tests
Jonathan Druart [Thu, 30 Jul 2020 09:59:44 +0000 (11:59 +0200)]
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>
(cherry picked from commit e330e4ec222f8ac3a04339a020509e30aa0bf3ab)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25852: Improve C4::Creators::Lib reliability under plack
Jonathan Druart [Thu, 30 Jul 2020 10:00:03 +0000 (12:00 +0200)]
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>
(cherry picked from commit 0a9d3f17d9e44b5326a42d14420d30243031629d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25953: Add ID to installed plugins table on plugins-home.pl
David Cook [Wed, 8 Jul 2020 12:36:46 +0000 (12:36 +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>
(cherry picked from commit c2111c1ce6532b73af3a4847500be8f305db570a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoRevert "Bug 25968: Make logs sort by date descending as a default"
Lucas Gass [Thu, 13 Aug 2020 14:30:51 +0000 (14:30 +0000)]
Revert "Bug 25968: Make logs sort by date descending as a default"

This reverts commit 10d515257c0c68a4ca07c8ab8108068ded1298e0.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26070: DBRev 20.05.02.010
Lucas Gass [Thu, 6 Aug 2020 20:45:36 +0000 (20:45 +0000)]
Bug 26070: DBRev 20.05.02.010

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26070: Remove GoogleIndicTransliteration system preference
Owen Leonard [Mon, 27 Jul 2020 19:16:07 +0000 (19:16 +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>
(cherry picked from commit 9b9e8fd32852acceb10cfc54d4a5a3acc0f6e232)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22660: DBrev 20.05.02.009
Lucas Gass [Thu, 6 Aug 2020 20:28:34 +0000 (20:28 +0000)]
Bug 22660: DBrev 20.05.02.009

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22660: (QA follow-up) Fix capitalization in system preference
Katrin Fischer [Wed, 29 Jul 2020 22:51:34 +0000 (22:51 +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>
(cherry picked from commit 9e0d097a5692af07db020e6f806eeaa97d43ae1e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22660: (follow-up) Re-word system preference description
Owen Leonard [Thu, 23 Jul 2020 18:20:51 +0000 (18:20 +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>
(cherry picked from commit 23846781751d7fb808b3fa4b857da72706653575)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22660: (follow-up) Improve asset handling, add linting
Owen Leonard [Thu, 23 Jul 2020 17:58:22 +0000 (17:58 +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>
(cherry picked from commit 5bec404420c6dd9251b511d12e2425e5a6039a95)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 22660: Add system pref to allow switching of editors in News Tool
Lucas Gass [Fri, 8 May 2020 22:57:40 +0000 (22:57 +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>
(cherry picked from commit 980dd605031e616f1d481852dffe9cc6779eb3e3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25968: Make logs sort by date descending as a default
Owen Leonard [Fri, 10 Jul 2020 13:19:14 +0000 (13:19 +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>
(cherry picked from commit e68fe2a928bec05b9602fa28dfbc86e04657ce81)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25982: OPAC shelves RSS link output is xml
Didier Gautheron [Sun, 12 Jul 2020 12:09:15 +0000 (14:09 +0200)]
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>
(cherry picked from commit 3d0da68d5ada37b40099fbc11b63202ccf7a48b2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 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 (13:10 +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>
(cherry picked from commit 7c8276bf0e64a2dc90af4aab0d6e78893edc12b1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 21268: Don't remove 0 allocated funds from fund list
Jonathan Druart [Tue, 28 Jul 2020 07:23:35 +0000 (09:23 +0200)]
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>
(cherry picked from commit 8ecaedc22db5a25db6ffa98e6a7fc2e7039656c7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25499: Fix fund code column when closing a budget
Katrin Fischer [Fri, 22 May 2020 23:12:22 +0000 (01:12 +0200)]
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>
(cherry picked from commit ab015f04dcd4956ca1ccd610d085e8b0c17ca733)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25920: Add liblocale-codes-perl package to fix ubuntu-stable (focal)
Mason James [Fri, 3 Jul 2020 11:42:02 +0000 (23:42 +1200)]
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>
(cherry picked from commit 58be086a18e39068fd12dfeef677f982ae735a73)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25961: Add hooks for plugins to inject variables to OPAC XSLT
Tomas Cohen Arazi [Wed, 8 Jul 2020 19:54:51 +0000 (16:54 -0300)]
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>
(cherry picked from commit 9676f537a448d50770c90d9d5a8b420a1f302444)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25709: DBRev 20.05.02.008
Lucas Gass [Fri, 31 Jul 2020 21:17:49 +0000 (21:17 +0000)]
Bug 25709: DBRev 20.05.02.008

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25709: Rename systempreference to NotesToHide
Nick Clemens [Mon, 6 Jul 2020 17:56:35 +0000 (17:56 +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>
(cherry picked from commit 5e45076c00b2f72537ba9c81c4535253f1aaadfb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23086: Search for collection is broken
Kyle M Hall [Wed, 18 Sep 2019 14:28:33 +0000 (10:28 -0400)]
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>
(cherry picked from commit bc1b76be4a35403239fbce6f349ee343435cc8a0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23086: Unit test
Nick Clemens [Wed, 15 Jul 2020 15:33:18 +0000 (15:33 +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>
(cherry picked from commit 40b6e1b8a1a6e74cb4e9a1c422ffa4faa0bdefc0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25940: Check for reserve_id before Dopop
Lucas Gass [Mon, 6 Jul 2020 20:38:42 +0000 (20:38 +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>
(cherry picked from commit 0ec7ba72861f21c2ce83d3a98446af7db7a3e321)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25724: Do not call ModReserveStatus when completing transfer
Nick Clemens [Fri, 12 Jun 2020 10:51:36 +0000 (10:51 +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>
(cherry picked from commit e025cd76437b212746717ad54b5da22e410bbe8f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25724: Unit tests
Nick Clemens [Fri, 12 Jun 2020 11:11:26 +0000 (11:11 +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>
(cherry picked from commit 028e9a07db625845482eff1b550a9bbe86ec6fbc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25729: Prevent Charges/Fees.t to fail on slow server
Jonathan Druart [Mon, 27 Jul 2020 13:15:44 +0000 (15:15 +0200)]
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>
(cherry picked from commit fcd659b2d4cf62df48113567c59392e8dff9696f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25889: Increase performance of debian/list-deps script
Mason James [Mon, 29 Jun 2020 01:40:36 +0000 (13:40 +1200)]
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>
(cherry picked from commit 8d56af377c158823497df17b2ef18637bbc11a1c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26033: Use pic.infini.fr instead of framapic
Jonathan Druart [Tue, 21 Jul 2020 10:36:17 +0000 (12:36 +0200)]
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>
(cherry picked from commit 8aa907379eb54d360746c3e15051327a1e6cc1fe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 26016: Fix capitalization for "MARC Preview"
Katrin Fischer [Fri, 17 Jul 2020 23:36:24 +0000 (23:36 +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>
(cherry picked from commit 1a505632b8d1300a02512cfe300056f7b3797bfb)

4 years agoBug 23696: take deleted biblios into account when building oai sets
Josef Moravec [Mon, 30 Sep 2019 09:28:40 +0000 (09:28 +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>
(cherry picked from commit e14c1702b446111f98ce6736aa7544df14b03d1d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23797: DBIC Schema Changes
Lucas Gass [Fri, 31 Jul 2020 20:03:37 +0000 (20:03 +0000)]
Bug 23797: DBIC Schema Changes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23797: Apply DB changes to kohastructure.sql
Jonathan Druart [Thu, 23 Jul 2020 08:50:27 +0000 (10:50 +0200)]
Bug 23797: Apply DB changes to kohastructure.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0edaab49afec96c793477e9e790b4a9d7b6044fe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23797: DBRev 20.05.02.007
Lucas Gass [Fri, 31 Jul 2020 19:45:52 +0000 (19:45 +0000)]
Bug 23797: DBRev 20.05.02.007

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23797: DBRev 20.05.02.006
Lucas Gass [Fri, 31 Jul 2020 19:41:40 +0000 (19:41 +0000)]
Bug 23797: DBRev 20.05.02.006

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23797: (follow-up) Enable OpacLoginInstructions in header
Owen Leonard [Tue, 7 Jul 2020 18:36:32 +0000 (18:36 +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>
(cherry picked from commit 1bc9765d043169dfeb569e25659f553f39dc466b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23797: (follow-up) Increase the size of opac_news.lang
Owen Leonard [Mon, 29 Jun 2020 13:07:42 +0000 (13:07 +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>
(cherry picked from commit f8c5b54acfa94f2c5e04f3376223e883deef9937)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23797: Convert OpacLoginInstructions system preference to news block
Owen Leonard [Tue, 24 Mar 2020 15:06:30 +0000 (15:06 +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>
(cherry picked from commit be1d25ba16014c5fb3c788f8a93c5ecf3f5d9dbf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23796: DBRev 20.05.02.005
Lucas Gass [Thu, 30 Jul 2020 18:25:20 +0000 (18:25 +0000)]
Bug 23796: DBRev 20.05.02.005

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23796: Convert OpacCustomSearch system preference to news block
Owen Leonard [Wed, 11 Dec 2019 18:20:46 +0000 (18:20 +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>
(cherry picked from commit 16053574a5bff66d86ebcc906ccbabe31c45d1c7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23795: DBRev 20.05.03.004
Lucas Gass [Thu, 30 Jul 2020 18:07:33 +0000 (18:07 +0000)]
Bug 23795: DBRev 20.05.03.004

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23795: Convert opaccredits system preference to news block
Owen Leonard [Wed, 11 Dec 2019 17:03:01 +0000 (17:03 +0000)]
Bug 23795: Convert opaccredits system preference to news block

This patch builds on Bug 22318 to move the opaccredits 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 opaccredits 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 opaccredits system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from opaccredits is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'opaccredits_en', 'opaccredits_fr-FR',
   'opaccredits_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   opaccredits preference has been removed.

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>
(cherry picked from commit c9eb2be381bf9b6848b14bd374ba004f41198ed0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25765: (QA follow-up) Use method directly in cleanborrowers
Martin Renvoize [Tue, 21 Jul 2020 15:03:54 +0000 (16:03 +0100)]
Bug 25765: (QA follow-up) Use method directly in cleanborrowers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bd9ece8c194ffc960b5709b884620bf24e29068b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25765: (QA follow-up) Save a DB hit
Martin Renvoize [Tue, 21 Jul 2020 14:58:02 +0000 (15:58 +0100)]
Bug 25765: (QA follow-up) Save a DB hit

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 83d63d2302ee77c68dbae8be80fc6a038fa5ce51)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25765: Replace LoginBranchname and LoginBranchcode with use of Branches template...
Fridolin Somers [Tue, 16 Jun 2020 12:01:39 +0000 (14:01 +0200)]
Bug 25765: Replace LoginBranchname and LoginBranchcode with use of Branches template plugin

The template plugin Branches contains a method GetLoggedInBranchcode that returns current branch code.
This patch adds GetLoggedInBranchname to get current branch name.
It is used to replace vars LoginBranchname and LoginBranchcode sent to all templates in C4/Auth.pm.

In labels and patrons cards modules, I choose to remove a unseless display of
current branch in a hint.

In acqui/acqui-home.tt, I choose to remove a useless display of current
branch and also because table of founds contains a filter on library.

Test plan:
Check pages source code to see branch code or name is correct.
list of the pages:
/cgi-bin/koha/acqui/acqui-home.pl
/cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX
/cgi-bin/koha/circ/branchoverdues.pl
/cgi-bin/koha/circ/set-library.pl
/cgi-bin/koha/circ/offline.pl
/cgi-bin/koha/labels/label-edit-batch.pl?op=new
/cgi-bin/koha/labels/label-manage.pl
/cgi-bin/koha/patroncards/edit-batch.pl
/cgi-bin/koha/patroncards/manage.pl
OPAC:
/cgi-bin/koha/opac-detail.pl?biblionumber=XXX

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cbd86551571260ca6daade57920e0fb3f290dfb4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25765: Add GetLoggedInBranchname method
Fridolin Somers [Tue, 16 Jun 2020 11:59:29 +0000 (13:59 +0200)]
Bug 25765: Add GetLoggedInBranchname method

Add GetLoggedInBranchname method to Branches templates plugin.

Also changes GetName method to use Koha::Library instead of direct SQL.

Test plan :
Run prove t/db_dependent/Template/Plugin/Branches.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0fcd0fd2707188368fa5b370b808e875c6ea5814)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 5087: DBRev 20.05.02.003
Lucas Gass [Thu, 30 Jul 2020 17:10:14 +0000 (17:10 +0000)]
Bug 5087: DBRev 20.05.02.003

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 5087: Add server-side check
Jonathan Druart [Thu, 23 Jul 2020 09:15:24 +0000 (11:15 +0200)]
Bug 5087: Add server-side check

If a user to access a CSV profile that is not available at the OPAC we
should redirect to 404.

It will also handle undefined csv_profiles

For instance:
kohadev.mydnsname.org:8080/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=1&format=3
kohadev.mydnsname.org:8080/cgi-bin/koha/opac-downloadcart.pl?bib_list=1/2/&format=3

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c2d45ac0f4687fc4dcf84e9de663f8d3f3a354be)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 5087: (QA follow-up) Fix leakage in opac-downloadshelf.pl
Tomas Cohen Arazi [Mon, 20 Jul 2020 15:02:14 +0000 (12:02 -0300)]
Bug 5087: (QA follow-up) Fix leakage in opac-downloadshelf.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit db15f4af8dc021c0ac06c3447cb87c5e51952cd2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 5087: (QA follow-up) used_for deserves an index
Tomas Cohen Arazi [Mon, 20 Jul 2020 14:27:27 +0000 (11:27 -0300)]
Bug 5087: (QA follow-up) used_for deserves an index

This patch introduces an index for the used_for column

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 92d0472d631817395ad71f89f962fa5166f15770)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 5087: (QA follow-up) Rename the attribute to fit later API usage
Tomas Cohen Arazi [Mon, 20 Jul 2020 14:09:01 +0000 (11:09 -0300)]
Bug 5087: (QA follow-up) Rename the attribute to fit later API usage

This patch renames the introduced attribute for later usage on the API,
and changes the logic to use it the other way around.

It also adds a KEY for the flag, as it will be used in WHERE statements.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 478093072000d01b2b5c20f05044e4bd3bbfeecd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 5087: Ability to define whether CSV profile shows in OPAC
Aleisha Amohia [Thu, 20 Dec 2018 22:52:59 +0000 (22:52 +0000)]
Bug 5087: Ability to define whether CSV profile shows in OPAC

To test:
1) Update database
2) Update schema
3) In staff side, go to Tools -> CSV profiles
4) Make a CSV profile with profile type = MARC and usage = Export
records
5) Leave 'Show option in OPAC' unchecked and save
6) Go to OPAC and add an item to your cart
7) Click Cart, click Download, confirm that your newly created CSV
profile does not show as an option
8) Go back and edit CSV profile on staff side
9) Check the 'Show option in OPAC' checkbox and save
10) Go back to download cart in OPAC
11) Confirm the CSV profile now shows in the dropdown

Sponsored-by: Catalyst IT
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ae3644a5947ea410fc3e8ac8b64307df7d1cbb18)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25955: Fix getting index_name
Nick Clemens [Wed, 8 Jul 2020 14:24:37 +0000 (14:24 +0000)]
Bug 25955: Fix getting index_name

To test:
1 - Have a site running ES
2 - perl misc/maintenance/compare_es_to_db.pl
3 - Lots of output, all bad
4 - Apply patch
5 - Repeate
6 - Whew, looks correct

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 005219ea6fc53a52a41169e96024244abb394ee1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25845: (QA follow-up) Call it REST API instead of just API
Tomas Cohen Arazi [Mon, 20 Jul 2020 12:50:58 +0000 (09:50 -0300)]
Bug 25845: (QA follow-up) Call it REST API instead of just API

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 015ed932114ff48e944739afa9123d2501d65e14)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25845: Add 'api' to the log viewer interface options
Tomas Cohen Arazi [Tue, 23 Jun 2020 14:06:55 +0000 (11:06 -0300)]
Bug 25845: Add 'api' to the log viewer interface options

This patch simply adds the API option to the log viewer.

To test:
1. Have BorrowersLog set
2. Update some patron using the API. For example
   curl --location --request PUT 'http://koha:koha@kohadev-intra.mydnsname.org:8081/api/v1/patrons/1' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstname": "Tomasito",
"surname": "None",
"address": "Address",
"category_id": "ST",
"city": "Córdoba",
"library_id": "MPL"
}'
3. Open the log viewer
=> FAIL: There's no way to filter on interface, choosing API
4. Apply this patch
5. Reload the log viewer
=> SUCCESS: There are options to filter by 'API' interface
=> SUCCESS: Filtering by 'API' works
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9b526483c65550c0f36eabad70055bed79a8197c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25907: When cancelling a waiting hold on returns.pl, looks for new hold to fill...
Kyle M Hall [Wed, 1 Jul 2020 10:53:18 +0000 (06:53 -0400)]
Bug 25907: When cancelling a waiting hold on returns.pl, looks for new hold to fill without rescanning barcode

Right now, after canceling a hold on the checkin screen, a librarian
needs to rescan the item barcode to check and trap the next hold. This
is an extra unnecessary step.

Test Plan:
1) Place two or more holds on a record
2) Check in the item
3) Confirm the hold
4) Check in the item again
5) Cancel the hold
6) Koha should now display the modal asking to confirm the next hold
   without the need to rescan the barcode!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b31fdc8f55007217f95980692114a5b0a9a85bc0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25629: Fix capitalization in sample notices
Katrin Fischer [Sat, 30 May 2020 00:46:46 +0000 (00:46 +0000)]
Bug 25629: Fix capitalization in sample notices

This fixes the capitalization in sample notices files to
follow coding-guidelines. Only applies to English, translations
remain unchanged.

Additional fixes:
- Overdues slip added the letter code as subject instead of the description
- Opac changed to OPAC for self-registration verification emails

German (de-DE) file was not changed, as there is a pending translation
bug that will take care of these (bug 25129).

To test:
- Verify changes by running the web installer for the changed
  files and verify sample notices install without error
- Verify subjects and notice descriptions are correct
- Run tests in t/db_dependent/Letters*

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dc2c19bd515a4ce4057b41b2ae2bb668d345c461)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25998: (QA follow-up) Add DBIC level relation
Martin Renvoize [Fri, 17 Jul 2020 06:44:45 +0000 (07:44 +0100)]
Bug 25998: (QA follow-up) Add DBIC level relation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 997094cc38a46372777f39f0bfa249b87fe76d58)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25998: Add 'library' relation to Koha::Account::Line
Martin Renvoize [Thu, 16 Jul 2020 08:40:23 +0000 (09:40 +0100)]
Bug 25998: Add 'library' relation to Koha::Account::Line

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16413beea6a2f5667a3a68971158ad1d7ea4b48a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25998: Add Unit Tests
Martin Renvoize [Fri, 17 Jul 2020 07:01:06 +0000 (08:01 +0100)]
Bug 25998: Add Unit Tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e9927e729066be42a039b7e3f1abb5143820d1cb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11
Mason James [Thu, 18 Jun 2020 01:26:20 +0000 (13:26 +1200)]
Bug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11

to test...
 1/ attempt to install koha 20.05 package on deb11, fail :'(
 2/ apply patch and build new koha package
 3/ attempt to install new koha package on deb11, succeed!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 14932ae7d3bf864f64bffc9b1b015a07e11c8e2e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25723: (QA follow-up) Remove unused module import
Joonas Kylmälä [Fri, 17 Jul 2020 14:26:15 +0000 (14:26 +0000)]
Bug 25723: (QA follow-up) Remove unused module import

The last usage of this module was removed in the commit
"Bug 25723: Update cache flushing calls" but the import was
not removed along with it.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e8fe7de5be946735b59fdc5cd8e8c6b166ed2475)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25723: (QA follow-up) Handle holiday and exception on same day
Nick Clemens [Fri, 17 Jul 2020 12:34:18 +0000 (12:34 +0000)]
Bug 25723: (QA follow-up) Handle holiday and exception on same day

When a holiday is entered, then exceptions generated on a range, there exists both a holiday and exception in
the special holidays table. We should cache the exception over the holiday instead of both

Also, !1 in perl returns '' rather than 0, so we should explicitly set the value

Add blank line to clear pod error from qa tools

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Re-introduce the blank line mentioned in the commit message, it was accidentally removed by automatic formatting
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 223b603f08267f801860bf5deaaa1884e58eab1e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25723: (QA follow-up) Silent POD warning
Martin Renvoize [Wed, 17 Jun 2020 13:04:14 +0000 (14:04 +0100)]
Bug 25723: (QA follow-up) Silent POD warning

I didn't introduce the method that is warned about, but adding POD for
it seemed reasonable and will silence the QA Script warning.

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5851539424d04eda0da52ef8744925227dd6ce0f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25723: Remove tests for removed method
Martin Renvoize [Wed, 17 Jun 2020 12:46:34 +0000 (13:46 +0100)]
Bug 25723: Remove tests for removed method

We removed the exception_holidays (and single_holidays) methods as part
of this patchset. As such, we should no longer test them ;)

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 25f0d425eaa7c66953d02c5a5717b1b2abcb89a6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25723: Update cache flushing calls
Martin Renvoize [Wed, 17 Jun 2020 12:18:24 +0000 (13:18 +0100)]
Bug 25723: Update cache flushing calls

This patch updates the previous single_holidays and exeption_holidays
cache flushing calls to match the new cache key structure of the updated
routines.

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 61141c28b0fcbbb021371bb4c2dd8e818aec0691)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25723: Use the same code for single and exception holidays
Martin Renvoize [Wed, 17 Jun 2020 10:14:30 +0000 (11:14 +0100)]
Bug 25723: Use the same code for single and exception holidays

This patch refactors is_exception_holiday and is_single_holiday to
utilise a single _holidays method which combines the logic of the
previous single_holidays and exception_holidays methods.

As Koha::Calendar is instantiated at a branch level, we also move split
the cache into branches too.

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ae0b2befe8c9086df24469cb546c7c5f8d98de95)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25723: Use a hasref for lookup
Martin Renvoize [Fri, 12 Jun 2020 15:30:28 +0000 (16:30 +0100)]
Bug 25723: Use a hasref for lookup

Rather than using an array of dates and iterating them, use a hashref
and do a direct lookup

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e1dfe50522a01a7640fcca6e2a015206939579c9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25723: Drop DateTime::Set from cpanfile
Martin Renvoize [Fri, 12 Jun 2020 15:02:26 +0000 (16:02 +0100)]
Bug 25723: Drop DateTime::Set from cpanfile

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cd862763c9654ded15c1a7d79fafb2ec73e4f20e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25723: (follow-up) Fix Unit Test
Martin Renvoize [Fri, 12 Jun 2020 14:11:52 +0000 (15:11 +0100)]
Bug 25723: (follow-up) Fix Unit Test

The unit test previously relied on the internals of exception_holidays.

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5b2990d270fdde9fd7f69f6402db9ee171b6473e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25723: Drop DateTime::Set dependancy
Martin Renvoize [Fri, 12 Jun 2020 10:53:49 +0000 (11:53 +0100)]
Bug 25723: Drop DateTime::Set dependancy

This patch removes our use of DateTime::Set and replaces it with a quick
hashref implimentation

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0f0553da225052ff5b8b9bca7a386e04472f32da)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25718: Correct typo in additem.tt
Caroline Cyr La Rose [Wed, 8 Jul 2020 21:24:46 +0000 (17:24 -0400)]
Bug 25718: Correct typo in additem.tt

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>
(cherry picked from commit 2440d480ca24bd1d15731fbd32aec0ea3aa71086)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25717: Improve automatic renewal error messages
David Nind [Sat, 27 Jun 2020 00:38:46 +0000 (00:38 +0000)]
Bug 25717: Improve automatic renewal error messages

Improve wording and grammar for automatic renewal error messages.

Test plan:
1. Review the error message changes and make sure they make sense.

The new message make sense to me.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 379fd6d838d9909ea5784011486f3d184766a833)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25511: Add POD for --force
Jonathan Druart [Mon, 20 Jul 2020 14:57:42 +0000 (16:57 +0200)]
Bug 25511: Add POD for --force

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0c0666c531133a4c743a50ee01a0aada84c2e3cf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25511: Add --force option to update_dbix_class_files.pl
Martin Renvoize [Fri, 15 May 2020 09:51:46 +0000 (10:51 +0100)]
Bug 25511: Add --force option to update_dbix_class_files.pl

This adds a --force option to the aforementioned script allowing those
in the know to overwrite the schema when changes above the found are
detected.

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 34666e26902facdc3bc7e46a7ecd539f69f813e5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25427: Make authority subfield management interface consistent MARC view
Owen Leonard [Fri, 8 May 2020 15:11:19 +0000 (15:11 +0000)]
Bug 25427: Make authority subfield management interface consistent MARC view

This patch makes a couple of minor changes to the authority MARC
subfield structure administration interface to make it more consistent
with the corresponding MARC subfield interface.

To test, apply the patch and go to Administration -> Authority types.

- Pick an authority type to edit, for instance PERSO_NAME, and choose
  'MARC structure' from the Actions menu.
- Pick a tag to edit and select "Subfields" from the Actions menu.
- In the table of subfields for that tag, each subfield in the first
  column should link to the edit interface for that subfield (its tab
  pre-selected).
- The "Edit" button in that table should do the same.

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f1f3117583a41d02f2ad794622f9becd469720f0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25984: Compile CSS
Lucas Gass [Mon, 27 Jul 2020 17:23:20 +0000 (17:23 +0000)]
Bug 25984: Compile CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25984: Add minimum height and width to shelf browser covers
Owen Leonard [Mon, 13 Jul 2020 15:18:23 +0000 (15:18 +0000)]
Bug 25984: Add minimum height and width to shelf browser covers

This patch adds a class to the shelf browser cover image links and a
style for these links defining a minimum height and width. This allows
the browser's default tab focus outline to be visible.

This patch also adds a check for an enabled cover image service before
displaying the cover image links.

This patch introduces whitespace changes so diff accordingly.

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

- Enable the OPACShelfBrowser system preference.
- Enable at least one cover image service (Amazon, Google, Coce, etc).
- Locate a title in the OPAC which has items attached.
- On the bibliographic detail page, click the "Browse shelf" link in the
  table of holdings to display the shelf browser.
- Use the tab key to move the focus to cover images in the shelf
  browser.
- Confirm that the focus outline moves through each cover link whether
  or not there is a cover image available.
- Diable all cover image services.
- Test the shelf browser again and confirm that it's not necessary to
  tap through an empty row.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e722dd1725e113acd79dcb9e8eed2cd4da35aa33)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25244: Add specific aria-label to search results
Martin Renvoize [Mon, 29 Jun 2020 14:55:17 +0000 (15:55 +0100)]
Bug 25244: Add specific aria-label to search results

This patch adds an arai-lebel to the select checkboxes on the search
results page of the OPAC.

Test plan
1/ Perform a search that will yield some results
2/ Inspect the 'checkbox' on the left side of the results table
3/ Note that there is no arai-label
4/ Apply patch
5/ Refresh the search results page
6/ Inspect the 'checkbox' on the left side of the results table
7/ Note that the aria-label now appears and contains relavant
information
8/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 25244: (follow-up) QA corrections

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d1a7112a9054305ead325daedd6bb106a31b346f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25922: Fix typo 'arial-label' -> 'aria-label'
Julian Maurice [Fri, 3 Jul 2020 13:36:04 +0000 (17:36 +0400)]
Bug 25922: Fix typo 'arial-label' -> 'aria-label'

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 73ff914d5d537947b5fdc4cd602e79f41af5179a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25922: Add aria-label to the allowlist for translation
Martin Renvoize [Fri, 3 Jul 2020 13:07:25 +0000 (14:07 +0100)]
Bug 25922: Add aria-label to the allowlist for translation

This patch adds aria-label to the allowlist for translations.

To test:
- Apply patches from here and bug 25244
- kshell
- cd misc/translator
- perl translate update de-DE
- Check for the aria-label in the diff
- Verify the strings appear in the po files now
- Translate them
- perl translate install de-DE
- Verify the translated strings appear in the template

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 280f1bdeb3cbec9f57d71e980490e32af61eecfb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25237: Fix semantic heading for opac-details
Martin Renvoize [Thu, 11 Jun 2020 11:45:57 +0000 (12:45 +0100)]
Bug 25237: Fix semantic heading for opac-details

Prior to this patch the opac-details view contained semantically incorrect h3
headings for the author information.

Test plan
1/ Perform a search in the OPAC that will yield results
2/ Navigate to any results detailed view
3/ Inspect the page and note that there are semantically incorrect headings
   H1 (Page title) > H2 (Item title) > H5 (Author)
4/ Apply the patch
5/ Reload the page
6/ Inspect the page and note that the semantically incorrect author block has
   been converted to a span with an 'h3' class for styling
7/ Note the page still appears nicely
8/ Signoff

Bonus points: Check with XSLT views enabled and disabled.

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>
(cherry picked from commit 6b49a70b94d6b5e0e2e1cde3025ade1278814925)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25155: (follow-up) Increase headings levels by 1
Martin Renvoize [Thu, 11 Jun 2020 09:14:03 +0000 (10:14 +0100)]
Bug 25155: (follow-up) Increase headings levels by 1

In the previous patch we reduced the headings levels by 2, but this was
one level too many as we already have an H1 in the navbar and so all
other heading sets should start at level 2 to semantically follow the
title heading.

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>
(cherry picked from commit c9a0243f3abf407e1a89d7bfc125911cc153b3cc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25155: Fixing semantic headings login modal
Martin Renvoize [Thu, 11 Jun 2020 08:32:45 +0000 (09:32 +0100)]
Bug 25155: Fixing semantic headings login modal

The login modal headings were semantically incorrect prior to this
patch.

Test plan:
1) Click the 'Log in to your account' option to expose the modal
2) Use a headings inspector and note we jump from H1 (Page Title) -> H3
   (Modal Title)
3) Apply the patch and reload the page.
4) Click the 'Log in to your account' option to expose the modal
5) The modal should still appear well formed
6) Use a headings inspector and note we jump from H1 (Page Title) -> H2
   (Modal Title) -> H3 (Shibboleth title if enabled)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 513b226873759ba3df6765dce635fe96cf5a51f3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25155: Fixing semantic headings in opac-auth.tt
Hayley Mapley [Thu, 11 Jun 2020 01:13:30 +0000 (13:13 +1200)]
Bug 25155: Fixing semantic headings in opac-auth.tt

Test plan:
1) Follow test plan from comment #1
2) Apply the patch
3) Reload the page, and note that is still displays fine
4) Check that the main heading is now an h1, and that the other headings
on the page make sense

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0bc47b5302fba91c1315acee5533ec5917df5761)

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