koha.git
18 months agoBug 31963: Only show hold fee msg on OPAC if patron will be charged
Aleisha Amohia [Mon, 24 Oct 2022 23:08:52 +0000 (23:08 +0000)]
Bug 31963: Only show hold fee msg on OPAC if patron will be charged

This patch ensures HoldFeeMode is considered when displaying a message
to patrons on the OPAC that says they'll be charged a hold fee when
placing or collecting the hold.

When HoldFeeMode is set to not_always or "only if all items are checked
out and the record has at least one hold already" then the hold fee
message should only show if all items on the record are checked out, AND
the record has at least one hold already - both of these conditions must
be met.

To test:
1. Go to Administration -> Patron categories
2. Edit your patron category and give a hold fee of $1.
3. Go to Administration -> System preferences and search for
HoldFeeMode. Set to 'only if all items are checked out and the record
has at least one hold already' if not already set. Keep this tab open.
4. In another tab, open the OPAC.
5. Search the OPAC for a record with one item which is NOT checked out.
6. Go to place a hold on this record. Confirm you see a message saying
that you will be charged a hold fee, even though not all items are
checked out and the record does not have a hold --> This is the bug.

7. Apply patch and restart services.

Items available, no holds placed

8. Repeat steps 5-6. This time, you should NOT see the hold fee message.

Items available, holds placed

9. In your staff interface tab, find the same record.
10. Place a hold for a different patron on this record.
11. In your OPAC tab, find this record again and go to place a hold. You
should NOT see the hold fee message.

No items available, no holds placed

12. In your staff interface tab, cancel the hold placed on this record.
13. Check out the item to a different patron.
14. In your OPAC tab, find this record again and go to place a hold. You
should NOT see the hold fee message.

No items available, holds placed

15. In your staff interface tab, keep the item checked out to another
patron.
16. Place a hold for a third patron on this record.
17. In your OPAC tab, find this record again and go to place a hold. You
SHOULD see the hold fee message.

Multiple holds

18. Search the OPAC for a record. Make sure your search will return more
than one result, including our test record.
19. Check the checkbox for our test record, plus another record where
the item is not checked out.
20. Click the Place hold button to place holds on all of our selected
records. You should only see the hold fee message above our test record.

21. In your staff interface tab, test setting HoldFeeMode to the other
values and confirm the hold message shows on the OPAC as expected.
22. Confirm tests pass t/db_dependent/Reserves/GetReserveFee.t

Sponsored-by: Horowhenua Libraries Trust
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>
18 months agoBug 32002: Make submit button yellow on administration > Did you mean?
Owen Leonard [Fri, 28 Oct 2022 18:40:49 +0000 (18:40 +0000)]
Bug 32002: Make submit button yellow on administration > Did you mean?

This patch corrects the class on the "Did you mean?" page's save button
so that it is consistent with other primary submit buttons.

To test, apply the patch and go to Administration -> Did you mean?

The "Save configuration" button should be yellow.

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>
18 months agoBug 31960: (follow-up) Make headings match
Owen Leonard [Tue, 1 Nov 2022 12:13:49 +0000 (12:13 +0000)]
Bug 31960: (follow-up) Make headings match

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
18 months agoBug 31960: Information on job detail view is misaligned
Owen Leonard [Tue, 25 Oct 2022 11:46:12 +0000 (11:46 +0000)]
Bug 31960: Information on job detail view is misaligned

This patch updates the structure of the background jobs template so that
HTML processed in the report includes is well styled. The patch does
this by breaking the report and detail includes out of the fieldset and
putting them in a separate section.

This patch also adds the page-section class to the table view of current
and past background jobs.

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

To test, apply the patch and go to Administration -> Manage jobs.

- The table of jobs (even if empty) should be contained in a
  page-section style white box.
- Test various processes which trigger a backgroud job:
  - Batch item modification
  - Batch item deletion
  - Batch hold deletion
  - Batch record modification
  ... etc.
- After each process has been started, view the details of the job.
- The information about the job shold be displayed well, with separate
  sections for "Report" and "Detailed messages."

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>
18 months agoBug 32070: Consistent classes for primary buttons: Acquisitions
Owen Leonard [Wed, 2 Nov 2022 11:43:32 +0000 (11:43 +0000)]
Bug 32070: Consistent classes for primary buttons: Acquisitions

This patch makes changes the button markup in Acquisitions templates
so that all submit buttons and any buttons that should should be styled
as primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view pages in Acquisitions to confirm
that everything looks correct. In most cases there are no visible
changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
18 months agoBug 32068: Consistent classes for primary buttons: Administration
Owen Leonard [Tue, 1 Nov 2022 18:58:30 +0000 (18:58 +0000)]
Bug 32068: Consistent classes for primary buttons: Administration

This patch makes changes the button markup in Administration templates
so that all submit buttons and any buttons that should should be styled
as primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view pages in Administration to confirm
that everything looks correct. In most cases there are no visible
changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
18 months agoBug 32044: Compiled CSS
Tomas Cohen Arazi [Wed, 2 Nov 2022 22:27:13 +0000 (19:27 -0300)]
Bug 32044: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
18 months agoBug 32044: Improve consistency in primary submit buttons
Owen Leonard [Mon, 31 Oct 2022 18:19:03 +0000 (18:19 +0000)]
Bug 32044: Improve consistency in primary submit buttons

We currently have a mix of ways to style buttons, including some using
Bootstrap's btn-primary class and some with CSS targeting
input[type='submit']. This patch works to make these buttons more
consistent in their appearance and to improve the modularity of related
SCSS.

The patch also removes some unused CSS from login.css.

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

Test various page to see if main submit buttons look correct in their
default, hover, and active states:

- The login page
- Circulation -> Checkouts -> Check out button (btn-primary)
- Circulation -> Set library (input[type='submit'])
- Cataloging -> Basic MARC editor (split button)

Also check "default" buttons:

- Patrons -> Sidebar filter (input[type='button'])
- Circulation -> Checkouts -> Show checkouts (btn-default)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
18 months agoBug 31877: Fix capitalization: "Delete this Tag" and "Repeat this Tag"
Katrin Fischer [Mon, 24 Oct 2022 20:44:21 +0000 (22:44 +0200)]
Bug 31877: Fix capitalization: "Delete this Tag" and "Repeat this Tag"

To get to the string in the staff interface:
1. In the staff interface, go to Cataloging
2. Click "New record"
3. Hover the mouse cursor over one of the delete tag buttons (rectangle with a small x next to the tag title)
   --> a little popup thing (tooltip?) appears with "Delete this Tag"
4. Open the developper tools inspector in your browser
5. Click on the delete tag button
   --> the image alt text is "Delete this Tag"
6. Repeat the same check in the authorities editor
7. Apply patch
8. All tooltips and alt text should read correctly now

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
18 months agoBug 31876: Fix capitalization "Click to Expand Tag"
Katrin Fischer [Mon, 24 Oct 2022 20:32:27 +0000 (20:32 +0000)]
Bug 31876: Fix capitalization "Click to Expand Tag"

The string "Click to Expand this Tag" appears in addbiblio.tt a couple of times. It should be "Click to expand this tag".

To get to the string for the staff interface:
1. In the staff interface, go to Cataloging
2. Click "New record"
3. Hover the mouse cursor over one of the tag titles (e.g. CONTROL NUMBER)
   --> a little popup thing (tooltip?) appears with "Click to Expand this Tag"
4. Go to Administration > Global system preferences
5. Search for advancedMARCeditor
6. Change the value to "Don't show"
7. Click "Save all Cataloging preferences"
8. Go back to Cataloging > New record
9. Hover the mouse cursor over the tag number (e.g. 001)
   --> a little popup thing (tooltip?) appears with "<tag title> Click to Expand this Tag"
10. Go to Authorities > new record
11. Hover over the desription of a tag which subfields are collapsed
   --> verify the tooltip appears with "Click to Expand this Tag"
12. Apply patch, all occurrences should be fixed now.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
18 months agoBug 32050: Add 'page-section' to calendar page
Owen Leonard [Fri, 14 Oct 2022 11:00:07 +0000 (11:00 +0000)]
Bug 32050: Add 'page-section' to calendar page

This patch adds a "page-section" div to a couple of areas on the
calendar page.

To test, apply the patch and go to Tools -> Calendar.

The content in the page's two columns should be wrapped in a white box.

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>
18 months agoBug 32014: Compiled CSS
Tomas Cohen Arazi [Wed, 2 Nov 2022 22:21:55 +0000 (19:21 -0300)]
Bug 32014: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
18 months agoBug 32014: Tweak style of checkout settings panel
Owen Leonard [Thu, 27 Oct 2022 11:36:01 +0000 (11:36 +0000)]
Bug 32014: Tweak style of checkout settings panel

This patch makes some minor changes to the CSS controlling the way the
checkout settings panel displays, as well as the panel showing the last
checked-out item.

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

- Go to Circulation and locate a patron to check out to.
- On the checkout page, click the "settings" icon in the barcode field.
- The checkout settings panel should display. Confirm that the spacing
  looks good.
- Check out an item to the patron.
- Confirm that the panel showing the last checked out item information
  looks correct: A green-bordered box with a white background, no
  rounded corners.

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>
18 months agoBug 32038: Sidebar and footer style improvements on suggestions page
Owen Leonard [Fri, 28 Oct 2022 17:24:08 +0000 (17:24 +0000)]
Bug 32038: Sidebar and footer style improvements on suggestions page

This patch makes some changes to the suggestions template in order to
make the sidebar filter form and bulk action table footer forms more
usable and readable.

Some global changes to <fieldset class="brief"> style are made.

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

- Go to Suggestions.
- Confirm that the sidebar contains two sections: Organize by and Filter
  by.
- Test that the links under "Filter by" work to expand and collapse the
  different sections (bibliographic, suggestion, and acquisition).
- Below the table of existing suggestions you should see the section
  "Change selected suggestions."
- Each form should look good, with labels in bold above each form field,
  with "primary" style submit buttons.
- Because some global styles have been modified, check that fieldsets
  with the class "brief" are still displayed correctly in other areas:
  - In sidebar forms: Patrons, Acquisitions order and invoice searches,
    overdues and holds to pull in Circulation.
  - In other areas: The Quick spine label creator; the upload plugin
    form; the calendar's add holiday form.

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>
18 months agoBug 31664: Display pending transfer information on details page
Nick Clemens [Fri, 30 Sep 2022 12:01:36 +0000 (12:01 +0000)]
Bug 31664: Display pending transfer information on details page

If a transfer is requested, but not sent, we should display this information on biblio details for staff

This patch also removes nocancel parameter that was not used, passes transfer object directly to template

To test
1 - Manually transfer an item
2 - Note the item shows in transit on details page
3 - Remove the datesent to emulate a pending transfer
    UPDATE branchtransfers SET datesent = NULL itemnumber=1;
4 - View details page - no info on transfer
5 - Apply patch
6 - Item shows 'Transit pending'

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>
18 months agoBug 32035: Add "Koha" to the staff interface home page
David Nind [Sat, 29 Oct 2022 23:30:03 +0000 (23:30 +0000)]
Bug 32035: Add "Koha" to the staff interface home page

Currently the staff interface does not include Koha before the version
number shown on the home page.

Test plan:
1. Log in and view the staff interface home page.
2. In the bottom right-hand corner "Version 22.06.00" is shown.
3. Apply the patch.
4. Refresh the staff interface home page.
5. It now shows "Koha 22.06.00" (linked to the Koha website).
6. Sign off :D (or comment on alternative options).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Claude Demeure <claude.demeure@mailo.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
18 months agoBug 32012: runreport.pl should use binmode UTF-8
Fridolin Somers [Thu, 27 Oct 2022 09:15:35 +0000 (23:15 -1000)]
Bug 32012: runreport.pl should use binmode UTF-8

Like Bug 26832 added binmode UTF-8 to script misc/search_tools/export_elasticsearch_mappings.pl, this should be added to misc/cronjobs/runreport.pl.

Test plan :
1) Do not apply patch
2) Create a SQL report with :
   SELECT 'accentué',barcode FROM items limit 3
3) Note the id of this report, for example 1
4) Run : misc/cronjobs/runreport.pl 1 --format csv | tee /tmp/without.csv
=> You see output with unknown character instead of é :
5) Run : file --mime-type /tmp/without.csv
=> You see : /tmp/without.csv: iso-8859-1
6) Apply patch
7) Run : misc/cronjobs/runreport.pl 1 --format csv | tee /tmp/with.csv
=> You see correct output with é
8) Run : file --mime-type /tmp/without.csv
=> You see : /tmp/without.csv: utf-8

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>
19 months agoBug 32022: Compiled CSS
Tomas Cohen Arazi [Fri, 28 Oct 2022 19:43:15 +0000 (16:43 -0300)]
Bug 32022: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32022: (follow-up) Ensure action background takes presidence
Martin Renvoize [Fri, 28 Oct 2022 07:53:08 +0000 (08:53 +0100)]
Bug 32022: (follow-up) Ensure action background takes presidence

