Skip to content

Cancellations do not restore Opportunities' capacity in Feeds #166

Open

Description

@lukehesluke

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

Activity

  1. lukehesluke commented on Oct 19, 2022

    @lukehesluke
    ContributorAuthor

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

  2. lukehesluke commented on Oct 19, 2022

    @lukehesluke
    ContributorAuthor

    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

  3. lukehesluke commented on Oct 19, 2022

    @lukehesluke
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions