Bug 39878 - EDIFACT vendor account records sets default port incorrectly for FTP
Summary: EDIFACT vendor account records sets default port incorrectly for FTP
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Kyle M Hall (khall)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-12 14:43 UTC by Kyle M Hall (khall)
Modified: 2025-05-13 16:48 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the default upload and download ports when creating an EDI account (Koha administration > Acquisition parameters > EDI accounts > New account). If: - FTP is selected, it now defaults to port 21 (instead of port 22). - SFTP is selected, it defaults to port 22.
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 39878: EDIFACT vendor account records sets default port incorrectly for FTP (2.26 KB, patch)
2025-05-12 14:51 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39878: EDIFACT vendor account records sets default port incorrectly for FTP (2.29 KB, patch)
2025-05-12 22:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 39878: (follow-up) Update hints for default FTP and SFTP ports (1.91 KB, patch)
2025-05-12 22:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 39878: EDIFACT vendor account records sets default port incorrectly for FTP (2.36 KB, patch)
2025-05-13 06:39 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39878: (follow-up) Update hints for default FTP and SFTP ports (1.98 KB, patch)
2025-05-13 06:39 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2025-05-12 14:43:17 UTC
When creating or editing an EDI (EDIFACT vendor record) if the port is left empty it will be set to port 22. This is fine then the service is SFTP, but if FTP is selected the default to 21.
Comment 1 Kyle M Hall (khall) 2025-05-12 14:51:48 UTC
Created attachment 182297 [details] [review]
Bug 39878: EDIFACT vendor account records sets default port incorrectly for FTP

When creating or editing an EDI (EDIFACT vendor record) if the port is left empty it will be set to port 22. This is fine then the service is SFTP, but if FTP is selected the default to 21.

Test plan:
1) Enable EDIFACT
2) Create a new EDI Vendor account with the FTP transport selected. Pleave the ports unpopulated
3) Note the saved record has port 22 set
4) Apply this patch
5) Restart all the things!
6) Repeat stepts 1 and 2
7) The port should now be 21 for new ftp site and 22 for new stp sites!
Comment 2 David Nind 2025-05-12 22:02:45 UTC
Created attachment 182316 [details] [review]
Bug 39878: EDIFACT vendor account records sets default port incorrectly for FTP

When creating or editing an EDI (EDIFACT vendor record) if the port is left empty it will be set to port 22. This is fine then the service is SFTP, but if FTP is selected the default to 21.

Test plan:
1) Enable EDIFACT
2) Create a new EDI Vendor account with the FTP transport selected. Pleave the ports unpopulated
3) Note the saved record has port 22 set
4) Apply this patch
5) Restart all the things!
6) Repeat stepts 1 and 2
7) The port should now be 21 for new ftp site and 22 for new stp sites!

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-05-12 22:02:48 UTC
Created attachment 182317 [details] [review]
Bug 39878: (follow-up) Update hints for default FTP and SFTP ports

Hint now covers the default ports for FTP (21) and
SFTP (22), instead of "will default to 22".

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Martin Renvoize (ashimema) 2025-05-13 06:39:36 UTC
Created attachment 182331 [details] [review]
Bug 39878: EDIFACT vendor account records sets default port incorrectly for FTP

When creating or editing an EDI (EDIFACT vendor record) if the port is left empty it will be set to port 22. This is fine then the service is SFTP, but if FTP is selected the default to 21.

Test plan:
1) Enable EDIFACT
2) Create a new EDI Vendor account with the FTP transport selected. Pleave the ports unpopulated
3) Note the saved record has port 22 set
4) Apply this patch
5) Restart all the things!
6) Repeat stepts 1 and 2
7) The port should now be 21 for new ftp site and 22 for new stp sites!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 5 Martin Renvoize (ashimema) 2025-05-13 06:39:39 UTC
Created attachment 182332 [details] [review]
Bug 39878: (follow-up) Update hints for default FTP and SFTP ports

Hint now covers the default ports for FTP (21) and
SFTP (22), instead of "will default to 22".

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 6 Katrin Fischer 2025-05-13 16:48:06 UTC
Pushed for 25.05!

Well done everyone, thank you!