Bug 38489 - EDI should be updated to use the new FTP/SFTP Servers management page
Summary: EDI should be updated to use the new FTP/SFTP Servers management page
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Jake Deery
QA Contact: Testopia
URL:
Keywords:
Depends on: 35761
Blocks:
  Show dependency treegraph
 
Reported: 2024-11-20 09:23 UTC by Jake Deery
Modified: 2025-01-06 15:50 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 35761: Integrate EDI into new FTP/SFTP management UI (33.54 KB, patch)
2024-12-04 17:41 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 38489: (follow-up) tidy EDIfact files (14.60 KB, patch)
2024-12-04 17:41 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 38489: Integrate EDI into new FTP/SFTP management UI (33.54 KB, patch)
2024-12-04 17:42 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 38489: (follow-up) tidy EDIfact files (14.60 KB, patch)
2024-12-04 17:42 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 38489: Integrate EDI into new FTP/SFTP management UI (35.56 KB, patch)
2025-01-03 13:19 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 38489: (follow-up) tidy EDIfact files (16.97 KB, patch)
2025-01-03 13:25 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 38489: (follow-up) tidy EDIfact files (16.97 KB, patch)
2025-01-06 15:50 UTC, Jake Deery
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Deery 2024-11-20 09:23:09 UTC
See Bug 35761. This bug should continue this work, by moving the EDI transport information to the sftp_servers table, replacing the FTP/SFTP server details instead with a foreign key.
Comment 1 Jake Deery 2024-12-04 17:41:17 UTC Comment hidden (obsolete)
Comment 2 Jake Deery 2024-12-04 17:41:28 UTC Comment hidden (obsolete)
Comment 3 Jake Deery 2024-12-04 17:42:39 UTC Comment hidden (obsolete)
Comment 4 Jake Deery 2024-12-04 17:42:48 UTC Comment hidden (obsolete)
Comment 5 Jake Deery 2025-01-03 13:19:32 UTC
Created attachment 176118 [details] [review]
Bug 38489: Integrate EDI into new FTP/SFTP management UI

This patch integrates the EDI Transport.pm module into the new FTP/SFTP
management UI by tweaking the existing methods to look at the new SftpServer
object, instead of its own.

Included also is a change to the database structure to make use of the new
sftp_servers table, as well as an atomic update to copy the schema changes,
and existing config to the new sftp_servers table.

NOTE:       To test this bug, you'll need to have access to a valid FTP/SFTP
  server, within which you are able to generate exemplar quotes, orders,
  and invoices. If you do not have access to this, contact me, and I will
  try to arrange something. Thanks

To test:
a)  Apply Bug 35761, follow that test plan, and enable EDIFACT syspref
b)  Notice how there is a duplication of FTP/SFTP details in Koha, between
    EDI and FTP/SFTP Servers
c)  APPLY THIS BUG, reset_all, and enable EDIFACT syspref
d)  Create an FTP/SFTP Server under Koha Administration -> FTP/SFTP Server
e)  Create an EDI account
    1)  Notice how there is now two dropdowns for upload & download server
    2)  Choose the same server for both options
    3)  Set valid download & upload directories
    4)  Enable quotes, orders, and invoices
f)  Run ./misc/cronjobs/edi_cron.pl
    1)  Check that a quote is now in Koha from the EDI vendor
    2)  Confirm the quote via the staff client
g)  Run ./misc/cronjobs/edi_cron.pl
    1)  Check that the order is now on the FTP/SFTP server
    2)  Generate an invoice on the FTP/SFTP server
h)  Run ./misc/cronjobs/edi_cron.pl
    1)  Confirm Koha has received the invoice
    2)  Mark the invoice as paid in the staff client
i)  Run ./misc/cronjobs/edi_cron.pl
    1)  Check that the invoice is now on the FTP/SFTP server
j)  SIGN OFF!
Comment 6 Jake Deery 2025-01-03 13:25:21 UTC
Created attachment 176119 [details] [review]
Bug 38489: (follow-up) tidy EDIfact files

This patch follows-up by by tidying the following files:
*   Koha/Edifact/Transport.pm
*   admin/edi_accounts.pl
Comment 7 Jake Deery 2025-01-06 15:50:24 UTC
Created attachment 176161 [details] [review]
Bug 38489: (follow-up) tidy EDIfact files

This patch follows-up by by tidying the following files:
*   Koha/Edifact/Transport.pm
*   admin/edi_accounts.pl