Completing a fixed-time recurring task before its DTSTART does not advance it
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with Todo._next() and Todo.complete(handle_rrule=True) in the caldav package, then check _complete_recurring_thisandfuture, which passes the same completion_timestamp. Run the snippet from the issue to reproduce: completing a fixed-time RRULE task (BYMONTH) before its DTSTART returns the current occurrence instead of the next one. Done means the early-completion call advances to the next occurrence after DTSTART, and the after-DTSTART case still behaves as before.
索引モデルが issue の本文から書いたものです。
説明
Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5
Todo.complete(handle_rrule=True) moves a recurring task to self._next(completion_timestamp). For an RRULE with BY* parts ("fixed-time" recurrence), _next() keeps the original DTSTART and returns rrule.after(completion_timestamp). When the task is completed before its DTSTART, that is the current occurrence itself, so the task stays where it was. In "safe" mode a completed copy is written, and the recurring task still shows the occurrence that was just done.
from datetime import datetime, timezone
from caldav import Todo
t = Todo(data="""BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//x//y//EN
BEGIN:VTODO
UID:t1
DTSTAMP:20261016T120000Z
DTSTART:20270404T093000Z
DUE:20270404T123000Z
RRULE:FREQ=YEARLY;BYMONTH=4,9
SUMMARY:first layer
END:VTODO
END:VCALENDAR""")
t._next(datetime(2027, 4, 2, 10, tzinfo=timezone.utc)) # done two days early
# -> 2027-04-04 09:30 UTC, the same occurrence (expected 2027-09-04)
t._next(datetime(2027, 4, 4, 12, tzinfo=timezone.utc)) # done after DTSTART
# -> 2027-09-04 09:30 UTC, as expected
Suggested fix: for fixed-time recurrences, look for the next occurrence after max(completion_timestamp, DTSTART) (strictly after the current DTSTART). _complete_recurring_thisandfuture passes ts=completion_timestamp as well, and should probably get the same treatment.
- 主要言語
- Python
- スター
- 412
- フォーク
- 113
- 平均マージ
- 22時間 43分
- マージ済み PR(30日)
- 43
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-caldav/caldav のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
python-caldav/caldav#687 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
python-caldav/caldav#780 ·
メンテナーはふだん 1 日以内に返信
-
compatibility refactoring
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
python-caldav/caldav#778 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
python-caldav/caldav#777 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
python-caldav/caldav#774 ·
メンテナーはふだん 1 日以内に返信
python-caldav/caldav の issue をすべて見る
似ている issue
-
docs: the dev-setup table and AGENTS.md name the reviewed_by guard that CI's Changelog job runsオープンarea: tools documentation good first issue ready for a contributor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
eyalgolan/statecraft-israel#873 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 5 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信