Adjust Requisition Line Item fields to use Orderable versioning


There is a need to support Orderable versioning in Requisition Line Item (RLI) class. We need to remove and add several fields to stop using snapshotted (copied) values and retrieve the values by fetching the referenced (versioned) entity.

Acceptance criteria

  1. Adding Orderable version to RLI - to reference an Orderable in RLI to handle multiple version. Orderable id has been already added.

  2. Removing packsToShip, pricePerPack, totalCost and nonFullSupply (Reference Data based values) from RLI entity - the fields are currently snapshotted (fetched from Orderable and calculated). The values should be retrieved via Orderable reference.

  3. Orderable Id and version should be encapsulated in one class eg. EntityReference.

  4. There should be a migration committed for the existing RequisitionLineItems. The simplest approach is to drop the mentioned fields and obtain the values by referencing the latest available Orderable version.

  5. Replace fields in report generation (RequisitionLines.jrxml) to use proper methods instead of deleted fields - eg. replace pricePerPack with calculatePricePerPack()

  6. Fix v1 endpoint handling to use calculated fields

This issue has been created basing on design discussion


Additional questions

  • Before commiting the changes, should we assume that current orderable always represents snapshotted values

    • Yes

  • How should we migrate already snapshotted value when orderable has been changed?

    • always use the latest orderable

  • Is there a possibility that different orderables may have different fields? (eg. later someone will decide to delete one field)? If so, how should we deal with this situation?

    • impossible


Łukasz Lewczyński


Paweł Cieszko


Story Points


Time tracking


Epic Link




Fix versions