Skip to content

fix(import): follow-ups to the destination and date checks - #397

Merged
ryanlewis merged 7 commits into
mainfrom
fix/import-followups
Oct 7, 2026
Merged

ryanlewis merged 7 commits into
mainfrom
fix/import-followups

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

Follow-ups to #391 and #394, one commit each.

What I measured in Things 3

  • A bad creation-date or completion-date on a heading or a checklist item makes Things reject the whole payload ("There is a problem with the provided JSON."), the same as on a to-do or project.
  • A to-do in the items of a project the payload creates goes in that project, under the heading before it, whatever list, list-id, heading-id or heading it also gives.
  • A completed or canceled item is saved with its completion-date as its stop date, to the fraction of a second. An open item's completion-date is ignored.

Changes

  • import prints the same notes as add when a list or area title is shared, or a project is closed or in the Trash, once per list or area.
  • A to-do sent to the old title of a project that an earlier update item renames is left unchecked. Updates need the auth token, so where Things files it was not measured, and failing it would invite a duplicate on retry.
  • A completed or canceled created item that was saved with a different stop date fails the import with reason completion-date-dropped. It keeps its uuid, and the message says not to import it again.
  • The read-back checks the heading a to-do lands under by uuid, using db.HeadingTarget (lowest uuid among case-twins), for add and import. Before, a to-do under the other twin was confirmed.
  • A bad date on a heading or checklist item is refused before anything is sent.
  • import warns when a to-do in a created project's items gives a destination that Things ignores.

I did not dedupe the list lookup and warnings that add and import share (item 2 of the brief). Import resolves ids and titles differently (list-id versus list, payload-created and renamed projects, headings created in the payload, per-item paths and caching), so one shared function would need most of those as parameters, which isn't clean.

…lded title

Of headings whose titles differ only in case Things takes the lowest uuid (db.HeadingTarget), so a to-do under the other twin is no longer taken for the one add or import sent.
Hold a to-do sent to a heading the payload creates to any heading, judge a completion-date only once the row has a stopDate and with a second's slack, give a heading-id's project the same notes as a list-id's, and drop the reopen note for an item the payload closes, which leaves the project closed (measured). Warn about a nested to-do's ignored destination only for the four measured attributes in a created project, share one check of which verdicts fail the import, and tell agents not to import a completion-date-dropped item again.
@ryanlewis
ryanlewis merged commit b2a0c7e into main Oct 7, 2026
10 checks passed
@ryanlewis
ryanlewis deleted the fix/import-followups branch October 7, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant