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

Optional automatic action upon task completion: move task to an archive file #2855

Open
4 tasks done
therden opened this issue May 27, 2024 · 1 comment
Open
4 tasks done
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' type: enhancement New feature or request

Comments

@therden
Copy link
Contributor

therden commented May 27, 2024

⚠️ 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

(Note: Similar functionality has been submitted in Issues and/or covered in Discussions previously.)

A new, optional task field should be supported by Tasks, to trigger the plugin to act upon a task when it is completed. One such action would entail automatically moving the task to the end of an archive file.

✔️ Solution

Support could be added for a new, optional task field or attribute. It could be called Finish, and signified by a checkered flag emoji 🏁 (or [finish:: ] in Dataview format). The '`Finish' field should be added to the plugin's Create/Edit Task modal dialog.

If the field value is set to_file then, when the task is completed, Tasks will automatically delete it from note file that hosted it appears and then write it to the end of a dedicated archive file (Completed Tasks.md in the vault's root directory, by default.)

For more flexibility, a new option could be added to Tasks' configuration settings: by default, it would display the default archive file path shown above; but it would allow the user to change the filename and/or location.

A possible later enhancement would support users' specifying a Finish to_file heading within a note's YAML front matter that would override the vault-wide setting for completed tasks in that particular note.

In any event: if the designated archive file doesn't exist when a task containing 🏁 to_file is completed, then the plugin will create it before writing the task to it.

❓ Alternatives

No other currently available plugin performs the desired action automatically when the task is completed.

📝 Additional Context

This issue is being created at the maintainer's direction.

If you want this functionality added to Tasks, please respond to this description with a thumbs up - 👍.

@therden therden added the type: enhancement New feature or request label May 27, 2024
@claremacrae
Copy link
Collaborator

Thanks Tom.

This issue is being created at the maintainer's direction.

Just to clarify why, this is to ensure that:

  1. we have one well-defined feature-request per feature, that we can refer to in the docs
  2. to ensure that there is a well-defined description of the behaviour, and so code, required.

To that end, please could you kindly add to the description so it is more thorough about what the required parts of the implementation are... For example, how will Tasks know what archive file to use, what will happen of the archive file does not exist... What will happen if there is already content in the note file...

(I'll edit the description to refer only to voting via 👍, which has become the de-facto sorting mechanism)

@claremacrae claremacrae added 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' labels May 28, 2024
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' type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants