Repository navigation
Conversation
tobixen
added a commit
that referenced
this pull request
Nov 22, 2026
caldav's set_due(move_dtstart=True) leaves DTSTART alone when the duration is zero, and computes a zero duration when DTSTART is a date on the same day as a timestamp DUE. The task then got a duration that grew with every postponement. The date/timestamp fix-up that select runs (_fix_mismatched_date_types) moves to plann/lib.py and is applied before postponing too, and a zero duration keeps DTSTART equal to the new DUE. So does a negative one: west of UTC, a date next to an early UTC DUE becomes a local midnight after the DUE. Prompts: > I did a `plann select --priority 5-8 --todo edit --postpone 14d` and > later also a `plann select --priority 6-8 --todo edit --postpone > 14d`, so most tasks are now postponed with 28 days. However, it seems > like only the DUE was moved, while the DTSTART remained. This gives a > big problem as I'm currently using the (calculated) duration as time > estimate. Please: 1) move the DTSTART on all those tasks, 2) ensure > the DTSTART is also moved when doing `edit --postpone` > Go for the updated recommendations. [= among them: drop this branch's > own date/timestamp fix in favour of the one merged from PR 91] > then rebase [#90] onto it [= > onto master with #91 merged] Assisted-By: Claude Sonnet 5.5 / Opus 5.5 <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
tobixen
force-pushed
the
select-priority
branch
from
November 22, 2026 15:28
3c75513 to
9abdf0c
Compare
select had no way to filter on priority. --priority takes a number, a range or a list (5, 1-3, 1,5-9), sidestepping the question of whether "max" means highest number or highest importance. 0 also matches a missing PRIORITY. The filtering is client-side, through the new "in" operator of icalendar-searcher, as CalDAV has no integer comparison; plann now requires icalendar-searcher 1.4.0 (PyCalendar/icalendar-searcher#27). Prompt: `plann select --priority ...` doesn't work. We need some way to filter here, maybe --max-priority and --min-priority ? (but how to handle 0, and in what direction should max and min go? As a start, just `--priority 5` for all tasks with exact priority 5 would be better than nothing) Followup-Prompt: the filtering should go via the icalendar-search package. Please move the code there Followup-Prompt: Are any of those covered by the roadmap? [comparison operators, an "in" operator, or both] Followup-Prompt: Add the "in"-operator as for now, if that's the cheapest. Followup-Prompt: (on the review finding that the icalendar_searcher dependency has no version) Pin now to the upcoming icalendar-searcher version Assisted-By: Claude Opus 5.5 <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
caldav's set_due(move_dtstart=True) leaves DTSTART alone when the duration is zero, and computes a zero duration when DTSTART is a date on the same day as a timestamp DUE. The task then got a duration that grew with every postponement. The date/timestamp fix-up that select runs (_fix_mismatched_date_types) moves to plann/lib.py and is applied before postponing too, and a zero duration keeps DTSTART equal to the new DUE. So does a negative one: west of UTC, a date next to an early UTC DUE becomes a local midnight after the DUE. Prompts: > I did a `plann select --priority 5-8 --todo edit --postpone 14d` and > later also a `plann select --priority 6-8 --todo edit --postpone > 14d`, so most tasks are now postponed with 28 days. However, it seems > like only the DUE was moved, while the DTSTART remained. This gives a > big problem as I'm currently using the (calculated) duration as time > estimate. Please: 1) move the DTSTART on all those tasks, 2) ensure > the DTSTART is also moved when doing `edit --postpone` > Go for the updated recommendations. [= among them: drop this branch's > own date/timestamp fix in favour of the one merged from PR 91] > then rebase [#90] onto it [= > onto master with #91 merged] Assisted-By: Claude Sonnet 5.5 / Opus 5.5 <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com> Assisted-By: Claude Opus 5.5
tobixen
force-pushed
the
select-priority
branch
from
November 27, 2026 19:07
9abdf0c to
eb34f75
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on PyCalendar/icalendar-searcher#27 - merge after icalendar-searcher 1.4.0 is released.
Commit message:
select had no way to filter on priority. --priority takes a number,
a range or a list (5, 1-3, 1,5-9), sidestepping the question of
whether "max" means highest number or highest importance. 0 also
matches a missing PRIORITY. The filtering is client-side, through
the new "in" operator of icalendar-searcher, as CalDAV has no
integer comparison; plann now requires icalendar-searcher 1.4.0
(PyCalendar/icalendar-searcher#27).
Prompt:
plann select --priority ...doesn't work. We need some way to filter here, maybe --max-priority and --min-priority ? (but how to handle 0, and in what direction should max and min go? As a start, just--priority 5for all tasks with exact priority 5 would be better than nothing)Followup-Prompt: the filtering should go via the icalendar-search package. Please move the code there
Followup-Prompt: Are any of those covered by the roadmap? [comparison operators, an "in" operator, or both]
Followup-Prompt: Add the "in"-operator as for now, if that's the cheapest.
Followup-Prompt: (on the review finding that the icalendar_searcher dependency has no version) Pin now to the upcoming icalendar-searcher version
Assisted-By: Claude Opus 5.5 noreply@anthropic.com
Reviewed-by: Tobias Brox tobias@redpill-linpro.com
Also piggy-backing:
fix: date/timestamp fix-up crashed on DUE tasks