The action class sets the background to transparent, but because it's
often used in conjunction with the fieldset which includes the card
mixin the background rule was getting overridden to white.

Test plan
1. Consider the same cases as the original patch
2. Confirm that the last test now shows the buttons outside of the card
   but nicely spaced to clearly belong to it.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32022: Style tweaks to fieldsets and page-section
Owen Leonard [Thu, 27 Oct 2022 15:28:11 +0000 (15:28 +0000)]
Bug 32022: Style tweaks to fieldsets and page-section

This patch makes CSS changes to try to bring some consistency to
various elements which are similar in the general sense of "white box."
Fieldsets, page-section, etc.

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

Test various pages with page-section, fieldsets, etc.:

- Patron details
- Patron edit
- Patron accounting
- Check Tools -> Patron lists -> New to confirm that there is not a gap
  between the submit button's container and the rest of the form.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31948: DBRev 22.06.00.075
Tomas Cohen Arazi [Fri, 28 Oct 2022 19:36:21 +0000 (16:36 -0300)]
Bug 31948: DBRev 22.06.00.075

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31948: Add timestamp to tmp_holdsqueue table
Katrin Fischer [Fri, 28 Oct 2022 13:56:10 +0000 (13:56 +0000)]
Bug 31948: Add timestamp to tmp_holdsqueue table

With the option to have real time updates to tmp_holdsqueue
a timestamp will be really helpful to help find the most recently
added entries.

To test:
* Place some holds on a record with available items
* Run build_holds-queue.pl
* Verify the hold shows up under circulation > holds queue
* Apply patch
* Run build_holds_queue.pl again
* Verify this works without any issues
* Turn on RealTimeHoldsQueue
* Update pick-up location, add another hold
* Make sure these changes are reflected in the holds queue as well
* Look at the database and verify timestamps are set

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31986: Add page-section to various administration pages
Owen Leonard [Tue, 25 Oct 2022 19:13:06 +0000 (19:13 +0000)]
Bug 31986: Add page-section to various administration pages

This patch adds a page-section div to some administration pages in order
to provide a consistent structure visual contrast. The following pages
are modified:

Additional fields
Funds
Authority types
Authority types -> MARC tag structure
Authority types -> MARC tag structure -> Subfields
MARC bibliographic framework
MARC bibliographic framework -> MARC tag structure
MARC bibliographic framework -> MARC tag structure -> Subfields
MARC Bibliographic framework test
Classification configuration
Currencies and exchange rates
EDI accounts
Library EANs
Item search fields
Koha to MARC mapping
Record overlay rules
Record matching rules
OAI sets configuration
SMTP servers
Z39.50/SRU servers

To test, view each page to confirm that the page-section div visibly
delineates the main content area.

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>
19 months agoBug 31760: Compiled CSS
Tomas Cohen Arazi [Fri, 28 Oct 2022 19:40:21 +0000 (16:40 -0300)]
Bug 31760: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31760: Fix contrast of 'separator'
Martin Renvoize [Thu, 13 Oct 2022 10:49:02 +0000 (11:49 +0100)]
Bug 31760: Fix contrast of 'separator'

This patch increases the contrast of the separator pipe visible in the
staff client upper right corner of the header bar.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31992: Fix t::lib::Mocks::Zebra
Jonathan Druart [Wed, 26 Oct 2022 15:34:10 +0000 (17:34 +0200)]
Bug 31992: Fix t::lib::Mocks::Zebra

This will fix t/db_dependent/www/batch.t and t/db_dependent/www/search_utf8.t

QA - improvement ideas welcome! It's definitely not the best we can do.

Test plan:
  prove t/db_dependent/www/search_utf8.t t/db_dependent/www/batch.t
must return green

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: (follow-up) Fix t/db_dependent/Koha/Items.t
Aleisha Amohia [Thu, 27 Oct 2022 01:13:08 +0000 (01:13 +0000)]
Bug 23012: (follow-up) Fix t/db_dependent/Koha/Items.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: Fix t/db_dependent/Koha/Item.t
Tomas Cohen Arazi [Tue, 25 Oct 2022 17:56:23 +0000 (14:56 -0300)]
Bug 23012: Fix t/db_dependent/Koha/Item.t

With the follow-up changes, the return value is no longer a scalar, but
a hashref, but the tests weren't updated accordingly.

This patch fixes this situation.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30036: Fix db_rev permissions
Tomas Cohen Arazi [Thu, 27 Oct 2022 21:19:27 +0000 (18:19 -0300)]
Bug 30036: Fix db_rev permissions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32011: 2FA - Prevent qr_code to not be generated
Jonathan Druart [Thu, 27 Oct 2022 08:53:06 +0000 (10:53 +0200)]
Bug 32011: 2FA - Prevent qr_code to not be generated

Caught by selenium/authentication_2fa.t

 #   Failed test 'Enforce 2FA setup on first login'
 #   at t/db_dependent/selenium/authentication_2fa.t line 291.Error while executing command: unexpected alert open: Dismissed user prompt dialog: [object Object] at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.
 at /usr/share/perl5/Selenium/Remote/Driver.pm line 356.

There is a 500 in the logs:
 "POST /api/v1/app.pl/api/v1/auth/two-factor/registration HTTP/1.1" 500

That is caused by
[ERROR] POST /api/v1/auth/two-factor/registration: unhandled exception (Mojo::Exception)<<Overflow error. version 8
total bits: 1268  max bits: 1232>>

It's coming from GD::Barcode, in my understanding we should increase 'Version'.

Test plan:
Remove all other subtests from the selenium to speed up its exec, then
run it in a loop. Without this patch the tests fail quite often (1/10),
now it should not fail with this error (maybe another one, see bug
32010)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31993: Improve specificity of authorized values breadcrumbs
Owen Leonard [Wed, 26 Oct 2022 15:11:08 +0000 (15:11 +0000)]
Bug 31993: Improve specificity of authorized values breadcrumbs

This patch adds a link back to the current authorized value category to
the breadcrumbs. The page title has also been modified to match.

To test apply the patch and go to Administration -> Authorized values.

- Click an authorized value category, e.g. CCODE.
- Click "New authorized value for CCODE"
- In the breadcrumbs menu you should see: "Home ->  Administration ->
  Authorized values -> Authorized values for category CCODE -> New
  authorized value.
- The "Authorized values for category CCODE" link should take you back
  to the correct view.
- The page title should match.
- Return to the list of CCODE authorized values and open one for
  editing.
