Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Fixed Term subscriptions showing Active after Expiry ( KB 0.24.4 ) #1930

Open
KBbitsP opened this issue Oct 12, 2023 · 5 comments

Comments

@KBbitsP
Copy link
Contributor

KBbitsP commented Oct 12, 2023

Steps to reproduce :

  1. Use Killbill version 0.24.4 ( reproducible on 0.24.10 as well )
  2. Use the catalog : https://github.com/killbill/killbill-docs/blob/4671dcd9da1cf021e85629ab67e3ffb6fb553bb1/catalogs/fixedterm-no-trial.xml
  3. Create a subscription starting 1st September.
  4. Query the endpoint https://killbill.github.io/slate/subscription.html#retrieve-a-subscription-by-id and observe the field billingEndDate.
  5. Move the date to 25th October.
  6. Again query the endpoint https://killbill.github.io/slate/subscription.html#retrieve-a-subscription-by-id and observe the fields cancelledDate, billingEndDate and State.
  7. Check the subscription tab in Kaui.

Observed Issues :

  1. For a fixed term subscription, fields cancelledDate and billingEndDate remain null at the time of creation of the subscription, during the period the subscription is active and after the fixed time period is over.
  2. The State of the subscription stays as 'Active' even after the subscription time period is finished.
  3. Kaui continues to show the subscription as active in the subscriptions tab, however, if you try to cancel the subscription, a message is displayed showing that subscription is already expired.

Expected :

  1. billingEndDate should take into account the fixed term period and cancelledDate should show correct date after the fixed subscription period is over.
  2. The 'State' should correctly reflect that the subscription is Expired.
  3. Kaui subscription tab should show the correct status once the subscription is Expired.
@reshmabidikar
Copy link
Contributor

reshmabidikar commented Oct 13, 2023

I think the issue is in the getSubscriptionForEntitlementId method. The tests the subscription module (TestUserApiExpire) check for the expired state (for ex. this line) and work fine. However, in the beatrix test (TestCatalogFixedTerm) we missed adding a check for expired state (after this line).

@shaun-forgie
Copy link

Is this scheduled for a fix in a given release yet?

@reshmabidikar
Copy link
Contributor

Is this scheduled for a fix in a given release yet?

Not yet, we will update the ticket once this issue is addressed.

@shaun-forgie
Copy link

shaun-forgie commented Feb 19, 2024

So you will update the expired subscription to have a value in the cancelledDate field along with returning a new status
of expired.

@shaun-forgie
Copy link

this seem related to #1921

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants