koha.git
14 months agoBug 33402: Move ERM Cypress tests to their own directory
Jonathan Druart [Tue, 4 Apr 2023 11:27:13 +0000 (13:27 +0200)]
Bug 33402: Move ERM Cypress tests to their own directory

We need to move the existing Cypress tests (that are ERM only, t/cypress/integration/*.ts )
to their own subdirectory, eg t/cypress/integration/ERM

Test plan:
Confirm that the cypress tests are still passing after this change:
  perl /kohadevbox/misc4dev/run_tests.pl --run-cypress-tests-only

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 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>
14 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>
14 months agoBug 32634: (follow-up) Restructure page headings
Owen Leonard [Wed, 18 Jan 2023 13:12:08 +0000 (13:12 +0000)]
Bug 32634: (follow-up) Restructure page headings

An error in template logic is preventing the page's h1 from displaying.
Rather than fixing this I have changed the h1 to display a generic
"Transaction details" h1. The h2 shows the transaction type (credit or
debit).

The h2 is now inside the .page-section.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Checked all the places mentioned in the commit message, and they
all have .page-section now.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32634: Add 'page-section' to various pages
Owen Leonard [Fri, 13 Jan 2023 20:15:13 +0000 (20:15 +0000)]
Bug 32634: Add 'page-section' to various pages

This patch adds a "page-section" container div around the main section
of various pages which lack it.

This patch contains indentation changes, so please ignore whitespace
when looking at the diff.

Apply the patch and view the following pages to confirm that the main
content is contained in a white box:

- Locate a patron who has one or more account transactions.
  - Go to the Accounting tab -> Transactions. Click "Details" on one of
      the lines.
    - The "Details of debit" and "History" sections should be wrapped in
      .page-section.
- Go to Tools -> Patron card creator -> Manage -> Batches
  - If there is not a list of batches you will need to create at least
    one to see the page-section container.
- Go to Reports -> View dictionary.
  - If necessary, add a definition.
  - The "Current terms" table should be wrapped in .page-section.
- Go to Lists and view the contents of a list with one or more titles on
  it. The table of titles should be wrapped in .page-section.
- Go to Circulation -> Upload offline circulation file (.koc)
  - Upload a .koc file and click the "Add to offline circulation queue."
  - On the confirmation page the "Your file was uploaded" message should
    be wrapped in .page-section.
  - Click "View pending offline circulation actions"
    - The list of pending actions should be wrapped in .page-section

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Fix table style
Pedro Amorim [Sun, 26 Mar 2023 10:53:25 +0000 (10:53 +0000)]
Bug 33066: Fix table style

Move table rendering outside <ol> to prevent unintended style in _forms.scss from being applied and causing table to not be full width
Remove unecessary table styling

JD: following commit has been squashed. Patch from Pedro is fixing the
FIXME
"""
Bug 33066: Fix style - FIXME

This is not working, see /cgi-bin/koha/erm/eholdings/local/packages/1
The table is not taking width: 100%
I fixed it previously with the display: table in the style block, but
here it's not applied.

There is also the "green tick" (fa-check-square-o) that is not on the
same line https://snipboard.io/jma923.jpg
"""

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Fix cypress tests
Jonathan Druart [Fri, 17 Mar 2023 15:20:27 +0000 (16:20 +0100)]
Bug 33066: Fix cypress tests

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Remove useless use of useDataTable
Jonathan Druart [Fri, 17 Mar 2023 14:38:06 +0000 (15:38 +0100)]
Bug 33066: Remove useless use of useDataTable

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Use KohaTable for EHoldingsEBSCOTitlesList
Jonathan Druart [Fri, 17 Mar 2023 14:01:44 +0000 (15:01 +0100)]
Bug 33066: Use KohaTable for EHoldingsEBSCOTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Use KohaTable for EHoldingsEBSCOPackageTitlesList
Jonathan Druart [Fri, 17 Mar 2023 13:39:51 +0000 (14:39 +0100)]
Bug 33066: Use KohaTable for EHoldingsEBSCOPackageTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Restore '(#id)' to lists
Pedro Amorim [Wed, 8 Mar 2023 18:36:24 +0000 (18:36 +0000)]
Bug 33066: Restore '(#id)' to lists

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Use KohaTable for EHoldingsEBSCOPackagesList
Jonathan Druart [Wed, 8 Mar 2023 14:57:09 +0000 (15:57 +0100)]
Bug 33066: Use KohaTable for EHoldingsEBSCOPackagesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Use KohaTable for EHoldingsLocalTitlesList
Jonathan Druart [Wed, 8 Mar 2023 14:02:13 +0000 (15:02 +0100)]
Bug 33066: Use KohaTable for EHoldingsLocalTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Use KohaTable for EHoldingsLocalPackageTitlesList
Jonathan Druart [Wed, 8 Mar 2023 13:20:50 +0000 (14:20 +0100)]
Bug 33066: Use KohaTable for EHoldingsLocalPackageTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Use KohaTable for EHoldingsLocalPackagesList
Jonathan Druart [Tue, 7 Mar 2023 20:03:39 +0000 (21:03 +0100)]
Bug 33066: Use KohaTable for EHoldingsLocalPackagesList

Bug 33066: (follow-up) Use KohaTable for EHoldingsLocalTitlePackagesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Restore filter by mine
Jonathan Druart [Wed, 8 Mar 2023 12:24:23 +0000 (13:24 +0100)]
Bug 33066: Restore filter by mine

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Restore HTML escaping
Jonathan Druart [Tue, 7 Mar 2023 16:40:20 +0000 (17:40 +0100)]
Bug 33066: Restore HTML escaping

And we add a render function that will escape by default

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Use KohaTable for LicensesList
Jonathan Druart [Tue, 7 Mar 2023 16:04:01 +0000 (17:04 +0100)]
Bug 33066: Use KohaTable for LicensesList

Bug 33066: (follow-up) Use KohaTable for LicensesList

There was a mismatch, we can embed the whole vendor object info.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Fix width after ColVis change
Jonathan Druart [Tue, 7 Mar 2023 15:46:48 +0000 (16:46 +0100)]
Bug 33066: Fix width after ColVis change

This fixes the width to 100%, otherwise it is not recalculated correctly

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Fix ColVis
Jonathan Druart [Tue, 7 Mar 2023 15:42:38 +0000 (16:42 +0100)]
Bug 33066: Fix ColVis

The filter (header) was not removed alongwith the column

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Fix default_filters
Jonathan Druart [Tue, 7 Mar 2023 15:32:20 +0000 (16:32 +0100)]
Bug 33066: Fix default_filters

Will need to be tested when EHoldingsEBSCOTitlesList.vue will be
adjusted

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Fix default_search
Jonathan Druart [Tue, 7 Mar 2023 15:26:43 +0000 (16:26 +0100)]
Bug 33066: Fix default_search

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Remove duplicate 'Actions' column
Jonathan Druart [Tue, 7 Mar 2023 15:13:03 +0000 (16:13 +0100)]
Bug 33066: Remove duplicate 'Actions' column

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Embed vendor and retrieve vendor name from the request
Jonathan Druart [Tue, 7 Mar 2023 14:42:48 +0000 (15:42 +0100)]
Bug 33066: Embed vendor and retrieve vendor name from the request

Bug 33066: (follow-up) Embed vendor and retrieve vendor name from the request

It needs "Bug 32923: Allow to embed user_roles for agreements"

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Remove build_datatable
Jonathan Druart [Tue, 7 Mar 2023 14:37:10 +0000 (15:37 +0100)]
Bug 33066: Remove build_datatable

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Fix name display
Jonathan Druart [Tue, 7 Mar 2023 14:36:46 +0000 (15:36 +0100)]
Bug 33066: Fix name display

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Reintroduce column filters
Jonathan Druart [Tue, 7 Mar 2023 14:02:25 +0000 (15:02 +0100)]
Bug 33066: Reintroduce column filters

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Fix "Loading..."
Jonathan Druart [Tue, 7 Mar 2023 14:06:50 +0000 (15:06 +0100)]
Bug 33066: Fix "Loading..."

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Add colvis
Jonathan Druart [Fri, 24 Feb 2023 16:08:58 +0000 (17:08 +0100)]
Bug 33066: Add colvis

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Fix dt - no need to reselect
Jonathan Druart [Fri, 24 Feb 2023 14:47:41 +0000 (15:47 +0100)]
Bug 33066: Fix dt - no need to reselect

Bug 33066: (follow-up) Fix dt - no need to reselect

Patron search result table was not displayed correctly
Uncaught TypeError: this.on is not a function

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 33066: Introduce a KohaTable Vue component
Jonathan Druart [Fri, 24 Feb 2023 12:14:19 +0000 (13:14 +0100)]
Bug 33066: Introduce a KohaTable Vue component

The way we deal with DataTables in Vue component is not nice, especially when we
need to add buttons/link in the cell and interact with the rest of the Vue app from
there.

When I started to work on Vue last year there was no good solution from DataTables,
now there is a Vue component. It is not perfect, you still cannot add Vue component
in the DT component, but it brings something to follow. Agustin implemented something
on theke/import_source_vue, but he went too far, and it will need to rewrite the
whole ERM module. Additionally he didn't provide a solution that has the same features
as what we have now.

The goal of this patch is to not duplicate the code in datatables.js, we
don't want to maintain two version of this code (one is enough already!)
We split the huge function in datatables.js in small ones to make them
reusable from the Vue component.

This is quite ugly, and it needs to lot more addition, but it's a first
start!

Help, ideas, and feedback welcome (and needed!)

Bug 33066: Fix agreement name in delete confirmation dialog

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 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>
14 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>
14 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>
14 months agoBug 30403: (QA follow-up) Add new YAML syspref to about.pl
Tomas Cohen Arazi [Thu, 6 Apr 2023 14:27:46 +0000 (11:27 -0300)]
Bug 30403: (QA follow-up) Add new YAML syspref to about.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 30403: (follow-up) Remove useless warning
Tomas Cohen Arazi [Thu, 6 Apr 2023 13:38:16 +0000 (10:38 -0300)]
Bug 30403: (follow-up) Remove useless warning

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 30403: DBRev 22.12.00.018
Tomas Cohen Arazi [Thu, 6 Apr 2023 13:25:12 +0000 (10:25 -0300)]
Bug 30403: DBRev 22.12.00.018

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 30403: (QA follow-up) Fix up atomic update
Kyle Hall [Fri, 16 Dec 2022 14:22:41 +0000 (09:22 -0500)]
Bug 30403: (QA follow-up) Fix up atomic update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 30403: (QA follow-up) Fix warning in unit test
Kyle Hall [Fri, 16 Dec 2022 14:21:48 +0000 (09:21 -0500)]
Bug 30403: (QA follow-up) Fix warning in unit test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 30403: Add syspref UpdateNotForLoanStatusOnCheckout
Emmi Takkinen [Tue, 29 Mar 2022 09:51:01 +0000 (12:51 +0300)]
Bug 30403: Add syspref UpdateNotForLoanStatusOnCheckout

We currently have syspref UpdateNotForLoanStatusOnCheckin which updates
notforloan status when item is checked in. We should also have
same kind of syspref for check outs. This would be usefull if for
example library has item in exhibition with status
"In exhibition, available for loan". When patron check outs the
item notforloan status can be reseted back to 0, informing staff
that the item is back on circulation.

This patch adds new syspref Add syspref UpdateNotForLoanStatusOnCheckout.

To test:
1. Set items notforloan status as e.g -1.
2. Check out item for a patron.
=> Note that items status doesn't change.
3. Apply patch and update database if needed.
4. Add "-1: 0" to syspref UpdateNotForLoanStatusOnCheckout.
5. Check item in and out again for a patron.
=> Note that items status is changed as 0.

Also prove t/db_dependent/Circulation/issue.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Catrina <catrina@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 31615: Allow checkin of items bundles without verifying their contents
Julian Maurice [Fri, 23 Sep 2022 08:12:22 +0000 (10:12 +0200)]
Bug 31615: Allow checkin of items bundles without verifying their contents

This patch adds a button in the "bundle verification" modal to skip
this step and do the checkin anyway.

Test plan:
1. Create an items bundle (see bug 28854 comment 458)
2. Check out this bundle, then return it. The "bundle verification"
   modal should appear
3. Leave the textarea empty and click on "Confirm checkin without
   verifying bundle contents"
4. Confirm that the bundle was correctly returned, and no items were
   marked as lost

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 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>
14 months agoBug 31123: DBRev 22.12.00.017
Tomas Cohen Arazi [Thu, 6 Apr 2023 13:16:00 +0000 (10:16 -0300)]
Bug 31123: DBRev 22.12.00.017

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 31123: Fix file permission
Nick Clemens [Thu, 30 Mar 2023 14:14:58 +0000 (14:14 +0000)]
Bug 31123: Fix file permission

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 31123: Add all subfields to OPAC stylsheet
Martin Renvoize [Fri, 24 Feb 2023 15:42:00 +0000 (15:42 +0000)]
Bug 31123: Add all subfields to OPAC stylsheet

This patch updates the OPAC XSLT's to display all subfields, barring the
'x' field which is often used as a 'private note' in other notes fields.

We also handle converting subfield 'u' to a hyper link if it's found to
be present and use subfield 'a' for the link text if present.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 31123: Update Staff XSLT to include all subfields
Martin Renvoize [Fri, 24 Feb 2023 15:36:00 +0000 (15:36 +0000)]
Bug 31123: Update Staff XSLT to include all subfields

This patch updates the XSLT sheets to include all subfields in your
selected ContentWarningField in display and handles converting the
subfield u if present to a hyperlink.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 31123: Display content warnings in OPAC
Martin Renvoize [Thu, 8 Sep 2022 14:11:31 +0000 (15:11 +0100)]
Bug 31123: Display content warnings in OPAC

This patch adds handling of content warning display to the OPAC for both
detail and search result views

Test plan
1) Work through the test plan for the previous patch
2) Confirm that the same text now also displays on the equivilent OPAC
   pages.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 31123: Display content warnings on the intranet
Martin Renvoize [Thu, 8 Sep 2022 14:07:57 +0000 (15:07 +0100)]
Bug 31123: Display content warnings on the intranet

This patch adds handling to our XSLT processing to pass the new
`ContentWarningField` preference value to the stylesheets and then uses
that variable to add content warning notes to both the detail and search
result displays of the staff client.

Test plan
1) Run the database update to expose the new system preference
2) Set `ContentWarningField` to something sensible, like `599`
3) Add the above select field to one of your frameworks with a subfield
   `a`.
4) Edit a record with that framework to add a content warning into the
   record
5) Search for the record and confirm you now see `Content warning: Your
   test text`
6) Click into the record detail and confirm you see the content warning
   text there too
7) Bonus points: Assign a new authorized value category to the chosen
   field and subfield and confirm the staff client display text is used
   in the above tests.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 31123: Add `ContentWarningField` preference
Martin Renvoize [Thu, 8 Sep 2022 15:38:16 +0000 (16:38 +0100)]
Bug 31123: Add `ContentWarningField` preference

This patch adds a new `ContentWarningField` preference allowing the
library to define which 59X field to use to store harmful content
warning notes.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 30930: (QA follow-up) Tidy code block
Kyle M Hall [Fri, 24 Mar 2023 16:13:23 +0000 (12:13 -0400)]
Bug 30930: (QA follow-up) Tidy code block

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 30930: Ability to change auth type while editing record
Aleisha Amohia [Mon, 15 Mar 2021 01:51:25 +0000 (14:51 +1300)]
Bug 30930: Ability to change auth type while editing record

This patch adds the ability to change the authority MARC framework/type
being used while editing an authority record.

To test:

1) Log into the staff client and go to Authorities
2) Search for an existing authority and edit it
3) Notice there is no way to change this authority type
4) Apply patch, restart services, refresh editor in browser
5) Notice the new Settings dropdown. Click to open
6) Confirm the correct current authority type is selected
7) Select another type to change to that. The page should reload
8) Confirm the page reloads with the correct authority type framework
loaded and the MARC data is still correct

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 26598: (QA follow-up) Fix up tab for guarantees' charges
Kyle Hall [Fri, 16 Dec 2022 17:57:19 +0000 (12:57 -0500)]
Bug 26598: (QA follow-up) Fix up tab for guarantees' charges

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 26598: Display guarantee's fines on guarantor's details page
Maryse Simard [Fri, 2 Oct 2020 03:53:17 +0000 (23:53 -0400)]
Bug 26598: Display guarantee's fines on guarantor's details page

A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists.

+ resolve a git merge conflict

To test:
1) Apply patch
2) Choose a patron that has guarantees and navigate to the patron's details page
3) If the guarantees don't have any fines, the display should be unchanged
4) Add fines to the guarantee
5) Go back to the guarantor's details page
    => A warning should appear in the "Guarantees" section with the total due
6) Clicking on the link accompanying the warning focuses on the new
"Guarantees' fines" tab containing a table of all guarantee's and their
fines.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 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>
14 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>
14 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>
14 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>
14 months agoBug 32686: Specify action of action_logs to purge
Alex Buckley [Thu, 19 Jan 2023 01:29:37 +0000 (01:29 +0000)]
Bug 32686: Specify action of action_logs to purge

Add --log-action parameter to cleanup_database.pl

Test plan:
1. Apply patch
2. Enable cataloguing and borrowers log
3. Make some changes to borrowers, create some borrowers, and edit some
biblio records
4. Change the action_logs.timestamp for all action_logs entries to 367
days ago
5. Run cleanup_database.pl with --logs 365 --log-module=MEMBERS
--log-action=CREATE --confirm
6. Confirm only the borrowers creation action_logs entries are removed
7. Run cleanup_database.pl with --logs 365
8. Confirm all action_logs entries are removed

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 months agoBug 32164: Add link to MARC modification templates from batch record modification...
Owen Leonard [Mon, 13 Feb 2023 19:34:45 +0000 (19:34 +0000)]
Bug 32164: Add link to MARC modification templates from batch record modification page

This patch adds a more visible link from the batch record modification
page in the event that there are no MARC modification templates defined.
The template checks that the user has permission.

The patch also modifies the same message on the MARC modification
templates page so that the interfaces are more unified, and tweaks the
operation of the "New action" button.

To test you should have no MARC modification templates defined.

- Apply the patch and go to Tools -> Batch record modification.
- If you're logged in as a user with permission you should see a message
  dialog containing a button, "Create a new MARC modification template."
- Clicking it should take you to the MARC modification templates page,
  where you'll see a similar message and a button, "Create a new
  template." Clicking this button should trigger a modal form, just like
  clicking the "New template" button in the toolbar should.
- Submit the form to create a new template. You should see message on
  the following page that says "New action." Clicking the button should
  display the entry form, and then clicking "Cancel" should hide the
  form and redisplay the message.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 months agoBug 18398: (follow-up) Update POD & Unit tests
Martin Renvoize [Tue, 28 Mar 2023 11:35:05 +0000 (12:35 +0100)]
Bug 18398: (follow-up) Update POD & Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 18398: Update C4::Message enqueue to use $patron->notice_email_address
Martin Renvoize [Fri, 10 Mar 2023 10:02:19 +0000 (10:02 +0000)]
Bug 18398: Update C4::Message enqueue to use $patron->notice_email_address

This patch updates the enque method in C4::Message to expect a
Koha::Patron object in the parameters and then uses that patron object
to select the correct email address for notices as defined by
AutoEmailPrimaryAddress.

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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>