Commit graph

54354 commits

Author SHA1 Message Date
6692f95062
Bug 35430: Move 'Stage' into StockRotation directory
Cleaning up a little, I opt to move the 'Stage' controller under a new
StockRotation parent directory.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:24 +02:00
Janusz Kaczmarek
fb2e54b0c3
Bug 36976: Warning 'Argument "" isn't numeric in numeric' in log when merging bibliographic records
When merging bibliographic records, Koha generates warning:

[WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81.

in [plack-]intranet-error.log.

This is because $tagslib->{$fieldtag}->{'tab'} -- for a tag, not for a
subfield --is (always?) an empty string (cf.
C4::Biblio::GetMarcStructure : $res->{$tag}->{tab} = ""), and in
Koha::Util::MARC::createMergeHash it is compared numerically with 0.

Test plan:
==========
1. From biblio search result page, selact two records with the checkboxes
   and start a merge (Edit -> Merge records).  Proceed with merging.
   After the merge, controll the content of the plack-intranet-error.log
   (when using plack -- standard in ktd).  Note the lines:
   [WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81.
2. Apply the patch; restart_all.
3. Repeat p. 1.  There should be no fresh warnings.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:24 +02:00
fd7130beca
Bug 37038: (QA follow-up) Replace \> by -gt
Note that -gt is the bash integer comparison and > is the
lexical one:
$ if [ '1' \> '09' ]; then echo true; fi
true
$ if [ '1' -gt '09' ]; then echo true; fi

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Added the dev/null redirection to suppress warn in bin/sh.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:23 +02:00
Janusz Kaczmarek
bc92152e2f
Bug 37038: koha-elasticsearch creates a file named 0
After execution of koha-elasticsearch command a file named 0 remains in
the current directory.

Inside the single parentheses, the character '>' is treated as a file
redirection, not as a comparison operator.

Test plan:
==========
1. Have a test installation with Elasticsearch.  As root, perform:
   ./debian/scripts/koha-elasticsearch --rebuild kohadev
   When the command finishes, check the contents of the current
   directory (ls -ltr | tail).  You sould notice a fresh file named '0'
2. Apply the patch. Delete the file named 0.
3. Repeat p. 1.  There should be no file named 0 now.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:23 +02:00
7c5a96e6eb
Bug 36936: Squash warning in bookings test
Simple catch for the warning throwing by DuplicateID exceptions in the
bookings.t api tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:22 +02:00
6caedbfc00
Bug 14565: Allow koha-run-backups to backup an instance called demo
We all have a `demo` instance somewhere. It is so weird that the default
script for backing up Koha has a hardcoded exclusion for instances
called like that. This patch fixes that.

To test:
1. Add a demo instance:
   $ ktd --shell
  k$ sudo koha-create --create-db demo
2. Run:
  k$ sudo debian/scripts/koha-run-backups
3. Check the backups:
  k$ ls -l /var/spool/koha/demo/
=> FAIL: No backup for the demo instance
3. Apply this patch
4. Repeat 2
=> SUCCESS: Backup made!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:22 +02:00
8a90ec5432
Bug 36944: Mock AutoLocation in 2FA subtest
Test plan:
Enable AutoLocation in prefs.
Run Auth.t. Should pass now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:21 +02:00
3e1d8b0628
Bug 32575: Add an empty text body to fix multipart/mixed handling
By adding an empty text body, we force Email::Stuffer/Email::MIME
to use multipart/mixed handling for the attachment instead of forcing
a single part (ie direct attachment) email, which is not consistently
handled by different email clients.

An empty text body is language-neutral (ie not imposing English),
and it allows SMTP servers to inject organisational footers into
the email (e.g. confidentiality notices).

Signed-off-by: Magnus Enger <magnus@libriotech.no>
I have tested this solution in production, and it works for me.

Bug 32575: Tidy patch

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:20 +02:00
05432982cf
Bug 36741: Skip auto_too_soon issues in auto renew digest
This change adds a line to skip auto_too_soon issues/checkouts
in the auto renew digest template.

Since auto_too_soon do not trigger notifications and don't require
any special action, let's skip them in the breakdown of checkouts in
the AUTO_RENEWALS_DGST email.

Test plan:
0. Apply the patch
1. reset_all (in koha-testing-docker)
2. Note the following line in the AUTO_RENEWALS_DGST template:
[% NEXT IF (checkout.auto_renew_error == 'auto_too_soon') %]

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:20 +02:00
5f156ad3df
Bug 37187: Fix deletion of label batches and label templates
This patch uses the new form-submit JS to convert the label management
deletion link from a GET operation to POST.

To test, apply the patch and go to Cataloging -> Label creator.

- Click Manage -> Label batches. Create a batch if necessary.
- Click the "Delete" button in the "Actions" column. You should get a
  confirmation message, "Are you sure you want to delete this?"
  - Test both the confirming and cancelling.
- Perform the same test with Manage -> Label templates.
- From the Manage -> Label batches page, click "edit" on one of the
  batches.
- Right above the "Items in batch number X" is a toolbar which should
  have a button, "Delete batch." Test that it works correctly to delete
  the batch.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:19 +02:00
b18664ec45
Bug 28664: (follow-up) Throw exception if debt if VOID
This patch adds an exception when an attempt is made to refund against a
VOID debit.

Test plan
1) Run the included unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:19 +02:00
a47474e3d7
Bug 28664: Prevent refunds against void lines
With the introduction of double entry accounting for VOID actions, we
need to add an additional filter to the 'Issue refund' button appearance

Test plan
1/ Add a debt
2/ Pay the debt
3/ Void the payment
4/ Confirm that with the patch applied the 'Issue refund' button doesn
not appear on the 'Void' accountline.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:18 +02:00
Sam Lau
4801037abe
Bug 37044: Added library branch to SCO OPAC message
This patch simply adds the correct branch at the end of an OPAC message on the SCO page.

To Test:
1) From the staff interface, click on a patron and add an OPAC message
   to their account.
2) Log into the SCO with this patron.
   (http://localhost:8080/cgi-bin/koha/sco/sco-main.pl)
3) Notice how in the "Messages for you" at the top, you will see the
   message, however, at the timestamp, it says something like "Written
   on 06/06/2024 by " w/o listing the library that sent it.
4) Apply patch
5) Log back into SCO module
6) Note that now in the message timestamp, it correctly lists the
   library that sent the message.
7) Sign-off

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:42 +02:00
2b50c3fc3c
Bug 36767: Add a hint to show the new default of 22
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:42 +02:00
09d2bdf90a
Bug 36767: Default port should be set to 22
This patch sets a default value for the EDI account form for the upload and download ports

Test plan:
1) Try to create an EDI account without setting the upload or download ports
2) The form will crash
3) Apply patch and restart_all
4) Try again, the form should submit
5) In your new EDI account, you should see the value of 22 for both ports

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:41 +02:00
Caroline Cyr La Rose
fb918a53fe
Bug 36952: Add 370 to authority index (MARC21)
This enhancement adds field 370 to MARC21 default authority
index mappings.

To test:
1. Import the attached .mrc file
2. Go to Authorities
3. Search 'Main heading' for quebec
   --> 1 result (normal)
4. Search 'Entire record' for quebec
   --> 1 result
5. Go to the OPAC > Authority search
6. Redo steps 3 and 4
   --> Same results
7. Apply patch
8. Reindex authorities (in KTD shell:
   koha-elasticsearch --rebuild -a -v -r kohadev)
9. Redo step 3
   --> Still 1 result (normal)
10. Redo step 4
    --> 2 results
11. Redo step 5-6
    --> Same results as steps 9-10

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:41 +02:00
Caroline Cyr La Rose
477b93e3ff
Bug 36953: Add 678 to authority index (MARC21)
This enhancement adds field 678 to the default MARC21 authority index mappings.

To test:
1. Import the attached .mrc file
2. Go to Authorities
3. Search "Entire record" for innu
   --> No results
4. Go to the OPAC > Authority search
5. Search "in the complete record" for innu
   --> No results
6. Apply patch
7. Reindex authorities (in KTD shell:
   koha-elasticsearch --rebuild -a -v -r kohadev)
8. Redo step 3
   --> 1 result
9. Redo steps 4-5
   --> 1 result

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:40 +02:00
be9d5605b3
Bug 36912: Add more spans/classes to member-display-address-style.inc
To test:
1. APPLY PATCH
2. Make an AV for ROADTYPE
3. Find a patron record and make sure the entire 'Main address' portin is filled out. ( street number, street type, address, address 2, ZIP, City, State, and Country )
4. For easier testing you can add this test CSS to IntranetUSerCSS:

.patronaddress1 {
  .streetnumber {
  	color: blue;
  }
  .address1 {
  	color: green;
  }
  .roadtype {
    color: pink;
  }
}

.patronaddress2 {
	color: lightgreen;
}

.patroncity {
  .city {
     color: orange;
  }
  .state {
     color: brown;
  }
  .zipcode {
     color: limegreen;
  }
  .comma {
     color: teal;
  }
  .country {
     color: red;
  }
}

5. Go to the patron's record and look aty the brief info. you should see classes for everything in the address block. If you added the CSS from above everything should be colored differently.
6. Find the system pref 'AddressFormat' and test everything in US style, French style, and German style.

Signed-off-by: Laurae <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:39 +02:00
David Nind
d5f9493696
Bug 36777: Add new section for lost item circulation preferences
This moves lost item circulation system preferences from
'Checkout policy' to their own 'Lost item policy' section.

It also fixes a capitalization issue - 'Fines Policy' to
'Fines policy'.

Test plan:
1. View the circulation system preferences page (Administration >
   System preferences > Circulation).
2. Search the page, and note that there are several system
   preferences about lost items in the 'Checkout policy' section.
3. Apply the patch.
4. Refresh the page.
5. Note that there is now a new section heading 'Lost item policy'.
   The system preferences previously under 'Checkout policy' are
   now located in this new section.
6. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:39 +02:00
928681a24c
Bug 37002: Correct several HTML markup errors
This patch makes several minor corrections to HTML markup in the
bibliographic detail page template and related include files. This
corrects the following validator errors:

- Stray end tag a.
- Bad value true for attribute disabled on element select.
- Bad value true for attribute disabled on element input.
- No space between attributes.
- Duplicate attribute class.
- The value of the for attribute of the label element must be the ID of
  a non-hidden form control.

The patch is simple enough that an inspection of the patch is probably
enough, but following is a detailed test plan of the affected areas:

- Apply the patch and view the bibliographic detail page in the
  staff interface.
- Under the "Edit" menu in the toolbar, these options should still work
  correctly:
  - Modify record using template
  - Edit items in a batch
  - Delete items in a batch
- Click the "Items" link in the sidebar and find the "Bookable" setting
  for the title's items. Make at least one item bookable and return to
  the detail page.
- Click the "Place booking" button in the toolbar and confirm that you
  can successfully place the booking.
- If you have access to Novelist, confirm that Novelist content displays
  correctly on the detail page.
- Turn on the "EnableItemGroups" preference.
- On the detail page, open the "Item groups" tab and click the "New item
  group" button.
  - In the modal, the "Name" and "Display order" labels give focus to
    the corresponding form field when clicked.
  - Create an item group.
- Under the holdings tab, select one or more items and click "Add/move
  to item group".
  - In the modal, clicking the "Item group" label should give focus to
    the dropdown.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:38 +02:00
dc154e3dd2
Bug 36895: Fix background job link
This patch fixes the missing job id in the links from the import KBART file page

Test plan:
1) Import a KBART file to get the message at the top of the screen.
2) The message should include a link on the text "see progress"
3) Click the link, it should just take you to the background jobs page
4) Apply patch
5) yarn build
6) Hard refresh the browser
7) Repeat steps 1-3
8) It should correctly take you to the background job

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:38 +02:00
984960351e
Bug 36909: Eliminate duplicate ID in cookie consent markup
This patch changes markup and CSS in the OPAC and staff client to
eliminate HTML validator warnings about duplicate ids.

To test, apply the patch and rebuild all CSS (Bug 36909: Eliminate
duplicate ID in cookie consent markup).

- If necessary, set the "CookieConsent" system preference to "Require."
- Open the OPAC in a new private window (to prevent previous consents
  from hiding the consent messages).
- You should see a cookie consent bar across the bottom of the page. It
  should look correct, and its contents should reflow well at various
  browser widths.
- Click "Accept all cookies."
- In the header you should now see a "Your cookies" link.
- Click it and confirm that the contents of the modal look correct and
  reflow well at various browser widths.

- Perform the same tests in the staff interface.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:37 +02:00
66981d89c2
Bug 36905: Terminology: home locations / home collections
This patch removes the unnecessary word "home" from several aria-lablels
in OPAC facets. I think they were copy-paste errors.

To test, apply the patch and perform a catalog search in the OPAC.

Since the aria-label isn't visible in the interface, you can check the
source to confirm that the "Show more" links for locations, collections,
and languages say "Show more locations," "Show more collections," and
"Show more languages."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:36 +02:00
149412cb62
Bug 37198: Improve GetPreparedLetter documentation
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:36 +02:00
0e1289d014
Bug 36141: Add classes to CAS text on OPAC login page
This enhancement makes it easier for libraries to change the CAS-related messages on the OPAC login page.

It moved the invalid CAS login message above the CAS loging heading,
like for Shibboleth login.

Test plan :
1) Enable system preference 'casAuthentication'
2) Restart all caches (restart_all in koha-testing-docker)
3) Go to OPAC, logged out
4) Click on 'Log in to your account'
5) In the staff interface, edit the OPACUserJS system preference. Add the following JS and Save:
   $(".cas_invalid").text("Test changing the invalid CAS login message.");
   $(".cas_title").text("Test changing the CAS login heading.");
   $(".cas_url").text("Test changing the CAS account link text.");
   $(".cas_url").after(' <i class="fa fa-globe" aria-hidden="true"></i>');
6) Refresh the OPAC and confirm the text changes to reflect your JS.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:35 +02:00
8d898f1746
Bug 36911: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:35 +02:00
002fbdcc62
Bug 36911: Reindent circ-menu.inc
This patch reindents the circ-menu include file so that it has
consistent indentation. These changes should have no visible effect on
the page.

To test, apply the patch and enable the 'CircSidebar' system
preference if necessary.

- View any circulation page, including the checkout page, to confirm
  that the left-hand sidebar menu is unchanged.
- Test with the 'patronimages' system preference both on and off.

Viewing the diff while ignoring whitespace changes should show only
places where a line break was added.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 17:24:34 +02:00
46c1b9e9bf
Bug 35197: (QA follow-up) Add note about intentions
This is the beggining of a wider series of developments aimed at
retifying overlapping features.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:59 +02:00
5cfc8b58a6
Bug 35197: Rename to 'Extended attribute types'
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:58 +02:00
f8b8223353
Bug 35197: (QA follow-up) Add 'additional_fields' tag description in docs
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:58 +02:00
f15ddba63e
Bug 35197: (QA follow-up): Fix permissions specification
Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:57 +02:00
5d4d3bb1b7
Bug 35197: (QA follow-up): Fix pasted comment
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:56 +02:00
c6f74f753f
Bug 35197: (QA follow-up): Update tablename
prove t/db_dependent/api/v1/additional_fields.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:56 +02:00
629e62ed28
Bug 35197: Field name consistency
This patch adds a to_api_mapping and updates the yaml definitions to be
ensure we are consistent with modern best practice for our api field
names.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:55 +02:00
4d40f5f2b9
Bug 35197: Add tests
prove t/db_dependent/api/v1/additional_fields.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:55 +02:00
3c87aa8c7f
Bug 35197: Add additional_fields REST API endpoint
Test plan:
1) Apply patch, restart plack 'koha-plack --restart kohadev'
2) Visit /api/v1/additional_fields?tablename=aqinvoices - Notice its empty
3) Visit /cgi-bin/koha/admin/additional-fields.pl?tablename=aqbasket and add a new additional field
4) Do step 2) again - Notice the newly created additional field is there
5) Visit /cgi-bin/koha/admin/additional-fields.pl?tablename=aqinvoices and add a new additional field for invoices
6) Do step 2) again - Notice both additional fields are there
7) Visit /api/v1/additional_fields?tablename=aqinvoices - Notice only the additional field for aqinvoices is listed

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:54 +02:00
444f3d8bad
Bug 37181: Add --confirm option to pseudonymize_statistics.pl
To test:
1 - Perform some transactions
2 - Enable Pseudonymization
3 - perl misc/maintenance/pseudonymize_statistics.pl -v
4 - Confirm test run an nothing changed
5 - perl misc/maintenance/pseudonymize_statistics.pl -v -c
6 - Confirm statistics are pseudonymized

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Amend: tidied the changes [tcohen]
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:54 +02:00
5e9b914352
Bug 36815: (follow-up) Use correct language for default
When 'default' language is set, we need to use the default as defined by
the OPACLanguages system preference.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:53 +02:00
7f3a0bb76b
Bug 36815: (follow-up) Fix logic for new languages
If a notice doesn't already have any data in it we weren't able to use
the object to lookup the sample.. with this patch we now always load the
samples if they exist for each installed and enabled language,
regardless of whether there's already a notice stored in that language.

