Completing a fixed-time recurring task before its DTSTART does not advance it
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 412
- Forks
- 113
- Merge medio
- 22 h 43 min
- PR fusionados (30 d)
- 43
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de python-caldav/caldav
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
python-caldav/caldav#687 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
python-caldav/caldav#784 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
python-caldav/caldav#783 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
python-caldav/caldav#780 ·
Los mantenedores suelen responder en 1 día
-
compatibility refactoring
Dificultad 4/5 3-5 días Aptitud para principiantes 32/100
python-caldav/caldav#778 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de python-caldav/caldav
Issues similares
-
documentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
drevendev/HungryCrab#273 ·
Los mantenedores suelen responder en 1 día
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
drevendev/BeautifulRepo#19 ·
Los mantenedores suelen responder en 2 días
-
Moonshot: Kimi K3 always sends `reasoning_effort="max"`, though the API now accepts `low` and `high`Abiertoaccepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
UKGovernmentBEIS/inspect_ai#5939 ·
Los mantenedores suelen responder en 1 día
-
bug linux
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Fill paper for Screen2WordsAbiertoarea:data data-quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
reacher-z/Awesome-CUA#1468 ·
Los mantenedores suelen responder en 1 día