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

Do contract sync for contracts missing subscription_number in the past due to IT partner gateway bug

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • swatch-contracts
    • None

      See the card (https://issues.redhat.com/browse/SWATCH-3887) for queries and examples. After the IT Partner Gateway implemented the fix in ITPART-2131, all newly created contracts will now have an end date when they are unsubscribed/terminated. However, to keep legacy contracts in sync, we need to perform a contract sync for the affected orgs. This will ensure the contracts and subscriptions tables remain consistent and will also allow us to safely deprecate the contracts table and its related dependencies in the future.

      Example sql query to find the mismatch:

      SELECT *,CASE WHEN s.subscription_id IS NULL THEN TRUE  ELSE FALSE  END AS subscription_missing_contract_present FROM contracts c LEFT JOIN subscription s ON c.subscription_number = s.subscription_number AND c.start_date = s.start_date WHERE s.subscription_id IS NULL 

      AC: 

      • Determine a SQL query to find contracts with missing subscriptions
      • Run contract sync only for the legacy contracts where there are missing subscriptions.

              Unassigned Unassigned
              karshah@redhat.com Kartik Shah
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: