Define new Storage API for updating Instance Reference for Non-package order line

Description

Purpose/Overview:
Current situation or problem: When a purchase orders is connected to the wrong instance there is no way to correct it. Unopening orders to do this is causing issues with receiving workflow.

Use cases:
Use cases

Requirements/Scope:

  1. Define API through which it should be possible replace instance reference for opened order line.

Approach:
1. Define storage PATCH method
2. Refactoring

  • Move following methods in the org.folio.services.lines.PoLinesService:

    • org.folio.rest.impl.PoLinesAPI#createPoLineWithTitle. And handleResponseWithLocation(asyncResultHandler, tx, "POLine {} {} created") should stay in the controller

    • org.folio.rest.impl.PoLinesAPI#updatePoLineWithTitle

    • Logic from org.folio.rest.impl.PoLinesAPI#deleteOrdersStoragePoLinesById should be moved to org.folio.services.lines.PoLinesService

      !Important : Basically all business logic should be placed in the business services

3. Define class abstractions

  • Create the same class structure as in the mod-orders Class diagram

  • All classes should be defined in the Spring context as singletons

Acceptance criteria:

  • RAML file ramls/po-line.raml updated

  • Stubs implemented

  • Optional : API tests

Environment

None

Potential Workaround

None

Attachments

5

Checklist

hide

TestRail: Results

Activity

Show:

Andrei MakarankaMay 30, 2022 at 1:56 PM

Verified on snapshot

Dzmitry ButramyouMay 27, 2022 at 1:29 PM

Verified via postman.

Andrei MakarankaMay 27, 2022 at 8:08 AM

Run on snapshot-2. Looks correct



Please test PAtCH via postman.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Thunderjet

Fix versions

Release

Morning Glory (R2 2022)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created November 22, 2021 at 9:46 AM
Updated July 26, 2022 at 6:13 PM
Resolved May 30, 2022 at 1:56 PM
TestRail: Cases
TestRail: Runs