-
Task
-
Resolution: Unresolved
-
Critical
-
None
-
None
-
None
-
5
-
False
-
-
False
-
subs-swatch-lightning
-
-
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.
- blocks
-
SWATCH-3887 Swatch doesn't utilize IT Partner Gateway unsubscribed status
-
- Closed
-