forked from GitHubMirrors/silverbullet-icalendar
chore(conductor): Add new track 'Fix RRULE object mapping'
This commit is contained in:
@@ -11,3 +11,8 @@ This file tracks all major tracks for the project. Each track has its own detail
|
||||
|
||||
- [x] **Track: Fix TypeError: r.replace is not a function in icalendar.ts**
|
||||
*Link: [./tracks/fix_rrule_type_error_20260219/](./tracks/fix_rrule_type_error_20260219/)*
|
||||
|
||||
---
|
||||
|
||||
- [ ] **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/)*
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Track fix_rrule_object_mapping_20260219 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"track_id": "fix_rrule_object_mapping_20260219",
|
||||
"type": "bug",
|
||||
"status": "new",
|
||||
"created_at": "2026-02-19T00:00:00Z",
|
||||
"updated_at": "2026-02-19T00:00:00Z",
|
||||
"description": "Fix RRULE object expansion error by correctly mapping object keys to standard iCalendar RRULE properties."
|
||||
}
|
||||
19
conductor/tracks/fix_rrule_object_mapping_20260219/plan.md
Normal file
19
conductor/tracks/fix_rrule_object_mapping_20260219/plan.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Implementation Plan - Fix RRULE Object Mapping
|
||||
|
||||
## Phase 1: Reproduction
|
||||
- [ ] Task: Reproduce `Unknown RRULE property` error
|
||||
- [ ] Modify the test case in `icalendar_test.ts` to use `frequency` instead of `freq` in the mock object.
|
||||
- [ ] Run the test and confirm it fails with the expected error.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Reproduction' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: Fix Implementation
|
||||
- [ ] Task: Implement mapping logic in `icalendar.ts`
|
||||
- [ ] Create a mapping object for verbose keys to iCal keys.
|
||||
- [ ] Update `expandRecurrences` to use this mapping.
|
||||
- [ ] 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)
|
||||
32
conductor/tracks/fix_rrule_object_mapping_20260219/spec.md
Normal file
32
conductor/tracks/fix_rrule_object_mapping_20260219/spec.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Specification: Fix RRULE Object Expansion Error
|
||||
|
||||
## Overview
|
||||
The previous fix for handling object-type `rrule` properties (returned by `ts-ics`) introduced a regression. The conversion logic used uppercase full names (e.g., `FREQUENCY`), but the `rrule` library's `parseString` method expects standard iCalendar shortened keys (e.g., `FREQ`). This results in an `Error: Unknown RRULE property 'FREQUENCY'`.
|
||||
|
||||
## Functional Requirements
|
||||
- **Correct Key Mapping:** The logic that converts an `rrule` object back to a string must use standard iCalendar RRULE property keys.
|
||||
- **Mapping Table:**
|
||||
- `frequency` -> `FREQ`
|
||||
- `until` -> `UNTIL`
|
||||
- `count` -> `COUNT`
|
||||
- `interval` -> `INTERVAL`
|
||||
- `bysecond` -> `BYSECOND`
|
||||
- `byminute` -> `BYMINUTE`
|
||||
- `byhour` -> `BYHOUR`
|
||||
- `byday` -> `BYDAY`
|
||||
- `bymonthday` -> `BYMONTHDAY`
|
||||
- `byyearday` -> `BYYEARDAY`
|
||||
- `byweekno` -> `BYWEEKNO`
|
||||
- `bymonth` -> `BYMONTH`
|
||||
- `bysetpos` -> `BYSETPOS`
|
||||
- `wkst` -> `WKST`
|
||||
- **Case Insensitivity:** The mapping should be case-insensitive for the input object keys.
|
||||
|
||||
## Implementation Steps
|
||||
1. **Reproduce:** Update the existing `expandRecurrences - object rrule` test case to use the key `frequency` and verify it fails with the reported error.
|
||||
2. **Fix:** Implement a mapping function in `icalendar.ts` to translate object keys to standard RRULE keys before stringifying.
|
||||
3. **Verify:** Run the test case to confirm it now passes.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Test `expandRecurrences - object rrule` passes with an object using `frequency` key.
|
||||
- [ ] No "Unknown RRULE property" errors are logged for valid RRULE objects.
|
||||
Reference in New Issue
Block a user