EDI SFTP Records wrong remote file when sending purchase order

Bug #2060153 reported by Jason Stephenson
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Committed
Medium
Unassigned
3.11
Fix Committed
Medium
Unassigned

Bug Description

Evergreen: main, 3.11.5, 3.12.3

A bug slipped through testing of SFTP EDI fixes in bug 2040514.

When sending the ORDERS message (.EPO file), the wrong value gets recorded in the remote_file column of the acq.edi_message table. Instead of the remote file name, the return value of the SFTP put operation gets stored in the remote_file column. This is usually the value "1" when the put was successful.

The correct file is sent to the correct location on the remote server, and it appears to be processed correctly otherwise, including subsequent messages being picked up and processed.

This appears to be another case of the implementation of the Net::FTP functions not working quite right with Net::SFTP::Foreign.

C/W MARS, Inc. noticed this after trying the code in production. It also turns up in the database that was used for testing this feature, but was overlooked at the time, since the bug reporter focused his attention on if the file made it to the other server or not and didn't notice the database anomaly.

A patch will be forthcoming once it has been tested.

description: updated
Revision history for this message
Jason Stephenson (jstephenson) wrote :

A proposed fix for this issue is available in working/user/dyrcona/lp2060153-edi-stfp-put-repair (https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp2060153-edi-stfp-put-repair).

C/W MARS, Inc. is using it in production.

tags: added: pullrequest
Changed in evergreen:
assignee: Jason Stephenson (jstephenson) → nobody
milestone: none → 3.13-beta
Revision history for this message
Galen Charlton (gmc) wrote :

I'll review it this morning.

Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Galen Charlton (gmc) wrote :

Tested and signed off. Branch is working/user/gmcharlt/lp2060153_signoff

tags: added: signedoff
Changed in evergreen:
assignee: Galen Charlton (gmc) → nobody
milestone: 3.13-beta → 3.12.4
no longer affects: evergreen/3.12
Changed in evergreen:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Galen Charlton (gmc) wrote :

Enough time has passed, and additional sites are using this in production. Merged down to rel_3_11. Thanks, Jason!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
milestone: 3.12.4 → 3.12.5
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.