Bug 39904

Summary: EDIFACT error messages are malformed
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: AcquisitionsAssignee: Kyle M Hall (khall) <kyle>
Status: Pushed to main --- QA Contact: Emily Lamancusa (emlam) <emily.lamancusa>
Severity: minor    
Priority: P5 - low CC: emily.lamancusa, kyle
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 39904: EDIFACT error messages are malformed
Bug 39904: EDIFACT error messages are malformed
Bug 39904: EDIFACT error messages are malformed
Bug 39904: (QA follow-up) Fix a few other cases

Description Kyle M Hall (khall) 2025-05-14 14:51:28 UTC
Perl can interpolate hashrefs but not method calls. This results in messages like "Cannot connect to Koha::Schema::Result::VendorEdiAccount=HASH(0xaaab059252f0)->host: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58." when running the edi_cron.pl cronjob.
Comment 1 Kyle M Hall (khall) 2025-05-14 15:53:23 UTC
Created attachment 182458 [details] [review]
Bug 39904: EDIFACT error messages are malformed

Perl can interpolate hashrefs but not method calls. This results in messages like "Cannot connect to Koha::Schema::Result::VendorEdiAccount=HASH(0xaaab059252f0)->host: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58." when running the edi_cron.pl cronjob.

Test Plan:
1) Enable EDIFACT
2) Create a fake EDI account with a bad FTP server in it
3) Run edi_cron.pl
4) Note the errors like:
    Cannot connect to Koha::Schema::Result::VendorEdiAccount=HASH(0xaaab059252f0)->host: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58.
5) Apply this patch
6) Run edi_cron.pl
7) Note the errors are now like:
    Cannot connect to test.example.com: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58.
Comment 2 David Nind 2025-05-14 17:55:57 UTC
Created attachment 182463 [details] [review]
Bug 39904: EDIFACT error messages are malformed

Perl can interpolate hashrefs but not method calls. This results in messages like "Cannot connect to Koha::Schema::Result::VendorEdiAccount=HASH(0xaaab059252f0)->host: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58." when running the edi_cron.pl cronjob.

Test Plan:
1) Enable EDIFACT
2) Create a fake EDI account with a bad FTP server in it
3) Run edi_cron.pl
4) Note the errors like:
    Cannot connect to Koha::Schema::Result::VendorEdiAccount=HASH(0xaaab059252f0)->host: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58.
5) Apply this patch
6) Run edi_cron.pl
7) Note the errors are now like:
    Cannot connect to test.example.com: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Emily Lamancusa (emlam) 2025-05-16 20:16:08 UTC
Created attachment 182555 [details] [review]
Bug 39904: EDIFACT error messages are malformed

Perl can interpolate hashrefs but not method calls. This results in messages like "Cannot connect to Koha::Schema::Result::VendorEdiAccount=HASH(0xaaab059252f0)->host: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58." when running the edi_cron.pl cronjob.

Test Plan:
1) Enable EDIFACT
2) Create a fake EDI account with a bad FTP server in it
3) Run edi_cron.pl
4) Note the errors like:
    Cannot connect to Koha::Schema::Result::VendorEdiAccount=HASH(0xaaab059252f0)->host: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58.
5) Apply this patch
6) Run edi_cron.pl
7) Note the errors are now like:
    Cannot connect to test.example.com: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 4 Emily Lamancusa (emlam) 2025-05-16 20:16:10 UTC
Created attachment 182556 [details] [review]
Bug 39904: (QA follow-up) Fix a few other cases

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 5 Katrin Fischer 2025-05-19 07:06:13 UTC
It feels like a regression test might make sense here?
Comment 6 Katrin Fischer 2025-05-19 07:50:23 UTC
Pushed for 25.05!

Well done everyone, thank you!