Repository navigation
fix(import): refuse dates Things rejects, name shares-dated-title candidates, decode once - #391
Merged
Merged
Conversation
…ed-title candidates Things rejects the whole payload over a creation-date that is not a date and time with seconds and a UTC offset, so import now refuses it before sending instead of treating it as recent. A null creation-date is read back like an undated item, as Things saves it as created now. Items reported shares-dated-title list the new items they could be in candidates. The payload is decoded once and shared by every check.
…rt refused under --json
… refuse before --create-tags Things takes one-digit date and time fields and rejects a comma before the fraction, and rejects a bad creation-date or completion-date on an update item too, so the date check now follows the shape Things takes and covers every to-do and project. Both refusals, and the repeating one, now run before the tag check, so --create-tags writes nothing for a refused payload. An undated item is only reported shares-dated-title when one of its new items is also filed where the dated item goes.
…er item The date check now reads the item type trimmed, as the rest of the import does, and its refusals join the repeating ones in importRefusalError: one entry per item naming every blocked attribute and a reason, with an update item's id and database title. An undated item sharing a recent dated item's title fails as shares-dated-title again when the database cannot be read. importTags uses walkImportNode.
ryanlewis
force-pushed
the
fix/import-polish
branch
from
October 7, 2026 22:26
3904d60 to
54348c2
Compare
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.
Follow-ups to the import read-back work (#355, #374).
Dates Things rejects
I checked in Things 3 by importing test items. Things rejects the whole payload, with a "There is a problem with the provided JSON." sheet, when a
creation-dateorcompletion-dateon a to-do or project (created or updated) is a date on its own, a time with no offset, a time with no seconds, has a lowercaset/z, a comma before the fraction, surrounding spaces, or is a number. It takes one-digit fields (2026-10-5T9:30:00Z) and offsets written asZ,+02:00,+0200,+02or+2. Anullcreation-date is no date: Things saves the item as created now.Before this change, a date-only or timezone-less creation-date counted as recent. Things never created anything from that payload, so every undated item was then reported
not-found, with a hint to check that Things was running.importnow refuses such a payload before sending anything, including before--create-tagsmakes any tag, and names each item. Under--jsonthis isimport refused, andblockednames the attribute. The repeating-item refusal also runs before the tag check now, so a refused import never creates tags.shares-dated-title
An item reported
shares-dated-titlenow lists its new items incandidates, the fieldambiguousandnot-foundalready use, so the JSON shape only gains data. The check is also destination-aware: an undated item is only held back when one of its new items is also filed where the recently dated item with the same title goes.Decode once
The payload was decoded four times: once to validate it, then again for tags, update items and created items. It is now decoded once and the decoded tree is passed to each check.