Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds option to force update same task mentions in current file #397

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nkakouros
Copy link
Contributor

@nkakouros nkakouros commented Feb 11, 2022

This tries to fix the case when multiple viewports list the same task. Updating the task in one of them and saving can have the unwanted result that the changes get reverted as taskwiki uses non-updated mentions of the task as authoritative.

For example:

# Viewport 1 | project:parent
* [ ] My task

# Viewport 2 | project:parent.child
* [X] My task

# Viewport 3 | +label
* [ ] My task

In this scenario, where the second occurrence of the task has been marked as complete (with the TaskWikiDone command), if the user saves the file, the task will be marked as pending. Common change logs for such tasks look like:

2022-01-31 09:46:27 End set to '2022-01-31 09:46:27'.
                    Status changed from 'pending' to 'completed'.
2022-01-31 09:47:24 End deleted.
                    Status changed from 'completed' to 'pending'.
2022-02-01 10:34:55 End set to '2022-02-01 10:34:55'.
                    Status changed from 'pending' to 'completed'.
2022-02-01 11:16:33 End deleted.
                    Status changed from 'completed' to 'pending'.
2022-02-01 11:17:43 End set to '2022-02-01 11:17:43'.
                    Status changed from 'pending' to 'completed'.
2022-02-01 15:30:37 End deleted.
                    Status changed from 'completed' to 'pending'.
2022-02-02 10:47:29 End set to '2022-02-02 10:47:29'.
                    Status changed from 'pending' to 'completed'.
2022-02-02 10:47:33 End deleted.
                    Status changed from 'completed' to 'pending'.
2022-02-02 10:49:42 End set to '2022-02-02 10:49:42'.
                    Status changed from 'pending' to 'completed'.
2022-02-02 10:49:53 End changed from '2022-02-02 10:49:42' to '2022-02-02 10:49:52'.

bouncing between pending and completed. This happens for other task attributes as well (e.g. due time).

PS: I would really like to write tests for any pending PR I have and have them merged, but I can't get the test suite to work.

Edit: I now see that #222 deals with the same issue. Feel free to close this if the older PR makes more sense.

@liskin
Copy link
Collaborator

liskin commented Feb 13, 2022

PS: I would really like to write tests for any pending PR I have and have them merged, but I can't get the test suite to work.

I've been trying to get to this but life keeps interfering. :-/
If you'd like to try and hack on this together, this may nudge me to get to it earlier. Reach out via IRC or Gitter (or Discord, although I only read that piece of crap once a day or two) then.

Edit: I now see that #222 deals with the same issue. Feel free to close this if the older PR makes more sense.

Your implementation seems more robust though. #222 looks like it may discard some unsaved changes in the buffer.

@litwol
Copy link

litwol commented Feb 7, 2024

What remains for this to be merged?

@liskin
Copy link
Collaborator

liskin commented Mar 21, 2024

What remains for this to be merged?

The CI needs some tender loving care, so the existing tests are failing and thus nobody even bothered to write tests for this new functionality. And then all the maintainers are burnt out and/or having different priorities in life.

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.

3 participants