[Bug 21214] New: cleanup_database.pl --mail should let admin choose which letter codes to keep
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Bug ID: 21214 Summary: cleanup_database.pl --mail should let admin choose which letter codes to keep Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: charles.farmer@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz We are often asked if an email was sent to a patron, and despite not having 100% confirmation that the message reached the person, it feels bad when fines are attached to it and no information's left in the database for our librarians. A new patch would let certain messages stay in the database, despite their age, based on their letter_code. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |charles.farmer@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 --- Comment #1 from Charles Farmer <charles.farmer@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 --- Comment #2 from Charles Farmer <charles.farmer@inlibro.com> --- Created attachment 77762 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77762&action=edit Bug 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |charles.farmer@inlibro.com |ity.org | CC| |katrin.fischer@bsz-bw.de --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Charles, please don't forget to assign the bug to yourself when providing a patch! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77756|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com Status|Needs Signoff |Failed QA --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Hi, there is a problem in the code -> 243 my $quoted_codes = ''; 244 if ($letter_codes) { 245 my @codes = map { "'$_'" } split(',', $letter_codes); -> 246 my $quoted_codes = join(',', @codes); 247 } Two "my $quoted_codes", in lines 243 and 246. $quoted_codes passed to execute will always be empty. Remove the second 'my' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 --- Comment #5 from Ivan Dziuba <ivan.dziuba@inlibro.com> --- Created attachment 112992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112992&action=edit Bug 21214: I changed cleanup_database.pl and some corrections with --keep-lc to dodge deletion in message_queue based on letter_code -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Ivan Dziuba <ivan.dziuba@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ivan.dziuba@inlibro.com Status|Failed QA |Needs Signoff Assignee|charles.farmer@inlibro.com |ivan.dziuba@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Ivan Dziuba <ivan.dziuba@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77762|0 |1 is obsolete| | --- Comment #6 from Ivan Dziuba <ivan.dziuba@inlibro.com> --- Created attachment 112993 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112993&action=edit Bug 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Ivan Dziuba <ivan.dziuba@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #112992|0 |1 is obsolete| | --- Comment #7 from Ivan Dziuba <ivan.dziuba@inlibro.com> --- Created attachment 112994 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112994&action=edit Bug 21214: I changed cleanup_database.pl and some corrections with --keep-lc to dodge deletion in message_queue based on letter_code -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 --- Comment #8 from Ivan Dziuba <ivan.dziuba@inlibro.com> --- Created attachment 113002 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113002&action=edit Bug_21214: Changes after merge -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #112993|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #112994|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113002|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77762|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Ivan Dziuba <ivan.dziuba@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77762|0 |1 is obsolete| | --- Comment #9 from Ivan Dziuba <ivan.dziuba@inlibro.com> --- Created attachment 113008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113008&action=edit Bug 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 --- Comment #10 from Ivan Dziuba <ivan.dziuba@inlibro.com> --- Created attachment 113009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113009&action=edit Bug_21214: Change of SQL request in condition $mail with letter_code and code modification -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113008|0 |1 is obsolete| | --- Comment #11 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 148622 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148622&action=edit Bug 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113009|0 |1 is obsolete| | --- Comment #12 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 148623 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148623&action=edit Bug_21214: Change of SQL request in condition $mail with letter_code and code modification -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hammat.wele@inlibro.com --- Comment #13 from Hammat wele <hammat.wele@inlibro.com> --- Rebase -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 --- Comment #14 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 148624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148624&action=edit Bug 21214: (fix) Change letter_code with letter_id in the sql query and code modification -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148624|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 --- Comment #15 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 148625 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148625&action=edit Bug 21214: (fix) Rebuild the sql query -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148622|0 |1 is obsolete| | --- Comment #16 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 158679 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158679&action=edit Bug 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 Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148623|0 |1 is obsolete| | --- Comment #17 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 158680 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158680&action=edit Bug_21214: Change of SQL request in condition $mail with letter_code and code modification Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148625|0 |1 is obsolete| | --- Comment #18 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 158681 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158681&action=edit Bug 21214: (fix) Rebuild the sql query Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #19 from Lucas Gass <lucas@bywatersolutions.com> --- Works as described. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158679|0 |1 is obsolete| | Attachment #158680|0 |1 is obsolete| | Attachment #158681|0 |1 is obsolete| | --- Comment #20 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- Created attachment 162064 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162064&action=edit Bug 21214: cleanup_database.pl rebase to master 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthias.le-gac@inlibro.com --- Comment #21 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- Rebase to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |no-sandbox CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|ivan.dziuba@inlibro.com |hammat.wele@inlibro.com CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #22 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- [FAIL] misc/cronjobs/cleanup_database.pl FAIL forbidden_patterns forbidden pattern: tab char (line 371) forbidden pattern: tab char (line 372) forbidden pattern: tab char (line 373) forbidden pattern: tab char (line 374) FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl misc/cronjobs/cleanup_database.pl` Processing additional checks PASS! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158679|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158680|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158681|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162064|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158679|0 |1 is obsolete| | --- Comment #23 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189527 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189527&action=edit Bug 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158680|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158681|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 --- Comment #24 from Chris Cormack <chris@bigballofwax.co.nz> --- Automatic patch test results: â ï¸ The patch applies with fuzzy option (ignoring whitespace). This may indicate minor conflicts that need to be resolved. Details: Patch applies with fuzzy option (ignoring whitespace) This is an automated message from the patch testing system. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 --- Comment #25 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I really like that feature! It will allow us to keep overdue notices while other types of notices could be deleted sooner. Only comment I have is maybe hat keep-lc is maybe a little confusing. Something like keep-letters or keep-mail might have been a little more telling. But there is documentation, so not a blocker for me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189527|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21214 --- Comment #26 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 201124 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201124&action=edit Bug 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 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org