Uploaded image for project: 'ERM Platform'
  1. ERM Platform
  2. ERM-1883

Change to coverage should lead to updated entry in EntitlementLog

    XMLWordPrintable

Details

    • ERM Sprint 125, ERM Sprint 126, ERM Sprint 127, ERM Sprint 128, ERM Sprint 129
    • Bienenvolk
    • Lotus R1 2022

    Description

      Purpose:

      If the coverage for an entitlement changes because of:

      • Update of an existing PCI coverage
      • Update of an existing Agreement Line custom coverage
      • Addition of new PCI coverage
      • Addition of new Agreement Line custom coverage
      • Removal of a PCI coverage statement
      • Removal of Agreement Line custom coverage

      the change should be advertised in the entitlement log through a new entry with an eventType of "UPDATE" (or similar)

      User story statement(s):

      As a consumer of the EntitlementLog,
      I want to have the correct coverage information
      so that I can use it appropriately (e.g. in a union catalogue)

      Scenarios:

      1. Scenario:
        • Given a PCI with an active entitlement and no custom coverage set on the agreement line
        • When an existing coverage statement for the PCI is updated
        • Then a new entry will be added to the entitlementLog with eventType of "UPDATE" and include the updated coverage
      2. Scenario:
        • Given a PCI with an active entitlement and no custom coverage set on the agreement line
        • When a new coverage statement for the PCI is added
        • Then a new entry will be added to the entitlementLog with eventType of "UPDATE" and include the updated coverage
      3. Scenario:
        • Given a PCI with an active entitlement which has custom coverage set on the agreement line
        • When the existing custom coverage statement for the entitlement is updated
        • Then a new entry will be added to the entitlementLog with eventType of "UPDATE" and include the updated coverage
      4. Scenario:
        • Given a PCI with an active entitlement and no custom coverage set on the agreement line
        • When a new custom coverage statement for the entitlement is added
        • Then a new entry will be added to the entitlementLog with eventType of "UPDATE" and include the updated coverage
      5. Scenario:
        • Given a PCI with an active entitlement which has custom coverage set on the agreement line
        • When an existing coverage statement for the PCI is updated
        • Then a new entry will be added to the entitlementLog with eventType of "UPDATE" and include the updated coverage
      6. Scenario:
        • Given a PCI with an active entitlement and no custom coverage set on the agreement line
        • When an existing coverage statement for the PCI is updated
        • Then a new entry will be added to the entitlementLog with eventType of "UPDATE" and include the updated coverage

       

      Dev task breakdown

      https://github.com/folio-org/mod-agreements/blob/6febed3bee4aec20f1c2b97857ef51cabbbf710a/service/grails-app/services/org/olf/EntitlementLogService.groovy#L98-L149

      • This method is triggered regularly and updates the entitlementLogs
      • Add another section for "updated" entitlements, check for the above (Not entirely sure we can know if some of these have changed... May have to recalculate for each entitlement and compare to existing log or something...
      • If changes have occurred, create new EntitlementLogEntry

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                ostephens Owen Stephens
                ostephens Owen Stephens
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases