Repository navigation
fix(import): send a dated when time as YYYY-MM-DD@HH:MM and read it back as sent - #449
Merged
Merged
Conversation
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.
Since #446,
add,project addandeditsendtoday@6pm,tomorrow@Tand<date>@TasYYYY-MM-DD@HH:MM(things.ResolveWhen) and the read-back judges that value.importstill sent the value as typed and checked the raw value, which the read-back cannot place, so it confirmed the item whatever Things did with it.Changes
importrewrites eachwhenin an item's attributes (created items, a project'sitems, and update items) withthings.ResolveWhenat send time. The rest of the payload is sent byte for byte as given.checkWhensjudges the sent value (sentAs), using the same send time as the rewrite. Atomorrow@9amthat lands in the Inbox is now reportedmisfiledinstead of confirmed.snapshotCreated(the read-back window) readsclock.Now()rather thantime.Now(), so it agrees with import's futurecreation-datecheck. Nothing changes in production, where both are the wall clock.commands.md(importwhenandmisfiled) andSKILL.md.Before / after
Payload
[{"type":"to-do","attributes":{"title":"Pay rent","when":"tomorrow@9am"}}]sent on 10 Oct:"when":"tomorrow@9am"; reportedCreated and confirmedwherever Things filed it."when":"2026-10-11@09:00". If Things files it in the Inbox, the import fails:[0]: task "Pay rent" (new-1) was created, but its when "tomorrow@9am" did not file it there: it is in inbox with no start date(reasonmisfiled).Tests
TestResolveImportWhens(rewrite, spacing and escapes kept, nested and update items, values outside attributes untouched),TestImportSendsResolvedWhen, newTestImportChecksWhencasestimedMisfiled/timedLanded, andTestSnapshotCreatedReadsClock.make testandmake lintpass.