mpcjanssen / simpletask-android

GNU General Public License v3.0
545 stars 124 forks source link

Feature request to add option to create key:value pair for Priority on task completion #1176

Open lindoman opened 2 years ago

lindoman commented 2 years ago

On my version (11.0.0, Nextcloud version, android 12) the setting "Keep priority in completed tasks" keeps the priority between the completed date and the created date like this: x 2022-06-14 (A) 2022-06-13 My very important task

Which if I understand correctly is not the "official" suggested implementation of todo.txt:

https://github.com/todotxt/todo.txt#rule-2-the-date-of-completion-appears-directly-after-the-x-separated-by-a-space

Instead, if we wanted to keep the priority, the suggestion is to use a custom key:value pair e.g. pri:A

If we agreed with the suggestion for a key:value pair, I would then be able to mention the following, which already came up in another actively developed linux desktop app:

https://github.com/ransome1/sleek/issues/363

Of course the "non-standard" implementation in simpletask-android works perfectly well within simpletask-android (and also in sleek, as long as I don't complete tasks in sleek), but there is a conflict for me if I try to use both apps for task completion on the same file. I also wonder if this would have an impact on the original todo.txt CLI app.

smichel17 commented 2 years ago

Which if I understand correctly is not the "official" suggested implementation of todo.txt

You understand correctly, and this is working as intended. Keeping priority is one place where, imo, todo.txt gets it wrong; it makes it unnecessarily awkward/complicated to restore a completed task. But of course, ST is a todo.txt app, so the setting exists for compatibility; the intent is that you'd disable it if you're using other todo.txt apps. The setting has a description ("Todo.txt removes priority on completion") that tries to call this out.

So, this issue can go two ways:

lindoman commented 2 years ago

You make a good point about the complication of restoring a completed task, and I agree with you. It is very easy to complete a task without meaning to in ST (by accidentally clicking) and less easy in the original CLI. So restoration of priority on completed tasks is a required feature for ST which I think it does well. I actually like the way you implemented this, if only I didn't want to use other todo.txt apps at the same time!

So...

Given there is a semi-official (if awkward) way to do this, I think this should be a feature request to add the ability to move the priority to a pri: key:value pair on completion, as long as the priority can also be restored by the same route, and the key:value pair deleted again.

I realise this is a bit of a pain, but I think it is the most compatible route, because there might be a tendency for other apps to implement a similar mechanism, even if we agree that we don't particularly like it...!

I don't know enough about lua callbacks (I must learn) to be able to comment on your suggestion with the onComplete callback. Would you also be able to replicate the restoration of the original priority using lua??

snubz commented 1 year ago

Hi,

stumbled upon this issue, while looking for solutions to avoid conflicts in my todo.txt (using sleek and simpletask simultaneously on one todo.txt).

I had a look beforehand at all settings inside simpletask, but it did not occur to me, that this setting would be related to my problem. Therefore three proposals, referring to:

  • If you have phrasing suggestions, I'm happy to consider them.