]> git.koha-community.org Git - koha.git/log
koha.git
18 months agoBug 32716: larger proxy_buffer_size in NGINX example config
Galen Charlton [Tue, 24 Jan 2023 19:10:32 +0000 (14:10 -0500)]
Bug 32716: larger proxy_buffer_size in NGINX example config

This patch updates the example NGINX config to increase the
proxy_buffer_size to 16k. The default value of 4k (on some platforms)
has empirically been shown to be a bit too small for the Link
headers emitted by the REST API when pagination is requested.

To test
-------
[1] Set up a Koha system with NGINX as a reverse proxy in
    front of it (either in front of Apache or in front of
    of Starman).
[2] Perform a patron search that returns at least two pages
    of results and navigate to the second page.
[3] Note that the navigation can fail with a 502 HTTP error
    and an "upstream sent too big header while reading response
    header from upstream" error in the NGINX log.

    The problem is most likely when the pagesize of the server
    running NGINX is 4096 bytes.
[4] Update the NGINX configuration per this patch and restart
    NGINX.
[5] This time, repeating step 2 should work.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a29964778a44ef6f7f4a8400df4ef12ab80f5ed6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33481: Pass content-type when requesting EBSCO's webservice
Jonathan Druart [Tue, 11 Apr 2023 11:37:14 +0000 (13:37 +0200)]
Bug 33481: Pass content-type when requesting EBSCO's webservice

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d1b4481fe474053df47d6779727f95a553631856)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33289: Add API client class to interact with svc/config/systempreferences
Jonathan Druart [Tue, 21 Mar 2023 08:00:10 +0000 (09:00 +0100)]
Bug 33289: Add API client class to interact with svc/config/systempreferences

On bug 30708 we will need to modify sysprefs from the UI (Vue app), it
could be useful for other developments as well and so it is moved on its
own bug report.

Test plan:
It can be tested independently of bug 30708 using the following code:

const client = APIClient.sysprefs
client.sysprefs
    .update(
        "CardnumberLength",
        "42"
    )

Sponsored-by: BULAC - http://www.bulac.fr/
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>
(cherry picked from commit 9597b88ed259470f2dc5d0a2be206cad6e0f3605)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33154: Tab WRAPPER follow-up: label text must be translatable
Owen Leonard [Tue, 7 Mar 2023 11:15:07 +0000 (11:15 +0000)]
Bug 33154: Tab WRAPPER follow-up: label text must be translatable

This patch updates templates which have already been updated to use the
new tab WRAPPER system for generating tab markup. Templates are changed
so that tab label strings are wrapped in <span> to make them
translatable.

The html_helpers include file is also updated so that the example code
in comments shows the right pattern (the breadcrumb example is similarly
corrected).

To test apply the patch and run the translation script to update the .po
files, e.g.

perl misc/translator/translate update fr-FR

Check the updated .po files for some of the lines modified in the patch:

 - koha-tmpl/intranet-tmpl/prog/en/modules/about.tt:31
 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt:69
 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt:330
 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt:141
 - koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt:118
 - koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt:259
 - koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt:455
 - koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt:98

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca80bf67cea41613248d8e932e4dbdb5b232b5ca)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33486: POD fix
Tomas Cohen Arazi [Thu, 13 Apr 2023 14:32:52 +0000 (11:32 -0300)]
Bug 33486: POD fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8fcc61e82eef585ad79220eadcace9c35613580f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process
Nick Clemens [Tue, 11 Apr 2023 13:43:51 +0000 (13:43 +0000)]
Bug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 42c1059d1dd2821e61010f3f6ea0d8d52a699d05)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33077: Improve ease of translating template title tags
Owen Leonard [Mon, 27 Feb 2023 11:33:22 +0000 (11:33 +0000)]
Bug 33077: Improve ease of translating template title tags

This patch uses the cities administration page as a proof-of-concept for
using the [% t() %] construction to wrap translatable string in template
<title> tags. This should result in a significant improvement in
translatability.

To test, apply the patch and run the translation script to update the
.po files, e.g.

perl misc/translator/translate update fr-FR

Check the updated .po files:

 - In fr-FR-staff-prog.po you should no longer see a reference to
   cities.tt line 6, "#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt:6"
 - In fr-FR-messages.po you should see several strings which have been
   pulled individually from the <title> tag:
   - cities.tt:9, msgid "Modify city"
   - cities.tt:11, msgid "New city"
   - cities.tt:15, msgid "Confirm deletion of city"
   - cities.tt:19, msgid "Administration", msgid "Cities", msgid "Koha",
     and msgid "Administration"

Translate the strings in fr-FR-messages.po and install the updated
translation:

perl misc/translator/translate install fr-FR

Swith to the update language in the staff interface and confirm that the
Cities page title is translated correctly.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7020b90f305fbdf584b57f61e39d259d3f9e0d22)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33323: Select button in patron search modal is not translatable
Owen Leonard [Thu, 23 Mar 2023 17:42:46 +0000 (17:42 +0000)]
Bug 33323: Select button in patron search modal is not translatable

This patch modifies the JS which generates some markup during some kinds
of patron searches so that the strings labeling submit buttons can be
translated.

To test, apply the patch and go to Administration -> Funds.
- Add a fund or edit an existing one.
- Test the "Select owner" link
  - A popup should appear, and after performing a patron search which
    returns results you should see a "Select" column in the last column
    of the patron search results table.
- Test the "Add users" link
  - Perform the same test as above. The button in the last column should
    be "Add"
- The template accommodates two other cases, "Edit" and "Check out" but
  I was unable to find a place where they were used.

- To test translatability, run the translation tool for any language,
  e.g.

  perl misc/translator/translate update fr-FR

  Search the regenerated po file (in this example
  misc/translator/po/fr-FR-staff-prog.po) to confirm that the
  correct strings are there: "Select", "Add", "Edit, and "Check out"
  should each have entries for line 234, e.g.

  koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc:234
  c-format
  msgid "Select"
  msgstr "Sélectionner"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a9d736ba74aadbc409597b58608ae33120efb368)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33265: Clean up serial links on serial edit page
Lucas Gass [Fri, 17 Mar 2023 20:47:09 +0000 (20:47 +0000)]
Bug 33265: Clean up serial links on serial edit page

To test:
1. Reviece a serial
2. Notice the unstyled links:
    * Serial collection #1
    * Subscription #1
    * Show biblio
3. Apply pacth
4. The links should now be styled.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c5f3312eafd5aa02638b812882e249e794271b36)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33261: Format dates in subscription_issues table
Lucas Gass [Fri, 17 Mar 2023 14:30:37 +0000 (14:30 +0000)]
Bug 33261: Format dates in subscription_issues table

To test:
* Add a subscription
* Receive some issues
* Go to the subscription detail page, issues tab
* Verify the dates there display as YYYY-MM-DD
* Change DateFormat system preference setting, nothing changes.
* Apply patch
* Date should now be formatted in the way specified in the DateFormat system preference

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7574626f2c33fb22f1c2467d364842edf4217195)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33414: Add the data-order class
Jonathan Druart [Wed, 5 Apr 2023 07:11:41 +0000 (09:11 +0200)]
Bug 33414: Add the data-order class

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bb4e59f888e5c1e292dfa37c65b644b3993736c6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33414: Fix dates display in orders by fund
Fridolin Somers [Wed, 5 Apr 2023 02:55:49 +0000 (16:55 -1000)]
Bug 33414: Fix dates display in orders by fund

Since Bug 30718, dates are displayed in ISO format in orders by fund.
It removed dates formating in perl, this must be added in template.

Test plan :
1) Create some fresh orders on a fund F1
2) Go to Acquisitions > Orders by fund
3) Select fund F1 and 'To screen into the browser'
4) Submit
5) Check you see a formatted date in 'Entry date' column
6) Recieve some order from fund F1
Repeat 2 to 4
7) Check you see formatted date in 'Date received' column

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2ea8bf53834e9bfcf5962efe81ebf4e7515965cc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33332: Fix formatting of TT comments to improve translations
Owen Leonard [Fri, 24 Mar 2023 12:52:28 +0000 (12:52 +0000)]
Bug 33332: Fix formatting of TT comments to improve translations

This patch reformats some Template::Toolkit multi-line comments in
html_helpers.inc so that each line is commented separately. This seems
to prevent the translation tool from putting the comments into the po
file.

To test, apply the patch and confirm that pages which use the
breadcrumbs and tabs WRAPPER directives still work correctly:

- Breadcrumbs: staff client home page, about page, error page.
- Tabs: Administration -> Library transfer limits or circulation alerts.
- To test translatability, run the translation tool for any language,
  e.g.

  perl misc/translator/translate update fr-FR

Search the regenerated po file (in this example
misc/translator/po/fr-FR-staff-prog.po) to confirm that there is no
instance of something like "[%%# BOOTSTRAP BREADCRUMBS WRAPPER USAGE"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95aaf4269601592baf660ecdd3b90ec12590250c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33367: Remove tmp/modified_authorities/README.txt
Jonathan Druart [Thu, 30 Mar 2023 07:19:40 +0000 (09:19 +0200)]
Bug 33367: Remove tmp/modified_authorities/README.txt

This does not seem to be useful anymore.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c3a40d3801d8f70fa865e22962f7ae7e9cc18bee)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 32301: Fix default search sorting in advanced search when not editing a search
Nick Clemens [Fri, 17 Mar 2023 11:20:31 +0000 (11:20 +0000)]
Bug 32301: Fix default search sorting in advanced search when not editing a search

Bug 22605 changed the sorting to expect the passed parameter from the
previous search, this broke default when the search page was loaded
fresh.

We should simply fallback from the edited search to the default if it is
not set

To test:
1) Go to staff client
2) Go to Advanced Search
3) Notice the default Sort By value is "Relevance"
4) Go to system preferences
5) Go to "defaultSortField"
6) Change the value of the system preference
7) Go back to Advanced Search and refresh the page
8) Notice that there are no changes, the default Sort By is still
"Relevance"
9) Apply patch
10) Notice that changing the system preference now changes the default
Sort By in Advanced Search
11) Perform a search, change the sorting, then edit the search
12) Confirm the correct sorting from the search is preserved

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3489cdca1fd77272deca0ff6bda90e1cc40dddb1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 32800: Don't embed items for deleted records
Nick Clemens [Thu, 2 Feb 2023 15:58:10 +0000 (15:58 +0000)]
Bug 32800: Don't embed items for deleted records

To test:
1 - Delete a biblio
2 - perl /kohadevbox/koha/misc/migration_tools/build_oai_sets.pl -v -i -r
3 - Error:
    Can't call method "items" on an undefined value at /kohadevbox/koha/Koha/Biblio/Metadata.pm line 163.
4 - Apply patch
5 - Repeat
6 - Success!

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 37bf88d252c7efda0301b8f3624dcf02ebb7e187)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
18 months agoBug 33111: (QA follow-up) Add more context to breadcrumb parts for easier translation
Katrin Fischer [Sat, 8 Apr 2023 22:46:26 +0000 (22:46 +0000)]
Bug 33111: (QA follow-up) Add more context to breadcrumb parts for easier translation

With the new wrappers we will translate every part of the
breadcrumb as a separate string and only once. So single words
like 'new' can be problematic in translation.

This changes:
* New > New identity provider
* Edit > Edit identity provider
* (Item search fields) <name of search field> > Edit <name of search field>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 27474b9e9e4d38e5353cfaccc3d363e57005fc0e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33111: Use template wrapper for breadcrumbs: Administration part 4
Owen Leonard [Fri, 6 Jan 2023 16:43:38 +0000 (16:43 +0000)]
Bug 33111: Use template wrapper for breadcrumbs: Administration part 4

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration ->
  - Library EANs (list, new, edit, confirm delete)
  - Identity providers (list, new, edit)
    - Manage domains (list, new, edit)
  - Item circulation alerts
  - Item search fields (list, new, edit)
  - Item types (list, new, edit, delete confirm)
  - Koha to MARC mapping
  - Library groups
  - MARC frameworks ->
    -> Actions -> MARC structure (list, new, edit, delete confirm)
       -> View, edit, and delete confirm
  - Record matching rules (list, new, edit, delete confirm)

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0c5261f4f1fce30affc790142aaf9027199a84f0)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33007: Use template wrapper for breadcrumbs: Administration part 2
Owen Leonard [Fri, 6 Jan 2023 15:44:55 +0000 (15:44 +0000)]
Bug 33007: Use template wrapper for breadcrumbs: Administration part 2

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

Note: The patch includes indentation changes, so ignore whitespace
when viewing the diff.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration ->
  - Authorized values
    - New category
    - View category
      - Add authorized value
      - Edit authorized value
 - Authority types
   - New authority type
   - Edit authority type
   - Confirm deletion of authority type
 - Manage jobs
   - Details of job
 - MARC bibliographic framework
   - New framework
   - Edit framework
   - Confirm deletion of framework
 - Library transfer limits
 - Libraries
   - New library
   - Edit library
   - Confirm deletion of library
 - Cash registers
   - New cash register
   - Edit cash register
 - Patron categories
   - New category
   - Edit category
   - Confirm deletion of category
 - MARC bibliographic framework test
 - Classification configuration
   - Modify classification source
   - Add classification source
   - Modify filing rule
   - Add filing rule
   - Modify splitting rule
   - Add splitting rule

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ad53b3b538d8763f2a22a76b826e13e893fe7b52)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33006: (follow-up) Add spans for translatability
Owen Leonard [Fri, 24 Feb 2023 13:09:56 +0000 (13:09 +0000)]
Bug 33006: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

This patch also modifies some of the templates to simplify
the logic controlling how different elements of the breadcrumbs are
shown or not.

This patch also modifies another problematic set of strings in
auth_tag_structure.tt outside the breadcrumbs.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f24771ad2e8009530cc0273562342265a3a9592c)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33006: Use template wrapper for breadcrumbs: Administration part 1
Owen Leonard [Sat, 18 Feb 2023 15:54:24 +0000 (15:54 +0000)]
Bug 33006: Use template wrapper for breadcrumbs: Administration part 1

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

Note: The patch includes indentation changes, so ignore whitespace
when viewing the diff.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration
  -> Administration home page
     - Under "Additional parameters"
       -> Additional fields
          -> View, create, edit
       -> Advanced editor shortcuts
       -> Audio alerts
     - Under "Acquisition parameters"
       -> Budgets
          -> Add fund
          -> Close fund
          -> Budget details
             -> Planning
          -> Create, edit, duplicate
     - Under "Catalog"
       -> Authority types -> MARC structure
          -> New, edit, delete
          -> "Actions" -> Subfields
            -> Edit, delete
Acquisitions -> Vendor -> Contracts
  - View, edit, delete

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 695b0aaa618908fc3017077faf3c6d6d13252156)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33130: Use template wrapper for breadcrumbs: Authorities
Owen Leonard [Wed, 1 Mar 2023 20:06:31 +0000 (20:06 +0000)]
Bug 33130: Use template wrapper for breadcrumbs: Authorities

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Authorities home page
  - Authority search results
  - Authority detail
  - Authority add/edit
  - Authority merge

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 61114e032f74a6b688fed2ff49a6140dbeefff75)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33131: Use template wrapper for breadcrumbs: Catalog part 1
Owen Leonard [Fri, 3 Mar 2023 19:13:18 +0000 (19:13 +0000)]
Bug 33131: Use template wrapper for breadcrumbs: Catalog part 1

This patch updates several catalog templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Advanced search
- Bibliographic detail page
- Labeled MARC detail page
- MARC detail page
- ISBD detail page
- Item detail page
- Image detail view (with LocalCoverImages enabled and a custom cover
  added)
- Checkout history
- Item search

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6faf64eb3b0b2cd78a497614d45f543e1c661a33)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33147: Use template wrapper for breadcrumbs: Catalog part 2
Owen Leonard [Mon, 6 Mar 2023 13:23:23 +0000 (13:23 +0000)]
Bug 33147: Use template wrapper for breadcrumbs: Catalog part 2

This patch updates several catalog templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Catalog search results
- Search history (from the user menu in the header)
- Bibliographic detail page -> Rota (must have StockRotation enabled).

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2cf9efa3b6a1bf4d830017053bb54d544d3c00ac)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33324: Use template wrapper for tabs: Tools
Owen Leonard [Thu, 23 Mar 2023 16:12:15 +0000 (16:12 +0000)]
Bug 33324: Use template wrapper for tabs: Tools

This patch updates templates in the tools directory so that they use
the new WRAPPER directive to build tabbed navigation.

To test, apply the patch and test each page to confirm that tabs still
work as before:

- Cataloging -> Export
  - This page by default will have two tabs, "Export bibliographic
    records" and "Export authority records." You can edit koha-conf.xml
    to enable two additional options: backup_db_via_tools and
    backup_conf_via_tools
- Tools -> Batch patron modification
  - "By card number" and "By borrowernumber," and "By patron list" if
    you have any patron lists defined.
- Tools -> Overdue notice/status triggers

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa22e9fb485c5a3c77858f6137afcc8a405db214)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33333: Use template wrapper for tabs: SQL reports
Owen Leonard [Thu, 23 Mar 2023 16:45:00 +0000 (16:45 +0000)]
Bug 33333: Use template wrapper for tabs: SQL reports

This patch updates the saved SQL reports template so that it uses the
new WRAPPER directive to build tab markup.

To test, apply the patch and go to Reports -> Use saved. In order to
properly test the patch you should have multiple reports defined with
multiple categories ("Accounts", "Acquisitions", "Catalog", etc.).

Clicking each tab should filter the table of reports correctly.
After navigating away from the page and back to it, your selected tab
should be remembered.

Signed-off-by: Alexandra Speer <alexandra.speer@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6884b73a71cafbe82f4ee8ba19d978781ff72bf7)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33307: Use template wrapper for tabs: Lists
Owen Leonard [Thu, 9 Mar 2023 18:14:04 +0000 (18:14 +0000)]
Bug 33307: Use template wrapper for tabs: Lists

This patch updates the lists template so that it uses the new WRAPPER
directive to build tabbed navigation.

To test, apply the patch and go to the lists page in the staff
interface.

- Confirm that the two tabs, "Your lists" and "Public lists" look
  correct and work correctly.
- Test that the correct tab is selected when you add the "public" or
  "private" parameter to the url:

  /cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1
  /cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4a52bc9a7a600e60b69405c59fb912fc9c74c83e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33294: Use template wrapper for tabs: Checkout history
Owen Leonard [Tue, 21 Mar 2023 16:43:06 +0000 (16:43 +0000)]
Bug 33294: Use template wrapper for tabs: Checkout history

This patch updates the checkout history template so that it uses the new
WRAPPER directive to build tabbed navigation.

In order to make the template logic a little easier to parse I moved the
table of checkouts into its own BLOCK to be used when on-site checkouts
are enabled or disabled.

To test, apply the patch and locate a patron who has a checkout history.

- If you have on-site checkouts enabled you will see three tabs: All,
  Checkouts, and On-site checkouts.
- Each tab should work correctly: The checkouts tab showing only regular
  checkouts, the on-site checkouts tab showing only on-site checkouts.
- If you have on-site checkouts disabled there should be no tabs, the
  table of checkouts should be displayed inside a "page-section" div
  instead.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 84cdc74ba72163495d431ba93682f8fc8c024f1f)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33293: Use template wrapper for tabs: Holds
Owen Leonard [Tue, 21 Mar 2023 16:25:48 +0000 (16:25 +0000)]
Bug 33293: Use template wrapper for tabs: Holds

This patch updates the holds template so that it uses the new WRAPPER
directive to build tabbed navigation.

Note: this patch includes indentation changes, so check the diff
accordingly.

To test, apply the patch and locate a bibliographic record which
can be placed on hold.

- Start the process of placing a hold.
- If you have any patron clubs defined, there should be two tabs:
  Patrons and Clubs. Both should look correct and work correctly.
- If you have no patron clubs you should see only the Patrons tab.

Works as advertised.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d289cc0a3d7ec640513d2749fff255f0567f2631)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33186: Use template wrapper for tabs on search history and advanced search
Owen Leonard [Thu, 9 Mar 2023 18:47:04 +0000 (18:47 +0000)]
Bug 33186: Use template wrapper for tabs on search history and advanced search

This patch updates the search history and advanced search templates in
the staff interface so that they use the new WRAPPER directive for
building tabs.

The patch also makes a minor change to CSS in order to accommodate the
different markup.

To test, apply the patch and rebuild the staff interface CSS.

- Go to the catalog's advanced search page. You should see tabs for each
  of the selections defined in the AdvancedSearchTypes system
  preference.
- The tabs should look correct and work correctly.
- If necessary, enable the EnableSearchHistory system preference.
- Click the logged-in user name in the header menu and choose "Search
  history."
- On this page you should see two tabs, catalog and authority. Both tabs
  should look correct and work correctly.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 78f037382ddb111e707b42d0c1b2c125fff81c1e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33185: Use template wrapper for tabs on authority and biblio MARC details
Owen Leonard [Thu, 9 Mar 2023 17:47:54 +0000 (17:47 +0000)]
Bug 33185: Use template wrapper for tabs on authority and biblio MARC details

This patch updates the MARC detail views of bibliographic and authority
records so that they use the new WRAPPER directives to build tabs.

To test, apply the patch and locate a bibliographic record in the
catalog.

- Click the "MARC" menu item in the left-hand sidebar.
- Confirm that all tabs work correctly.

Perform the same test by going to Authorities and doing a search for
authorities. Clicking one of the results should take you to a
tabbed MARC view.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b6230b0817e7cf257c515cb320597ac790eca544)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33001: (follow-up) Add spans for translatability
Owen Leonard [Thu, 23 Feb 2023 22:53:02 +0000 (22:53 +0000)]
Bug 33001: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33005
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e2871c2859e2c7453e1175aee7eafc60a5e1937)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33001: Use template wrapper for breadcrumbs: Acquisitions part 2
Owen Leonard [Fri, 6 Jan 2023 11:49:32 +0000 (11:49 +0000)]
Bug 33001: Use template wrapper for breadcrumbs: Acquisitions part 2

This patch updates several acquisitions-related templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Acquisitions ->
  - Late orders,
    - moddeliverydate.tt
    - modordernotes.tt
    -- These two templates aren't linked to from anywhere, but
       you can navigate directly to:
       http://127.0.0.1:8081/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=X and
       http://127.0.0.1:8081/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=1

  - Order search, order search results
  - Invoice search,
    - Invoice details,
      - Invoice files
  - Vendor -> Basket -> Add to basket ->
    - From a new (empty) record
    - From existing orders (copy)
    - From a subscription

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33005
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4535efa4aaae5c70ac9d75b4749585db51bcd874)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33005: (QA follow-up) Update breadcrumb when editing a vendor
Katrin Fischer [Sun, 9 Apr 2023 00:26:22 +0000 (00:26 +0000)]
Bug 33005: (QA follow-up) Update breadcrumb when editing a vendor

When editing a vendor the last part of the breadcrumbs read:
Update: <vendor>

This is very unusual, so updated to the standard wording:
Modify <vendor>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 51ceac07dff0508932d80d9d582a60bc26e9709a)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33005: (follow-up) Add spans for translatability
Owen Leonard [Fri, 24 Feb 2023 12:44:31 +0000 (12:44 +0000)]
Bug 33005: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 129a01af5ab0ab11bb0afd13d1117ac7510b29be)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33005: Use template wrapper for breadcrumbs: Acquisitions part 3
Owen Leonard [Fri, 6 Jan 2023 11:50:00 +0000 (11:50 +0000)]
Bug 33005: Use template wrapper for breadcrumbs: Acquisitions part 3

This patch updates several acquisitions-related templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Acquisitions ->
  -> All available funds table
     -> Ordered
     -> Spent
  -> Vendor
     -> Vendor details
     -> Uncertain prices
     -> Receive shipments (must have at least one open basket)
        -> If necessary, receive a new shipment. Or click an
           invoice number to reach the "receive orders" page.
           -> Click "Receive" in the table listing baskets.
     -> Basket -> Add to basket
        -> From a suggestion
        -> From an external source

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 21e88a1aec58211011c6a8914e3eb2a85dad3c74)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33382: Use template wrapper for breadcrumbs: Patron clubs
Owen Leonard [Fri, 31 Mar 2023 13:34:54 +0000 (13:34 +0000)]
Bug 33382: Use template wrapper for breadcrumbs: Patron clubs

This patch updates patron club templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Patron clubs
    - New club template
    - Edit club template
    - New club
    - Edit club
    - Club enrollments (from the "Actions" menu in the list of clubs)

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 90dfcc7506cbaeaff21692a60dad453454f5ba2c)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33373: Use template wrapper for breadcrumbs: Circulation part 3
Owen Leonard [Thu, 30 Mar 2023 19:15:10 +0000 (19:15 +0000)]
Bug 33373: Use template wrapper for breadcrumbs: Circulation part 3

This patch updates several circulation templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Circulation ->
  - Article requests -> Article request detail
  - Check in
  - Hold ratios
  - Transfers to send
  - Transfers to receive
  - Holds queue
  - Holds awaiting pickup
  - Set library

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1baeb95a32057d29f0a6eb30e2a6332e613c8385)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33372: Use template wrapper for breadcrumbs: Circulation part 2
Owen Leonard [Thu, 30 Mar 2023 18:34:08 +0000 (18:34 +0000)]
Bug 33372: Use template wrapper for breadcrumbs: Circulation part 2

This patch updates several circulation templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Circulation
  - Check out
    - Check out to patron
  - Curbside pickups
  - Built-in offline circulation
  - Pending on-site checkouts
  - Overdues
  - Holds to pull
  - Renew

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab467d7c32ef50dc18664f6b1f1bcb76f9d4d4e9)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33180: Use template wrapper for tabs: Budgets and Search engine configuration
Owen Leonard [Thu, 9 Mar 2023 15:20:21 +0000 (15:20 +0000)]
Bug 33180: Use template wrapper for tabs: Budgets and Search engine configuration

This patch updates two administration templates so that they use the new
WRAPPER directive to build tabbed navigation: Budgets and Search engine
configuration.

Note: this patch includes indentation changes, so check the diff
accordingly.

To test, apply the patch and check the updated pages:

 - Administration -> Budgets
 - Administration -> Search engine configuration

On both pages tabs should look correct and work correctly.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c74696b33313097fec9bcee92c8e4f072a9ed611)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33383: Use template wrapper for breadcrumbs: Course reserves
Owen Leonard [Fri, 31 Mar 2023 14:27:17 +0000 (14:27 +0000)]
Bug 33383: Use template wrapper for breadcrumbs: Course reserves

This patch updates several course reserves templates so that they use
the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Course reserves
  - New course
  - Edit course
  - Batch remove reserves
  - Course details
    - Add reserves (step one and two)
    - Batch add reserves

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fbf5221837d27731bab6c1b821c2a1517f4369a)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33384: Use template wrapper for breadcrumbs: Labels
Owen Leonard [Fri, 31 Mar 2023 15:33:35 +0000 (15:33 +0000)]
Bug 33384: Use template wrapper for breadcrumbs: Labels

This patch updates label creator templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Cataloging ->
  - Barcode image generator
  - Quick spine label creator
  - Label creator ->
    - Label creator home
      - New ->
        - Label batch
        - Layout
        - Label template
        - Printer profile
        - Barcode range
      - Manage ->
        - Label batches
          - Edit batch
        - Layouts
          - Edit layout
        - Label templates
          - Edit template
        - Printer profiles

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 33f14126a15e6bc4f1c1b1bda93713d494a07fe3)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33385: Use template wrapper for breadcrumbs: Patrons part 1
Owen Leonard [Fri, 31 Mar 2023 16:38:32 +0000 (16:38 +0000)]
Bug 33385: Use template wrapper for breadcrumbs: Patrons part 1

This patch updates several patron templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Patron details ->
  - Accounting -> Transactions
    - Transaction details
      - Check the details of a debit and a credit
  - More ->
    - Manage API keys (must have RESTOAuth2ClientCredentials preference
      enabled)
    - Delete (with a patron who has checkouts)
    - Discharge

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a674c4571614aa3a7cc32fc9cf58d7d66c171f0f)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33386: Use template wrapper for breadcrumbs: Patrons part 2
Owen Leonard [Fri, 31 Mar 2023 18:01:59 +0000 (18:01 +0000)]
Bug 33386: Use template wrapper for breadcrumbs: Patrons part 2

This patch updates several patron templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Patron details ->
  - Files (EnableBorrowerFiles must be enabled)
  - Holds history
  - Housebound (HouseboundModule must be enabled)
  - Ill requests history (ILLModule must be enabled)
- Staff interface home page -> Discharge requests pending
  - Must have useDischarge preference enabled
  - Must log into the OPAC and request a discharge using a patron
    account which has no checkouts.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c2cc62a6b052cb9217eae76d1342b6d365bba436)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33387: Use template wrapper for breadcrumbs: Patrons part 3
Owen Leonard [Mon, 3 Apr 2023 16:08:56 +0000 (16:08 +0000)]
Bug 33387: Use template wrapper for breadcrumbs: Patrons part 3

This patch updates several patron templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Patrons home page
- Patron detail page ->
  - Change password
  - Set permissions
  - Accounting ->
    - Create manual invoice
    - Create manual credit

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 186690a38dd35ce67e399e089834e9c303dae81b)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33389: Use template wrapper for breadcrumbs: Patrons part 5
Owen Leonard [Tue, 4 Apr 2023 14:39:45 +0000 (14:39 +0000)]
Bug 33389: Use template wrapper for breadcrumbs: Patrons part 5

This patch updates several patron templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Patrons ->
  - Patron details ->
    (Patron with charges) ->
      - Accounting ->
        - Pay
    - Circulation history
    - Routing lists
    - Statistics
    - Purchase suggestions
    - More -> Manage two-factor authentication (must have
      TwoFactorAuthentication enabled)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab4211d42b5d635f6c8d351402c45369c862291f)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33409: Use template wrapper for breadcrumbs: Patrons lists
Owen Leonard [Tue, 4 Apr 2023 15:32:08 +0000 (15:32 +0000)]
Bug 33409: Use template wrapper for breadcrumbs: Patrons lists

This patch updates several patron lists templates so that they use the
new WRAPPER for displaying breadcrumbs.

Unrelated minor change: I added <span> around a few other strings in
add-modify.tt in order to improve translatability.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Patron lists
    - Main page
    - Patron list contents view
    - Add patron list
    - Edit patron list

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9cb3bac73772c34061a626a93e68835494fce9d3)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33410: Use template wrapper for breadcrumbs: Patron card creator
Owen Leonard [Tue, 4 Apr 2023 16:39:02 +0000 (16:39 +0000)]
Bug 33410: Use template wrapper for breadcrumbs: Patron card creator

This patch updates several patron card creator templates so that they
use the new WRAPPER for displaying breadcrumbs.

Unrelated minor change: I added <span> around a few other strings in
edit-profile.tt and edit-template.tt in order to improve
translatability.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Patron card creator
    - New ->
      - Card batch
      - Image
      - Layout
      - Card template
      - Printer profile
    - Manage ->
      - Card batches
      - Images
      - Layouts
      - Card templates
      - Printer profiles

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e957afb9aa7449546c73c2335c0a69f6cd2048d)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33429: Use template wrapper for breadcrumbs: Plugins
Owen Leonard [Thu, 6 Apr 2023 10:40:48 +0000 (10:40 +0000)]
Bug 33429: Use template wrapper for breadcrumbs: Plugins

This patch updates plugin management templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- In koha-conf.xml, look for "enable_plugins"
  - If this is set to 0, plugins are disabled:
    <enable_plugins>0</enable_plugins>
    - Navigate directly to /cgi-bin/koha/plugins/plugins-home.pl, which
      should say "Plugins disabled." Check the breadcrumbs on this page.
  - Enable plugins by changing the settimg in koha-conf.xml to 1 (a
    restart of services is required): <enable_plugins>1</enable_plugins>
  - Go to Administration -> Manage plugins
    - Test this page and the "Upload plugin" page.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6cc5c0208a553b839807460c944bebe30de23416)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33434: Use template wrapper for breadcrumbs: Point of sale
Owen Leonard [Thu, 6 Apr 2023 16:04:26 +0000 (16:04 +0000)]
Bug 33434: Use template wrapper for breadcrumbs: Point of sale

This patch updates point of sale templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- If necessary, enable the EnablePointOfSale and UseCashRegisters system
  preferences.
  - If none are configured, define at least one register and at least
    one debit type by going to Administration -> Cash registers and
    Administration -> Debit types.
  - From the staff interface's user menu in the upper right of the
    header, choose "Set library and cash register."
  - Select a cash register.
  - Go to the Point of Sale page, and check the breadcrumbs on that
    page.
    - Check the "Transaction history for [register name]" and "Cash
      summary for [library] pages linked in the left-hand sidebar.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb782f5cc672b1ccdab1355267df12bd019f38aa)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33436: Use template wrapper for breadcrumbs: Reports part 1
Owen Leonard [Thu, 6 Apr 2023 18:55:50 +0000 (18:55 +0000)]
Bug 33436: Use template wrapper for breadcrumbs: Reports part 1

This patch updates several reports templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Reports ->
  - Acquisitions statistics
    - Results
  - Patrons with the most checkouts
    - Results
  - Patrons who haven't checked out
    - Results
  - Patron statistics wizard
    - Results

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 11712996480a162af4be42f024f3ef38e35a6236)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 29311: (follow-up) Fix t/db_dependent/selenium/regressions.t
Katrin Fischer [Mon, 10 Apr 2023 16:13:04 +0000 (16:13 +0000)]
Bug 29311: (follow-up) Fix t/db_dependent/selenium/regressions.t

The test was checking for the value of an input field.
But with this patch set, there is no longer an input, but
a link element with the title. This adjusts the patch to look
for the correct element.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 307df8f1af4b0577faa4dbcac8072d818bc1ffe4)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 29311: (follow-up) Add id to span elements
Katrin Fischer [Mon, 10 Apr 2023 16:08:32 +0000 (16:08 +0000)]
Bug 29311: (follow-up) Add id to span elements

The input fields in the form have ids, these are useful
for styling, but also for the Selenium tests. This patch
adds the ids from the former inputs to the now spans.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2fc06098d2133bfc7c46701e0e90fc384bbb1342)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33368: DBRev 22.12.00.019
Tomas Cohen Arazi [Thu, 6 Apr 2023 15:50:40 +0000 (12:50 -0300)]
Bug 33368: DBRev 22.12.00.019

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ba601ca37fe45dacaa1ed34b783a7d239058724e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33368: DBIC schema
Tomas Cohen Arazi [Thu, 6 Apr 2023 15:47:26 +0000 (12:47 -0300)]
Bug 33368: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 26120079a5380f13676648fc52f341da798f0804)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33368: Extends borrowers.flags to bigint
Jonathan Druart [Thu, 30 Mar 2023 07:58:30 +0000 (09:58 +0200)]
Bug 33368: Extends borrowers.flags to bigint

it's a int(11) which means its limit is 2^31

We have currently 29 permissions, there is only one remaining, at 31 permissions
the permission system won't support a case where a patron has all permissions.

Test plan:
Don't apply this patch
Add another permission
INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES (30, 'new permission 1', '', 0) ;
Go to the interface, tick all the boxes
select flags from borrowers where borrowernumber=5;
=> 2113928830
Remember:
2^31  2147483648
2^32  4294967296

Add another one
INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES (31, 'new permission 2', '', 0) ;
Repeat the step before
=> boom
CGI::Compile::ROOT::kohadevbox_koha_members_member_2dflags_2epl::member_2dflags_2epl(): DBI Exception: DBD::mysql::st execute failed: Out of range value for column 'flags' at row 1 at /usr/share/perl5/CGI/Emulate/PSGI.pm line 30

Apply the patch, try again

QA note: That's ofc not the best solution, but the easiest for now

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e81612c7191c8136ed72ce9c59e3951ca3c9adbc)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32510: Patrons - 'New list' option is not available when too many patron's lists
Hammat Wele [Mon, 9 Jan 2023 16:38:47 +0000 (16:38 +0000)]
Bug 32510: Patrons - 'New list' option is not available when too many patron's lists

It's impossible to add a patron to a new list when Koha has more than 35 patrons’ lists. This behaviour affects the 'add patron to list' drop-down menu in the patron search page (Patrons module > patron search > add to patron list button ). Koha will show a drop-down menu without the 'New list' option being visible, so you can't create more lists.

This patch allows scrolling the drop-down menu when there are too many lists.

To reproduce:
1. Go to Patron module
2. Search for patrons
3. Select few accounts
4. Click on 'add to patron list',  then choose 'New list'
If your Koha has a little number of patrons’ lists, add some more until you've reached a total of 35 lists (or more depending on your sreen resolution).
5. When you've reached 35 lists, try to add a patron to a new list
--> the 'new list' option is no longer available after 35 lists

6. Apply the patch
7. compile the .scss file 'yarn build --view'
8. Clear your navigator caches
9. repeat step 1, 2, 3, 4
11. You can now scroll drop-down menu and see The 'New list' option

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e91b3fb4b01cf303a471abb98c7a9528b59c45f9)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 31994: DataTable next button does not work when using data in the HTML
Olivier Hubert [Wed, 26 Oct 2022 16:29:20 +0000 (12:29 -0400)]
Bug 31994: DataTable next button does not work when using data in the HTML

This patch resolves the issue that occurs when the next button of a DataTable with data straight from the HTML is clicked.

Test plan:
1. Run the following SQL query on the database:
   DELETE FROM tables_settings WHERE tablename = 'table_item_type';
2. Restart plack / memcached if using.
3. Open itemtypes.pl.
4. If there are fewer than 11 item types, create additional item types until there are more than 10, so that the next button can be used.
5. Click on the next button / link.
6. Notice that nothing happens.
7. Apply the patch.
8. Restart plack / memcached if using.
9. Reload itemtypes.pl.
10. Click on the next button / link.
11. Notice that the next page is displayed.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
I can reproduce the problem on ktd, after a restart_all and a
hard reload of itemtypes.pl. Patch fixes the problem.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e23d4d0e6adbd1b2c48fa8c235953b8f642ad032)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 29311: (QA follow-up) Fix filter
Nick Clemens [Wed, 29 Mar 2023 14:03:49 +0000 (14:03 +0000)]
Bug 29311: (QA follow-up) Fix filter

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 69a1c4a53abca3273bf497198348dcc5c406e1ce)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 29311: (QA follow-up) Fix an existing spelling typo
Nick Clemens [Wed, 29 Mar 2023 14:02:47 +0000 (14:02 +0000)]
Bug 29311: (QA follow-up) Fix an existing spelling typo

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b231d0d5b1949292d5367c700183f534463672d)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 29311: Forbid editing biblio info when creating suggestion for biblio
jeremy breuillard [Mon, 21 Mar 2022 14:29:57 +0000 (15:29 +0100)]
Bug 29311: Forbid editing biblio info when creating suggestion for biblio

When creating a suggestion for an existing biblio, biblio info like
title or author should not be editable.

Test plan:
1. Enable system preference 'suggestion'
2. Log in at OPAC
3. Go to a biblio record detail page
4. Click 'suggest for purchase'
5. Notice that all fields can be modified (title, author, ...)
6. Apply patch
7. Repeat steps 2 and 3 or refresh the page
8. Verify that the biblio fields cannot be modified now. The only fields
   that should be editable are: quantity, item type, library, reason for
   suggestion, and notes

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d96393a52ab047939c97b5b5b496f2ed85f58893)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 31057: Add hint to the 'To date' input on the calendar form
Katrin Fischer [Thu, 9 Feb 2023 22:36:13 +0000 (22:36 +0000)]
Bug 31057: Add hint to the 'To date' input on the calendar form

Just adding a hint using the 'hint' class didn't work as
expected here. The hint was immediately hidden. That is
because of the collapsable hint text for the option at
the bottom of the form using the [?] link. So I chose to
use the class of the [$] to make the script a little more
selective.

To test:
* Go to the calendar tool
* Test that the [$] hide/show different help texts
* Apply patch
* Verify a hint now shows below the "To date"
* Verify that the help texts still function as before

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b46220cbc752c30cec8baab72aa6009f470fcfc8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33040: Add "Date published (text)" to serials tab on record view (detail.pl)
Kyle Hall [Wed, 22 Feb 2023 15:55:41 +0000 (10:55 -0500)]
Bug 33040: Add "Date published (text)" to serials tab on record view (detail.pl)

Some libraries would like to see the "Date published (text)" in the serials tab on the "Normal" record view ( aka catalogue/detail.pl ).

Test Plan:
1) View the serials tab on detail.pl for a subscription where the latest
   serial has a "Date published (text)" field populated.
2) Apply this patch
3) Restart all the thigns!
4) Browse to detail.pl for that record
5) View the Subscriptions tab
6) Note the "Date published (text)" column exists now!

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b3b33960dac85015d4f6e73604a8f7d21ed31e5b)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 27513: Add notes to variables for report parameters template
Philip Orr [Fri, 31 Mar 2023 07:12:48 +0000 (07:12 +0000)]
Bug 27513: Add notes to variables for report parameters template

This patch adds the TT variable 'notes' to the variables
that guided_reports.pl passes to the template guided_reports_start.tt
during SQL parameters entry in the phase 'Run this report'.

To test:
1. apply the patch
2. navigate to Reports -> Guided Reports -> Create from SQL
3. create an SQL report that includes at least one parameter, e.g.:
   SELECT barcode FROM items WHERE homebranch=<<Select library|branches>>
   the actual SQL and name of the report doesn't matter much, just make
   sure that you also put a note e.g. "Test text for display" in the
   field "Notes:" before you save the report.
4. run the report
5. the note you entered should now be displayed below the heading
   "Enter parameters for report..."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fa534d464c63739f4c836a43966802caa09b0ca8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33391: Prevent applying hover style on navmenulist currently active item
Pedro Amorim [Sat, 1 Apr 2023 14:51:02 +0000 (14:51 +0000)]
Bug 33391: Prevent applying hover style on navmenulist currently active item

* Apply patch
* Run yarn css:build
* Do the 2nd example above again and verify

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 153391e85f731c83bdf2ab137562f09d2f36bd6d)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33160: (QA follow-up) Adjust condition on biblio object
Marcel de Rooy [Fri, 24 Mar 2023 09:03:04 +0000 (09:03 +0000)]
Bug 33160: (QA follow-up) Adjust condition on biblio object

If it is undefined, there is no biblionumber.
If it is, we can safely assume that it has a biblionumber. Which
is the case for most biblio records, lol.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f5f9a250e0cf4fa230f3c658e450c2d08656c8a5)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33160: Use hostinfo to display title information when 773$w is empty
Katrin Fischer [Tue, 7 Mar 2023 16:49:35 +0000 (16:49 +0000)]
Bug 33160: Use hostinfo to display title information when 773$w is empty

When a 773 entry is not linked to another record using 773$w or
by using Easyanalytics, the title information would not display.

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. Look at the cart brief and full view in staff and OPAC.
9. Verify the In: source information only displays for the first record.
10. Apply patch
11. Veriy the In: source information now displays for both records on all 4 pages.

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a6a4a3ec713590baa047c5c8b595255f2fad8c2)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 31841: Use location,wrdl when searching Shelving location
David Cook [Mon, 17 Oct 2022 03:45:48 +0000 (03:45 +0000)]
Bug 31841: Use location,wrdl when searching Shelving location

The "location" index only has a word index defined, so we need
to specify the wrdl qualifier when searching it via the staff
interface dropdown menu

Test plan:
1) Change QueryAutoTruncate to "only if * is added"
2) Change IntranetCatalogSearchPulldown to "Show"
3) Search for "Shelving location" of "GEN" in catalogue
search bar
4) Note no results returned

5) Apply patch
6) koha-plack --restart kohadev

7) Repeat Step #3
8) Note that results appear for 'location,wrdl: GEN'

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0d125917a1a8dfe1fddf68de219e09d3c9ad11c3)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33299: Item type column displays translated_description when placing item level...
Mark Hofstetter [Tue, 28 Mar 2023 13:46:38 +0000 (15:46 +0200)]
Bug 33299: Item type column displays translated_description when placing item level holds in OPAC

0. go to detail page of a record->place hold->"show more options"->"specific item"
1. Item type column is empty when placing item level holds in OPAC
(or only the image is displayed)
2. apply patch
3. now the translated description is also shown
4. test with another language
4. please sign off ;-)

Signed-off-by: Amaury Gau <amaury.gau@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 74007678bfe3c26b4e7bdeafaab5dbf3fa4fcc40)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33422: Add cypress test
Matt Blenkinsop [Thu, 6 Apr 2023 09:37:09 +0000 (09:37 +0000)]
Bug 33422: Add cypress test

This patch adds a cypress test to check whether the "active" class is correctly updating when navigating

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0b16749efb12e74f305ba913174c7753f0f7b519)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33422: (bug 32728 follow-up) ERM - Update search header depending on navigation
Matt Blenkinsop [Wed, 5 Apr 2023 15:30:58 +0000 (15:30 +0000)]
Bug 33422: (bug 32728 follow-up) ERM - Update search header depending on navigation

This patch removes reference to a non-existent id ("ui-id-X") and replaces it with new ids specific to agreements, titles and packages.

Test plan:
1) Apply patch
2) Navigate between Agreements, Packages, Titles using the sidebar. The search bar should change each time to match the section
3) Add some agreemens, packages, titles
4) Perform a search using the different search bar options. Each time it should take you to the correct page with the search activated in the KohaTable. The navbar should also be highlighted to match the correct section and the top search bar should also show the correct section

Signed-off-by: David Nind <david@davidnind.com>
JD Amended commit message: link with 32728
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7cc6ae331dee2fde47c59cc9b718ab8a10384358)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33272: Color of the "(remove)" link when an item is in the cart (OPAC)
Owen Leonard [Tue, 21 Mar 2023 12:08:04 +0000 (12:08 +0000)]
Bug 33272: Color of the "(remove)" link when an item is in the cart (OPAC)

This patch improves the CSS for styling the OPAC cart's "remove" link in
search results so that the color is consistent within alternating table
row colors.

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

- Perform a search in the OPAC which will return multiple results.
- Click the "Add to cart" link next to multiple results.
- The "remove" link which appears should be the correct red color
  whether the table row background is white or grey.

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>
(cherry picked from commit 90dc36f57e1407a4580f04fb5ac088b348b22aa6)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32263: Fix capitalization for "...and on the Libraries page in the OPAC."
Philip Orr [Thu, 30 Mar 2023 12:16:40 +0000 (12:16 +0000)]
Bug 32263: Fix capitalization for "...and on the Libraries page in the OPAC."

Small fix to correct the capitalization in library editing mode to
display "...and on the libraries page in the OPAC.".

To Test:
1. apply patch
2. navigate to Administration -> Libraries
3. edit any library
4. confirm that the note underneath the option for "Public" now
   displays with the correct capitalization ("... on the libraries
   page...")

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f44f89462128e8ca91e5958b159c0b631367022d)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32648: Avoid skipping record or hiding item
Nick Clemens [Fri, 31 Mar 2023 10:44:45 +0000 (10:44 +0000)]
Bug 32648: Avoid skipping record or hiding item

It seems that depending on other tests, the item could be hidden from the record, or
the entire record hidden because of the way we count hidden items.

I add a mock for the two HIddenItems prefs and hardcode an xml record
to avoid problematic data from test builder

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3db7173dde0c8221c3628a0624c45f08d3f256fe)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 31640: Fuzzy translations of preferences can cause missing sections and inaccurat...
Kevin Carnes [Wed, 28 Sep 2022 08:39:30 +0000 (10:39 +0200)]
Bug 31640: Fuzzy translations of preferences can cause missing sections and inaccurate translations

This patch ignores fuzzy translations for preferences and warns if there are multiple sections with the same translated name.

Test Plan:
1)  Install English United Kingdom translations (./misc/translator/translate install en-GB)
2)  Go to Koha administration in the staff interface
3)  Click Global system preferences
4)  Select I18N/L10N preferences
5)  Enable English United Kingdom in the language preference for staff interface
6)  Save all I18N/L10N preferences
7)  Return to Koha administration
8)  Select English United Kingdom as the language at the bottom of the screen
9)  Click on Global system preferences
10) Select Circulation
11) Observe that there is only SelfCheckInMainUserBlock or StockRotation, but not both
12) Apply the patch
13) Install English United Kingdom translations (./misc/translator/translate install en-GB)
14) Go to Koha administration
15) Select English United Kingdom as the language at the bottom of the screen
16) Click on Global system preferences
17) Select Circulation
18) Observe that SelfCheckInMainUserBlock and StockRotation are both present

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5fdc436119803a08f7c52f9aedf054a7c59988cd)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33149: Use template wrapper for breadcrumbs: Circulation part 1
Owen Leonard [Mon, 6 Mar 2023 16:51:56 +0000 (16:51 +0000)]
Bug 33149: Use template wrapper for breadcrumbs: Circulation part 1

This patch updates several circulation templates so that they use the
new WRAPPER for displaying breadcrumbs.

The patch also makes a minor change to bookcount.pl to allow for correct
display of the record title using the biblio-title include.

Navigation context for bookcount.tt has been changed to "catalog" from
"circulation" because the page is linked to from a catalog-related page.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Circulation home page
  - Checkout notes
  - Article requests
  - Transfer
  - Overdues with fines
  - Check out -> Check out to patron ->
    - Batch check out
- Catalog -> Search -> Bibliographic record -> Items
  - View item's checkout history. The updated page should show this new
    breadcrumb sequence: Home -> Catalog -> [title] -> Items ->
    Circulation statistics

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e244c13e020fc0ea94fcb1adc76b2ff2eae8d14a)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33148: Use template wrapper for breadcrumbs: Cataloging
Owen Leonard [Mon, 6 Mar 2023 14:50:35 +0000 (14:50 +0000)]
Bug 33148: Use template wrapper for breadcrumbs: Cataloging

This patch updates several cataloging templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Cataloging -> Home page
  - Cataloging search results
    - Select two results and 'Merge selected'
  - Basic MARC editor
  - Advanced MARC editor
  - Item edit page
 - Catalog -> Search -> Bibliographic record details
   - Edit -> Attach item
   - Edit -> Link to host record (must have EasyAnalyticalRecords
     preference enabled)

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 98d86424d4f7be0f2a8a83bd33bbe61f469502b7)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33285: (QA follow-up) add POD and fix some code style
Fridolin Somers [Fri, 31 Mar 2023 22:16:43 +0000 (12:16 -1000)]
Bug 33285: (QA follow-up) add POD and fix some code style

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6221538b6d54d85b403296191a9d2fb27d34116c)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33285: Allow specifying the delimeter for runreport.pl
Nick Clemens [Mon, 20 Mar 2023 20:08:56 +0000 (20:08 +0000)]
Bug 33285: Allow specifying the delimeter for runreport.pl

To test:
1 - Write a report in koha
2 - perl misc/cronjobs/runreport.pl --format csv 1 (or correct report number)
3 - Note you get commas
4 - Apply patch
5 - Repeat #2 - no change
6 - perl misc/cronjobs/runreport.pl --format csv --separator "|" 1
7 - Now it is pipe delimited
8 - perl misc/cronjobs/runreport.pl --format tsv --separator "|" 1
9 - Error is reported, you cannot set separator unless csv
10 - Try other separators

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bad0d52245ebf7fe73131e3721a99f7ec9a965ce)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33381: Fix sidemenu active and hover styling
Pedro Amorim [Sat, 1 Apr 2023 17:38:33 +0000 (17:38 +0000)]
Bug 33381: Fix sidemenu active and hover styling

Change router link active class match rule. This makes it so that the route erm/agreements/1 will also match the router-link /erm/agreements instead of the previous exact match rule, thus adding the 'current' class
Update styling router-links to not apply 'current' styling when
.disabled

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 92e3793eb87485a5726cd26bd1c567ca574b2760)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33168: (follow-up) Swap spaces for tabs
Mason James [Fri, 31 Mar 2023 14:21:54 +0000 (03:21 +1300)]
Bug 33168: (follow-up) Swap spaces for tabs

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f74a353097710cf33b3b75b9912b2b00d2aa1a30)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 29234: Further clean Z3950 Tests
Nick Clemens [Mon, 3 Apr 2023 13:15:24 +0000 (13:15 +0000)]
Bug 29234: Further clean Z3950 Tests

We are deleting all authorised values in Session2.t and assuming they don't exist in Sesson.t

This patch ensures the tests will work regardless of data in DB

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d50f85cc6a54f11c4ea0cbf953a8b2016c5cf78)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 29234: Set datesent for transfers in Z3950 Responder tests
Nick Clemens [Mon, 3 Apr 2023 12:33:52 +0000 (12:33 +0000)]
Bug 29234: Set datesent for transfers in Z3950 Responder tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b96e61f1eaec6db55461c17e81fbfbe9f5321aff)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32447: Fix DataTable filtering when hidden columns are in place
Andreas Roussos [Tue, 21 Feb 2023 11:25:01 +0000 (12:25 +0100)]
Bug 32447: Fix DataTable filtering when hidden columns are in place

The bibliographic record's details page in the Staff interface
includes a 'Holdings' table at the bottom with information for
each item attached to the record. When activating the filters
in this table, there is no input field for the barcode column
but just bold text.

This broke in v22.11.00, the related commit being 018a981b9b
from Bug 29282 where two new hidden columns were added to that
table.

We can fix this by taking advantage of the existing code in
koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc
(introduced by commit dfb7af91af6 from Bug 23307) which allows
us to create and hook our own custom columnsInit() function in
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
to redraw the DataTable filters upon page load if a column is
marked as 'is_hidden: 1' in admin/columns_settings.yml, or if
a column is added/removed via the "⚙ Columns" button (both
are handled by the DataTables column-visibility.dt event).

Redrawing the filters via the above method also fixes the
issue described in Bug 32448.

Test plan:

1) Confirm the erratic DataTable behaviour outlined above
2) Apply this patch and reload all JS assets (hit CTRL-F5)
3) Confirm that you now see the correct input text field
   for the 'Barcode' column
4) Confirm that you can search for barcodes or in any other
   column successfully
5) Try toggling the visibility of the columns and making as
   many search variations as possible -- it should all now
   work without any glitches!

For extra credit ;-) you can also test the 'Other holdings'
table by setting the SeparateHoldings SysPref to 'Separate'.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit be81f156b884a33d501e9f882cf6c47c3642a0a7)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32447: Clean up table configuraton settings for holdings table
Katrin Fischer [Sat, 11 Feb 2023 00:48:02 +0000 (00:48 +0000)]
Bug 32447: Clean up table configuraton settings for holdings table

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6cbbfa27cbfdab6bd23b45e7ebeef15d849c4240)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 25590: Street number is missing from the alternate address in the OPAC
Katrin Fischer [Sun, 26 Feb 2023 11:59:56 +0000 (11:59 +0000)]
Bug 25590: Street number is missing from the alternate address in the OPAC

This patch adds the street number field to the alternate address
section in the OPAC, matching the layout of the address in the
staff interface.

To test:

1) Check that you are unable to add a street number to the Alternate
address when logged into the OPAC
2) Apply the patch
3) Check that you can now add and edit the streetnumber field.
4) Check that it also works correctly in patron self-registration.
5) Make the field mandatory and verify this works as expected
   (PatronSelfRegistrationBorrowerMandatoryField and PatronSelfModificationBorrowerMandatoryField)
6) Hide the field from the form
   (PatronSelfRegistrationBorrowerUnwantedField and PatronSelfModificationBorrowerUnwantedField)
7) Change the AddressFormat system preference to German
8) Verify that the street number field moved after the first address line matching
   the first address in the form.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6cd0a7e2828746cc0451c80ca7219a047cd62f53)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32976: Add permission check on Add/Edit controls for patron images
Katrin Fischer [Sun, 26 Feb 2023 11:20:34 +0000 (11:20 +0000)]
Bug 32976: Add permission check on Add/Edit controls for patron images

This adds a check on the batch_upload_patron_images permission
to the Add/Edit control for patron images in the patron account
in the staff interface.

