Skip to content

feat: auto-update opportunity and match status when appointment date passes #672

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 — without coordinator action.

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 (regular volunteering) are not affected
  • The logic runs automatically — either via a scheduled cron job or computed on-read

Implementation note

  • "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 view
  • A lightweight scheduled job (e.g. daily at midnight) is the simplest approach; on-read is also acceptable if a cron is complex to set up

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

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