Uploaded image for project: 'mod-invoice'
  1. mod-invoice
  2. MODINVOICE-133

Implement the "upload" endpoint

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      ACQ Sprint 89
    • Story Points:
      3
    • Development Team:
      Thunderjet

      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.

      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

              Activity

                People

                Assignee:
                aliaksandr_pautau Aliaksandr Pautau
                Reporter:
                cmcnally Craig McNally
                Tester Assignee:
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases