]> git.koha-community.org Git - koha.git/log
koha.git
3 years agoBug 24387: Fix one remaining occurrence of KohaNews
Jonathan Druart [Mon, 16 Aug 2021 11:54:46 +0000 (13:54 +0200)]
Bug 24387: Fix one remaining occurrence of KohaNews

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Add exec flags
Jonathan Druart [Mon, 16 Aug 2021 11:56:56 +0000 (13:56 +0200)]
Bug 25078: Add exec flags

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoRevert "Bug 26860: facets.inc refactor availability facet"
Jonathan Druart [Mon, 16 Aug 2021 10:24:58 +0000 (12:24 +0200)]
Revert "Bug 26860: facets.inc refactor availability facet"

This reverts commit 63d6c1d8c583a734bd289f01a423133f0c56bb0e.

3 years agoBug 25078: Don't process db revs if updatedatabase.pl failed
Jonathan Druart [Mon, 16 Aug 2021 09:44:14 +0000 (11:44 +0200)]
Bug 25078: Don't process db revs if updatedatabase.pl failed

The updatedatebase stops when something wrong happens, we should not
continue to process the new DB revs (db_revs dir) in that case.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Move skeleton file
Jonathan Druart [Mon, 16 Aug 2021 09:35:28 +0000 (11:35 +0200)]
Bug 25078: Move skeleton file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Keep atomic updates in "atomicupdate" dir
Jonathan Druart [Mon, 2 Aug 2021 09:06:57 +0000 (11:06 +0200)]
Bug 25078: Keep atomic updates in "atomicupdate" dir

The atomicupdate directory will contain all the atomic update files (old
and new version).
That will ease job for the RM and RMaints, no file (except skeletons)
must be in this directory before push.

This patch also fixes an inconsistency we had: the atomic update was run
before the other db revs on the UI but after when the CLI script was
used.

Now we make sure that the CLI does not deal with the atomic update files
when called from the installer (UI)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Fix 'Wide character' from CLI
Jonathan Druart [Fri, 16 Jul 2021 08:01:29 +0000 (10:01 +0200)]
Bug 25078: Fix 'Wide character' from CLI

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Fix encoding issue with db_revs output
Julian Maurice [Thu, 8 Jul 2021 14:01:41 +0000 (16:01 +0200)]
Bug 25078: Fix encoding issue with db_revs output

From `perldoc -f open`:

The scalars for in-memory files are treated as octet strings: unless the
file is being opened with truncation the scalar may not contain any code
points over 0xFF.

So $out need to be decoded first in order to be used in other Perl
strings

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Close open filehandle
Julian Maurice [Thu, 8 Jul 2021 14:01:38 +0000 (16:01 +0200)]
Bug 25078: Close open filehandle

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: (follow-up) Update 'NewVersion' for output_version changes
Martin Renvoize [Wed, 23 Jun 2021 11:16:11 +0000 (12:16 +0100)]
Bug 25078: (follow-up) Update 'NewVersion' for output_version changes

This patch updates the NewVersion compatability method to add arrayref
description handling to split it into description + report.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Separate update "report" from its description
Julian Maurice [Mon, 14 Jun 2021 16:44:06 +0000 (18:44 +0200)]
Bug 25078: Separate update "report" from its description

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Re-introduce NewVersion
Jonathan Druart [Tue, 15 Jun 2021 09:38:51 +0000 (11:38 +0200)]
Bug 25078: Re-introduce NewVersion

This is ugly, we re-add the code we removed in the previous patch.

We need to continue supporting "old" versions.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Put db revs into different files to handle them better
Jonathan Druart [Fri, 29 Jan 2021 11:50:27 +0000 (12:50 +0100)]
Bug 25078: Put db revs into different files to handle them better

This patch suggests to stop using updatedatabase.pl to add new DB revs.
Each DB rev will be in a separate pl files (installer/data/mysql/db_revs).

The switch should ideally be done from 21.06.00.000.

Each DBrev is executed in a try block and a transaction. If something
went wrong, the whole DB rev is rolled back.

Why do /var/log/koha/kohadev/updatedatabase_*.log (not -error) contain
    Status: 500
    Content-type: text/html

    <h1>Software error:</h1>
etc.

Test plan:
- git checkout c4b4db21d25 (master on 2021-07-08)
- Set the version syspref to 21.0500000:
    > update systempreferences set value="21.0500000" where variable="version";
- Apply "Bug 25078: [DO NOT PUSH] DB revs for testing" (restart_all)
- Read the different DBrevs created as examples
- Make sure the different use cases are covered
- execute the updatedatabase script (CLI)
- Set the version syspref to 21.0500000
- Update the DB from the UI
- Set the version syspref to 21.0500000
- execute the updatedatabase script with the --force parameter (for
testing purpose)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Move DB revs up to 21.06.00.016
Jonathan Druart [Thu, 8 Jul 2021 07:43:58 +0000 (09:43 +0200)]
Bug 25078: Move DB revs up to 21.06.00.016

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26761: Use aria-disabled attribute in OPAC cart for disabled links
Owen Leonard [Wed, 21 Oct 2020 11:15:50 +0000 (11:15 +0000)]
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links

This patch adds "aria-disabled" attributes to disabled links in the
Cart, and adds JS to change the value from "true" to "false" when the
links are enabled. The goal is to make the interface more informative to
users of screen readers.

To test, apply the patch and add some items to the Cart in the OPAC.

- Inspect the markup of controls like "Remove", "Place hold," etc. Each
  should look disabled (grey) and has the correct aria-disabled
  attribute value.
- Select one or more checkboxes. The links should be come active, and
  the aria-disabled attribute shoulk now be "false."
- Deselect all checkboxes. The links should now be disabled.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: Compiled CSS
Jonathan Druart [Mon, 16 Aug 2021 08:29:15 +0000 (10:29 +0200)]
Bug 10902: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: Use prefetch and dbic rs
Jonathan Druart [Mon, 16 Aug 2021 08:49:48 +0000 (10:49 +0200)]
Bug 10902: Use prefetch and dbic rs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: (follow-up) Account for singleBranchMode
Owen Leonard [Tue, 10 Aug 2021 11:56:45 +0000 (11:56 +0000)]
Bug 10902: (follow-up) Account for singleBranchMode

This patch checks singleBranchMode before highlighting the current
branch in search results.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: (follow-up) Fix patron search autocomplete
Owen Leonard [Mon, 9 Aug 2021 11:43:32 +0000 (11:43 +0000)]
Bug 10902: (follow-up) Fix patron search autocomplete

The circulation search autocomplete (e.g. from circulation.pl search
header) was corrected in the previous patch to include library name
instead of branchcode. This patch makes the same correction for patron
search autocomplete (e.g. from members-home.pl search header).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: (QA follow-up) Show library name instead of code
Owen Leonard [Fri, 6 Aug 2021 13:48:42 +0000 (13:48 +0000)]
Bug 10902: (QA follow-up) Show library name instead of code

This patch modifies the patron search autocomplete so that library name
is shown instead of library code.

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>
3 years agoBug 10902: Highlight patrons from logged-in library in patron searches
Owen Leonard [Tue, 30 Mar 2021 16:21:06 +0000 (16:21 +0000)]
Bug 10902: Highlight patrons from logged-in library in patron searches

This patch alters a few different patron search interfaces so that
patrons from the currently-logged-in library are highlighted in a way
that differentiates them from other patrons.

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_client).

- In Administration -> System preferences, make sure the
  PatronAutoComplete preference is enabled.
- In the "Check out" tab in the header, type a partial patron name which
  will return multiple results and wait for the autocomplete menu to
  appear..
  - Patrons in the autocomplete results should show the branchcode, and
    patrons from the currently-logged-in library should be highlighted
    in green.
- Submit your partial name in the "check out" tab.
  - In the search results the branch name of patrons from the
    currently-logged-in library should be similarly highlighted.
- Go to patrons browse for patrons. These results should be highlighted
  as in the previous steps.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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>
3 years agoBug 28819: (follow-up) Use stacked icons for different searches
Owen Leonard [Fri, 13 Aug 2021 17:00:37 +0000 (17:00 +0000)]
Bug 28819: (follow-up) Use stacked icons for different searches

This patch modifies the staff interface home page so that the "Advanced
search" and "Item search" links are differentated using stacked Font
Awesome icons.

To test, apply the patch and view the staff interface home page. The
icons associated with advanced and item searches should be different:

- The Advanced search link should have a magnifying glass icon on top of
  a grey book icon.
- The Item search link should have a magnifying glass icon on top of a
  grey list icon.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28819: Add item search to intranet-main.tt
Lucas Gass [Mon, 9 Aug 2021 16:39:55 +0000 (16:39 +0000)]
Bug 28819: Add item search to intranet-main.tt

To test:
1. Apply patch
2. Go to staff main page ( intranet-main.tt )
3. Now you should see an 'Item search' button and icon.

Signed-off-by: kelly mcelligott <kelly@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28765: Remove sub find_value from batchMod.pl
Jonathan Druart [Mon, 26 Jul 2021 16:31:43 +0000 (18:31 +0200)]
Bug 28765: Remove sub find_value from batchMod.pl

It has never been used and should be removed

Test plan:
Search for "find_value" in the file and confirm that there is no more
occurrence

Signed-off-by: David Nind <david@davidnind.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 24387: DBRev 21.06.00.016
Jonathan Druart [Mon, 16 Aug 2021 09:01:28 +0000 (09:01 +0000)]
Bug 24387: DBRev 21.06.00.016

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24387: Fix sample_news.yml installer file
Jonathan Druart [Wed, 11 Aug 2021 14:50:18 +0000 (16:50 +0200)]
Bug 24387: Fix sample_news.yml installer file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24387: Remove sample_news.for other languages
Jonathan Druart [Wed, 11 Aug 2021 14:49:59 +0000 (16:49 +0200)]
Bug 24387: Remove sample_news.for other languages

We shouldn't continue to update those files as we are going to remove
them soon.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24387: (QA follow-up) Fix method import issues
Tomas Cohen Arazi [Tue, 10 Aug 2021 23:54:08 +0000 (20:54 -0300)]
Bug 24387: (QA follow-up) Fix method import issues

Raised by the QA script, a couple issues carried by pre-17600 patches.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24387: (QA follow-up) Add missing filters
Tomas Cohen Arazi [Tue, 10 Aug 2021 18:52:40 +0000 (15:52 -0300)]
Bug 24387: (QA follow-up) Add missing filters

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24387: DBIC schema changes
Jonathan Druart [Fri, 16 Jul 2021 07:13:34 +0000 (09:13 +0200)]
Bug 24387: DBIC schema changes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24387: Fix location options when editing HTML custom
Jonathan Druart [Fri, 9 Jul 2021 13:26:24 +0000 (15:26 +0200)]
Bug 24387: Fix location options when editing HTML custom

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24387: Rename "News" with "Additional contents"
Jonathan Druart [Tue, 6 Jul 2021 15:28:19 +0000 (17:28 +0200)]
Bug 24387: Rename "News" with "Additional contents"

One big patch for one big move.

The "News" feature (opac_news) has been hijacked to handle some system
preferences (bug 26050). The goal was to take profit of the UI (editor)
and the ability to translate the value.

Disclaimer: This patch is NOT offering the best implementation but, as
we still don't have bug 24975, it cannot be done now. And no, we don't
want to wait for it to move forward here. This patch is going into the
right direction anyway.

This enhancement is going to rename the "News" with a more genertic
"Additional contents". We have two different "categories" of content:
"news" and "html customizations".

What does it bring?
- A split on the UI for disambigate the two types of content (news and
syspref/html customizations)
- A simplification of the edit form: all languages will be translatable
on the same view (like the "notice templates")
- Ground will be prepared for different types of content (if needed later)
- Staff news can be translated

How was the "News" area working before this patch?
The opac_news DB table contained a (very inconsistent) 'lang' column.
The different values were:
- '' => news to display at the OPAC and staff interfaces
- 'koha' => news for staff only
- 'slip' => news for slip notices
- $lang => news for OPAC only, translated in $lang ('en', 'es-ES', etc.)
- "$location_$lang" => A syspref moved to this "news" area. The syspref
is $location, and is translated in $lang. Eg. OpacLoginInstructions_en,
OpacLoginInstructions_fr-FR, opacheader_es-ES

This patch is improving the DB structure with the following changes:
- renaming 'opac_news' with 'additional_contents'
- new 'category' column
 => 'news' or 'html_customizations'
- new 'location' column
 => For 'news': 'staff_and_opac', 'staff_only', 'slip'
 => For 'html_customizations': the old syspref name (eg. 'OpacLoginInstructions').
- new 'code' column (see later for more info)
- the 'lang' column will only contain the language code ('en', 'es-ES',
etc.). BUT a 'default' entry will ALWAYS exist for fallback behaviour.

We are getting closer to the 'notice template' table structure because
we want to match its UI. The 'code' column will bring us the ability to
group the different 'additional_contents' rows. The code for a given
news will be the same, but the (lang, title, content) will differ.
Examples:
  News 1 will have, for each of the translated versions
  (category, code,    location, branchcode)
  ('news',   'News1', $location, $branchcode||undef)
  And the 3 following columns will differ:
  (title,              content,               lang)
  ('title for news 1', 'content for news 1', 'default')
  ('titulo para 1',    'contenido para 1',   'es-ES')

Note that the "category" is not strictely necessary, but it seems better
to have the ability to split the different content by category/type
easily.

Additional changes:
- Syspref 'NewsToolEditor' is renamed 'AdditionalContentsEditor'
- Koha::NewItem => Koha::AdditionalContent
- Koha::News => Koha::AdditionalContents
- Script and template renamed from koha-news to additional-contents
- Foreign keys have been renamed
- Subpermission edit_news has been renamed edit_additional_contents
- The UI can now be accessed via a "News" or "HTML customizations" link
from the tools module. The related contents will then be displayed (both
categories are now split)

Changes not done here:
- Primary key 'idnew' could be renamed 'id'

Limitations of the upgrade:
News cannot be grouped by a unique code for existing translations.
=> A given news will be now displayed several times on the translated
interface
Any ideas to improve the upgrade behaviour?
We will have to add a warning in the release notes to tell libraries to
review their news.

Test plan:
0. Don't apply the patches
1. Translate the interfaces in some languages
. Create some news for staff and OPAC
. Create some content for different entry of HTML customizations
Note that you are forced to define a 'default'.
Also note that you are only forced to fill the title (not the content).
This is certainly problematic (see FIXME in the code) as sometime only
the content is displayed.
. Play with the interface (edit, delete, filter)
. Go to the different places the news are displayed, and confirm they
are displayed correctly (staff home, opac home, opac rss)
. Create 1+ news for 'slip', check an item out and 'print slip' (from
the circulation page). You must see the news.
. Go to the different places you are expecting the HTML customizations
to be present and confirm that you see them.
. Switch the lang of the interface and confirm that you now see the
content in the translated version
. Generate the templates in another language, don't translate the
content
. Use this language for the interface and confirm that the 'default'
version is displauyed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 12561: DBRev 21.06.00.015
Jonathan Druart [Mon, 16 Aug 2021 09:01:27 +0000 (09:01 +0000)]
Bug 12561: DBRev 21.06.00.015

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 12561: Add warning on about page
Jonathan Druart [Fri, 18 Jun 2021 14:13:17 +0000 (16:13 +0200)]
Bug 12561: Add warning on about page

If a default xslt file has been removed or if the one filled in one of
the syspref does not exist.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
3 years agoBug 12561: Change prototype of XSLTParse4Display
Jonathan Druart [Fri, 18 Jun 2021 14:05:34 +0000 (16:05 +0200)]
Bug 12561: Change prototype of XSLTParse4Display

Use a hash for better readability and reusability.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
3 years agoBug 12561: Remove non-XSLT views
Jonathan Druart [Fri, 18 Jun 2021 13:27:40 +0000 (15:27 +0200)]
Bug 12561: Remove non-XSLT views

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
3 years agoBug 12561: Remove HighlightOwnItemsOnOPAC and HighlightOwnItemsOnOPACWhich
Jonathan Druart [Fri, 18 Jun 2021 12:55:25 +0000 (14:55 +0200)]
Bug 12561: Remove HighlightOwnItemsOnOPAC and HighlightOwnItemsOnOPACWhich

This is the only remaining non-XSLT only feature. We should remove the
non-XSLT views that have been deprecated for a while now, and remove
this feature.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
3 years agoBug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)
Caroline Cyr La Rose [Wed, 19 May 2021 16:10:25 +0000 (12:10 -0400)]
Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)

This patch adds 050 $a to the mapping for the lc-call-number index.

To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r

If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex

I'm not sure how to search specifically for an LC call number.
You can confirm that 050 $a is displayed in the Search engine configuration page.

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>
3 years agoBug 28381: Elasticsearch - Add 710 and 711 to default mappings for author index ...
Caroline Cyr La Rose [Tue, 18 May 2021 21:12:34 +0000 (17:12 -0400)]
Bug 28381: Elasticsearch - Add 710 and 711 to default mappings for author index (MARC21)

This patch adds fields 710$a and 711$a to the default author mappings for elasticsearch indexing.

To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r

If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex

3) Search for an author name found only in 710 using the Author index
in advanced search
4) Repeat search for an author name in 711

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>
3 years agoBug 28380: Elasticsearch - correct 024aa in mappings (MARC21)
Caroline Cyr La Rose [Tue, 18 May 2021 20:40:50 +0000 (16:40 -0400)]
Bug 28380: Elasticsearch - correct 024aa in mappings (MARC21)

This patch corrects a typo in the mappings.yaml file

To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r

If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex

3) Search for a standard number found in 024$a using the Standard number index
in the advanced search

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>
3 years agoBug 28379: Elasticsearch - Add 710 to author-name-corporate index (MARC21)
Caroline Cyr La Rose [Tue, 18 May 2021 20:13:17 +0000 (16:13 -0400)]
Bug 28379: Elasticsearch - Add 710 to author-name-corporate index (MARC21)

This patch adds 710 to the default author-name-corporate index mappings for
elasticsearch.

To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r

If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex

3) Search for an author name found only in 710 using the Author (Corporate name) index
in advanced search

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>
3 years agoBug 28378: Elasticsearch - Add 264c to default copydate mappings (MARC21)
Caroline Cyr La Rose [Tue, 18 May 2021 20:04:41 +0000 (16:04 -0400)]
Bug 28378: Elasticsearch - Add 264c to default copydate mappings (MARC21)

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>
3 years agoBug 28339: Elasticsearch - Add 8XX to default title-series index mappings (MARC21)
Caroline Cyr La Rose [Tue, 18 May 2021 19:50:34 +0000 (15:50 -0400)]
Bug 28339: Elasticsearch - Add 8XX to default title-series index mappings (MARC21)

This patch adds series added entries titles (800 $t, 810 $t, 811 $t, and 830 $a) in the
default title-series index mappings.

To test:

1) Apply patch
2) Reindex using rebuildelasticsearch.pl -r

If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration and click "Reset mappings" and confirm
2b) Then reindex

3) Search for a series title found only in and added entry field

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>
3 years agoBug 28719: Change somes links in the serials page to avoid them leading to nothing
Alexis Ripetti [Fri, 16 Jul 2021 15:43:44 +0000 (11:43 -0400)]
Bug 28719: Change somes links in the serials page to avoid them leading to nothing

To test:
1- Search for a serial
2- Pick one
3- Go to 'Serial collection' on the left
4- An issue should be selected if you're expected a new issue
5- delete it using 'Delete selected issues'
6- Confirm deletion
7- If you're supposed to receive more issues the next one should now be there
8- Now edit the serial ('Edit serials')
9- See that the link leads to nothing
10- Apply patch and redo steps 1 to 8
11- See that the link now leads to something

Signed-off-by: kelly <kelly@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28842: A summary to the /items/:item_id/pickup_locations route
Tomas Cohen Arazi [Wed, 11 Aug 2021 12:03:58 +0000 (09:03 -0300)]
Bug 28842: A summary to the /items/:item_id/pickup_locations route

This patch simply adds a summary to the route. This will be picked by
the API docs.

It also removes the 'pickup_locations' tag, as we did in bug 28461.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.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 28848: Make sure the 'swagger' attribute is a string
Tomas Cohen Arazi [Thu, 12 Aug 2021 14:15:22 +0000 (11:15 -0300)]
Bug 28848: Make sure the 'swagger' attribute is a string

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.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 26852: Fix Heading.t
Jonathan Druart [Wed, 11 Aug 2021 15:01:51 +0000 (17:01 +0200)]
Bug 26852: Fix Heading.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26852: subfield $e missing in X11 definition of MARC21 headings
Janusz Kaczmarek [Sun, 21 Dec 2014 08:31:47 +0000 (09:31 +0100)]
Bug 26852: subfield $e missing in X11 definition of MARC21 headings

This patch adds $e to 111 and 611, but removes it from 100 and 110 as it's
used for the relator term there and should not be copied. Same for 111$j.

Test plan:

1. Have a biblio record with, for example, 711 field with a $e subfield.
2. Have two auth records: one with 111 field reflecting the 711 field and second similar but without $e subfield
3. Have LinkerModule set to Default
4. Run link_bibs_to_authorities.pl
5. 711 should remain unlinked since there were two record found by the Default Linker and no one was chosen.

6. Apply the patch.
7. Run link_bibs_to_authorities.pl
8. 711 should be linked now.

Repeat testing in similar fashion for authorities:

9. 100/110 $e
10. 111 $j

NB zebra index definition is OK:
kohaidx:index_match_heading tag="111" subfields="acdefghjklnpqstvxyz" subdivisions="vxyz">
in etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml

Signed-off-by: Sara Brown <sbrown@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 28834: Correct wording biblios/authorities in tools home
Fridolin Somers [Mon, 9 Aug 2021 20:07:53 +0000 (10:07 -1000)]
Bug 28834: Correct wording biblios/authorities in tools home

In tools home, we actually see 2 wordings : biblios/bibliographic authorities/authority
Looks like bibliographic is more correct.

Test plan :
1) Apply patch and look at words in tools home /cgi-bin/koha/tools/tools-home.pl

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28779: (QA follow-up) Even more specific message
Katrin Fischer [Tue, 10 Aug 2021 13:21:18 +0000 (15:21 +0200)]
Bug 28779: (QA follow-up) Even more specific message

For the detail page, the MARC view etc. we use the text:

The record you requested does not exist (488).

I think this is better than "not found", because that sounds
like it might be an issue with the search index, which we can
rule out in this case.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28779: (QA follow-up) More specific message and soem cleanup
Nick Clemens [Fri, 30 Jul 2021 14:39:39 +0000 (14:39 +0000)]
Bug 28779: (QA follow-up) More specific message and soem cleanup

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Petro Vashchuk <stalkernoid@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 28779: Skip processing of non-existent biblios
Joonas Kylmälä [Thu, 29 Jul 2021 16:35:47 +0000 (19:35 +0300)]
Bug 28779: Skip processing of non-existent biblios

Just checking with a regex that whether an input looks like a biblionumber
is not enough, we need to also verify there is a biblio really existing
in the database and skip processing of hold request for non-existent
biblionumbers.

To test:
 1) Go to page /cgi-bin/koha/reserve/request.pl?biblionumbers=XXXXX
    where XXXXX is non-existent biblionumber, notice internal server error
 2) Apply patch
 3) Repeat step 1 and notice we cannot place a hold

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Petro Vashchuk <stalkernoid@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 28825: Can't edit local cover image for item from details page
Owen Leonard [Fri, 6 Aug 2021 16:49:50 +0000 (16:49 +0000)]
Bug 28825: Can't edit local cover image for item from details page

This patch corrects the markup for local cover images attached to items.
The correction allows correct display of an "edit" link when the user
clicks an item's cover image and views it in the lightbox-style modal.

To test, apply the patch and make sure the "LocalCoverImages" system
preference is enabled.

- View the details of a bibliographic record in the catalog which has
  items attached..
- In the table of holdings, click Edit -> Upload image.
- Upload an image for the item and return to the bibliographic detail
  page.
- Your image should now be displayed in the holdings table.
- Click the image to view it.
- In the footer of the modal there is an edit link: "Local cover image
  (edit). Before this patch the edit link would lead to a missing page.
  After applying the patch the link should take you to the "Image view"
  where you have the option of deleting the image or uploading another
  one.

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>
3 years agoBug 27847: Compiled CSS changes
Jonathan Druart [Wed, 11 Aug 2021 11:26:12 +0000 (13:26 +0200)]
Bug 27847: Compiled CSS changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27847: Don't obscure page when checkin modal is non-blocking
Owen Leonard [Mon, 19 Apr 2021 11:49:25 +0000 (11:49 +0000)]
Bug 27847: Don't obscure page when checkin modal is non-blocking

This patch changes the series of events striggered when a non-blocking
modal dialog is displayed during checkin. If the "TransfersBlockCirc"
preference is set to "Don't block," the user can continue to check in
even though a transfer dialog has appeared. This patch hides the modal's
"backdrop" element so that the modal doesn't look like one which blocks
further action.

There is no Bootstrap backdrop option which both hides the backdrop and
makes it non-blocking, so we have to use the default non-blocking option
and "manually" hide the backdrop.

The "show.bs.modal" event must be added in order to make the
necessary change before the modal is displayed. This prevents the
darkened backdrop from appearing and then being hidden.

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_client).

- Set the "TransfersBlockCirc" preference to "Don't block."
- Check in an item which belongs to another library.
- A modal dialog should be displayed: "Please return this item to XXX"
- The page "behind" the modal should not be darkened, and the cursor
  focus should remain in the check-in field.
- Checking in an item which as a hold should still trigger the
  "blocking" behavior: The modal must be dismissed by clicking one of
  its buttons (not the backdrop) and the page behind the modal should be
  darkend.
- Test with "TransfersBlockCirc" set to "Block." Checking in an item
  belonging to another library should trigger the "blocking" modal
  behavior.
- Test that other checkins still work correctly.

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 28764: (QA follow-up) Add comment, remove two defined's
Marcel de Rooy [Mon, 9 Aug 2021 13:41:45 +0000 (13:41 +0000)]
Bug 28764: (QA follow-up) Add comment, remove two defined's

If we no longer offer the sortfield with :asc actively, we should
probably write it somewhere too.
Replaced a few defined tests by empty test. No need to split empty
string or zero etc.

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 28764: Alter sort dropdown to use direction parameter
Nick Clemens [Fri, 30 Jul 2021 10:54:47 +0000 (10:54 +0000)]
Bug 28764: Alter sort dropdown to use direction parameter

This code is odd -we build a select in the template, then turn it into a list of links using javascript
This patch adds a direction data element and uses it while building the links

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 28764: Parse direction parameter in public list view
Nick Clemens [Tue, 27 Jul 2021 11:27:21 +0000 (11:27 +0000)]
Bug 28764: Parse direction parameter in public list view

This patch adds a check for a 'direction' paramter in list sorting.

It maintains the existing syntax for sorting 'sortfield=field:direction'
but adds support for the form used in paginations and more commonly thtoughout
Koha' sortfield=field&direction=direction'

To test:
1 - Create a public list
2 - Add enough items to generate two pages (40 worked for me)
3 - View the list and enforce sorting by date added descending:
    sortfield=dateadded:desc
4 - Note the titles shown
5 - Click to second page using the pagination bar
6 - Note the same titles are shown, in a reversed order
7 - Apply patch
8 - repeat 305
9 - Second page is sorted correctly!

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 28813: DBRev 21.06.00.014
Jonathan Druart [Wed, 11 Aug 2021 11:25:45 +0000 (11:25 +0000)]
Bug 28813: DBRev 21.06.00.014

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28813: Rename delivery_note to failure_code
Martin Renvoize [Thu, 5 Aug 2021 09:17:29 +0000 (10:17 +0100)]
Bug 28813: Rename delivery_note to failure_code

We now use the codes from the half implimented error_code in place of
the plain text that was being added to the delivery_note field. As part
of that we rename the field to failure_code to clarify it's intended
content.

Test plan
1/ Confirm t/db_dependent/Letters.t passes

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>
3 years agoBug 28813: Update unit tests
Martin Renvoize [Thu, 5 Aug 2021 09:16:24 +0000 (10:16 +0100)]
Bug 28813: Update unit tests

This patch updates the unit tests to check for failure_code instead of
delivery_note and catches a missing case.

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>
3 years agoBug 28813: DBIC Schema Update
Martin Renvoize [Thu, 5 Aug 2021 09:15:58 +0000 (10:15 +0100)]
Bug 28813: DBIC Schema Update

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>
3 years agoBug 28813: Update database field name
Martin Renvoize [Thu, 5 Aug 2021 09:14:49 +0000 (10:14 +0100)]
Bug 28813: Update database field name

Update the database field name from 'delivery_note' to 'failure_code' to
more accurately denote it's use.

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>
3 years agoBug 28835: Fix ability to pass list contents to batch record modification
Fridolin Somers [Tue, 10 Aug 2021 09:14:03 +0000 (23:14 -1000)]
Bug 28835: Fix ability to pass list contents to batch record modification

Bug 12759 added the ability to pass list contents to batch record
modification/deletion tools.
Patch Bug 22417 [Restore the 'add to list' feature] removed the fetch
of lists in batch_record_modification.pl I don't understand why.
It still exists in batch_delete_records.pl.

Note that this is needed when first form is displayed.

Test plan :
1) Create a private and a public list of records
2) Open Tools > Batch record modification
3) Check you can use the lists
4) Open Tools > Batch record deletion
5) Check you can use the lists

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 28828: Fix unimarc_field_4XX.tt and marc21_linking_section.tt value builders
Nick Clemens [Mon, 9 Aug 2021 12:09:13 +0000 (12:09 +0000)]
Bug 28828: Fix unimarc_field_4XX.tt and marc21_linking_section.tt value builders

Find closest ul for value builders.

Since Bug 22399 changes in biblio editor, value builder unimarc_field_4XX.tt JavaScript
code does not do its job anymore.
This is because a div is added and this call is now wrong:
  var subfields = whichfield.parentNode.parentNode.getElementsByTagName('input');

Test plan 1:
1) Use a UNIMARC DB
2) Define value builder unimarc_field_4XX on 463$t
3) Create a record B1 with 200$a, 200$f
4) Create a new record B2
5) Click on value builder in 463$t
6) Search for record B1
7) Click on "Choose"
=> Without patch only 463$t is filled with a value
=> With patch 463 $t, $a, $0 and $9 are filled with a value

Test plan 2:
1) Use a MARC_21 DB
2) Define plugin marc21_linking_section.pl on 773$t
3) Make sure 773$t and other subfields are visible in intranet/editor
4) Create a new record in basic cataloging editor
5) Click on value builder in 773$t
6) Search fro a record
7) Click on "Choose"
=> Without patch fields are not fileld
=> With patch subfields are correctly filled

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28569: In opac-suggestions.pl preselect user library
Fridolin Somers [Wed, 16 Jun 2021 09:17:19 +0000 (11:17 +0200)]
Bug 28569: In opac-suggestions.pl preselect user library

In OPAC new purchase suggestion opac-suggestions.pl for library combobox :
actually first value is selected, user library should be selected.

Test plan :
1) Create a new library named 'ZZZ top'
2) Set this library on a user U1
2) Loggin at OPAC with user U1
3) Create a new suggestion
=> Check library 'ZZZ top' is preselected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28727: (QA follow-up) Simplify permission check
Katrin Fischer [Tue, 10 Aug 2021 23:04:49 +0000 (01:04 +0200)]
Bug 28727: (QA follow-up) Simplify permission check

There was another permission check for edit_items directly below,
so instead of changing them to both be edit_items, I think we
can now remove one.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28727: Show edit item link when user has edit items permission
Andrew Fuerste-Henry [Tue, 20 Jul 2021 19:42:41 +0000 (19:42 +0000)]
Bug 28727: Show edit item link when user has edit items permission

To test:
1: log in as a user with edit_items but not edit_catalogue
2: confirm you do not get an Edit Item link on moredetail.pl
3: apply patch, restart, reload
4: confirm link now shows

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 28804: (bug 25026 follow-up) Handle SQL errors in reports
Jonathan Druart [Wed, 4 Aug 2021 06:59:40 +0000 (08:59 +0200)]
Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports

Since bug 25026 DBMS errors are raised, but the report module is not
dealing correctly with the errors.
If an error occurred in execute_query, next queries will fail as well,
we should skip them.

Test plan:
1. Create report from SQL queries, containing errors (invalid syntax, etc.)
'SELECT id FROM borrowers' can do it
2. Execute the query
=> Without this patch you get a 500
=> With this patch applied you see that the error raised at DBMS level
is propagated to the UI
3. Confirm that there is no regression on valid queries

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 17600: Fix missing imports from mappings.pl
Jonathan Druart [Fri, 6 Aug 2021 10:04:16 +0000 (12:04 +0200)]
Bug 17600: Fix missing imports from mappings.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28630: Improve date comparisons in tests
Jonathan Druart [Wed, 4 Aug 2021 09:12:41 +0000 (11:12 +0200)]
Bug 28630: Improve date comparisons in tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28630: (follow-up) Update wording of syspref
Martin Renvoize [Mon, 28 Jun 2021 13:42:13 +0000 (14:42 +0100)]
Bug 28630: (follow-up) Update wording of syspref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28630: Add unit tests
Martin Renvoize [Fri, 25 Jun 2021 09:33:18 +0000 (10:33 +0100)]
Bug 28630: Add unit tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28630: Add track_login_daily to ILSDI::AuthenticatePatron
Martin Renvoize [Fri, 25 Jun 2021 08:50:50 +0000 (09:50 +0100)]
Bug 28630: Add track_login_daily to ILSDI::AuthenticatePatron

This patch adds a call to track_login_daily for the AuthenticatePatron
method in ILSDI.

Many libraries use this ILSDI endpoint for electron book borrowing and
need to maintain the lastseen based on this type of lending.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28261: (QA follow-up) Fix width after adding visual feedback
Nick Clemens [Wed, 28 Jul 2021 13:51:40 +0000 (13:51 +0000)]
Bug 28261: (QA follow-up) Fix width after adding visual feedback

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28261: Add visual feedback on overridden pickup locations on patron's page
Tomas Cohen Arazi [Thu, 29 Apr 2021 11:53:43 +0000 (08:53 -0300)]
Bug 28261: Add visual feedback on overridden pickup locations on patron's page

This patch makes the patron pages in the staff interface use the API and
Select2 to render the pickup locations list. This has the effect of
adding visual feedback on those pickup locations that need an override,
based on the current configuration options.

All the checks are done in the GET /holds/:hold_id/pickup_locations
route, so this is a fairly trivial change.

To test:
1. Have a couple holds for a patron, some overrriden, some not
2. Visit the patrons' detail page, holds tab.
=> SUCCESS: You see the holds, pickup location has a dropdown
3. Repeat in the circulation tab for the patron
=> SUCCESS: You see the holds, pickup location has a dropdown
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Same behavior as before, but the dropdown is rendered with
Select2 and has a search feature. Overridden pickup locations have an
icon telling so
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28421: Unit Tests
Martin Renvoize [Mon, 24 May 2021 09:57:24 +0000 (10:57 +0100)]
Bug 28421: Unit Tests

This patch adds test test cases for both a Voided Payment and Voided
Writeoff. These cases need special handling in the refund process.

Test plan
0/ Don't apply
1/ Run t/db_dependent/Koha/Items.t
2/ Prior to this commit the test should pass
3/ Apply this commit but not the dependency(bug 22435)
3/ The test should fail
4/ Bug 22435 should make the test pass again.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: DBRev 21.06.00.013
Jonathan Druart [Wed, 4 Aug 2021 09:28:52 +0000 (09:28 +0000)]
Bug 22435: DBRev 21.06.00.013

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: (follow-up) Set CREATE offset for credits to positive
Martin Renvoize [Mon, 5 Jul 2021 13:16:30 +0000 (14:16 +0100)]
Bug 22435: (follow-up) Set CREATE offset for credits to positive

The history view of an accountline shows increases and decreases in the
amount outstanding from the perspective of the credit/debit line you are
inspecting.

Apply creates a negative offset amount which acts to 'reduce' both the
outstanding 'debt' for the debit line and the outstanding 'credit' for
the credit line.  Starting with a negative offset for the credit thus
makes this nonsenical.

Void creates positive offset amounts which act to 'restore' both the
outstanding 'debt' for the debit line and the outstanding 'credit' for
the credit line.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: (QA follow-up) More test updates
Martin Renvoize [Mon, 21 Jun 2021 17:32:50 +0000 (18:32 +0100)]
Bug 22435: (QA follow-up) More test updates

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: (QA follow-up) Fix returned offsets in moredetail
Martin Renvoize [Mon, 21 Jun 2021 16:08:33 +0000 (17:08 +0100)]
Bug 22435: (QA follow-up) Fix returned offsets in moredetail

This patch updates the offsets query for lost item returns displayed in
the catalogue/moredetail controller.

Test plan (Same as bug 19919)
Test plan:
1) Pay off a LOST item
2) Check for the associated display of 'Paidfor?:' on the itemdetails page
3) Writeoff a LOST item
4) Check that a 'Paidfor?:' is not displayed on the itemdetails page.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Update DBIC Schema's
Martin Renvoize [Mon, 21 Jun 2021 15:41:54 +0000 (16:41 +0100)]
Bug 22435: Update DBIC Schema's

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: (QA follow-up) Fix test for offset total
Martin Renvoize [Mon, 21 Jun 2021 15:39:38 +0000 (16:39 +0100)]
Bug 22435: (QA follow-up) Fix test for offset total

This patch updates the test for the offset total method to adhere to the
new restricted set of offset types available.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: (QA follow-up) Add missing test for manager relation
Martin Renvoize [Mon, 21 Jun 2021 15:20:22 +0000 (16:20 +0100)]
Bug 22435: (QA follow-up) Add missing test for manager relation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: (follow-up) Drop account_offset_types table
Martin Renvoize [Mon, 21 Jun 2021 15:15:12 +0000 (16:15 +0100)]
Bug 22435: (follow-up) Drop account_offset_types table

This patch drops the now defunkt account_offset_types table and ensure
the type field in account_offsets is instead an enum type column.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: (follow-up) Update POS for reduced offset types
Martin Renvoize [Mon, 21 Jun 2021 14:43:04 +0000 (15:43 +0100)]
Bug 22435: (follow-up) Update POS for reduced offset types

This patch updates the Koha::Charges::Sales class to use the 'CREATE'
and 'APPLY' offset types.

Test plan
1/ Run t/db_dependent/Koha/Charges/Sales.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: (QA follow-up) Fix test file and adjust test
Nick Clemens [Fri, 18 Jun 2021 15:11:31 +0000 (15:11 +0000)]
Bug 22435: (QA follow-up) Fix test file and adjust test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Improve database update
Martin Renvoize [Fri, 14 May 2021 15:42:44 +0000 (16:42 +0100)]
Bug 22435: Improve database update

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Update accountline-details page to show all history
Martin Renvoize [Fri, 14 May 2021 14:39:03 +0000 (15:39 +0100)]
Bug 22435: Update accountline-details page to show all history

The accountline-details page took a simplistic approach to displaying
the history of an accountline. This patch drops the now defunct
offset_type_description template block from it's respective include
files, and then updates the accountline-details template and controller
to show the full history of what's happend to the accountline passed.
This includes the creation, any increments/decrements (for fines), and
finally any offsets against the total (payments, cancellations, voids).

Test plan
1/ Create some credits and debits and apply them to each other in
various combinations.
2/ View the 'Details' page for some of the debit/credits
3/ Compare before patch and after for the Details page.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Update for bug 27049
Martin Renvoize [Fri, 14 May 2021 13:37:59 +0000 (14:37 +0100)]
Bug 22435: Update for bug 27049

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Fix _set_found_trigger
Martin Renvoize [Fri, 14 May 2021 13:04:35 +0000 (14:04 +0100)]
Bug 22435: Fix _set_found_trigger

The _set_found_trigger utilised the 'Writeoff' offset type to
distinguish between the application of a writeoff and any other form of
offset application.

This patch updates the trigger to use the full link through from offset
to account credit line to get the credit type being offset.

Test plan
1/ Run t/db_dependent/Koha/Items.t and prove it fails before the patch,
but passes after applying this patch.
2/ Run t/db_dependent/Koha/Account/Offsets.t and prove it passes both
before and after applying this patch.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Fix CREATE offset amounts
Martin Renvoize [Thu, 18 Mar 2021 10:23:57 +0000 (10:23 +0000)]
Bug 22435: Fix CREATE offset amounts

Updateing the tests highlighted a mistake in the original code.. the
offsets for the cancel and reduce creation lines were incorrectly
signed.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Update unit tests
Martin Renvoize [Wed, 17 Mar 2021 17:48:23 +0000 (17:48 +0000)]
Bug 22435: Update unit tests

This patch updates the unit tests to reflect the changes we have made to
offset types.  We do two things:

1) Clean up calls to 'apply' to drop passing offset_type
2) Update test code to look for APPLY and CREATE instead of specific
   offset types.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: ->apply() should always use 'APPLY' for offset_type
Martin Renvoize [Wed, 17 Mar 2021 14:11:20 +0000 (14:11 +0000)]
Bug 22435: ->apply() should always use 'APPLY' for offset_type

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Add 'APPLY' to account_offset_types
Martin Renvoize [Wed, 17 Mar 2021 17:48:04 +0000 (17:48 +0000)]
Bug 22435: Add 'APPLY' to account_offset_types

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Use 'CREATE' offset type in Koha::Account::Line
Martin Renvoize [Tue, 16 Mar 2021 17:18:39 +0000 (17:18 +0000)]
Bug 22435: Use 'CREATE' offset type in Koha::Account::Line

This patch updates the Koha::Account::Line methods that result in new account
lines to use the 'CREATE' offset type for the creation record.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Use 'CREATE' offset type in Koha::Account
Martin Renvoize [Tue, 16 Mar 2021 17:12:07 +0000 (17:12 +0000)]
Bug 22435: Use 'CREATE' offset type in Koha::Account

This patch updates the Koha::Account methods for adding debits and
credits to use the 'CREATE' offset type for the creation record.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22435: Update CREATE offset types
Martin Renvoize [Tue, 16 Mar 2021 17:28:12 +0000 (17:28 +0000)]
Bug 22435: Update CREATE offset types

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28142: Compiled CSS
Jonathan Druart [Wed, 4 Aug 2021 09:28:05 +0000 (11:28 +0200)]
Bug 28142: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28142: Accessibility: OPAC cart/basket checkboxes are not labelled
Henry Bolshaw [Thu, 15 Jul 2021 22:32:40 +0000 (22:32 +0000)]
Bug 28142: Accessibility: OPAC cart/basket checkboxes are not labelled

This patch adds labels to the checkboxes on the "Your cart" page to
improve accessibility for users of screen readers. The labels are
hidden from display because the item titles provide enough visual
context.

Test Plan:

1. Go to the OPAC
2. Search for some items and add them to your cart
3. Inspect the page html and confirm the checkboxes are not labelled
4. Select the "More Details" page and confirm these labels are missing too
5. Apply the patch
6. Inspect the checkboxes on the "Brief display" and "more details" views
7. Confirm that the checkboxes have meaningful labels and that the visual
display of the pages has not changed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
JD amended patch: fix indentation

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