Commit graph

49041 commits

Author SHA1 Message Date
Julian Maurice
b6964253fb
Bug 32842: Fix cataloguing/value_builder/unimarc_field_123j.pl
Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-29 12:28:55 +02:00
Julian Maurice
0bc83b3673
Bug 32841: Fix cataloguing/value_builder/unimarc_field_123i.pl
Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-29 12:28:54 +02:00
Julian Maurice
1f152facf7
Bug 32840: Fix cataloguing/value_builder/unimarc_field_123g.pl
Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-29 12:28:53 +02:00
Julian Maurice
3fc800d91a
Bug 32839: Fix cataloguing/value_builder/unimarc_field_123f.pl
Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-29 12:28:52 +02:00
Julian Maurice
ff97b1fe43
Bug 32838: Fix cataloguing/value_builder/unimarc_field_123e.pl
Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-29 12:28:51 +02:00
Julian Maurice
e4ff5f2704
Bug 32837: Fix cataloguing/value_builder/unimarc_field_123d.pl
Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-29 12:28:50 +02:00
d183715d75
Bug 32807: Fix cypress tests
Cypress tests were failing, not sure I understand why exactly as I don't
recreate the failure when using the interface. We could simplify the if
logic anyway.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-29 12:28:49 +02:00
Julian Maurice
577a237a3f
Bug 32834: Fix cataloguing/value_builder/unimarc_field_121b.pl
Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-28 15:38:09 +02:00
Julian Maurice
9a8b5003dc
Bug 32836: Fix cataloguing/value_builder/unimarc_field_123a.pl
Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-28 15:38:07 +02:00
e96f32b29c
Bug 32426: (follow-up) Fix api/v1/patrons.t
We use another exception now.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-28 14:54:04 +02:00
0d3e26d32c
Bug 32426: (follow-up) Fix for Members.t / Patrons.t
Moving and adjusting test in Member.t.

Test plan:
Run both tests.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-28 14:54:03 +02:00
10d12f999f
Bug 33341: Address some perlcritic errors in 5.36
Some old-style code is making our tests fail when run in Debian Testing.

This patch addresses this.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-28 14:50:33 +02:00
d8721bbc36
Bug 32594: Mark jobs as started and finished
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-28 14:49:44 +02:00
cb2fd4c00a
Bug 33021: (QA follow-up) Fix QA errors
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:50:09 +02:00
909dedd3f6
Bug 33133: Move fast cataloging to first column
This move the link and adds its own heading

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:50:08 +02:00
85cfdb1f5b
Bug 33133: Add fast cataloging to 'Cataloging' page
This patch adds a check for the existence of the Fast Add framework to
the Koha mainpage and the cataloging home page

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

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

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:50:07 +02:00
cf89db353d
Bug 33021: (QA follow-up) Add unit test
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:50:06 +02:00
Julian Maurice
6561cd84b6
Bug 33021: Show an alert when adding a reserved item to an item bundle
Test plan:
1. Create an item bundle (see bug 28854 comment 458)
2. Create a biblio with one item and place a hold for this item.
3. Try to add the reserved item to the bundle
   You should see a message saying that the item is reserved. Next to
   this message should be a button "Ignore holds and add to bundle".
4. Click on the button. There should be a message saying that the item
   was added to the bundle.
5. Close the modal window and verify that the item was correctly
   added to the bundle

Signed-off-by: Lucas Gass <lucas@bywatersolutiosn.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:50:05 +02:00
a2a55e284b
Bug 32121: (QA follow-up): Fix unit tests count
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:50:04 +02:00
f04dd671af
Bug 32121: (QA follow-up) Use error_code rather than key
We semi-recently introduced error_code into our error object to allow
for translation and code paths for different errors without having to
rely on long description string matches.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:50:03 +02:00
Julian Maurice
de36244266
Bug 32121: Show an alert when adding a checked out item to an item bundle
When trying to add a checked out item to an item bundle, an alert
message will show up, giving the user a chance to return the item
immediately before adding it to the bundle

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:50:02 +02:00
f781fdb4a2
Bug 32807: Fetch count instead of all entries for agreements and licenses
To list agreements and licenses we are retrieving the whole list to
simply know if at least one exists (and display the table that will
fetch the X first elements to display).

We should call count instead.

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

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:50:00 +02:00
Katrin Fischer
7b2644bf2b
Bug 32003: Add page-section to order search results and fix heading hierarchy
This adds a page-section to the order search results and moves
the former second h1 heading 'search results' to a h2 heading
below 'Order search', so we have a proper hierarchy

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:59 +02:00
Caroline Cyr La Rose
f3fb174775
Bug 32964: OPACResultsMaxItemsUnavailable description is misleading
This patch rephrases the last part of the description of the
OPACResultsMaxItemsUnavailable system preference to clarify the link
to the OPACResultsUnavailableGroupingBy option.

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

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

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:58 +02:00
52709755b7
Bug 32426: (follow-up) Use more acurate term 'internal' instead of 'legacy'
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:57 +02:00
83a24bdde9
Bug 32426: Fix qatools issues
[1] opac-registration-verify.pl forbidden pattern: Script permissions is authnotrequired => 1, it is correct for an OPAC script, not intranet (bug 24663)
    => Do not go back to authrequired => 1. Use a check on OpacPublic.
[2] opac-registration-invalid.tt missing_filter at line 41 (<p>Error [% error_type %]: [% error_info %]</p>)
[3] opac-memberentry.tt missing_filter at line 131 (<p>Error [% error_type %]: [% error_info %]</p>)

Test plan:
Verify that qatools passes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:56 +02:00
ac6a6b99cd
Bug 32426: Adjust error message of ERROR_login_exist
The reference to password might be confusing. You could have the
same password as another user.
The addition of 'could not create unique one' especially applies to
plugins that return an existing userid, like the very simple plugin
example on the Bugzilla report that just returns borrowers.email.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:55 +02:00
9d250efae9
Bug 32426: Changes for members/memberentry.pl
Test plan:
Note: We will address this again when installing a plugin, but
first we test with the legacy userid code.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:54 +02:00
79fa6025e8
Bug 32426: Changes for opac-registration-verify
Similar to changes in opac-memberentry.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:53 +02:00
5fd51573a5
Bug 32426: Changes for opac-memberentry
Test plan:
Enable self registration, pick a default category too for it.
The changes will be tested later with a plugin, but now change
Koha/Patron.pm as follows:
 sub _generate_userid_legacy { # as we always did
     my ($self) = @_;
+return $self;
So, add the return $self line only.
Restart all. Try to register an account on OPAC.
You should see an alert about problems processing your registration.
Undo the change in Patron.pm and restart all.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:52 +02:00
6b2e92e576
Bug 32426: Throw InvalidUserid exception in Patron->store
When creating we still call generate_userid and verify the result.
When modifying we do not accept an invalid userid. When needed,
we recreate the userid; this should be very exceptional.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:51 +02:00
c0260e4501
Bug 32426: Patron::generate_userid - add plugin hook
The hook is called patron_generate_userid. How suitable.
The existing generate_userid tests and new tests with mocked
plugins are merged into a new test script.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:50 +02:00
ba1d1ee5c9
Bug 3150: DBRev 22.12.00.015
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:49 +02:00
423c0b3640
Bug 3150: Adapt reporting to skeleton.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:48 +02:00
326c4e23ce
Bug 3150: (QA follow-up) Tidy scripts
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:47 +02:00
a426134fe3
Bug 3150: (QA follow-up) Don't load unused and deleted tt files
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:46 +02:00
128517fe66
Bug 3150: (QA follow-up) Remove unused variables
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:45 +02:00
d123287b18
Bug 3150: (follow-up) Make sure host information displays for unlinked records
When the 773 entry is not linked to a record using $w or
Easyanalytics we still want to display the information
about the source/host item in the emails.

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

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:44 +02:00
Aleisha Amohia
2896077b19
Bug 3150: (follow-up) Make subs to get host/related parts for notices
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:43 +02:00
Aleisha Amohia
cca354d0ce
Bug 3150: Include host item entries in LIST and CART notices
Incorporating fixes from Bug 16522

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:42 +02:00
b37f898efd
Bug 3150: (follow-up) Improve and fix new notice templates
This fixes several issues found and improves formatting:

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:41 +02:00
a184a88cb8
Bug 3150: (follow-up) Send list and cart emails immediately again
With this patch set the cart and list emails are sent via
the message_queue instead of bypassing it and being sent
immediately. This patch keeps them in message_queue, but
also sends them immediately, restoring the previous behavior.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:40 +02:00
fc5f56f7b6
Bug 3150: (QA follow-up) Remove borrowernumber from EnqueueLetter
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:39 +02:00
Aleisha Amohia
a611c6d4db
Bug 3150: Move emails for sending cart and list contents to notices
This patch creates notices using Template Toolkit syntax for sending
emails containing cart and list contents.

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

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:38 +02:00
d2f2fc2498
Bug 14251: Add weasyprint dependency
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 11:54:14 +02:00
d792225e91
Bug 14251: Add warning in about.pl for missing weasyprint
To test:
1. Have weasyprint installed
2. Go to the About > System information page
=> SUCCESS: No warning about weasyprint
3. Uninstall weasyprint
4. Repeat 2
=> SUCCESS: A warning is displayed and makes sense
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 11:54:08 +02:00
9d9ecdc49b
Bug 14251: Allow use of CSS in discharge letter
The discharge feature relies PDF::FromHTML which explicitly doesn't
handle CSS [1].

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 11:53:16 +02:00
Katrin Fischer
d22f885b06
Bug 32945: (QA follow-up) Fix capitalization of id in even more places
This fixes additional strings pointed out by QA.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 11:52:38 +02:00
Katrin Fischer
956c8fb491
Bug 32945: Fix capitalization of id in more places
id should be spelled ID, ids should be IDs as it's
an abbreviation according to:

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 11:52:38 +02:00
82859c8568
Bug 32969: (follow-up) Remove obsolete inline CSS
A couple of templates have some inline CSS intended to style jQueryUI
tabs. These instances can be removed:

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 11:52:03 +02:00