Details
-
Type:
Story
-
Status: Closed (View Workflow)
-
Priority:
P3
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 4.0.0
-
Labels:
-
Template:customfield_11100 32299
-
Sprint:ACQ Sprint 89
-
Story Points:3
-
Development Team:Thunderjet
-
Epic Link:
Description
Overview
Building upon the work done in MODINVOICE-137, this story adds the business logic for FTP upload of the batch voucher.
- Once the batch voucher is generated and persisted,
- if the batch voucher export configuration has uploadURI,
- Connect to the configured FTP server, using the username/password if provided.
- Convert the batch voucher to XML if necessary (format is specified in the export configuration)
- Upload the batch voucher to the specified location
- Update the batch voucher export record (status = Uploaded/Error). In the case of an error, populate the "message" field w/ some context, e.g. failed to connect to FTP server.
- if the batch voucher export configuration has uploadURI,
This story also includes implementation of the "upload" endpoints.
"upload" - very similar to the BL described above, only the batch voucher specified needs to be retrieved from storage first.
See the wiki for additional details.
NOTE: I'm assuming these API implementations will leverage shared code and should be fairly straight forward once the main BL is done. If this isn't the case we can split these out into one or more separate user stories.
NOTE: It may be challenging to write unit tests for this functionality. It might be helpful to use an embedded FTP server such as Apache MINA to help. This is not a requirement, only a suggestion.
NOTE: For the API tests, given the difficulty of verifying that the file was successfully uploaded to the FTP server, it's reasonable to only exercise the exceptional path here... e.g. call the upload endpoint referring to a configuration that doesn't specify uploadURI.
Acceptance Criteria
- FTP support has been added to "upload" endpoints
- FTP support has been added to the main batch voucher export background task/flow
- unit tests are updated
- API tests are updated.
NOTE Testing FTP : https://dev.folio.org/guides/ftp-ci-server/
TestRail: Results
Attachments
Issue Links
- blocks
-
MODINVOICE-166 MODINVOICE (mod-invoice) release
-
- Closed
-
- has to be done after
-
FOLIO-2450 FTP/SFTP servers for the reference environments
-
- Closed
-
-
MODINVOICE-126 XML schema for batch-voucher
-
- Closed
-
-
MODINVOICE-131 Create batch-voucher-export CRUD API
-
- Closed
-
-
MODINVOICE-132 Batch voucher generation and persistence
-
- Closed
-
-
MODINVOICE-137 Implement "test" endpoint
-
- Closed
-
-
MODINVOSTO-51 Create batch-voucher-configurations CRUD API
-
- Closed
-
-
MODINVOSTO-53 Create batch-voucher API
-
- Closed
-
-
MODINVOSTO-54 Create batch-voucher-exports CRUD API
-
- Closed
-
- relates to
-
UXPROD-2297 Part 2 - Export Library Accounting vouchers (Create Batch and Upload to ftp)
-
- Closed
-
-
MODINVOICE-170 Fix batch voucher file name generation
-
- Closed
-