Uploaded image for project: 'mod-orders'
  1. mod-orders
  2. MODORDERS-158

Refactor POLine model - Schemas



    • Story
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Done
    • None
    • 4.0.0
    • None
    • ACQ Sprint 58, ACQ Sprint 59
    • 2
    • Thunderjet


      In order to simplify the business logic layer and reduce the likelihood of inconsistencies/race conditions/etc. we've decided to refactor the poLine model so that most of the sub-objects (e.g. cost, details, etc.) are merged directly into the poLine schema. The overall structure would stay the same, but these sub-objects wouldn't need to have their own UUID and also would need to maintain a reference back to the poLine. These changes to the PoLine model closely relate to work needed in mod-orders, ui-orders and mod-orders-storage to accommodate these changes.

      The end result of this would be that we'll be storing something that looks a lot more like composite_po_line. The few remaining references to other orders sub-objects (e.g. reportingCode, alerts, etc.) are to controlled vocabularies - things that can be referenced by many poLines. Despite the narrowing of the gap between poLine and compositePoLine, for now we'll still maintain the two schemas

      The Acquisitions API Listing document provides a little more detail in this comment:

      NOTE: po_line now includes: adjustments, claims, cost, detail, eresource, fund_distribution, license, location, physical, source, vendor_detail

      Update the PoLine model (schemas and examples). Necessary changes to the UI, business logic and storage layers will be addressed in separate stories.

      Acceptance Criteria:

      • id and poLineId fields are removed from the sub-object schemas listed above
      • UUID references to these sub-objects are removed from PoLine and their schemas are included/referenced by the poLine schema instead. (a la compositePoLine)
      • examples are updated
      • fields in these schemas are transitioned to camelCase if still using underscore_notation.

      TestRail: Results


          Issue Links



                cmcnally Craig McNally
                cmcnally Craig McNally
                Craig McNally Craig McNally
                0 Vote for this issue
                1 Start watching this issue



                  TestRail: Runs

                    TestRail: Cases