To test:
* Enable patronimages system preference
* With your 'superlibrarian' account:
* Add and edit/remove a patron image to an account
* Create a staff user with batch_upload_patron_images permission
* Log in with this user and verify everything works the same
  as before
* Remove the batch_upload_patron_images permission
* Verify the Add/Edit controls are on longer visible to this
  patron

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 600c6d2282363ffcc62c6002e39cdb5a45414e75)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32279: Add GetAuthorizedHeading method export C4::AuthoritiesMarc
Fridolin Somers [Sat, 19 Nov 2022 03:36:47 +0000 (17:36 -1000)]
Bug 32279: Add GetAuthorizedHeading method export C4::AuthoritiesMarc

C4::AuthoritiesMarc method GetAuthorizedHeading is not exported thus it is called in other modules :
 > git grep GetAuthorizedHeading
C4/AuthoritiesMarc.pm:=head2 GetAuthorizedHeading
C4/AuthoritiesMarc.pm:  $heading = &GetAuthorizedHeading({ record => $record, authid => $authid })
C4/AuthoritiesMarc.pm:sub GetAuthorizedHeading {
C4/Breeding.pm:                            $heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marcrecord });
C4/ImportBatch.pm:            $row->{'authorized_heading'} = C4::AuthoritiesMarc::GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } );
C4/ImportBatch.pm:    my $authorized_heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marc_record });

This patch adds it to be exported.
For example for use in Koha plugins.

Test plan :
Check import of authorities from a file is OK

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2d0eca8a0df0e34535d12e40c4247ec99a493619)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33322: (QA follow-up) Add comment to clarify selector context
Nick Clemens [Wed, 29 Mar 2023 14:32:21 +0000 (14:32 +0000)]
Bug 33322: (QA follow-up) Add comment to clarify selector context

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f19a3bf91a310b45141620df8b95116bd1fb5272)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 33322: Refine click handler for suggestion batch operations
Owen Leonard [Thu, 23 Mar 2023 17:15:48 +0000 (17:15 +0000)]
Bug 33322: Refine click handler for suggestion batch operations

The handler for suggestion batch operations looks for clicks on
"button[type='submit']" which is not very specific. With the new staff
interface this ends up including the header search form.

This patch modifies the markup of the batch operations section of
the template and makes the click handler more specific so that only the
right buttons are affected.

To test, apply the patch and go to Suggestions.

- In the header search form, perform a catalog search. You should be
  able to click the submit button to successfully initiate the search.
- Without checking a checkbox associated with any open suggestion, test
  the batch operation buttons at the bottom:
  - Change status
  - Change item type
  - Update manager
  - Delete
  - Archive
  All should trigger a JS alert, "Please select at least one suggestion"
- Test each batch operation with one or more suggestions selected and
  confirm that the operation completes successfully.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2f1dffe1d5bbbb3deb6c92d881e2a8025ee8b672)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32280: Export method ImportBreedingAuth from C4::Breeding
Fridolin Somers [Sat, 19 Nov 2022 03:54:32 +0000 (17:54 -1000)]
Bug 32280: Export method ImportBreedingAuth from C4::Breeding

In C4::Breeding method ImportBreedingAuth() should be exported to be used for example by plugins.

No test plan needed i bet.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Looks like a harmless and useful enhancement.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 97a100d19ded4c1297b44c65587b419ca8710cfc)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 29234: (QA follow-up) Fix test that expects wrong defaults
Tomas Cohen Arazi [Fri, 31 Mar 2023 16:30:14 +0000 (18:30 +0200)]
Bug 29234: (QA follow-up) Fix test that expects wrong defaults

This patch changes the get_items_that_can_fill tests so they explicitly
set a 'datearrived' as the new defaults for fresh transfer objects from
TestBuilder is more sane and has this field undef. Tests *should always*
create their required scenarios explicitly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6ab19f01b8a6ee800b75781f761949c6c44ce634)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 31259: Escape infinite loop when lime cannot wrap enough
Nick Clemens [Mon, 23 Jan 2023 12:51:48 +0000 (12:51 +0000)]
Bug 31259: Escape infinite loop when lime cannot wrap enough

It seems the wrapping here works with words, not characters. If a line is too long,
or too far over, we can't trim it enough. We need to escape if successive loops are
not changing the line

To test:
 1 - Using sample data, edit the layout to match picture in comment 9
 2 - Add some borrowers to a batch
 3 - Attempt to export batch and save PDF
 4 - Staff client waits
 5 - ps aux | grep card
 6 - Note the job keeps running
 7 - Kill it
 8 - Apply patch
 9 - Restart_all
10 - Export batch again
11 - Success, you get a badly formatted PDF, rather than nothing
12 - Note the PDF does not show "Yakama Nation Library"
13 - Edit layout, male "Lower left X" 20 instead of 220
14 - Export again and note text field 1 shows correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a18f65cdcc51571bc9eae1e903a6b7b676e6a89e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32437: (QA follow-up) Add missing methods in schema file
Tomas Cohen Arazi [Fri, 31 Mar 2023 10:59:46 +0000 (12:59 +0200)]
Bug 32437: (QA follow-up) Add missing methods in schema file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 320a4b4d74f5b4d76adb58e45865e54000a3bb4b)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32437: DBRev 22.12.00.016
Tomas Cohen Arazi [Fri, 31 Mar 2023 10:51:12 +0000 (12:51 +0200)]
Bug 32437: DBRev 22.12.00.016

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 92fbb49af7e37f2274bc4f26edb95d57d3819d41)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32437: DBIC schema
Tomas Cohen Arazi [Fri, 31 Mar 2023 10:49:42 +0000 (12:49 +0200)]
Bug 32437: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 82c552e8765c4c617bcfa9792d74d8b3a4b94b67)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32437: (QA follow-up) Prevent upgrade if wrong PRIMARY KEY key present
Nick Clemens [Thu, 16 Mar 2023 15:14:13 +0000 (15:14 +0000)]
Bug 32437: (QA follow-up) Prevent upgrade if wrong PRIMARY KEY key present

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88cf3c76e93a96662687634b30f605b8d2ac6165)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32437: (QA follow-up) Change to replace POD
Marcel de Rooy [Fri, 3 Mar 2023 07:27:04 +0000 (07:27 +0000)]
Bug 32437: (QA follow-up) Change to replace POD

Making it more visible that this also applies to authority
records.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 23b34d1be9351a99e51aa61f2e01a367843d7206)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32437: Honor overlay setting in staged batch when adding to a basket
Nick Clemens [Mon, 12 Dec 2022 18:41:28 +0000 (18:41 +0000)]
Bug 32437: Honor overlay setting in staged batch when adding to a basket

This patch uses the replace method added in last patch to ensure
records are overlayed when added to a basket

To test:
 1 - Stage the sample file on this report using the options below
     (If not using sample database simply save a record as marc from the details page, then change the title in the interface and import the saved version)
 2 - Make sure to match using KohaBiblio (999c)
 3 - Set option "Replace existing record" if match found
 4 - Once record is staged go to Acquisitions
 5 - Find a vendor and select/create an open basket
 6 - Add to basket from the staged file
 7 - Add order info and save
 8 - Check the record, title is unchanged -  Sample file should add 'New and improved!'
 9 - Check the staged records batch - note the diff shows that new record should have overwritten
10 - Apply patch
11 - Stage file, match on KohaBiblio, set action if matching record found to 'Ignore incoming record'
12 - Add to basket from the staged file and save
13 - Confirm record not overlayed when not reuqested
14 - Stage file, match on KohaBiblio, set action if mathc record found to  'Replace existing...'
15 - Add to basket from staged file and save
16 - Confirm the record is updated to 'New and improved!'

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3bc8259e4ffab99507f2c9d3781b6294f5af50f5)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
18 months agoBug 32437: Add replace method to Koha::Import::Record objects
Nick Clemens [Mon, 12 Dec 2022 18:13:25 +0000 (18:13 +0000)]
Bug 32437: Add replace method to Koha::Import::Record objects

This patch adds a replace routine to Koha::Import::Record - largely
copying and updating code from C4::ImportBatch

To test:
prove t/db_dependent/Koha/Import/Records.t

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ecc92f92ca1569f20abbc4aa0cea3944d1cb4973)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>