Test plan
1. Install Spanish by running koha-translate --install es-ES from inside
   the kohashell
2. restart all
3. Set TranslateNotices to Allow
4. Verify that the Spanish-language sample_notices.yml exists
5. Open a notice that has at least one Spanish default notice defined
6. Confirm you see the 'View default' button for the spanish notice and
   that the displayed notice is indeed the spanish translation

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:52 +02:00
73371635db
Bug 36815: Expose to the UI
This patch adds a modal to preview the sample notices in the UI and
allow replacing the template content with that content of that modal.

Test plan
1) Apply patches and restart plack (Or just use a sandbox)
2) Login to the staff client and navigate to 'Tools > Notices and Slips'
3) 'Edit' a notice.
4) Note the new 'View default' button on some notices where we ship a
   default in the 'sample_notices' file.
5) Click the button to view the sample notice
6) Confirm 'Close' just closes the modal
7) Confirm 'Copy' copies the sample notice into the editor field

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:52 +02:00
5cb727bece
Bug 36815: Unit tests
Add a pretty sparse integration test that relies on the default shipped
sample_notices.yaml.  This should catch if the format of that file
changes, but it doesn't test any more than that.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:51 +02:00
217898cbb7
Bug 36815: Add 'get_default' method to Koha::Notice::Template
This patch adds a new 'get_default' method to the Koha::Notice::Template
object.  The idea is that it returns the template content as defined by
the sample_notices.yml file for the language of your choosing.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:51 +02:00
2013ea70ec
Bug 34481: DBRev 24.06.00.010
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:50 +02:00
52f94659c1
Bug 34481: Tidy altered code
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:50 +02:00
cb085034ff
Bug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches
Like IncludeSeeFromInSearches adds see from heading in search (4xx),
new system preference IncludeSeeAlsoFromInSearches adds see also from heading (5xx).

Test plan:
Test on both Elasticsearch and Zebra:
1)
1.1) Create an authority record with heading, see from heading 4xx and see also from heading 5xx
1.2) Use this authority in a biblio record
2)
2.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Don't include"
2.3) Rebuild search engine
2.4) Perform a search on heading text => you find the biblio record
2.5) Perform a search on see from heading => you do not find the biblio record
2.6) Perform a search on see also from heading => you do not find the biblio record
3)
3.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Include"
3.2) Rebuild search engine
3.3) Perform a search on heading text => you find the biblio record
3.4) Perform a search on see from heading => you find the biblio record
3.5) Perform a search on see also from heading => you find the biblio record

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:49 +02:00
0877dfd16d
Bug 36498: Tidy cataloguing/additem.pl
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:48 +02:00
49c55a03e7
Bug 36498: Add ability to set item group display order from additem.tt
To test:
1. Apply patch, restart_all
2. System preferences -> EnableItemGroups, set to 'Enable'.
3. Find a record and create at least 1 item group.
4. Go to Add item
5. Scroll to the bottom and look for 'Options' underneath 'Add to item group'
6. In the dropdown select 'Create new item group'
7. There should be fields for 'Name' and 'Display order'.
8. Make sure you can add a new item group with and without a display order set. If no display order is set it should default to 0.
9. Try to add a non numerical display order, you should not be able to.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:48 +02:00
Eric Garcia
0be606f21e
Bug 35232: Fix typo on list.tt
1. Go to Patron lists and add patrons to a list.
2. Click the "Add multiple patrons" link
3. Clicking the "Borrowernumbers" label doesn't trigger the corresponding radio button
4. Apply patch
5. Attempt steps 1-3
6. Sign off :)

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:47 +02:00
18c97c1456
Bug 36128: (QA follow-up) Add regression test
This patch adds a simple regression test to ensure we don't re-introduce
the errant warning.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:47 +02:00
Denys Konovalov
4c8586270a
Bug 36128: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm
Fixes the following error message when running the overdues check cronjob on a
Koha system without defined overdue rules:

/etc/cron.daily/koha-common:
Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm
line 686.

by checking if the variable is defined before comparing it.

Test plan:
1. Go to Tools - Overdue notice/status triggers and verify that for every single
   patron type for both Default and every individual library, you have no value
   set for Delay, so that you will never send anyone an overdue notice
2. Run the cron job which creates and sends overdue notices
3. Confirm the above mentioned error no longer appears

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 14:04:46 +02:00