- The breadcrumbs should include a link back to "Authorized values for
  category CCODE"

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>
19 months agoBug 27017: (QA follow-up) Don't die if aqorders.biblionumber is null
Kyle Hall [Thu, 27 Oct 2022 18:03:05 +0000 (14:03 -0400)]
Bug 27017: (QA follow-up) Don't die if aqorders.biblionumber is null

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 27017: Code more defensively in process_invoice
Colin Campbell [Fri, 13 Nov 2020 13:46:13 +0000 (13:46 +0000)]
Bug 27017: Code more defensively in process_invoice

This patch adds a check for ordernumber precence in the EDI Invoice
message lines and skips process if one is not found.

We log the failure as a trace log to allow administrators the oportunity
to track down the issue further.

We also add a trace log to entries to show which bib the invoice line
is receipting to.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31969: (follow-up) Unit tests for Koha::BackgroundJobs->purge
Björn Nylén [Thu, 27 Oct 2022 08:47:56 +0000 (10:47 +0200)]
Bug 31969: (follow-up) Unit tests for Koha::BackgroundJobs->purge

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31969: (follow-up) Move deletion code to Koha::BackgroundJobs->purge for reuse.
Björn Nylén [Wed, 26 Oct 2022 12:45:23 +0000 (14:45 +0200)]
Bug 31969: (follow-up) Move deletion code to Koha::BackgroundJobs->purge for reuse.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31969: Add background queue options to cleanup_database
Björn Nylén [Mon, 24 Oct 2022 13:12:03 +0000 (15:12 +0200)]
Bug 31969: Add background queue options to cleanup_database

This patch adds background queue options to cleanup_database.pl to allow
for purging completed background jobs.

--bg-jobs DAYS Purge all finished background jobs this many days old. Defaults to 1 if no DAYS provided.
--bg-type TYPE What type of background job to purge. Defaults to "update_elastic_index" if omitted
               Specifying "all" will purge all types. Repeatable.

To test:
 1 - Enable elastic search in Koha
 2 - perl misc/maintenance/touch_all_items.pl
 3 - Generate an number of diffrent types of bg-jobs (eg batch_hold_cancel,
     batch_biblio_record_deletion, batch_item_record_deletion)
 4 - Check db and note there are a bunch of diffrent jobs
 5 - Update to make them old
     UPDATE background_jobs SET ended_on = '2022-10-01 00:00:00', status='finished'
 6 - perl misc/cronjobs/cleanup_database.pl
 7 - Note bg-jobs entry shows in help
 8 - perl misc/cronjobs/cleanup_database.pl --bg-jobs 1 -v
 9 - Note that elasticqueue would have been cleared
10 - perl misc/cronjobs/cleanup_database.pl --bg-jobs 1 -v --confirm
11 - Note that number of entries deleted is reported
12 - Attempt to clear other job types, including "all" eg
     perl misc/cronjobs/cleanup_database.pl --bg-jobs 1 --bg-type batch_item_record_deletion  -v --confirm
     perl misc/cronjobs/cleanup_database.pl --bg-jobs 1 --bg-type all  -v --confirm
13 - Confirm in staff interface that jobs are gone:
     http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
     (Uncheck 'Current jobs only')

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30407: Fix sysprefs.sql syntax
Tomas Cohen Arazi [Thu, 27 Oct 2022 17:40:09 +0000 (14:40 -0300)]
Bug 30407: Fix sysprefs.sql syntax

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30407: DBRev 22.06.00.074
Tomas Cohen Arazi [Thu, 27 Oct 2022 16:37:23 +0000 (13:37 -0300)]
Bug 30407: DBRev 22.06.00.074

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30407: (QA follow-up) Replace message with description
Katrin Fischer [Sun, 2 Oct 2022 20:32:36 +0000 (20:32 +0000)]
Bug 30407: (QA follow-up) Replace message with description

Switches "not for loan message" to "not for loan description" to
stay closer to the usual terminology for AV values also used
when managing them.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30407: (QA follow-up) Fix missing TT filter
Katrin Fischer [Sun, 2 Oct 2022 20:28:38 +0000 (20:28 +0000)]
Bug 30407: (QA follow-up) Fix missing TT filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30407: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the...
Emmi Takkinen [Wed, 30 Mar 2022 08:58:46 +0000 (11:58 +0300)]
Bug 30407: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the notforloan values description

This can be used to instruct staff how the item should handled when
it's checked in. For example items notforloan status has been
changed as "Invoiced item" while item has been on loan. When it's
checked in staff sees that they should put item aside for further
processing.

To test:
1. Apply patch and update database if needed
2. Set items notforloan status as -1 (or create new one)
3. Add line "-1: ONLYMESSAGE" to UpdateNotForLoanStatusOnCheckin
4. Check item out for patron.
5. Check item in.
=> Description of notforloan status should be displayed.
=> Confirm notforloan status hasn't changed.

Also prove t/db_dependent/Circulation/issue.t

Sponsored-by: Koha-Suomi Oy
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>
19 months agoBug 30036: (QA follow-up) Add explanation about default value behavior
Tomas Cohen Arazi [Thu, 27 Oct 2022 16:13:55 +0000 (13:13 -0300)]
Bug 30036: (QA follow-up) Add explanation about default value behavior

Devs forgot to mention the default value (empty) is for the current
behavior. This is particularly important as there's really no shipped
XSLT so a niche usage enhancement until related bugs are pushed. Those
only have UNIMARC files, though.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30036: DBRev 22.06.00.073
Tomas Cohen Arazi [Thu, 27 Oct 2022 13:03:50 +0000 (10:03 -0300)]
Bug 30036: DBRev 22.06.00.073

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30036: Fix trivial typo
Tomas Cohen Arazi [Thu, 27 Oct 2022 12:56:14 +0000 (09:56 -0300)]
Bug 30036: Fix trivial typo

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30036: (QA follow-up) Move system preference to OPAC tab
Katrin Fischer [Fri, 7 Oct 2022 11:12:32 +0000 (11:12 +0000)]
Bug 30036: (QA follow-up) Move system preference to OPAC tab

* Moves the AuthorityXSLTOpacResultsDisplay from staff interface to OPAC tab
* Fixes some capitalization opac in the database pref description

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30036: (follow-up) Update system preference description
David Nind [Sun, 11 Sep 2022 17:58:07 +0000 (17:58 +0000)]
Bug 30036: (follow-up) Update system preference description

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30036: Allow XSLT for authority results view in OPAC
jeremy breuillard [Mon, 7 Feb 2022 11:34:52 +0000 (12:34 +0100)]
Bug 30036: Allow XSLT for authority results view in OPAC

This patch adds a syspref to allow customizing the authority results
view at OPAC with XSLT

Test plan:
1. For testing make sure to have at least one or more authorities
   defined
2. OPAC: Home > Authority search(Submit) > Authority search results
   Notice the normal view of results
3. Apply patch
4. INTRA: Home > Administration > System preferences ->find
   "AuthorityXSLTOpacResultsDisplay"
5. Write the path where your file is. You can use the one for intranet:
   .../koha/koha-tmpl/intranet-tmpl/prog/en/XSLT/UNIMARCauthResults.xsl
6. Save changes
7. Repeat step 2 and notice the xslt view of results

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31976: Incorrect default category selected by authorized values page
Owen Leonard [Wed, 26 Oct 2022 15:52:18 +0000 (15:52 +0000)]
Bug 31976: Incorrect default category selected by authorized values page

This patch removes some obsolete code for selecting a default authorized
value category to be shown when the user first arrives on the authorized
values page. This has not been necessary since we switched to an
interface which lists all categories.

NOTE: This bug will not be reproducible if your first authorized value,
alphabetically, has no values associated with it. For instance, if you
delete all authorized values in the AR_CANCELLATION category.

To test, apply the patch and go to Administration -> Authorized values.

In the breadcrumbs menu you should see "Home -> Administration ->
Authorized values."

Clicking any of the authorized value categories in the list should take
you to a view of that category's values.

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>
19 months agoBug 31421: Add tests
Jonathan Druart [Thu, 27 Oct 2022 10:39:20 +0000 (12:39 +0200)]
Bug 31421: Add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31421: Add a limited option to template plugin
Nick Clemens [Thu, 20 Oct 2022 14:13:37 +0000 (14:13 +0000)]
Bug 31421: Add a limited option to template plugin

This adds a specific 'limited' routine to the Categories plugin, and uses
it for the new patron dropdowns

To test:
1 - Limit a patron category to some branches
2 - Sign in not at one of those
3 - Confirm the new patron dropdowns don't include the category

Bug 31421: (follow-up) Add POD

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31421: Do not apply library limits to Categories plugin
Nick Clemens [Thu, 6 Oct 2022 19:13:10 +0000 (19:13 +0000)]
Bug 31421: Do not apply library limits to Categories plugin

This patch simply changes from using 'search_with_library_limits'
to 'search'

The limits I think are intended to prevent users from setting a patron to the wrong category,
they are not meant to hide patrons. Or rather, they don't do that, patrons are returned in search
but cannot be processed. The dropdowns as well won't contain the category, so you can see these
patrons, but not filter by the category

Bug 31422 and bug 31032 point out further issues with limits.

For now, let's fix searching

To test:
1 - Edit Patron category 'Patron/PT'
2 - Try to do a patron search that returns patrons in this category
3 - See 'Processing' and error in JS console: Uncaught TypeError: categories_map[data] is undefined
4 - Apply patch
5 - Restart all and repeate
6 - It works now!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31991: Compiled CSS
Tomas Cohen Arazi [Thu, 27 Oct 2022 12:42:21 +0000 (09:42 -0300)]
Bug 31991: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31991: Restore style of sidebar forms
Owen Leonard [Wed, 26 Oct 2022 14:17:23 +0000 (14:17 +0000)]
Bug 31991: Restore style of sidebar forms

This patch restores the aside{} section of staff-global.scss from before
the staff redesign and makes some tweaks to make it consisten with the
redesign. The goal is to make the spacing of the form more compact but
still readable, and to correct some layout inconsistencies.

The patch also modifies the order filter form to fix the layout of some
checkboxes.

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

Test various pages with sidebar forms to confirm that the form looks
readable and usable. For example:

- Patrons
- Acquisitions -> Invoices
- Tools -> Tags
- Serials -> Subscription search results
- Overdues
- Holds to pull

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>
19 months agoBug 31996: Compiled CSS
Tomas Cohen Arazi [Thu, 27 Oct 2022 12:40:35 +0000 (09:40 -0300)]
Bug 31996: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31996: Make note-style messages consistent with dialogs
Owen Leonard [Wed, 26 Oct 2022 17:37:28 +0000 (17:37 +0000)]
Bug 31996: Make note-style messages consistent with dialogs

This patch modifies the style of divs with the class "note," making them
have the same background color as message dialogs as proposed in Bug
31973.

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

Confirm that the updated style looks good. Some pages where you can find
examples:

- Administration -> Authorized values -> View a categories values.
- Administration -> Search engine cofiguration (with Elasticsearch
  enabled).
- Cataloging -> Batch record deletion -> Submit a list of biblionumbers.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31973: Compiled CSS
Tomas Cohen Arazi [Thu, 27 Oct 2022 12:39:15 +0000 (09:39 -0300)]
Bug 31973: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31973: Restore background color to message-style alerts
Owen Leonard [Tue, 25 Oct 2022 15:32:50 +0000 (15:32 +0000)]
Bug 31973: Restore background color to message-style alerts

This patch restores the background color to message-style alerts, those
which use the markup <div class="dialog message">. These alerts should
stand out more to the user.

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

- Test areas which use the message-style dialog. Perhaps the easiest
  example is to try to view a bibliographic record which doesn't exist:

  /cgi-bin/koha/catalogue/detail.pl?biblionumber=1234567890

- It can also be found as a confirmation when deleting a basket in
  Acquisitions, deleting a patron attribute type in Administration,
  updating a Z39.50 server in Administration, etc.

- Confirm that the alert looks correct and is suitable visible.

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>
19 months agoBug 31952: (QA follow-up) Fix capitalization: Local Use
Katrin Fischer [Wed, 26 Oct 2022 22:21:22 +0000 (22:21 +0000)]
Bug 31952: (QA follow-up) Fix capitalization: Local Use

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31952: Fix broken layout on system pref search
Lucas Gass [Mon, 24 Oct 2022 21:50:04 +0000 (21:50 +0000)]
Bug 31952: Fix broken layout on system pref search

TO test:
1. Do an empty system pref search
2. Layout is broken.
3. Apply patch, restart_all
4. Do another empty system pref search, the layout should be fixed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31910: Fix list and add page-section to request-article.tt
Lucas Gass [Mon, 24 Oct 2022 22:17:08 +0000 (22:17 +0000)]
Bug 31910: Fix list and add page-section to request-article.tt

To test:
1. Apply patch
2. Look at article request form and ensure the fields and labels look good.
3. Ensure there are no more bullet points on the list.
4. Make sure the page-section div around the item selection looks good.

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>
19 months agoBug 31905: Fix button spacing on holds page
Owen Leonard [Wed, 26 Oct 2022 11:19:07 +0000 (11:19 +0000)]
Bug 31905: Fix button spacing on holds page

This patch makes minor modifications to the holds template in order to
improve the display of the hold buttons related to existing holds.

The patch also adds "display:none" to the hold cancellation fieldset so
there isn't a flash of content before JavaScript hides it.

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

- Place one or more holds on the record.
- View the holds for that record.
- Under the "Existing holds" heading there should be a toolbar of
  buttons which sits above the page-section div. The buttons should be
  well spaced.
- If you have cancellation reasons defined in authorized values, the
  "Cancel selected" button should correctly trigger a modal with the
  option to specify a cancellation reason.
- The display should work well for any setting of the HoldsSplitQueue
  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>
19 months agoBug 31162: (follow-up) Fix www/batch.t
Martin Renvoize [Wed, 26 Oct 2022 07:35:38 +0000 (08:35 +0100)]
Bug 31162: (follow-up) Fix www/batch.t

This patch updates the t/db_dependent/www/batch.t test for the
change of navigation.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31162: (follow-up) Fix Mocks/Zebra.pm
Martin Renvoize [Wed, 26 Oct 2022 07:30:55 +0000 (08:30 +0100)]
Bug 31162: (follow-up) Fix Mocks/Zebra.pm

This patch updates the t/lib/Mocks/Zebra.pm testing module for the
change of navigation.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoRevert "Bug 23012: get_lostreturn_policy returns a scalar"
Tomas Cohen Arazi [Tue, 25 Oct 2022 17:36:45 +0000 (14:36 -0300)]
Revert "Bug 23012: get_lostreturn_policy returns a scalar"

This reverts commit c2fee12cd0f652b16929eb503793e3594e778a23.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 25387: The order of authority subfield is not sent over to bibliographic record
Marion Durand [Fri, 8 Oct 2021 14:58:36 +0000 (16:58 +0200)]
Bug 25387: The order of authority subfield is not sent over to bibliographic record

When creating an authority record there is the possibility to reorder
the subfield. However this order is not sent back to the bibliographic
records when using this authority in a bibliographic record.

This patch make the order of subfield be sent back to bibliographic
record when the autority is used.
Field that are fill are sent to the begining of the bibliographic record
in the same order as in the authority record.

Test plan:
1- Find or create an authority record and reorder some subfield
2- Use this authority in a bibliographic record
3- Observe that the order of the subfield is not transferred from the
   authority record to the bibliographic record
4- Apply the patch
5- Repeat step 1 and 2 again
6- Observe that the order of the subfield is now transferred from the
   authority record to the bibliographic record

https://bugs.koha-community.org/show_bug.cgi?id=22666

Signed-off-by: George Veranis <gveranis@dataly.gr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls
Jonathan Druart [Wed, 20 Jul 2022 07:38:57 +0000 (09:38 +0200)]
Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls

We are seeing the following lines several times in the codebase
  $cache->clear_from_cache("default_value_for_mod_marc-");

But values are never set for this key.

Test plan:
Ask you, "Is the above correct?"
Use the correct 'git grep' and 'git log' and confirm the assertion.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30952: Fix selenium/basic_workflow.t
Jonathan Druart [Tue, 25 Oct 2022 10:24:22 +0000 (12:24 +0200)]
Bug 30952: Fix selenium/basic_workflow.t

Error while executing command: no such element: Unable to locate element: //*[@id="circ_returns_checkin"]/div[2]/div[1]/div[2]/button at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30952: Fix selenium/administration_tasks.t
Jonathan Druart [Tue, 25 Oct 2022 10:20:58 +0000 (12:20 +0200)]
Bug 30952: Fix selenium/administration_tasks.t

Cannot wait more for element '//input[@type="submit"]' to be visible at /kohadevbox/koha/t/lib/Selenium.pm line 189.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31609: JavaScript error on Additional contents main page
Owen Leonard [Fri, 23 Sep 2022 14:22:37 +0000 (14:22 +0000)]
Bug 31609: JavaScript error on Additional contents main page

This patch makes a minor modification to the JavaScript
on the Additional contents page to prevent an error when
there are no tabs present on the page.

The JS needs an additional check so that it doesn't run
when there are no tabs.

To test you should have more than one language installed.

- Before the patch, you would see a JavaScript error in
  the console: "Uncaught TypeError: can't access property
  "hash", firstTab[0] is undefined."
- Apply the patch and go to Tools -> Additional
  contents.
- With the patch applied there should be no error on the
  additional contents main page.
- Try creating or editing additional contents entries to
  confirm that the interface still works correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 25716: (QA follow-up) Make sure a comment doesn't break tests
Tomas Cohen Arazi [Mon, 24 Oct 2022 21:52:35 +0000 (18:52 -0300)]
Bug 25716: (QA follow-up) Make sure a comment doesn't break tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: get_lostreturn_policy returns a scalar
Tomas Cohen Arazi [Mon, 24 Oct 2022 21:36:46 +0000 (18:36 -0300)]
Bug 23012: get_lostreturn_policy returns a scalar

On commit 4d994773f83468b561896939f16131d0332d9cfc
Koha::Item->_set_found_trigger gets the call to get_lostreturn_policy()
changed so it expects a hashref instead of the scalar it returns. This
patch adjusts it back.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 24381: DBRev 22.06.00.072
Tomas Cohen Arazi [Mon, 24 Oct 2022 20:56:06 +0000 (17:56 -0300)]
Bug 24381: DBRev 22.06.00.072

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 24381: Update db_rev to new style
Tomas Cohen Arazi [Mon, 24 Oct 2022 20:53:46 +0000 (17:53 -0300)]
Bug 24381: Update db_rev to new style

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 24381: (follow-up) Add USE statements
Nick Clemens [Thu, 22 Sep 2022 21:30:57 +0000 (21:30 +0000)]
Bug 24381: (follow-up) Add USE statements

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 24381: (follow-up) Notice improvements
Martin Renvoize [Tue, 13 Oct 2020 11:28:31 +0000 (12:28 +0100)]
Bug 24381: (follow-up) Notice improvements

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 24381: Update notice params
Martin Renvoize [Thu, 16 Jul 2020 16:01:50 +0000 (17:01 +0100)]
Bug 24381: Update notice params

If the update to catch defaults fails, we need to attempt to update
renamed template variables

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 24381: Update notices if defaults used
Martin Renvoize [Thu, 16 Jul 2020 13:35:43 +0000 (14:35 +0100)]
Bug 24381: Update notices if defaults used

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 24381: Update sample notices
Martin Renvoize [Thu, 16 Jul 2020 11:01:30 +0000 (12:01 +0100)]
Bug 24381: Update sample notices

