bcgov / parks-reso-api

BC Parks Reservation System API
Apache License 2.0
13 stars 13 forks source link

Capture daily facility open/closed status on metrics objects. #309

Open kgorana opened 11 months ago

kgorana commented 11 months ago

Description

When a BC Parks admin user exports the capacity report it can show that 350 passes are available on all days even when the season is over and the facility is set to closed. It would be useful to have the report show 0 passes available when the facility is closed as that reflects reality. This ticket is to do that automatically instead of having a user go in and adjust any capacity numbers, the capacity numbers should stay the same but when a facility is closed it shows as no passes available.

This ticket is to add status properties to our metrics schema.

When a new metrics object is created, it should include the status of the facility, which can be gathered from resObjs for past/future dates, and from the facility itself for current dates if no resObj exists.

{
  pk: metrics::<orcs>::<facilityName>,
  sk:<shortDate>,
  ...
  status: 'open' || 'closed',
}

There is also an opportunity here to collect information on whether the facility had passes required or not on a given day. Open/closed status and Booking Days & Bookable Holidays have different definitions. It should be investigated whether Passes Required can also be captured on a metrics object - though this is not captured in resObjs so it may not be possible.

passesRequired: true || false

For example, a facility may not have any bookings because it is open but not requiring passes.

Acceptance Criteria

Notes

Exporters such as the capacity exporter may need updates to show the new status information.

Linked issues

blocks

relates to

cameronpettit commented 8 months ago

Addressed in https://github.com/bcgov/parks-reso-api/pull/341 and https://github.com/bcgov/parks-reso-admin/pull/330

manuji commented 8 months ago

Tested on TEST: Pending

JLWade commented 8 months ago

When status is set to closed, passes can still be required as this may be due to a snowstorm or one of many is closed so technically passes are still required by the facility itself is closed or unaccessible. If the capacity report has those two columns visible now that should work for offline analysis - I will need to confirm with marshall for longer term changes to that chart in the admin tool.

manuji commented 8 months ago

Thanks for the reply @JLWade . I will then move this to PO review.

JLWade commented 8 months ago

@cameronpettit do yo uknow what the N/A means? looking at joffre in test

Image

cameronpettit commented 8 months ago

This only hit TEST 4 days ago. Only net new metrics will have a status attribute.

JLWade commented 8 months ago

thought that might be the case - moving to done