Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

Refactor Reservation Date Logic #1669

Open
@esoterik

Description

@esoterik

We need to make sure that there's a single source of date logic for reservations that lives in the Reservations model. #end_date and #overlaps_with? are two examples of methods that do this already, but I don't trust that they're used appropriately everywhere.

In the end, the only time the due_date attribute should be referenced outside of the reservation model is during reservation creation and when reservations are flagged as overdue (essentially, only situations that care about the actual due date, not just when the reservation is no longer actively holding an equipment item). Everywhere else should use an appropriate method on the reservation model.

The motivation behind this is to make #986 easier: in that issue, we need to add a processing date attribute to reservations.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions