Repository navigation
Conversation
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>
select's sanity check normalises a DTSTART/DTEND pair of mixed date and timestamp types, but always wrote to DTEND - tasks only have DUE, giving a KeyError. It also truncated the timed side to midnight and left VALUE=DATE on the converted property. Now only the date-valued property is replaced with a midnight timestamp, in the timezone of the other so the two can still be compared. Prompt: (traceback pasted: `plann select --priority 6-8 --todo edit --postpone 14d` fails with KeyError: 'DTEND' after "task ... has non-matching types on dtstart and dtend/due") Followup-Prompt: (traceback pasted: the same command now fails in caldav's set_due with "TypeError: can't subtract offset-naive and offset-aware datetimes") 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 normalisation from select is now a shared helper, applied before postponing, and a zero duration keeps DTSTART equal to the new DUE. Prompt: 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` Assisted-By: Claude Sonnet 5.5 / Opus 5.5 <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
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