Uploaded image for project: 'mod-orders-storage'
  1. mod-orders-storage
  2. MODORDSTOR-73

Implement GET /order-lines w/ search and filtering

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Done
    • None
    • 5.0.0
    • None
    • ACQ Sprint 62
    • 2
    • EBSCO - FSE

    Description

      Overview:
      In order to support search and filtering across the various orders tables, we'll need to create a view. This is very similar to MODORDSTOR-22 only a poLine is returned instead of the purchase order. The GET /order-lines API is for querying this new view.

      id j sonb metadata
      poLine.id poLine.jsonb purchaseOrder.jsonb + poLine.jsonb

      For now the metadata column will be a complete merging of json blobs from purchaseOrder and poLine. Later, we might transition this to a smaller subset of fields from those three tables.

      Queries will match against the metadata column, but will return the jsonb column containing the poLine record. Unlike MODORDSTOR-22, DISTINCT ON is not required here, making this slightly simpler.

      • Create view when enabled for a tenant (See the attached SQL)
      • implement logic to perform lookup (See the attached POC)

      Acceptance Criteria:

      • The view is automatically created when the module is enabled for a tenant
      • Unit tests exists and cover positive and negative scenarios, including ordering, paging, resultCounts, etc.

      TestRail: Results

        Attachments

          1. 6-invoices-modal.png
            224 kB
            Dennis Bridges
          2. create_search_order-lines_view.sql
            0.3 kB
            Craig McNally
          3. SearchAndFilterLinesPOC.java
            3 kB
            Craig McNally

          Issue Links

            Activity

              People

                cmcnally Craig McNally
                cmcnally Craig McNally
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases