forked from GitHubMirrors/silverbullet-icalendar
chore(conductor): Add new track 'Fix RRULE UNTIL conversion'
This commit is contained in:
@@ -16,3 +16,8 @@ This file tracks all major tracks for the project. Each track has its own detail
|
||||
|
||||
- [x] **Track: Fix RRULE object expansion error by correctly mapping object keys to standard iCalendar RRULE properties.**
|
||||
*Link: [./tracks/fix_rrule_object_mapping_20260219/](./tracks/fix_rrule_object_mapping_20260219/)*
|
||||
|
||||
---
|
||||
|
||||
- [ ] **Track: Fix RRULE UNTIL object conversion error: Invalid UNTIL value: [object Object]**
|
||||
*Link: [./tracks/fix_rrule_until_conversion_20260219/](./tracks/fix_rrule_until_conversion_20260219/)*
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Track fix_rrule_until_conversion_20260219 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"track_id": "fix_rrule_until_conversion_20260219",
|
||||
"type": "bug",
|
||||
"status": "new",
|
||||
"created_at": "2026-02-19T00:00:00Z",
|
||||
"updated_at": "2026-02-19T00:00:00Z",
|
||||
"description": "Fix RRULE UNTIL object conversion error: Invalid UNTIL value: [object Object]"
|
||||
}
|
||||
19
conductor/tracks/fix_rrule_until_conversion_20260219/plan.md
Normal file
19
conductor/tracks/fix_rrule_until_conversion_20260219/plan.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Implementation Plan - Fix RRULE UNTIL Conversion
|
||||
|
||||
## Phase 1: Reproduction
|
||||
- [ ] Task: Reproduce `Invalid UNTIL value` error
|
||||
- [ ] Add a test case in `icalendar_test.ts` where `rrule` object has an `until` property as a `Date`.
|
||||
- [ ] Run the test and confirm it fails with `Error: Invalid UNTIL value: [object Object]`.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Reproduction' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: Fix Implementation
|
||||
- [ ] Task: Implement value formatting logic in `icalendar.ts`
|
||||
- [ ] Update `expandRecurrences` to use a helper for property value conversion.
|
||||
- [ ] Ensure `Date` objects are formatted as `YYYYMMDDTHHMMSSZ`.
|
||||
- [ ] Run the test to confirm it passes.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Fix Implementation' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: Verification & Cleanup
|
||||
- [ ] Task: Full Regression Check
|
||||
- [ ] Run all tests in `icalendar_test.ts`.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Verification & Cleanup' (Protocol in workflow.md)
|
||||
20
conductor/tracks/fix_rrule_until_conversion_20260219/spec.md
Normal file
20
conductor/tracks/fix_rrule_until_conversion_20260219/spec.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Specification: Fix RRULE UNTIL Object Conversion
|
||||
|
||||
## Overview
|
||||
The conversion of RRULE objects to strings fails for nested objects like `UNTIL` dates, resulting in `UNTIL=[object Object]`. This causes the `rrule` library to fail during expansion.
|
||||
|
||||
## Functional Requirements
|
||||
- **Robust Value Formatting:** Implement `formatRRuleValue` to handle various types of RRULE values:
|
||||
- **Date Objects:** Convert to `YYYYMMDDTHHMMSSZ`.
|
||||
- **Nested Date Objects:** (e.g., `{ date: Date }` from `ts-ics`) Extract and convert.
|
||||
- **Other Types:** Default to string conversion.
|
||||
- **Mapping Preservation:** Maintain the existing `RRULE_KEY_MAP` for key translation.
|
||||
|
||||
## Implementation Steps
|
||||
1. **Reproduce:** Add test `expandRecurrences - object rrule with until` in `icalendar_test.ts` using a Date object for `until`. Verify it fails with `Invalid UNTIL value`.
|
||||
2. **Fix:** Update `expandRecurrences` in `icalendar.ts` to use a formatting helper for values.
|
||||
3. **Verify:** Confirm the test case passes.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Test `expandRecurrences - object rrule with until` passes.
|
||||
- [ ] The generated string correctly represents the date (e.g., `UNTIL=20260219T000000Z`).
|
||||
Reference in New Issue
Block a user