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

Automate, upon completion, task deletion, relocation-within-same-file, or moving to an archive file #2547

Closed
2 of 4 tasks
therden opened this issue Dec 30, 2023 · 7 comments
Closed
2 of 4 tasks
Assignees
Labels
scope: lifecycle of tasks Issues to do with deletion or moving of tasks upon completion. See also 'scope: managing tasks' scope: managing tasks Things such as deleting or moving tasks between files. See also 'scope: lifecycle of tasks' status: wontfix This will not be worked on type: enhancement New feature or request

Comments

@therden
Copy link
Contributor

therden commented Dec 30, 2023

⚠️ Please check that this feature request hasn't been suggested before.

  • I searched previous Ideas in Discussions didn't find any similar feature requests.
  • I searched previous Issues didn't find any similar feature requests.
  • I am only requesting a single feature. Multiple changes should be split into individual requests, with links between them.
  • I believe my requested feature will be generally applicable to other users, not just me: it is not uniquely tied to my personal workflow.

🔖 Feature description

Optionally, on a per-item basis, upon completion automatically delete, relocate-within-same-file, or move the task to an archive file.

Requests to either Delete, "move to the bottom of the note", or Archive completed tasks in another file have been submitted as Tasks Issues and Discussion items in the past. Some examples:

In this issue I propose adding support for all three automated actions to Tasks at once.

✔️ Solution

The Packrat plugin (which I authored) has provided this functionality for completed instances of recurring tasks. However, because it was designed with the goal of reducing clutter in note files that contain many, frequently-recurring tasks, its Command operates only on the currently active note when invoked.

Packrat users have expressed that they want:

  • processing to happen immediately at the time that Tasks marks the task as Done (so that they don't need to manually open and invoke the Packrat command on multiple files); and
  • to extend this kind of automated processing to completed non-recurring tasks;

Some users have also requested the ability to

  • specify a different archive file within each note's YAML front matter
  • specify a different # Completed Tasks heading within each note file's YAML front matter.

I propose incorporating Packrat's approach -- letting user-defined text-string "triggers" determine what action to take when a task is completed -- within Tasks itself.

If you support the idea, I am willing and would be at least somewhat able to help with development.

❓ Alternatives

  • Archiver
  • Janitor
  • Task Collector

Further development of Packrat (after adding support for Dataview-style field identifiers, as Tasks did earlier this year 😃) -- but (even if I could manage to write one) I just can't see adding yet another processor-hogging "vault change monitoring" loop to my plugin just to catch and act on possible task completions.

📝 Additional Context

If none of the other plugins I mentioned above do what you want, t would be a great help if a new feature request could be created with the above reasoning and ideas please.... And saying why the available plugins don't do what is needed....

Originally posted by @claremacrae in #1647 (comment)

@therden therden added the type: enhancement New feature or request label Dec 30, 2023
@claremacrae claremacrae added the scope: lifecycle of tasks Issues to do with deletion or moving of tasks upon completion. See also 'scope: managing tasks' label Dec 30, 2023
@claremacrae
Copy link
Collaborator

Hi @therden, thank you for this post. (Thank you, too, for the kind donation. ❤️)

I have generally resisted requests for this kind of functionality as I see it as potentially error-prone, risking losing user data.

However, knowing that you have authored an existing plugin and are offering to help, does change things, and I would consider a well-writtem, documented and tested contribution.

However, I do have one request. I see you ticked the "this is only one feature" box, but I see this as 3 separately releasable features because:

  • If any one of the options were implemented completely, a Tasks release could be done, and some users would start using the facility
  • Each one is a non-trivial amount of work
  • So I would not want to hold up a Tasks release until the remaining features were done

Also, this one looks like it exactly overlaps with what #1647 requests.

There's a good reason why I provide those checkboxes to avoid duplicates and multiple-subject requests... From experience, it really complicates planning - it is impossible to know the status and progress of issues that cannot be marked as completed once partially released.

So - Just to make sure that I understand, are you saying that when you implement this, the first PR will do all 3 things (relocate, delete or move to archive), and that you can do that work in a small number of days?

Effectively, that is saying "do you already have well-tested code for all these 3 areas?"

@therden
Copy link
Contributor Author

therden commented Dec 30, 2023

Hi Claire, and thank you for responding.

I apologize: I misunderstood that checking all the boxes was a pre-requisite for submitting an Issue, and didn't see how to indicate that Issues relating to a subset had previously been submitted. I've updated my original message, to show the first two boxes un-checked.

You're right that I'm proposing what I consider to be a single feature: "optional additional automatic processing of tasks upon completion" -- where said "processing" may consist of Deleting, Archiving, or Moving the task to an out-of-the-way location within the host note. And yes, I am proposing that this take the form of a single PR supporting all three options.

Although my Packrat plugin's code is well-tested, I'm not presently sure how readily any of it may be transplanted into Tasks.

I definitely can't guarantee having a PR ready "within a small number of days." A month might be possible.

I'm only a part-time hobby coder, mostly experienced with Python. I learned only enough TypeScript to create the Packrat plugin, and would need to learn about automated testing with yarn. And I'd need to find and study the relevant parts of the Tasks codebase (preferable with some pointers from you) before I could get started writing tests or code.

If you're still open to collaborating, I'm thinking that the best next step might be for me fork tasks, create a new branch, and in it draft documentation describing the additional functionality that I'm proposing, and a mockup of the new section in Tasks' Settings that'd be associated with it. Let me know if that sounds right, or if you have something else in mind.

@claremacrae
Copy link
Collaborator

Hi @therden,

Many thanks for the reply. I understand what you are saying.

If you're still open to collaborating,

I am! 😄

I'm thinking that the best next step might be for me fork tasks, create a new branch, and in it draft documentation describing the additional functionality that I'm proposing, and a mockup of the new section in Tasks' Settings that'd be associated with it.

I understand that suggestion...

Let me know if that sounds right, or if you have something else in mind.

I do have some experience of PRs with an elapsed time of a month or more, and how they are typically impacted by the rate of development on the main branch...

I am keen to support you in this work - and from past experience, by far the most effective and productive way forward is for us to have an initial chat and swap ideas and approaches... Typing here is just way too low bandwidth...

Let's do that before you spend time on mocking up docs and the UI... And I can share what's involved in changing the Tasks code...

Perhaps you could talk me through the Packrat code too...

My email address is in my profile here.

Looking forward to hearing from you, and e-meeting you.

@claremacrae
Copy link
Collaborator

Just to note that there is a list of alternative plugins in this comment:

@claremacrae
Copy link
Collaborator

claremacrae commented Feb 9, 2024

Assigned, as @therden is kindly working on this - see #2652.

@claremacrae claremacrae added the scope: managing tasks Things such as deleting or moving tasks between files. See also 'scope: lifecycle of tasks' label May 28, 2024
@claremacrae
Copy link
Collaborator

Note, this ticket requests 3 separate features:

@claremacrae claremacrae added the status: wontfix This will not be worked on label Aug 4, 2024
@claremacrae
Copy link
Collaborator

I'm closing this as it requested multiple features, all of which are now covered by the separated topics below...

Note, this ticket requests 3 separate features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: lifecycle of tasks Issues to do with deletion or moving of tasks upon completion. See also 'scope: managing tasks' scope: managing tasks Things such as deleting or moving tasks between files. See also 'scope: lifecycle of tasks' status: wontfix This will not be worked on type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants