[Koha-bugs] [Bug 21214] cleanup_database.pl --mail should let admin choose which letter codes to keep

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 13 17:06:20 CEST 2018


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

--- Comment #1 from Charles Farmer <charles.farmer at inlibro.com> ---
Created attachment 77756
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77756&action=edit
BZ 21214: cleanup_database.pl --keep-lc to dodge deletion in message_queue
based on letter_code

Librarians sometime worry if a certain email was sent or not to a patron
(PREDUES, ODUES, etc.), and iirc, there are no way to have that information
once the cleanup_database.pl has run, unless we dig back an archive of their
database.
This patch would let an admin choose which letters to keep in the
message_queue, based on its letter_code, by passing a comma-separated list to
the script.

TEST PLAN:
1) Either you have already have data, or you'll want to add some new test lines
in your message_queue table
    . INSERT INTO
message_queue(borrowernumber,letter_code,message_transport_type,status,time_queued)
      VALUES(1,<YOUR CODE OF CHOICE>,'email','sent','2018-01-01 00:00:42');
2) Make a backup of this table
3) Run the script patchless with the --mail 1 option
    3.1) Messages older than 1 day should have been deleted
4) Put the data back in
5) Apply patch
6) Choose a letter_code you'd like to keep, and run the script with --mail 1
--keep-lc <CODE1>[,<CODE2>]
7) Messages older than 1 day that don't have the code <CODE1> [or <CODE2>]
should've been deleted

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list