Uploaded image for project: 'mod-invoice'
  1. mod-invoice
  2. MODINVOICE-165

Create pending payments for every Approved invoice upon module upgrade

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      ACQ Sprint 90
    • Story Points:
      2
    • Development Team:
      Thunderjet

      Description

      Overview

      With the addition of a new transaction type and the change of the invoice approval logic, it became necessary to migrate data in the mod-finance-storage. However, to migrate data in the mod-finance-storage the data from the mod-invoice-storage are required. Therefore, an approach using API instead of SQL queries has been chosen. The mod-invoice was chosen to exclude the possibility of a cyclic dependency between finance and invoices, and not to create dependencies between storage modules.

      Approach

      Add /_/tenant API to module descriptor
      Override TenantAPI.postTenant to add following logic:

      • if moduleFrom version < planed version
        • get all invoices and lines with status Approved
        • create Pending payment for every fundDistribution
        • send prepared Pending payments to POST /finance-storage/pending-payment-migration

      Acceptance Criteria

      • /_/tenant API added
      • postTenant implemented as described
      • unit tests?
      • migration tested

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                aliaksandr_pautau Aliaksandr Pautau
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases