Skip to content

Auto-update opportunity status for past-dated opportunities #672

@nadavosa

Description

@nadavosa

Summary

Opportunities of type event and accompanying whose date is at least 1 day in the past should have their statuses automatically updated.

Requirements

For any event or accompanying type opportunity where the date is strictly before today:

  1. Opportunity status → set to inactive (always, whether or not a volunteer was matched)
  2. Matching status in the deal table → if a volunteer was matched, set the matching status to past on the deal record (this reflects on both the opportunity side and the volunteer's profile side, since both read from the deal table)

Acceptance Criteria

  • Event/accompanying opportunity with a past date (≥1 day ago) has its status set to inactive, regardless of volunteer match
  • If a volunteer was matched, the deal record's matching status is set to past
  • Opportunities dated today or in the future are not affected
  • Other opportunity types are not affected
  • The logic runs automatically (e.g. scheduled job or on-read computation)

Notes

  • "1 day in the past" = date is strictly before today (today is not considered past)
  • The deal table is the source of truth for the volunteer↔opportunity matching status; updating it there is reflected in both the opportunity view and the volunteer's profile

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions