]> git.koha-community.org Git - koha.git/log
koha.git
19 months agoBug 33168: Prevent debhelper from renaming history.txt to changelog
David Cook [Tue, 21 Mar 2023 23:09:20 +0000 (23:09 +0000)]
Bug 33168: Prevent debhelper from renaming history.txt to changelog

This change prevents debhelper from renaming history.txt to changelog,
since that renaming was breaking the Timeline feature in Koha.

Another option would've been to rename history.txt to something else
but that filename is already embedded in Koha and the Koha release
tools, so this seems the safer option.

Test plan:
0. Apply patch
1. Build Debian package
2. Confirm that /usr/share/doc/koha-common/history.txt is created
and /usr/share/doc/koha-common/changelog.gz is not created

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 29449: Show userid on "Personal details" tab
Magnus Enger [Thu, 23 Feb 2023 08:46:13 +0000 (08:46 +0000)]
Bug 29449: Show userid on "Personal details" tab

To reproduce:
- Login to the OPAC
- Go to the "Personal details" tab
- Verify the Username/userid of the logged in user is not
  shown anywhere

To test:
- Apply this patch
- Reload the "Personal details" tab
- Verify that "Username:" and the userid is now shown below the
  "Library card number"
- Try adding "userid" to PatronSelfModificationBorrowerUnwantedField
  and verify the field is hidden as expected
- Log out
- Go to "Don't have an account? Register here."
- Verify "Username:" is *not* shown
- Sign off

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33346: Add missing class and id to link
Pedro Amorim [Tue, 28 Mar 2023 09:47:36 +0000 (09:47 +0000)]
Bug 33346: Add missing class and id to link

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33346: Add Help link to Koha manual in ERM module
Jonathan Druart [Tue, 28 Mar 2023 08:11:01 +0000 (10:11 +0200)]
Bug 33346: Add Help link to Koha manual in ERM module

The 'Help' is missing in the ERM module, this patch is adding it.

Test plan:
Confirm that the Help link is displayed on the different pages of the
ERM module and that it leads to the correct page of the manual.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32794: (follow-up) Replace code by new function (template)
Marcel de Rooy [Wed, 22 Mar 2023 15:50:45 +0000 (15:50 +0000)]
Bug 32794: (follow-up) Replace code by new function (template)

Test plan:
Same as first patch.
Bonus:
Remove protocol from $u. Set first ind1 to 7.
Put mailto in $2. Check link.
Change $2 to tel. Check link.
Change $2 to https. Check link.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32794: (follow-up) Consolidate shared code into one function (:template)
Marcel de Rooy [Wed, 22 Mar 2023 15:17:06 +0000 (15:17 +0000)]
Bug 32794: (follow-up) Consolidate shared code into one function (:template)

Few extra lines for the $2 exception as noted on Bugzilla.

Note: We should probably check why the utils xslt on opac and intranet
have so much differences currently.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32794: Expand tests for access method in XLST files
Nick Clemens [Thu, 2 Feb 2023 13:29:04 +0000 (13:29 +0000)]
Bug 32794: Expand tests for access method in XLST files

This patch expands the checks for 856u to check for mailto, and adds a few conditiona
checks of the first indicator to cover more methods

Reference: https://www.oclc.org/bibformats/en/8xx/856.html

To test:
1 - Edit a record and add a few 856 fields:
    856 0 0 $umailto:test@example.org
    856 0 0 $utest@example.org
    856 2 0 $utelnet://pucc.princeton.edu
    856 2 0 $upucc.princeton.edu
    856 3 0 $u8885555555
2 - View staff details and results and opac details and results
3 - Note all links have been prepended with http://
4 - Apply patch
5 - Refresh all views, ensure links are correctly formed

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 26433: Add Control number to SRU field configuration
Nick Clemens [Wed, 18 Jan 2023 15:11:34 +0000 (15:11 +0000)]
Bug 26433: Add Control number to SRU field configuration

This simply adds a row to the config page for configuring a mapping for Control
number, without this patch you cannot configure the feild, and the default is 'any'

I used the first record here for testing:
http://lx2.loc.gov:210/NAF?operation=searchRetrieve&version=1.1&query=query=bath.personalName=%22butler%20octavia%22&maximumRecords=20&recordSchema=marcxml

Enter SRU server using settings here:
https://www.loc.gov/z3950/lcserver.html#serv
       host: lx2.loc.gov
       port: 210
         db: NAF
     userid:
   password:
 servername: LOC SRU
    checked: NULL
       rank: NULL
     syntax: USMARC
    timeout: 0
 servertype: sru
   encoding: utf8
 recordtype: authority

To test:
1 - Setup SRU server using settings above
2 - In the server config click 'Modify' under 'SRU search fields mapping'
3 - Note you don't have an option for 'Control number'
4 - Go to Authorities
5 - New from Z39.50/SRU
6 - Search 'Control number' field with: PS3552.U827
7 - You get the record noted above as all fields are searched
8 - Search 'Control number' field with: 79056654
9 - You get the record noted above as all fields are searched
10 - Apply patch
11 - In the server config click 'Modify' under 'SRU search fields mapping'
12 - Note you now have a config for 'Control number'
13 - Enter 'bath.lccn'
14 - Save
15 - Repeat search from #6 - no result
16 - Repeat search from #8 - correct result as only lccn fields are search
17 - Modify server config ans set 'Control number' to 'bath.lcCallNumber'
18 - Repeat search from #6 - correct results as call number field is now search
19 - Repeast search from #8 - no result

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33159: Simplify ES handling and fix zebra handling
Nick Clemens [Wed, 8 Mar 2023 18:03:05 +0000 (18:03 +0000)]
Bug 33159: Simplify ES handling and fix zebra handling

Before this patch we used two indexes for the thesaurus values, we can
simply index both needed fields into a single index and just form the
search correctly.

This patch also ensures we pass the 'thesaurus' vlaue for the heading
directly to the query builder - for zebra it goes through, and for ES
we convert it to the expected code.

This patch also moves the necessary mappings out of the user definable
mappings and hardcodes them. There is precedent for this with
'match-heading', it ensures matching works as expected

To test:
1 - Follow previous test plan in Zebra and ES

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33159: Correctly form thesaurus term for non-subject headings
Nick Clemens [Tue, 7 Mar 2023 19:23:44 +0000 (19:23 +0000)]
Bug 33159: Correctly form thesaurus term for non-subject headings

Bug 30280 fixed things for subject heading, but didn't take into account
that all non-subject headings are considered LCSH - this means we can't
really handle different thesauri for controlled headings outside of
subjects - maybe a topic for a new bug, but we should fix matching for
them now

To test:
 1 - Set sysprefs:
    RequireChoosingExistingAuthority - don't require
    AutoCreateAuthorities - generate
    CatalogModuleRelink - Do
    AutoLinkBiblio - Do
    LinkerModule - first match
 2 - Find a record with an author attached to an authority, I used
  biblionumber 3 "Introduction to Attic Greek"
 3 - Edit in advanced editor
 4 - Delete the $9 link
 5 - Save the record
 6 - It generates a new number
 7 - Repeat 4-5, it does it again
 8 - Apply patch and restart all
 9 - Repeat 4-5
10 - It links to the original authority

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33159: Unit tests
Nick Clemens [Tue, 7 Mar 2023 19:23:22 +0000 (19:23 +0000)]
Bug 33159: Unit tests

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 29234: Transit on checking
Martin Renvoize [Thu, 14 Oct 2021 11:05:08 +0000 (12:05 +0100)]
Bug 29234: Transit on checking

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 29234: Unit test
Nick Clemens [Mon, 27 Mar 2023 10:58:43 +0000 (10:58 +0000)]
Bug 29234: Unit test

This patch adds a test that a pending stock rotation transfer is initiated on
checkin, as well as updating the defaults for creating transfer objects

To test:
prove -v t/db_dependent/Circulation.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32336: (QA follow-up) Use $metadata->schema
Tomas Cohen Arazi [Thu, 23 Mar 2023 23:16:37 +0000 (20:16 -0300)]
Bug 32336: (QA follow-up) Use $metadata->schema

When we worked on Koha::Biblio::Metadata, we agreed
biblio_metadata.schema would be the sourceof truth when it comes to the
record schema.

This patch acknowledges that, while retaining the fallback to the
syspref.

To test:
1. Apply this patch
2. Run:
   $ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass, behavior is unchanged.
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32336: Fix encoding of MARCXML output for REST API (UNIMARC)
Julian Maurice [Wed, 23 Nov 2022 14:43:06 +0000 (15:43 +0100)]
Bug 32336: Fix encoding of MARCXML output for REST API (UNIMARC)

Test plan:
1. Be sure to test on a UNIMARC instance
2. Enable system preferences RESTPublicAPI and RESTPublicAnonymousRequests
3. Create a biblio with some diacritics
4. Restart koha and do not interact with OPAC or the staff interface
   (this may change $MARC::File::XML::RecordFormat)
5. Query the public API to retrieve the created biblio in MARCXML. For
   instance with cURL:

   curl -H 'Accept: application/marcxml+xml' \
    http://koha.local/api/v1/public/biblios/<biblionumber>

   You should see encoding issues.
6. Apply the patch and restart Koha.
7. Repeat step 5.
   You should see no encoding issues.
8. You should also test /api/v1/biblios/<biblionumber> (this one
   requires authentication, so cURL might not be the most practical
   tool; use your favorite tool for this)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32336: Add unit test for UNIMARC encoding problems in REST API
Julian Maurice [Fri, 20 Jan 2023 14:33:39 +0000 (15:33 +0100)]
Bug 32336: Add unit test for UNIMARC encoding problems in REST API

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32710: Try to prevent UI/Form/Builder/Item.t to fail randomly
Jonathan Druart [Fri, 31 Mar 2023 08:33:02 +0000 (10:33 +0200)]
Bug 32710: Try to prevent UI/Form/Builder/Item.t to fail randomly

See the FIXME, and commit 77a34e099a9f3bcef2076a4170e8c8d843c403eb
Actually we are doing the trick (of removing _) before we are creating
another itemtype, we need to do it right before we are comparing.

Test plan:
Run in a loop, be patient, it failed for me (without the patch) at run
245

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33136: Added class "page-section" to the result page table of serial record search
Clemens Tubach [Thu, 30 Mar 2023 12:24:22 +0000 (12:24 +0000)]
Bug 33136: Added class "page-section" to the result page table of serial record search

Added class "page-section" to the result page table of serial record search to fit into the new staff design.

To test:
- Go to serials
- Create a new subscription
- Click o nzthe "Search for Record" link
- Search for something (example: e)
- Verify the result table
- Apply the patch
- Repeat the steps
- The result table should have the correct background

Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32864: Fix cataloguing/value_builder/unimarc_field_141.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:54 +0000 (11:58 +0100)]
Bug 32864: Fix cataloguing/value_builder/unimarc_field_141.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32863: Fix cataloguing/value_builder/unimarc_field_140.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:54 +0000 (11:58 +0100)]
Bug 32863: Fix cataloguing/value_builder/unimarc_field_140.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32862: Fix cataloguing/value_builder/unimarc_field_135a.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:54 +0000 (11:58 +0100)]
Bug 32862: Fix cataloguing/value_builder/unimarc_field_135a.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32861: Fix cataloguing/value_builder/unimarc_field_130.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:54 +0000 (11:58 +0100)]
Bug 32861: Fix cataloguing/value_builder/unimarc_field_130.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32860: Fix cataloguing/value_builder/unimarc_field_128c.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:54 +0000 (11:58 +0100)]
Bug 32860: Fix cataloguing/value_builder/unimarc_field_128c.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32859: Fix cataloguing/value_builder/unimarc_field_128b.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:54 +0000 (11:58 +0100)]
Bug 32859: Fix cataloguing/value_builder/unimarc_field_128b.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32858: Fix cataloguing/value_builder/unimarc_field_128a.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:54 +0000 (11:58 +0100)]
Bug 32858: Fix cataloguing/value_builder/unimarc_field_128a.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32857: Fix cataloguing/value_builder/unimarc_field_127.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:54 +0000 (11:58 +0100)]
Bug 32857: Fix cataloguing/value_builder/unimarc_field_127.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32964: (follow-up) Additional rewording for XSLT item display
Marcel de Rooy [Tue, 28 Mar 2023 12:57:10 +0000 (12:57 +0000)]
Bug 32964: (follow-up) Additional rewording for XSLT item display

Test plan:
Check OPAC preferences, OPACResultsMaxItems and siblings.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32855: Fix cataloguing/value_builder/unimarc_field_126b.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:54 +0000 (11:58 +0100)]
Bug 32855: Fix cataloguing/value_builder/unimarc_field_126b.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32854: Fix cataloguing/value_builder/unimarc_field_126a.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:54 +0000 (11:58 +0100)]
Bug 32854: Fix cataloguing/value_builder/unimarc_field_126a.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30162: Fix staff interface link in OPAC XSLT files for 830$w
Katrin Fischer [Tue, 14 Feb 2023 09:36:45 +0000 (09:36 +0000)]
Bug 30162: Fix staff interface link in OPAC XSLT files for 830$w

All the links in the Utils files shoudl be built using the $searchurl
variable to adapt the link to either staff or OPAC.

To test:
* Enable UseControlNumber system preference
* Create a record with the following fields:

490 1 _ ‡aEffective software development series
830 _ 0 ‡aEffective software development series.‡w13736978

  $w can be anything for this use case or another $w from your catalog.
  Easiest might be to enable the Advanced cataloguing editor to be
  able to insert these lines easily. If you are using the sample data,
  the example shoudl work as is.

* Save the record and open it in the staff interface and the OPAC
* The link in the OPAC should be broken, staff should work
* Apply patch
* Now both links should work

Co-authored-by: Anke Bruns <Anke.Bruns@gwdg.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32217: Fixed typo in error message for authentication providers
Philip Orr [Thu, 30 Mar 2023 08:28:54 +0000 (08:28 +0000)]
Bug 32217: Fixed typo in error message for authentication providers

Changed the error message for authentication providers to use
"in" instead of "with".

To Test:
Review the patch file closely and verify changes.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32852: Fix cataloguing/value_builder/unimarc_field_125b.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32852: Fix cataloguing/value_builder/unimarc_field_125b.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32851: Fix cataloguing/value_builder/unimarc_field_125a.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32851: Fix cataloguing/value_builder/unimarc_field_125a.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32850: Fix cataloguing/value_builder/unimarc_field_124.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32850: Fix cataloguing/value_builder/unimarc_field_124.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32849: Fix cataloguing/value_builder/unimarc_field_124g.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32849: Fix cataloguing/value_builder/unimarc_field_124g.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32848: Fix cataloguing/value_builder/unimarc_field_124f.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32848: Fix cataloguing/value_builder/unimarc_field_124f.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32847: Fix cataloguing/value_builder/unimarc_field_124e.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32847: Fix cataloguing/value_builder/unimarc_field_124e.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32846: Fix cataloguing/value_builder/unimarc_field_124d.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32846: Fix cataloguing/value_builder/unimarc_field_124d.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32845: Fix cataloguing/value_builder/unimarc_field_124c.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32845: Fix cataloguing/value_builder/unimarc_field_124c.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32844: Fix cataloguing/value_builder/unimarc_field_124b.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32844: Fix cataloguing/value_builder/unimarc_field_124b.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32843: Fix cataloguing/value_builder/unimarc_field_124a.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32843: Fix cataloguing/value_builder/unimarc_field_124a.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32842: Fix cataloguing/value_builder/unimarc_field_123j.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32842: Fix cataloguing/value_builder/unimarc_field_123j.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32841: Fix cataloguing/value_builder/unimarc_field_123i.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32841: Fix cataloguing/value_builder/unimarc_field_123i.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32840: Fix cataloguing/value_builder/unimarc_field_123g.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:53 +0000 (11:58 +0100)]
Bug 32840: Fix cataloguing/value_builder/unimarc_field_123g.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32839: Fix cataloguing/value_builder/unimarc_field_123f.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32839: Fix cataloguing/value_builder/unimarc_field_123f.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32838: Fix cataloguing/value_builder/unimarc_field_123e.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32838: Fix cataloguing/value_builder/unimarc_field_123e.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32837: Fix cataloguing/value_builder/unimarc_field_123d.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32837: Fix cataloguing/value_builder/unimarc_field_123d.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32807: Fix cypress tests
Jonathan Druart [Wed, 29 Mar 2023 07:38:50 +0000 (09:38 +0200)]
Bug 32807: Fix cypress tests

Cypress tests were failing, not sure I understand why exactly as I don't
recreate the failure when using the interface. We could simplify the if
logic anyway.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32834: Fix cataloguing/value_builder/unimarc_field_121b.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32834: Fix cataloguing/value_builder/unimarc_field_121b.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32836: Fix cataloguing/value_builder/unimarc_field_123a.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32836: Fix cataloguing/value_builder/unimarc_field_123a.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32426: (follow-up) Fix api/v1/patrons.t
Marcel de Rooy [Tue, 28 Mar 2023 06:41:59 +0000 (06:41 +0000)]
Bug 32426: (follow-up) Fix api/v1/patrons.t

We use another exception now.

Test plan:
Run t/db_dependent/api/v1/patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32426: (follow-up) Fix for Members.t / Patrons.t
Marcel de Rooy [Mon, 27 Mar 2023 14:35:28 +0000 (14:35 +0000)]
Bug 32426: (follow-up) Fix for Members.t / Patrons.t

Moving and adjusting test in Member.t.

Test plan:
Run both tests.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33341: Address some perlcritic errors in 5.36
Tomas Cohen Arazi [Mon, 27 Mar 2023 12:17:31 +0000 (14:17 +0200)]
Bug 33341: Address some perlcritic errors in 5.36

Some old-style code is making our tests fail when run in Debian Testing.

This patch addresses this.

To test:
1. Launch bookworm KTD:
   $ KOHA_IMAGE=master-bookworm ktd up -d
2. Run:
   $ ktd --shell
  k$ prove t/00-testcritic.t
=> FAIL: It fails!
3. Apply the patch
4. Repeat 2
=> SUCCESS: Tests now pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32594: Mark jobs as started and finished
Jonathan Druart [Fri, 17 Mar 2023 14:22:24 +0000 (14:22 +0000)]
Bug 32594: Mark jobs as started and finished

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33021: (QA follow-up) Fix QA errors
Tomas Cohen Arazi [Mon, 27 Mar 2023 10:49:34 +0000 (12:49 +0200)]
Bug 33021: (QA follow-up) Fix QA errors

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33133: Move fast cataloging to first column
Nick Clemens [Tue, 14 Mar 2023 13:36:14 +0000 (13:36 +0000)]
Bug 33133: Move fast cataloging to first column

This move the link and adds its own heading

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33133: Add fast cataloging to 'Cataloging' page
Nick Clemens [Fri, 3 Mar 2023 20:23:31 +0000 (20:23 +0000)]
Bug 33133: Add fast cataloging to 'Cataloging' page

This patch adds a check for the existence of the Fast Add framework to
the Koha mainpage and the cataloging home page

If it exists, and the user has fast cataloging permission then there
will be a link to Cataloging on the home page, and to Fast add on the
cataloging page

To test:
1 - Have two patrons, one with superlibrarian and one with only
  catalogue + fast_cataloging
2 - Make sure you have a fast add framework (code:FA)
3 - Have two windows/tabs one with each patron (one private/incognito or
  use two browsers)
4 - View mainpage.pl for both
5 - Superlibrarian has Catalogue link, other does not
6 - Browse to http://localhost:8081/cgi-bin/koha/cataloguing/cataloging-home.pl
7 - Superlibrarian sees stuff, other can access page, but has no buttons
8 - Apply patch
9 - Repeat 4 - both have a link
10 - Repeat 7 - both have a link to fast add
11 - Confirm fast add link works

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33021: (QA follow-up) Add unit test
Kyle M Hall [Fri, 24 Mar 2023 14:42:08 +0000 (10:42 -0400)]
Bug 33021: (QA follow-up) Add unit test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33021: Show an alert when adding a reserved item to an item bundle
Julian Maurice [Tue, 21 Feb 2023 10:14:06 +0000 (11:14 +0100)]
Bug 33021: Show an alert when adding a reserved item to an item bundle

Test plan:
1. Create an item bundle (see bug 28854 comment 458)
2. Create a biblio with one item and place a hold for this item.
3. Try to add the reserved item to the bundle
   You should see a message saying that the item is reserved. Next to
   this message should be a button "Ignore holds and add to bundle".
4. Click on the button. There should be a message saying that the item
   was added to the bundle.
5. Close the modal window and verify that the item was correctly
   added to the bundle

Signed-off-by: Lucas Gass <lucas@bywatersolutiosn.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32121: (QA follow-up): Fix unit tests count
Kyle M Hall [Fri, 24 Mar 2023 14:31:22 +0000 (10:31 -0400)]
Bug 32121: (QA follow-up): Fix unit tests count

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32121: (QA follow-up) Use error_code rather than key
Martin Renvoize [Thu, 2 Feb 2023 16:17:06 +0000 (16:17 +0000)]
Bug 32121: (QA follow-up) Use error_code rather than key

We semi-recently introduced error_code into our error object to allow
for translation and code paths for different errors without having to
rely on long description string matches.

This QA follow-up converts the existing match and new 'key' fields
introduced in this patchset to use the updated 'error_code' key.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32121: Show an alert when adding a checked out item to an item bundle
Julian Maurice [Mon, 7 Nov 2022 13:30:34 +0000 (14:30 +0100)]
Bug 32121: Show an alert when adding a checked out item to an item bundle

When trying to add a checked out item to an item bundle, an alert
message will show up, giving the user a chance to return the item
immediately before adding it to the bundle

Test plan:
1. Create an item bundle (see bug 28854 comment 458)
2. Create a biblio with one item and check out this item.
3. Try to add the checked out item to the bundle
   You should see a message saying that the item is checked out. Next to
   this message should be a button "Check in and add to bundle".
4. Click on the button. There should be a message saying that the item
   was added to the bundle.
5. Close the modal window and verify that the item was correctly
   returned and added to the bundle

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32807: Fetch count instead of all entries for agreements and licenses
Jonathan Druart [Wed, 22 Feb 2023 07:48:48 +0000 (08:48 +0100)]
Bug 32807: Fetch count instead of all entries for agreements and licenses

To list agreements and licenses we are retrieving the whole list to
simply know if at least one exists (and display the table that will
fetch the X first elements to display).

We should call count instead.

Test plan:
List agreements and licenses.
If none exists, the table is not displayed but a "There are no...
defined" message instead.
If at least one exists the table must be there

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32003: Add page-section to order search results and fix heading hierarchy
Katrin Fischer [Mon, 2 Jan 2023 22:50:48 +0000 (22:50 +0000)]
Bug 32003: Add page-section to order search results and fix heading hierarchy

This adds a page-section to the order search results and moves
the former second h1 heading 'search results' to a h2 heading
below 'Order search', so we have a proper hierarchy

In acquisitions:
* Make sure you have an order with at least one order line
* Do an empty orders search
* Verify there are 2 h1 headings on the page and the results table doesn't
  have a white background
* Apply patch
* Verify the results list now has a white background and the second
  now smaller heading has been moved into this area

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32964: OPACResultsMaxItemsUnavailable description is misleading
Caroline Cyr La Rose [Tue, 14 Feb 2023 22:01:40 +0000 (17:01 -0500)]
Bug 32964: OPACResultsMaxItemsUnavailable description is misleading

This patch rephrases the last part of the description of the
OPACResultsMaxItemsUnavailable system preference to clarify the link
to the OPACResultsUnavailableGroupingBy option.

It also changes some terminology to follow the guidelines
(capitalization, library instead of branch).

To test:
1. Apply patch
2. Go to Administration > Global system preferences
3. Search for OPACResultsMaxItems
4. Read the sentence for OPACResultsMaxItemsUnavailable, make sure it
makes sense, the grammar and spelling are ok, respects terminology
and capitalization guidelines
5. Try the link in the description, make sure it goes to the correct
syspref
6. Read the sentence and options for OPACResultsUnavailableGroupingBy,
make sure it makes sense, the grammar and spelling are ok, respects
terminology and capitalization guidelines
7. Optionally, try the various options, they should still work as
intended

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32426: (follow-up) Use more acurate term 'internal' instead of 'legacy'
Kyle M Hall [Fri, 3 Mar 2023 16:03:05 +0000 (16:03 +0000)]
Bug 32426: (follow-up) Use more acurate term 'internal' instead of 'legacy'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32426: Fix qatools issues
Marcel de Rooy [Thu, 26 Jan 2023 13:38:48 +0000 (13:38 +0000)]
Bug 32426: Fix qatools issues

[1] opac-registration-verify.pl forbidden pattern: Script permissions is authnotrequired => 1, it is correct for an OPAC script, not intranet (bug 24663)
    => Do not go back to authrequired => 1. Use a check on OpacPublic.
[2] opac-registration-invalid.tt missing_filter at line 41 (<p>Error [% error_type %]: [% error_info %]</p>)
[3] opac-memberentry.tt missing_filter at line 131 (<p>Error [% error_type %]: [% error_info %]</p>)

Test plan:
Verify that qatools passes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32426: Adjust error message of ERROR_login_exist
Marcel de Rooy [Thu, 26 Jan 2023 10:14:54 +0000 (11:14 +0100)]
Bug 32426: Adjust error message of ERROR_login_exist

The reference to password might be confusing. You could have the
same password as another user.
The addition of 'could not create unique one' especially applies to
plugins that return an existing userid, like the very simple plugin
example on the Bugzilla report that just returns borrowers.email.

Test plan:
Covered by previous patch. Just a string change here.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32426: Changes for members/memberentry.pl
Marcel de Rooy [Tue, 24 Jan 2023 14:34:51 +0000 (15:34 +0100)]
Bug 32426: Changes for members/memberentry.pl

Test plan:
Note: We will address this again when installing a plugin, but
first we test with the legacy userid code.

Add a new user with members/memberentry in staff.
Edit this user, change userid in staff. Try full form and partial
one.
If you remove userid or replace by a space (when mandatory), Koha
should regenerate a legacy userid.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32426: Changes for opac-registration-verify
Marcel de Rooy [Thu, 19 Jan 2023 11:01:42 +0000 (12:01 +0100)]
Bug 32426: Changes for opac-registration-verify

Similar to changes in opac-memberentry.

Test plan:
Now also enable  PatronSelfRegistrationVerifyByEmail.
Make the same change in Patron again with return $self.
Restart all. Self register. Check your email.
Follow the link. Verify that you have a similar alert.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32426: Changes for opac-memberentry
Marcel de Rooy [Thu, 15 Dec 2022 15:03:47 +0000 (16:03 +0100)]
Bug 32426: Changes for opac-memberentry

Test plan:
Enable self registration, pick a default category too for it.
The changes will be tested later with a plugin, but now change
Koha/Patron.pm as follows:
 sub _generate_userid_legacy { # as we always did
     my ($self) = @_;
+return $self;
So, add the return $self line only.
Restart all. Try to register an account on OPAC.
You should see an alert about problems processing your registration.
Undo the change in Patron.pm and restart all.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32426: Throw InvalidUserid exception in Patron->store
Marcel de Rooy [Thu, 8 Dec 2022 15:02:35 +0000 (16:02 +0100)]
Bug 32426: Throw InvalidUserid exception in Patron->store

When creating we still call generate_userid and verify the result.
When modifying we do not accept an invalid userid. When needed,
we recreate the userid; this should be very exceptional.

Test plan:
Run t/db_dependent/Koha/Patrons.t
Go to staff interface. Try changing userid of a patron to an
existing one.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32426: Patron::generate_userid - add plugin hook
Marcel de Rooy [Mon, 5 Dec 2022 14:17:37 +0000 (15:17 +0100)]
Bug 32426: Patron::generate_userid - add plugin hook

The hook is called patron_generate_userid. How suitable.
The existing generate_userid tests and new tests with mocked
plugins are merged into a new test script.

Test plan:
Run t/db_dependent/Koha/Patron_generate_userid.t
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: DBRev 22.12.00.015
Tomas Cohen Arazi [Mon, 27 Mar 2023 10:29:55 +0000 (12:29 +0200)]
Bug 3150: DBRev 22.12.00.015

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: Adapt reporting to skeleton.pl
Tomas Cohen Arazi [Mon, 27 Mar 2023 10:28:19 +0000 (12:28 +0200)]
Bug 3150: Adapt reporting to skeleton.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (QA follow-up) Tidy scripts
Kyle Hall [Tue, 14 Mar 2023 17:04:14 +0000 (13:04 -0400)]
Bug 3150: (QA follow-up) Tidy scripts

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (QA follow-up) Don't load unused and deleted tt files
Kyle M Hall [Tue, 14 Mar 2023 17:01:50 +0000 (17:01 +0000)]
Bug 3150: (QA follow-up) Don't load unused and deleted tt files

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (QA follow-up) Remove unused variables
Kyle Hall [Tue, 14 Mar 2023 16:32:22 +0000 (12:32 -0400)]
Bug 3150: (QA follow-up) Remove unused variables

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (follow-up) Make sure host information displays for unlinked records
Katrin Fischer [Tue, 7 Mar 2023 17:51:09 +0000 (17:51 +0000)]
Bug 3150: (follow-up) Make sure host information displays for unlinked records

When the 773 entry is not linked to a record using $w or
Easyanalytics we still want to display the information
about the source/host item in the emails.

To test:
1. Activate the UseControlNumber system preference
2. Search for a record and make sure it has 001 set to some value.
3. Use Edit > Add child record to create an analytical record from this record.
4. Make sure 773$w was filled in and finish by adding any mandatory fields, save.
5. Add this record to your cart. Also add a 773$g with the pages or similar.
6. Create another record with 773$t and $g, but without $w.
7. Also add this record to your cart.
8. Add a few other records to the cart.
9. Host item information (In: ) should display for all entries with 773 in the record.

This also makes use of the biblio-title include to display the
different parts of the title (245$abnp), if the record is linked.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (follow-up) Make subs to get host/related parts for notices
Aleisha Amohia [Mon, 27 Feb 2023 00:26:09 +0000 (00:26 +0000)]
Bug 3150: (follow-up) Make subs to get host/related parts for notices

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: Include host item entries in LIST and CART notices
Aleisha Amohia [Mon, 20 Feb 2023 23:17:56 +0000 (23:17 +0000)]
Bug 3150: Include host item entries in LIST and CART notices

Incorporating fixes from Bug 16522

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (follow-up) Improve and fix new notice templates
Katrin Fischer [Fri, 17 Feb 2023 15:55:53 +0000 (15:55 +0000)]
Bug 3150: (follow-up) Improve and fix new notice templates

This fixes several issues found and improves formatting:

* Add missing line breaks <br> where required as we are now using HTML
* Add missing USE statements to show
  * library
  * location
  * Link to the OPAC (Preference was not resolved)
* Make sure there is a comma between library and location
* Make sure Author(s): only displays when there is content after
* The comment field allows multi-line comments, formatting is now preserved

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (follow-up) Send list and cart emails immediately again
Katrin Fischer [Fri, 17 Feb 2023 15:52:58 +0000 (15:52 +0000)]
Bug 3150: (follow-up) Send list and cart emails immediately again

With this patch set the cart and list emails are sent via
the message_queue instead of bypassing it and being sent
immediately. This patch keeps them in message_queue, but
also sends them immediately, restoring the previous behavior.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (QA follow-up) Remove borrowernumber from EnqueueLetter
Martin Renvoize [Wed, 7 Sep 2022 07:08:07 +0000 (08:08 +0100)]
Bug 3150: (QA follow-up) Remove borrowernumber from EnqueueLetter

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: Move emails for sending cart and list contents to notices
Aleisha Amohia [Mon, 21 Sep 2020 21:30:32 +0000 (09:30 +1200)]
Bug 3150: Move emails for sending cart and list contents to notices

This patch creates notices using Template Toolkit syntax for sending
emails containing cart and list contents.

To test:
1. Apply Bug 27266
2. Run update database and restart services
3. In the staff client, add multiple items to your cart and to a list
4. Go to your cart and click Send to email the contents
5. Add an email and a comment and click Send
6. Confirm the information shown in the success message is correct
7. In your terminal, log into the database. View the message queue ( i.e. select * from message_queue; ). Confirm that your email has been queued and the content is all correct. Confirm the cart contents has been included as an attachment.
8. Go to your list and click Send list to email the contents
9. Repeat steps 5-7
10. Log into the OPAC
11. Add multiple items to your cart and to a list
12. Repeat steps 4-9
13. By the end, you should have four emails in your message queue. All
of the data about the items should be correct, they should all have
attachments, and be addressed to the correct email address.

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 14251: Add weasyprint dependency
Tomas Cohen Arazi [Wed, 28 Dec 2022 14:18:26 +0000 (11:18 -0300)]
Bug 14251: Add weasyprint dependency

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 14251: Add warning in about.pl for missing weasyprint
Tomas Cohen Arazi [Fri, 3 Feb 2023 18:18:13 +0000 (15:18 -0300)]
Bug 14251: Add warning in about.pl for missing weasyprint

To test:
1. Have weasyprint installed
2. Go to the About > System information page
=> SUCCESS: No warning about weasyprint
3. Uninstall weasyprint
4. Repeat 2
=> SUCCESS: A warning is displayed and makes sense
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 14251: Allow use of CSS in discharge letter
Tomas Cohen Arazi [Wed, 28 Dec 2022 13:43:16 +0000 (10:43 -0300)]
Bug 14251: Allow use of CSS in discharge letter

The discharge feature relies PDF::FromHTML which explicitly doesn't
handle CSS [1].

This patch makes it use the `weasyprint` command-line tool to generate
the PDF. This tool handles CSS correctly.

To test:
1. Install weasyprint:
   $ apt install weasyprint
2. Add some style to your DISCHARGE letter. I used:
<<today>>
<h1>Discharge confirmation</h1>
<p style="background-color: yellow;"><<branches.branchname>> certifies that the following borrower:<br>
<<borrowers.firstname>> <<borrowers.surname>> (cardnumber: <<borrowers.cardnumber>>)<br>
has returned all items.</p>
3. Have some non-latin chars on the patron name. I picked 'Henry
   Acevedo' and added 'Δοκιμή' as picked from bug 23589. Only to check no
   regressions.
4. Enable the 'UseDischarge' syspref
5. Go to Henry's detail page
6. Choose More > Discharge and Generate the discharge
=> SUCCESS:
   - Style is applied to the PDF
   - Greek characters are displayed correctly
7. Run the tests:
   $ kshell
  k$ prove -v t/db_dependent/Patron/Borrower_Discharge.t
=> SUCCESS: The rewritten tests pass!
8. Remove weasyprint:
   $ apt remove weasyprint
9. Repeat 7
=> SUCCESS: Tests pass, relevant test is skipped because of missing
            weasyprint
10. Sign off :-D

[1] https://metacpan.org/pod/PDF::FromHTML#CAVEATS

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32945: (QA follow-up) Fix capitalization of id in even more places
Katrin Fischer [Thu, 23 Feb 2023 22:31:09 +0000 (22:31 +0000)]
Bug 32945: (QA follow-up) Fix capitalization of id in even more places

This fixes additional strings pointed out by QA.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32945: Fix capitalization of id in more places
Katrin Fischer [Fri, 10 Feb 2023 20:49:19 +0000 (21:49 +0100)]
Bug 32945: Fix capitalization of id in more places

id should be spelled ID, ids should be IDs as it's
an abbreviation according to:

https://www.oxfordlearnersdictionaries.com/definition/english/identification

To test:
* Some of these are hard to make happen or require specific
  data, easiest will be to review the patch itself closely.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32969: (follow-up) Remove obsolete inline CSS
Owen Leonard [Thu, 23 Feb 2023 20:36:38 +0000 (20:36 +0000)]
Bug 32969: (follow-up) Remove obsolete inline CSS

A couple of templates have some inline CSS intended to style jQueryUI
tabs. These instances can be removed:

- opac-readingrecord.tt: Tabs have been replaced with Bootstrap.
- opac-idref.tt: There doens't appear to be any tab-related markup in
  the template at all.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32969: Remove references to jQueryUI assets and style in the OPAC
Owen Leonard [Wed, 15 Feb 2023 15:36:23 +0000 (15:36 +0000)]
Bug 32969: Remove references to jQueryUI assets and style in the OPAC

This patch removes the jQueryUI assets from Bootstrap OPAC files and
removes the links to those assets from the templates. References in CSS
to jQueryUI-related elements are also removed.

To test, apply the patch and rebuild the OPAC CSS.

Test various pages in the OPAC to confirm that there are no visible
changes. The browser console should not warn of missing files.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33278: Correct JS for activating default tab on various pages
Owen Leonard [Mon, 20 Mar 2023 15:43:39 +0000 (15:43 +0000)]
Bug 33278: Correct JS for activating default tab on various pages

The conversion of the header search tabs to Bootstrap resulted in a bug
on several staff interface pages: The first tab isn't selected by
default. The jQuery selector isn't specific enough.

The patch also corrects a template error which was introduced to
merge-record.inc by Bug 32683.

To test, apply the patch and test the following pages to confirm that
the first tab on each page is selected by default:

- Catalog -> Advanced search
- Catalog -> MARC details
- Catalog -> Search results -> Merge
- Administration -> Authorized values -> Edit
- Administratoin -> Library transfer limits
- Administration -> Item types -> Edit
- Authorities -> Authority details
- Authorities -> Search -> Merge

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33198: Don't calculate pickup locations per bib unless placing multiple holds
Nick Clemens [Fri, 10 Mar 2023 18:44:21 +0000 (18:44 +0000)]
Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds

For single bibs we use an ajax select2 dropdown, and we don't use this
value

To test:
1 - Place some holds on single bibs
2 - Confirm dropdowns for pickup location work as expected
3 - Do the same for multiple bibs selected from search results
4 - Apply patch
5 - Confirm there is no change after the patch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32883: (QA follow-up) Adjust ordering for pickups
Nick Clemens [Tue, 14 Mar 2023 13:04:35 +0000 (13:04 +0000)]
Bug 32883: (QA follow-up) Adjust ordering for pickups

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32883: Correct cubside pickups ordering
Jonathan Druart [Mon, 6 Feb 2023 15:48:54 +0000 (16:48 +0100)]
Bug 32883: Correct cubside pickups ordering

They are displayed by date of creation, it's not what we want for "to be
staged" for instance, where it needs to be ordered by date/time of
scheduled pickup.

Test plan:
Create several curbside pickups, to have some in the different tabs
Confirm that the order is the one you expect.
=> to be staged ordered by pickup date/time
=> stage and ready ordered by pickup date/time
=> patron is outside ordered by arrival date/time
=> delivered today ordered by *desc* delivered date/time

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30966: Record Overlay Rules - can't use Z39.50 filter
Johanna Raisa [Fri, 29 Jul 2022 05:37:50 +0000 (08:37 +0300)]
Bug 30966: Record Overlay Rules - can't use Z39.50 filter

This patch fixes overlay rules on z39.50 import

Test plan:
1) Create protection overlay rule to some fields for z39.50.
2) Import a record via z39.50.
3) See that the protected fields are replaced on the editor.
4) Apply the patch.
5) Import a record again.
6) See that the protected fields are in place on the editor.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33309: Index items after renewal transaction completes
Nick Clemens [Wed, 22 Mar 2023 19:12:01 +0000 (19:12 +0000)]
Bug 33309: Index items after renewal transaction completes

This patch ensures a record is indexed only after the renewal transaction
has completed successfully. Otherwise the job cannot be found by the background process
worker, becaue it was not yet in the DB

To test:
1 - Make sure you are using ES, and the es indexer is running
2 - tail -f /var/log/koha/kohadev/*.log
3 - Issue an item to a patron and renew it
4 - Note error in es-indexer-output.log like:
    [2023/03/21 12:22:36] [WARN] No job found for id=157 main:: /kohadevbox/koha/misc/workers/es_indexer_daemon.pl (129)
5 - Apply patch
6 - Renew again
7  There should be no error
8 - Search for the record and confirm items info displays correctly
9 - View the background jobs in admin, confirm the most recent job has completed

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33137: Make column names match
Lucas Gass [Thu, 9 Mar 2023 13:17:05 +0000 (13:17 +0000)]
Bug 33137: Make column names match

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33137: Add call number to pay-fines-table and table settings
Lucas Gass [Wed, 8 Mar 2023 16:40:24 +0000 (16:40 +0000)]
Bug 33137: Add call number to pay-fines-table and table settings

To test:
1. Apply patch and restart_all
2. From a patron's Accounting tab add some invoices that are related to an item.
3. From the 'Make a payemnt' notice the new Call number column.
4. Using Table settings, make sure you can properly hide the column.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>