This patch update the sample notices for new installs

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: DBRev 22.06.00.071
Tomas Cohen Arazi [Mon, 24 Oct 2022 20:45:45 +0000 (17:45 -0300)]
Bug 23012: DBRev 22.06.00.071

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: (QA follow-up) Add exec flag to db update
Nick Clemens [Mon, 24 Oct 2022 11:20:38 +0000 (11:20 +0000)]
Bug 23012: (QA follow-up) Add exec flag to db update

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: (QA follow-up) No need to create and delete rules for branch
Nick Clemens [Mon, 24 Oct 2022 11:17:48 +0000 (11:17 +0000)]
Bug 23012: (QA follow-up) No need to create and delete rules for branch

The tests create a new branch to make sure one exists without rules. We then add a rule
and delete it. We can simply create the new branch and never assign a rule

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: (QA follow-up) Combine method to get both values
Nick Clemens [Mon, 24 Oct 2022 11:13:32 +0000 (11:13 +0000)]
Bug 23012: (QA follow-up) Combine method to get both values

The code for get_processingreturn_policy was very similar to
get_lostreturn_policy. Combining the two methods allows for use of
get_effective_rules which uses get_effective_rule_value which is cached.
This should reduce lines of code and improve performance

Tests updated and adjusted as well

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: Apply processing fee return policy when lost item found
Aleisha Amohia [Wed, 12 Oct 2022 04:23:42 +0000 (04:23 +0000)]
Bug 23012: Apply processing fee return policy when lost item found

This enhancement gives the ability to set a policy for the lost item
processing fee that may get charged additional to the lost item
replacement cost. The processing fee can be:
- refunded
- refunded if unpaid
- kept

To test:

Set-up

1. Find an item, Item A. Go to Administration -> Item types and edit the
item type for Item A. Add a default replacement cost and a processing
fee and Save.
2. Go to Administration -> system preferences and set the following:
- WhenLostChargeReplacementFee: Charge
- BlockReturnOfLostItems: Don't block
3. Scroll down to the default lost item fee refund on return policy. Set
the refund lost item replacement fee policy to 'refund lost item charge'.
4. Edit Item A and set a replacement cost.

Reproduce

5. Check out Item A to Patron A.
6. Click the barcode to view Item A's information. Edit Item A and set
the Lost status to 'lost'.
7. Go back to Patron A's checkouts. The item should now be checked in
with two new charges applied - a lost item fee (the item's replacement
cost) and a lost item processing fee (set in item types).
8. Check in Item A to mark it as found.
9. Go back to Patron A's account. Notice the lost item fee has been
refunded, but the processing fee remains.
10. Manually pay or write off the processing fee. This enhancement
removes the need for this manual step.

11. Apply the patch and restart services

Test with lost item - refund

12. Go to Administration -> circulation and fines rules. Scroll down to
the default lost item fee refund on return policy. Notice there is now a
refund lost item processing fee policy. Set this to 'refund lost item
processing charge'.
13. Repeat steps 6 to 9.
14. Go back to Patron A's account. Both the lost item fee and processing
fee should have been refunded.

15. Repeat steps 6 to 8 (do not check it yet).
16. Go back to Patron A's account. Pay the processing fee.
17. Repeat step 9.
18. Go back to Patron A's account. Both the lost item fee and processing
fee should have been refunded (you'll now be in a credit because the
paid processing fee was also refunded).

Test with lost item - refund_unpaid

19. Go to Administration -> circulation and fines rules. Scroll down to
the default lost item fee refund on return policy. Notice there is now a
refund lost item processing fee policy. Set this to 'refund lost item
processing charge (only if unpaid)'.
20. Repeat steps 6 to 9.
21. Go back to Patron A's account. Both the lost item fee and processing
fee should have been refunded.

22. Repeat steps 16 to 19.
23. Go back to Patron A's account. The lost item fee should have been
refunded but not the processing fee, as this was already paid.

Test with lost item - leave

24. Go to Administration -> circulation and fines rules. Scroll down to
the default lost item fee refund on return policy. Notice there is now a
refund lost item processing fee policy. Set this to 'leave lost item
processing charge'.
25. Repeat steps 6 to 9.
26. Go back to Patron A's account. The lost item fee and processing fee
should have been refunded but not the processing fee.

Other tests

27. Confirm tests pass
- t/db_dependent/Koha/Item.t
- t/db_dependent/Koha/CirculationRules.t

Sponsored-by: Auckland University of Technology
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: Set policy for lost item processing fee
Aleisha Amohia [Wed, 12 Oct 2022 04:22:31 +0000 (04:22 +0000)]
Bug 23012: Set policy for lost item processing fee

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: Show the PROCESSING_FOUND account credit type
Aleisha Amohia [Wed, 12 Oct 2022 04:11:33 +0000 (04:11 +0000)]
Bug 23012: Show the PROCESSING_FOUND account credit type

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23012: Database updates for PROCESSING_FOUND account credit type
Aleisha Amohia [Wed, 12 Oct 2022 04:01:20 +0000 (04:01 +0000)]
Bug 23012: Database updates for PROCESSING_FOUND account credit type

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 22321: (follow-up) Fix number of planned tests in Illrequests.t
Katrin Fischer [Mon, 8 Aug 2022 22:09:34 +0000 (22:09 +0000)]
Bug 22321: (follow-up) Fix number of planned tests in Illrequests.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 22321: Fix store() crash when modifying borrowernumber of a new ILL request
Lari Taskula [Tue, 22 Feb 2022 14:13:58 +0000 (14:13 +0000)]
Bug 22321: Fix store() crash when modifying borrowernumber of a new ILL request

To test:
1. prove t/db_dependent/Illrequests.t

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tried to change the borrowernumber connected to an ILL request
and checked that the associated hold was updated to the new
patron as well.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 22321: Unit test for new()->borrowernumber()->store()
Lari Taskula [Tue, 22 Feb 2022 14:08:34 +0000 (14:08 +0000)]
Bug 22321: Unit test for new()->borrowernumber()->store()

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 22321: Allow managing the borrowernumber tied to ILL request
Lari Taskula [Mon, 14 Feb 2022 11:21:11 +0000 (11:21 +0000)]
Bug 22321: Allow managing the borrowernumber tied to ILL request

Sometimes an ILL request is connected to the wrong borrower, and it
would be nice to be able to connect it to the right one.

In Swedish ILL the cardnumber of the patron connected with an ILL
request is entered into the central Libris system and then propagated
to Koha through the Libris API. This can lead to errors, and we have
created a dummy "ILL patron" to catch these. It would then be good
to be able to connect the ILL to the right patron in Koha.

This commit makes it possible to edit illrequests.borrowernumber.

To test:
1. Apply patch
2. Create two patrons, A and B
3. Create a new ILL request for patron A
4. Add a hold for patron A where biblionumber is the biblio tied
   to this ILL request
5. Go to
cgi-bin/koha/ill/ill-requests.pl?method=edit_action&illrequest_id=161
6. Observe Patron ID is editable
7. Change borrowernumber to patron B's borrowernumber
8. Click save
9. Observe ILL request is now for patron B
10. Go to patron B's details at
cgi-bin/koha/members/moremember.pl?borrowernumber=B_borrowernumber
11. At the bottom section of the page, click 1 Hold(s)
12. Observe the hold you placed at step 4 has transferred to
    patron b

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 22321: Update holds borrowernumber when ILL request borrowernumber changes
Lari Taskula [Mon, 14 Feb 2022 11:16:31 +0000 (11:16 +0000)]
Bug 22321: Update holds borrowernumber when ILL request borrowernumber changes

To test:
1. prove t/db_dependent/Illrequests.t

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 22321: Add unit tests
Lari Taskula [Mon, 14 Feb 2022 11:14:36 +0000 (11:14 +0000)]
Bug 22321: Add unit tests

To test:
1. prove t/db_dependent/Illrequests.t
2. Observe test failure

    1..3
    ok 1 - before change, original borrowernumber found
    not ok 2 - after change, changed borrowernumber found in holds
    #   Failed test 'after change, changed borrowernumber found in holds'
    #   at t/db_dependent/Illrequests.t line 167.
    #          got: '3786'
    #     expected: '3787'
    ok 3 - after change, changed borrowernumber found in illrequests
    # Looks like you failed 1 test of 3.
not ok 4 - store borrowernumber change also updates holds

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31553: Ensure news item content field is always editable
Alex Buckley [Tue, 13 Sep 2022 02:14:22 +0000 (14:14 +1200)]
Bug 31553: Ensure news item content field is always editable

Set a padding at the bottom of the news item editor body.

This is a tricky bug to replicate.

Test plan:
1. Set 'AdditionalContentsEditor' syspref = 'a WYSIWYG editor
(TinyMCE)'.

2. Select multiple languages in the 'OPACLanguages' system preference.

3. Go to: Tools > News.

4. Create a new news item. Switch between the different language tabs.

5. Confirm you can always input into the content field in all languages.

6. Edit an exiting news item. Switch between different language tabs.

7. Confirm you can always input into the content field in all languages.

Sponsored-by: Toi Ohomai Institute of Technology, New Zealand
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>
19 months agoBug 31730: (QA follow-up) Only link category name
Katrin Fischer [Sat, 15 Oct 2022 19:41:03 +0000 (19:41 +0000)]
Bug 31730: (QA follow-up) Only link category name

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31730: Link to authorized value interface when an authval is mentioned in preferences
Owen Leonard [Mon, 10 Oct 2022 17:09:27 +0000 (17:09 +0000)]
Bug 31730: Link to authorized value interface when an authval is mentioned in preferences

This patch adds links to the authorized value interface anywhere an
authorized value category is mentioned in a system preference
description.

To test, apply the patch and go to Administration -> System preferences.

- Check these preferences:
  Circulation -> ILLHiddenRequestStatuses
  Circulation -> BundleLostValue
  Circulation -> BundleNotLoanValue
  Circulation -> ClaimReturnedLostValue
  Accounting -> RequirePaymentType
- Confirm that the link in the description of each preference takes you
  to the correct authorized value category.

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>
19 months agoBug 31495: Allow opac-page when enforcing GDPR policy
Marcel de Rooy [Wed, 31 Aug 2022 11:57:16 +0000 (11:57 +0000)]
Bug 31495: Allow opac-page when enforcing GDPR policy

Test plan:
Add some page under Additional contents.
Enforce GDPR policy.
Test with user that has no consent (yet or anymore).
Check if you can reach additional contents with opac-page.pl.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 7960: Add class to item type descriptions so they can be hidden with CSS
Aleisha Amohia [Sun, 1 Jul 2018 23:33:07 +0000 (23:33 +0000)]
Bug 7960: Add class to item type descriptions so they can be hidden with CSS

This patch adds the class "itypetext" around item type descriptions so
they can easily be hidden with CSS.

To test:
1. Navigate to the pages listed below to confirm that the text
descriptions do show.
2. Add
.itypetext { display:none; }
to IntranetUserCSS and OPACUserCSS system preferences and save.
3. Go back to the pages listed below and confirm that the text
descriptions DO NOT show.

= STAFF CLIENT =
 - catalogue/advsearch.tt
 - catalogue/detail.tt
 - catalogue/results.tt
 - reserve/request.tt
 - virtualshelves/shelves.tt
= OPAC =
 - opac-advsearch.tt
 - opac-detail.tt
 - opac-readingrecord.tt
 - opac-reserve.tt
 - opac-shelves.tt
 - opac-user.tt

Refer to David Nind's test notes from Comment 23 for a more detailed
plan for acessing these pages.

Sponsored-by: Catalyst IT
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
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>
19 months agoBug 31940: Add page-section to library-groups
Martin Renvoize [Mon, 24 Oct 2022 11:33:06 +0000 (12:33 +0100)]
Bug 31940: Add page-section to library-groups

This patch adds the page-section div around each library-groups table.

Test plan
1) Check that the 'card' views appear appropriates on the library groups
   maangement page

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31923: Add warning sign and span
Caroline Cyr La Rose [Fri, 21 Oct 2022 21:45:59 +0000 (17:45 -0400)]
Bug 31923: Add warning sign and span

This patch adds a small warning sign before the sentence and also puts
the sentence inside a span.

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>
19 months agoBug 31923: 'Ignore' tab description is misleading
Caroline Cyr La Rose [Fri, 21 Oct 2022 21:34:13 +0000 (17:34 -0400)]
Bug 31923: 'Ignore' tab description is misleading

This patch modifies the description of the 'Ignore' tab in
MARC bibliographic and authority framework administration
to add that not only does the 'ignored' subfield not appear
in the editor, but the subfield will also be deleted from the
record.

To test:
1. Go to Administration > MARC bibliographic framework
2. Click 'Actions' next to any framework and choose 'MARC structure'
3. Click 'Actions' next to any field and choose 'Edit subfields'
4. Check the hint/description under 'Managed in tab' and make sure it
   - makes sense
   - is written in correct english (syntax and spelling)
   - mentions that the subfield's value will be deleted from the record
5. Go to Administration > Authority types
6. Redo steps 2-4 for authority frameworks

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>