[Bug 30069] New: Add edifact_messages to cleanup_database.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Bug ID: 30069 Summary: Add edifact_messages to cleanup_database.pl 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: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz We should add the ability to clean up old edifact messages with cleanup database. -- 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=30069 Fiona Borthwick <fiona.borthwick@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fiona.borthwick@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30070 -- 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=30069 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@ptfs-europe |ity.org |.com CC| |matt.blenkinsop@ptfs-europe | |.com -- 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=30069 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 146690 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146690&action=edit Bug 30069: Add edifact-messages to cleanup_database.pl This patch allows users to clear out old edifact_messages using the cleanup_database script. The number of days can either be set in the CLI or the default value of 365 can be used. Test plan: 1) Ensure you have some EDI orders or even just some dummy messages in the edifact_messages table 2) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose (Change the number of days according to the data in your table) 3) The response should show a number of messages that would have been deleted 4) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose --confirm 5) The response should now show the same number of messages have been deleted 6) Check your edifact_messages table to confirm that the data has been deleted -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146690|0 |1 is obsolete| | --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 146694 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146694&action=edit Bug 30069: Add edifact-messages to cleanup_database.pl This patch allows users to clear out old edifact_messages using the cleanup_database script. The number of days can either be set in the CLI or the default value of 365 can be used. Test plan: 1) Ensure you have some EDI orders or even just some dummy messages in the edifact_messages table 2) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose (Change the number of days according to the data in your table) 3) The response should show a number of messages that would have been deleted 4) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose --confirm 5) The response should now show the same number of messages have been deleted 6) Check your edifact_messages table to confirm that the data has been deleted Sponsored-by: PTFS Europe -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=30069 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146694|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 146976 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146976&action=edit Bug 30069: Add edifact-messages to cleanup_database.pl This patch allows users to clear out old edifact_messages using the cleanup_database script. The number of days can either be set in the CLI or the default value of 365 can be used. Test plan: 1) Ensure you have some EDI orders or even just some dummy messages in the edifact_messages table 2) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose (Change the number of days according to the data in your table) 3) The response should show a number of messages that would have been deleted 4) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose --confirm 5) The response should now show the same number of messages have been deleted 6) Check your edifact_messages table to confirm that the data has been deleted Sponsored-by: PTFS Europe Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 146977 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146977&action=edit Bug 30069: (QA follow-up) Fix capitalization for edifact Changes a few occurrences of edifact in the output messages to EDIFACT. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have no experience with the EDIFACT process, so I am not sure what role the EDIFACT messages play. Could this cause any issues if the orders haven't been received yet? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #5)
I have no experience with the EDIFACT process, so I am not sure what role the EDIFACT messages play. Could this cause any issues if the orders haven't been received yet?
Yes, that's a good thought. I think the query should but updated to not delete messages marked as 'new'. If automatic invoice importing is disabled, this feature should delete un-imported EDI invoices! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 --- Comment #7 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 147564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147564&action=edit Bug 30069: (QA follow-up) Rebase and add filter This patch now checks the status of messages and ignores any message with a status of 'new'. It is also rebased to account for changes made to cleanup_database.pl in bug 17350. Test plan: 1) Ensure you have some EDI orders or even just some dummy messages in the edifact_messages table with a mixture of statuses including 'new' 2) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose (Change the number of days according to the data in your table) 3) The response should show a number of messages that would have been deleted 4) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose --confirm 5) The response should now show the same number of messages have been deleted 6) Check your edifact_messages table to confirm that the data has been deleted 7) Confirm that no messages marked 'new' have been deleted -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #8 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Patch has been rebased and the requested check for 'new' messages has been added. Kyle I'm not too sure I understand what you are asking for in the second part of your comment about un-imported invoices, could you clarify further? Thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Matt Blenkinsop from comment #8)
Patch has been rebased and the requested check for 'new' messages has been added. Kyle I'm not too sure I understand what you are asking for in the second part of your comment about un-imported invoices, could you clarify further? Thanks
Invoices may not be processed and imported as soon as they are downloaded. It depends on the syspref EdifactInvoiceImport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146976|0 |1 is obsolete| | Attachment #146977|0 |1 is obsolete| | Attachment #147564|0 |1 is obsolete| | --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 147606 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147606&action=edit Bug 30069: Add edifact-messages to cleanup_database.pl This patch allows users to clear out old edifact_messages using the cleanup_database script. The number of days can either be set in the CLI or the default value of 365 can be used. Test plan: 1) Ensure you have some EDI orders or even just some dummy messages in the edifact_messages table 2) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose (Change the number of days according to the data in your table) 3) The response should show a number of messages that would have been deleted 4) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose --confirm 5) The response should now show the same number of messages have been deleted 6) Check your edifact_messages table to confirm that the data has been deleted Sponsored-by: PTFS Europe Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <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=30069 --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 147607 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147607&action=edit Bug 30069: (QA follow-up) Fix capitalization for edifact Changes a few occurrences of edifact in the output messages to EDIFACT. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <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=30069 --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 147608 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147608&action=edit Bug 30069: (QA follow-up) Rebase and add filter This patch now checks the status of messages and ignores any message with a status of 'new'. It is also rebased to account for changes made to cleanup_database.pl in bug 17350. Test plan: 1) Ensure you have some EDI orders or even just some dummy messages in the edifact_messages table with a mixture of statuses including 'new' 2) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose (Change the number of days according to the data in your table) 3) The response should show a number of messages that would have been deleted 4) Run perl misc/cronjobs/cleanup_database.pl --edifact-messages 100 --verbose --confirm 5) The response should now show the same number of messages have been deleted 6) Check your edifact_messages table to confirm that the data has been deleted 7) Confirm that no messages marked 'new' have been deleted Signed-off-by: Kyle M Hall <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=30069 --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 147609 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147609&action=edit Bug 30069: (QA follow-up) Use pure DBIC for select and delete with single query Signed-off-by: Kyle M Hall <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=30069 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 --- Comment #15 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Not backporting to 22.11.x - enhancement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Needs documenting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Aude Charillon <aude.charillon@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |Aude Charillon contact| | CC| |aude.charillon@ptfs-europe. | |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Aude Charillon <aude.charillon@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/873 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30069 Aude Charillon <aude.charillon@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Documentation|https://gitlab.com/koha-com |https://gitlab.com/koha-com submission|munity/koha-manual/-/merge_ |munity/koha-manual/-/merge_ |requests/873 |requests/947 Status|Needs documenting |RESOLVED --- Comment #16 from Aude Charillon <aude.charillon@ptfs-europe.com> --- Koha manual updated. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org