[Bug 42110] New: Migrate marc_order_accounts.download_directory to use local file transport option
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42110 Bug ID: 42110 Summary: Migrate marc_order_accounts.download_directory to use local file transport option Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org As detailed in bug 41020, we should be using the pre-existing local file transport for marc order accounts. This offers a simple migration path to using FTP/SFTP after migration. -- 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=42110 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |41020 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41020 [Bug 41020] Add ability to use file transports for MARC ordering accounts -- 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=42110 Kyle M Hall (khall) <kyle@bywatersolutions.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=42110 --- Comment #1 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 195494 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195494&action=edit Bug 42110: Migrate marc_order_accounts.download_directory to use local file transport option As detailed in bug 41020, we should be using the pre-existing local file transport for marc order accounts. This offers a simple migration path to using FTP/SFTP after migration. Test Plan: 1) Apply this patch on top of the bug 41020 patches 2) Before running the database update, create marc order accounts: a) Two with different download_directory values set b) One with no download_directory set c) One with a download_directory and a file_transport_id already set 3) Run the database update (installer/data/mysql/atomicupdate/bug_42110.pl) 4) Verify the migration results: a) Accounts from 2a have new local file transports created and linked, named "MARC order account: <description> [<id>] (Migrated)" b) Account from 2b has no file transport created or linked c) Account from 2c is unchanged (existing file_transport_id preserved) d) The download_directory column is removed from marc_order_accounts 5) Rebuild the API bundle: yarn api:bundle 6) Restart all the things! 7) Go to Administration > File transports a) Verify the migrated local file transports appear in the list b) Verify you can create a new file transport with transport type "Local" c) Verify that selecting "Local" disables and clears host, port, passive mode, authentication mode, username, password, and key file fields d) Verify switching back to SFTP/FTP re-enables those fields e) Verify saving a Local transport stores blank values for the disabled fields 8) Go to Administration > MARC order accounts a) Verify the download_directory column and form field are removed b) Verify you can create/edit accounts and select a file transport 9) Test the cron job (misc/cronjobs/marc_ordering_process.pl): a) Place .mrc files in the download directory of a local file transport b) Run: perl marc_ordering_process.pl -v -c Verify files are found and processed via the file transport c) Run with --delete flag, verify source files are deleted d) Run with --rename .done flag, verify source files are renamed e) Run with --archive /tmp/marc_archive flag, verify processed files are copied to the archive directory -- 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=42110 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=42110 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> 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=42110 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195494|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=42110 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195539 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195539&action=edit Bug 42110: Migrate marc_order_accounts.download_directory to use local file transport option As detailed in bug 41020, we should be using the pre-existing local file transport for marc order accounts. This offers a simple migration path to using FTP/SFTP after migration. Test Plan: 1) Apply this patch on top of the bug 41020 patches 2) Before running the database update, create marc order accounts: a) Two with different download_directory values set b) One with no download_directory set c) One with a download_directory and a file_transport_id already set 3) Run the database update (installer/data/mysql/atomicupdate/bug_42110.pl) 4) Verify the migration results: a) Accounts from 2a have new local file transports created and linked, named "MARC order account: <description> [<id>] (Migrated)" b) Account from 2b has no file transport created or linked c) Account from 2c is unchanged (existing file_transport_id preserved) d) The download_directory column is removed from marc_order_accounts 5) Rebuild the API bundle: yarn api:bundle 6) Restart all the things! 7) Go to Administration > File transports a) Verify the migrated local file transports appear in the list b) Verify you can create a new file transport with transport type "Local" c) Verify that selecting "Local" disables and clears host, port, passive mode, authentication mode, username, password, and key file fields d) Verify switching back to SFTP/FTP re-enables those fields e) Verify saving a Local transport stores blank values for the disabled fields 8) Go to Administration > MARC order accounts a) Verify the download_directory column and form field are removed b) Verify you can create/edit accounts and select a file transport 9) Test the cron job (misc/cronjobs/marc_ordering_process.pl): a) Place .mrc files in the download directory of a local file transport b) Run: perl marc_ordering_process.pl -v -c Verify files are found and processed via the file transport c) Run with --delete flag, verify source files are deleted d) Run with --rename .done flag, verify source files are renamed e) Run with --archive /tmp/marc_archive flag, verify processed files are copied to the archive directory Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42110 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195540 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195540&action=edit Bug 42110: DBIC Schema Build Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42110 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195541 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195541&action=edit Bug 42110: (follow-up) Remove dead Koha::Encryption code from marc_order_accounts.pl The $crypt variable was assigned from Koha::Encryption->new but never used, and Koha::Encryption was not imported with a use statement. Remove the dead code to prevent a potential runtime error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42110 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195542 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195542&action=edit Bug 42110: (follow-up) Fix incorrect 'SMTP connection' description in file_transport Swagger definition The debug field description incorrectly referred to an SMTP connection. This is a file transport (FTP/SFTP/local), not SMTP. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42110 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195543 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195543&action=edit Bug 42110: (follow-up) Fix misleading 'Remote' directory labels in file_transports admin The download/upload directory fields were labelled 'Remote download/upload directory' with hints referring to 'the remote server'. Since local transport uses these same fields for local paths, the labels should be transport-agnostic. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42110 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195544 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195544&action=edit Bug 42110: (follow-up) Add test for post-migration local transport scenario Add a subtest to MarcOrderAccount.t that specifically covers the state created by the bug_42110 atomicupdate: a local file transport with download_directory set, linked to a marc_order_account. Verifies that file_transport() returns the correct polymorphic class and that download_directory is accessible through the relationship. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42110 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org