Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-2660

Stop maintaining quantity change information on traditional subscriptions capacity line

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • swatch-contracts
    • 5
    • False
    • Hide

      None

      Show
      None
    • True

      Currently, when quantity changes on a traditional subscription, we terminate the current subscription record and create a new record with the same ID but with the updated quantity, a start date of the current time, and an end date of the original subscription record.

      Rather than try to maintain historical quantity information, we should just update the current subscription and all the attendant subscription measurements.

      The quantity updating code is in SubscriptionSyncController.syncSubscription.

      Automation testing should be done with This should be done using helpers. There is an existing python library for working with wiremock  https://github.com/wiremock/python-wiremock)

      Done Criteria 

      • Do not maintain history of changes for capacity line (traditional subs only). 
      • For subscriptions coming from the IT Partner Gateway, history of changes as represented in the Partner Gateway records is maintained in subscription-watch. 
      • Test that when the start date of a subscription is moved later, it is accurately represented for a traditional subscription. 
      • Test that when the start date of a subscription is moved earlier, it is accurately represented for a traditional subscription. 
      • Test that when the quantity of a subscription is changed , it is accurately represented for a traditional subscription.
      • Automation tests that cover the above cases in ephemeral environments. Some prior work around automation of this type of test was done in https://github.com/RedHatInsights/rhsm-subscriptions/pull/2841
      •  

              Unassigned Unassigned
              awood1@redhat.com Alex Wood
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: