Go to file
Magnus Enger 807cf91638 Bug 29354: Make overdue_notices.pl send .html
If you have EmailOverduesNoEmail = Send and specify "--html somedir",
overdue_notices.pl will send a file by email that contains partial
HTML, as a file called attachment.txt. This patch fixes that.

To reproduce in koha-testing-docker:
- EmailOverduesNoEmail = Send
- Make sure you have a loan that was due yesterday, by backdating the
  due date
- Set up an overdue action to send "Overdue Notice" (ODUE) to the
  category you made the loan to above, when a loan is one day overdue
- Run this command:
  $ sudo koha-shell -c "perl misc/cronjobs/overdue_notices.pl -v -t -html /tmp/" kohadev
- Look at the file /tmp/notices-<DATE>.html and make sure it is a full
  HTML document, with <html>, <head>, <body> etc.
- Create a report like this:
  SELECT message_id, letter_id, borrowernumber, subject, CONCAT( '<pre>', content, '</pre>' ) AS content,
    metadata, letter_code, message_transport_type, time_queued, updated_on, to_address, content_type, failure_code
  FROM message_queue
  WHERE subject = 'Overdue Notices'
  ORDER BY message_id DESC
- Run the report and verify there is a line like this in the "content"
  of the newest message:
  Content-Type: text/plain; name=attachment.txt
- A part of the "content" will be a block of several lines of gibberish
  (base64) that look something like "RGVhciAga29oYSwNCg0KQWN...". Copy
  this block of text to somewhere like base64decode.org and decode the
  text. You should see a fragment of HTML, without <html>, <head>,
  <body> etc.

To test:
- Apply the patch
- Run overdue_notices.pl again, with the same arguments as above
- Make sure /tmp/notices-<DATE>.html is still a full HTML document
- Re-run the report, and make sure you now have this in the "content":
  Content-Type: text/html; name=attachment.html
- Decode the base64 and make sure it is now a full HTML document, with
  <html>, <head>, <body> etc.
- Re-run overdue_notices.pl as above, but replace "-html /tmp/" with
  "-csv /tmp/test.csv"
- Make sure /tmp/test.csv and the decoded base64 from the report
  contains CSV data
- Re-run overdue_notices.pl as above, but replace "-html /tmp/" with
  "-text /tmp/"
- Make sure /tmp/notices-<DATE>.txt and the decoded base64 from the
  report contains no HTML

Note:
- The actual text from the different messages will be enclosed in
  <pre>-tags
- If you have HTML in your ODUE message template and run with -v, you
  will have warnings saying "The following terms were not matched and
  replaced"
These are due to Bug 14347, and are not adressed by the current patch.

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>
(cherry picked from commit 6d1890fc8e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-16 19:30:26 +00:00
C4 Bug 32684: (QA follow-up) Move too_many_lost to Patron 2023-03-16 19:28:50 +00:00
Koha Bug 32781: Prevent import from list to fail if package does not exist 2023-03-14 10:43:05 +00:00
acqui Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl 2023-02-01 15:18:30 +00:00
admin Bug 32460: Add missing columns to table configuration for patron categories 2023-02-24 11:15:42 +00:00
api Bug 33145: Fix ERM swagger specs 2023-03-07 18:07:06 +00:00
authorities Bug 30250: Use ApplyFrameworkDefaults when importing a record 2022-11-09 14:03:22 -03:00
basket Bug 16522: (follow-up) MARC display templates and get_marc_host fixes 2023-01-31 17:15:27 +00:00
bin
…
catalogue Bug 32585: (bug 32583 follow-up) Fix some variable references 2023-03-01 09:52:50 +00:00
cataloguing Bug 32819: Fix cataloguing/value_builder/stocknumberam123.pl 2023-03-07 18:26:55 +00:00
circ Bug 32922: Remove space in shebang 2023-02-24 07:51:37 +00:00
clubs Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
course_reserves Bug 31893: Use checkauth and do not fetch about.tt template 2023-01-31 14:09:05 +00:00
debian Bug 32558: Add ability for background_jobs_worker.pl to process multiple jobs simultaneously up to a limit 2023-03-07 18:12:49 +00:00
docs 22.11.00: Update history.txt 2022-11-25 15:20:02 -03:00
erm Bug 32922: Remove space in shebang 2023-02-24 07:51:37 +00:00
errors Bug 29420: HTTP status code incorrect when calling error pages directly under Plack/PSGI 2022-04-20 09:03:39 -10:00
etc Bug 32684: Implement SIP patron status field "too many items lost" 2023-03-16 19:28:38 +00:00
ill Bug 28909: Allow illview to use backend template 2022-08-09 13:21:39 -03:00
installer Bug 32799: DBRev 22.12.00.009 2023-03-01 15:41:18 +00:00
koha-tmpl Bug 33150: Add specific message for informing about too_soon for renewal. 2023-03-16 19:29:13 +00:00
labels Bug 31633: (follow-up) Group template params 2022-10-03 14:09:59 -03:00
lib/CGI/Session/Serialize Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
members Bug 31095: Remove GetDebarments from members/memberentry.pl 2023-02-01 15:35:28 +00:00
misc Bug 29354: Make overdue_notices.pl send .html 2023-03-16 19:30:26 +00:00
offline_circ Bug 30016: Remove GetOpenIssue subroutine 2022-08-31 08:50:37 -03:00
opac Bug 32674: Fix placing a hold at the OPAC for serials 2023-03-07 18:07:47 +00:00
patron_lists Bug 16446: Add ability to add patrons to list by borrowernumber 2021-10-21 12:24:04 +02:00
patroncards Bug 24001: Fix patron card template edition 2022-04-28 10:49:20 -10:00
plugins Bug 29787: Add plugin version to plugin search results 2022-04-08 15:49:15 +02:00
pos Bug 30619: Add email receipt to POS 2022-09-07 15:59:34 -07:00
recalls Bug 30924: Add missing branchtransfers.reason value for recall cancellation 2022-06-13 10:30:51 -03:00
reports Bug 32588: Make filters on 'items with no checkouts' report translatable 2023-01-31 18:06:13 +00:00
reserve Bug 32909: Load item type icons from the correct path 2023-02-16 09:41:30 -01:00
reviews Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
rotating_collections Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
serials Bug 29608: Made so doesn't require full permission 2022-09-07 13:49:53 -07:00
services Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
skel
…
suggestion Bug 32531: Restore behaviour of 'include archived' filter 2023-01-13 15:54:39 +00:00
svc Bug 15869: Change framework on overlay 2023-02-08 16:34:09 +00:00
t Bug 32684: Implement SIP patron status field "too many items lost" 2023-03-16 19:28:38 +00:00
tags Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
tmp/modified_authorities
…
tools Bug 30869: Add the ability to delete stock rotation rotas 2023-03-01 15:32:49 +00:00
virtualshelves Bug 16522: (follow-up) MARC display templates and get_marc_host fixes 2023-01-31 17:15:27 +00:00
xt Bug 32741: Regression tests 2023-02-06 15:50:58 +00:00
.editorconfig Bug 27375: Set YAML file settings in .editorconfig 2021-11-03 15:40:52 +01:00
.eslintrc.json
…
.gitignore Bug 32609: Add compiled css files to gitignore 2023-03-10 12:27:30 +00:00
.htaccess
…
.mailmap Bug 32582: Fix error in .mailmap 2023-01-25 14:39:04 +00:00
.perlcriticrc
…
.proverc.dist Bug 19821: Install sample data, ES mappings and Version syspref 2021-10-25 11:27:40 +02:00
.stylelintrc.json Bug 31528: (follow-up) A few additional rules 2022-10-03 08:23:15 -03:00
INSTALL
…
Koha.pm Bug 32799: DBRev 22.12.00.009 2023-03-01 15:41:18 +00:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 32994: Remove breaking css/maps/*.map files from Makefile.PL 2023-03-14 14:08:27 +00:00
README
…
README.md
…
README.robots
…
about.pl Bug 30808: Add support for version codenames 2022-11-25 15:20:00 -03:00
app.psgi
…
build-resources.PL Bug 32609: Use the current yarn.lock to generate node_modules 2023-03-10 12:27:47 +00:00
changelanguage.pl
…
cpanfile Bug 32558: (QA follow-up) Move ForkManager to required 2023-03-08 14:39:16 +00:00
cypress.json Bug 32030: Move cypress to t/ 2022-11-08 09:44:51 -03:00
fix-perl-path.PL Bug 28606: Remove $DEBUG and $ENV{DEBUG} 2021-06-24 11:53:44 +02:00
gulpfile.js Bug 32609: Improve yarn build commands 2023-03-10 12:27:27 +00:00
help.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
koha_perl_deps.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
kohaversion.pl
…
mainpage.pl Bug 30650: Add filter_by_scheduled_today 2022-07-29 15:00:47 -03:00
package.json Bug 32975: Error in package.json's definition of css:build vs css:build:prod 2023-03-10 12:27:54 +00:00
rewrite-config.PL Bug 28519: Put CGI::Session::Serialize::yamlxs in lib directory 2021-06-17 10:07:36 +02:00
tsconfig.json Bug 32030: Move cypress to t - fix build_js/watch_js 2022-11-08 09:44:52 -03:00
webpack.config.js Bug 32806: Move main-erm.ts to modules/erm.ts 2023-02-28 18:54:57 +00:00
yarn.lock Bug 32978: Updated yarn.lock 2023-02-24 11:31:26 +00:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo