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

Cancellations do not restore Opportunities' capacity in Feeds #166

Open
lukehesluke opened this issue Oct 7, 2021 · 3 comments
Open

Cancellations do not restore Opportunities' capacity in Feeds #166

lukehesluke opened this issue Oct 7, 2021 · 3 comments

Comments

@lukehesluke
Copy link
Contributor

lukehesluke commented Oct 7, 2021

Assumption: When an Order is cancelled, the Opportunities in the Order should have their capacities restored

Here's an example test run demonstrating that this does not happen for a Customer Requested Cancellation:

cancellation-window_succeed-within-window_openbookingsimpleflow_scheduledsession.md

You can see that the capacity started at 10. By B it had been reduced to 9 (although this actually would've happened at C1 due to anonymous-leasing, but you can't see that in the logs). After Cancel, it is not restored to 10.

This is also present for Seller Requested Cancellations i.e. capacity is not reverted when the Order is cancelled. Here is a run which demonstrates this:

seller-requested-cancellation_seller-requested-cancellation_OpenBookingSimpleFlow_ScheduledSession.md

Impact

Until this is completed, we cannot turn on these checks in Test Suite, which means that Test Suite implementations won't have this functionality. If a Booking System hasn't properly implemented this, then their sessions and slots will look like they've been fully booked when they haven't. This will lead to an appearance of less availability leading to fewer active persons 😨

Acceptance Criteria

When working on this, be sure to use a coverage/* branch (info about coverage branches) and start a branch in Test Suite with the same name.

In this branch on Test Suite, search for all instances of https://github.com/openactive/OpenActive.Server.NET/issues/166 in the code. Here's an example of one:

https://github.com/openactive/openactive-test-suite/blob/e92f7ab1f89ac4a7b9a818e6bd0763eb58876d43/packages/openactive-integration-tests/test/helpers/flow-stages/flow-stage-recipes.js#L554-L555

Update it so that the comment and the doSkip line (which includes RUN_TESTS_WHICH_FAIL_REFIMPL) are removed for each instance. The effect of this will be turning on the post-cancellation capacity checks in Test Suite.

The acceptance criteria is that this branch of Test Suite passes against the OpenActive.Server.Net branch


This was revealed while working on this Test Suite issue: openactive/openactive-test-suite#460

@lukehesluke
Copy link
Contributor Author

lukehesluke commented Oct 19, 2022

+1 to this. Have just been working with a Test Suite user and found this issue with their implementation, which otherwise passes Test Suite

@lukehesluke
Copy link
Contributor Author

One hunch based on my interactions with a user who has implemented an Open Booking API based on OpenActive.Server.NET is that a cancellation does restore an Opportunity's capacity in the feeds but that there is a long time delay before this happens. Since Test Suite cannot wait that long, it counts it as a failure.

But that hunch would need to be tested.

If it is that, then an ideal fix would be to remove the long time delay, which makes availability data more real-time, and allows Test Suite to run against it

@lukehesluke
Copy link
Contributor Author

I've moved this to the OpenActive Tooling Support because, while this is not part of the CR3 changes directly, this is a core part of pre-CR3 OBA which is expected to be be fully supported by tooling but is not. Let me know if that's correct!

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

No branches or pull requests

1 participant