Clone
 

elias muluneh <eliasmu@gmail.com> in openlmis-fulfillment

OLMIS-6010: improve test coverage

Bug Fix: rowsWithUnresolvedOrderable property should be visible in shipments api response

Remove unused setter, added a test

Split shipment error handler into a separate class to improve testability

Review feedback. Remove Gson and use Jackson for serializing unresolved orderable rows

Introduce methods to add line item and unresolved rows.

Use existing MessageKeys instead of String.format

Update shipment schema to include rowsWithUnresolvedOrderable.

    • -0
    • +4
    /src/main/resources/schemas/shipment.json
OLMIS-5986: For shipment files that did not process successfully, write an error log file in the errors folder that describes why it failed to process.

Refactored shipment integration channel names for better readability.

OLMIS-5985: Prefix archived shipment files with timestamp to avoid file name collision.

OLMIS-5675: Capture shipment line items with unresolved orderable in extra data

OLMIS-5671: Support SFTP and Local transfer types

This commit also contains changes that were made to restructure the existing code so that it is better testable.

    • -0
    • +69
    /src/main/resources/META-INF/shipment-file-context.xml
    • -0
    • +87
    /src/main/resources/META-INF/shipment-sftp-context.xml
OLMIS-5672: Accept changes to transfer properties and update the spring contexts that monitor for shipment files.

Simplify the Shipment Line Item Builder by using static imports and using one Map instead of two for Orderables.

Disable caching of shipment templates. Makes it easier to test OLMIS-5832 - OLMIS-5835

Replace usage of ImmutableList.Builder by ImmutableList.of

Check if the orderableDto returned from service matches the mock product.

Added one unit test, Remove @Builder annotation, moved instance variables to private function parameters.

Remove unused variables.

OLMIS-5833: Support optionally using OrderableId or product code to identify orderables in shipment line items.

Implement row level validations for validity of orderables and quantity shipped

OLMIS-5834: Support Order code and Order Id to resolve which order the shipment is fulfilling.

Additional refactoring to split shipment builder and shipment line item builder.

Rename class names to improve readability.

Improve Shipment CSV Parser for readability, reliability

- More reliably read and use the Shipment file template, column position field is used.

- Provide two ways to access records from each row. position bases as well as field name which is read from the shipment template.

- Parse returns List of CSVRecord instead of array of string.

Introduce FileColumnKeyPath Enumeration for known and required column keypaths.

Introducing such enumeration improves readability of the code that depends on specific shipment template columns significantly.

OLMIS-4832: Validate Shipment File Templates for presence/absence of required columns

The validation also detects duplicate identifier columns.

Added missing private access modifiers.

Remove connection and data timeout settings to use the default

Remove unused variable

Remove @Query from OrderRepository, Add more orders in test.

Remove unecessary @Query, improve tests

OLMIS-5674: Add extraData column on shipment Line Item. Persist any extra column defined in shipment file template.

    • -0
    • +1
    /src/main/resources/db/migration/20181121023726318__add_extra_data_column_on_shipment_line_items.sql