Repository navigation
fix(edit): treat a --when or empty notes append Things ignores as applied - #382
Merged
Merged
Conversation
…lied An edit whose --when, --append-notes or --prepend-notes leaves the item as it is made Things record no change, so edit and project edit waited the full read-back budget and failed with "edit did not apply". Compare those flags with the item before waiting, as moves already do. Checked against Things 3 on to-dos and projects; --when today, evening or today's date clears a reminder, so the reminder is read before calling those a no-op. Fixes #377
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.
Fixes #377
An edit whose value already matches the item, such as
--when somedayon a Someday item, made Things record no change.editandproject editthen waited the full read-back budget and failed with "edit did not apply". This change compares those flags with the item before waiting, the same way #372 does for moves. If every flag already matches, the item prints at once with exit 0. If only some match, the edit still waits for the ones that change.What Things does. I tested this against Things 3 on to-dos and projects and checked whether userModificationDate moved:
--when anytimeor an empty--whenon an undated Anytime item,--when somedayon an undated Someday item,--when today/eveningon an item already in that part of today, today's date on either part of today, and--when tomorrowor a later date on an item already scheduled for that day. An empty--append-notesor--prepend-notesalso records no change.--whenon an Inbox or Someday item (it moves to Anytime), and--when somedayoranytimeon a dated item.--when today,eveningor today's date clears a reminder, so on an item with a reminder it counts as a change. A later day keeps the reminder. The CLI didn't read reminders before, so I addedHasReminder. It runs only for those values.--title,--notes,--tags,--add-tagsand--deadlinealready had this check.Flags this leaves alone. A
--whenwith a time (18:00,date@time, RFC3339) still waits, because the CLI doesn't read the reminder time. A natural-language phrase still waits too, and so does a date already in the past.Docs (
commands.md,agents.md) and the bundled skill are updated to match.