obsidian-todoist-plugin icon indicating copy to clipboard operation
obsidian-todoist-plugin copied to clipboard

Moving completed tasks to Obsidian's daily notes

Open argenos opened this issue 3 years ago • 16 comments

Is your feature request related to a problem? Please describe. Not related to a problem, but something that might be on the "good-to-have" list. It would be great if we could use Obsidian's daily note as an archive for completed tasks (someone mentioned they do this in the Discord server with another todo app).

Describe the solution you'd like The process could be a little manual (at least for starters):

  1. Open yesterday's (or whatever date I've selected) daily note
  2. Invoque the command palette to add completed tasks from todoist 2a. I think an alternative could be the current syntax with the codeblocks if we're able to show completed tasks there
  3. Add them as text to a (configurable) section, e.g. ## Completed tasks
    [...]
    
    ## Completed tasks
    ### Project 1
    - Do thing A
    - Read paper X
    
    ### Project 2
    - Call person Y
    
    ### Home
    - Water plants
    
    3a. It would work just as the existing syntax, although completed tasks would still be stored in Todoist

Describe alternatives you've considered As far as I know this isn't possible with filters. Probably the only way to get the completed tasks out of Todoist is through the API, but I could be wrong.

I assume the Todoist archive doesn't necessarily need to go in the daily notes, but could go into any other note too, but it's probably a lot more complex to define what to sync out of the completed tasks in that case.

Additional context N/A

argenos avatar Nov 06 '20 16:11 argenos

I can implement some variant of this, but sadly you cannot get completed tasks through the API.

What I can implement is something like: "when you complete a task from Obsidian it gets copied to a different section of the document". Is that something that's interesting or useful to you?

jamiebrynes7 avatar Dec 09 '20 20:12 jamiebrynes7

@jamiebrynes7 since I saw you plan one day to migrate to the sync api, could this be implemented then ?

beaussan avatar Feb 24 '21 18:02 beaussan

Potentially yes, I'd need to investigate what kind of extra data the sync API exposes, but it seems more likely!

jamiebrynes7 avatar Mar 22 '21 14:03 jamiebrynes7

What I can implement is something like: "when you complete a task from Obsidian it gets copied to a different section of the document". Is that something that's interesting or useful to you?

@jamiebrynes7 this would be an absolute godsend for my workflow. The only thing keeping me in using Obsidian ToDos alone (instead of a preferable combo of ToDoist and Obsidian via this plugin) - is the fact that once a task has been completed, I lose all visibility over it from Obsidian.

I would assume that it would be like another "Project" added to your ToDoist view, that says "Completed" - where the items would appear as a completed item formatted in markdown.

Bejasc avatar Mar 25 '21 06:03 Bejasc

I've checked the new Sync API, and it seems like you can get the completed items from it and you can even uncheck them.

I'd prefer if the completed items stayed where they were actually instead of them moving to daily notes.

isle9 avatar May 25 '21 18:05 isle9

I'd love to be able to keep completed tasks somewhere in my Daily Note. Preferably under a configurable heading. That way I can grab them in my Weekly Review template.

shawnduggan avatar May 28 '21 11:05 shawnduggan

This would be great, and getting completed task info is pretty straightforward with the sync API (e.g. https://github.com/wbthomason/import-todoist.nvim/blob/master/rplugin/python3/todoist_import.py#L17-L45, as an example with the Python sync API library).

wbthomason avatar Jul 16 '21 16:07 wbthomason

Looking at the sync API, it doesn't support filtering, so things like listing done tasks for a specific day will probably not work.

Let's hope Todoist adds this feature to their API. I pinged them on Twitter. If enough people asks for this, they might consider implementing it.

sagikazarmark avatar Sep 22 '21 08:09 sagikazarmark

@jamiebrynes7, can you build this feature on plugin side? i.e. after checking as "completed", plugin can create markdown version of completed task under todoist query.

bzimor avatar Nov 02 '21 11:11 bzimor

Daily note or otherwise.. being able to keep completed tasks somewhere in Obsidian would be huge. Then linking tasks to notes would still be valuable.

While not exactly the same feature requests in the original post, intent would be to have tasks imported via Todoist to carry the same functionality as a task created in Obsidian through something like: https://github.com/schemar/obsidian-tasks

geodose avatar Jan 29 '22 18:01 geodose

it doesn't support filtering, so things like listing done tasks for a specific day will probably not work.

It does support filtering, at least for Pro users. I have a custom script for something similar in my daily notes that grabs any tasks that were completed that day. I'd be happy to open a pull request if you're open to contributions?

hbarudin avatar Mar 21 '22 17:03 hbarudin

it doesn't support filtering, so things like listing done tasks for a specific day will probably not work.

It does support filtering, at least for Pro users. I have a custom script for something similar in my daily notes that grabs any tasks that were completed that day. I'd be happy to open a pull request if you're open to contributions?

Could you share the script regardless of pull request? This would save so much manual work or using alternatives like VCRecur, which isn't quite the same.

aventuraviper avatar Mar 22 '22 08:03 aventuraviper

I have figured out a way to make this happen, although there are a lot of working parts. I'm using IFTTT, Dropbox, and Hazel (Noodlesoft utility to manage files based on rules on Mac), and a little bash script to make it work. The gist:

  • IFTTT recipe creates a text file in Dropbox when a Todoist task is completed
  • Hazel monitors that folder, changes the file name to match the date style I use for the daily note, but with a .txt extension
  • Hazel runs the bash script which appends the content of the .txt to the matching .md file in my "Journal" folder
  • Hazel deletes the .txt file on Dropbox

I can share the specific IFTTT recipe and bash script if it's of use to anyone - just thought I'd post the gist of it if anyone wants to try recreating it with their own tools and utilities. It works pretty well!

mitten avatar Jun 11 '22 00:06 mitten

I'm very interested in this functionality as well.

Currently I achieve something like it by using this Todoist plugin in conjunction with another: https://github.com/wesmoncrief/obsidian-todoist-text/

I use this plugin to display todos in the notes that are not today's daily note. When I open the daily note of the current day in the morning, I use the obsidian-todoist-text plugin to 'print' my todo list to text in obsidian, delete the embed from this app, keep track of my todos in obsidian, and then catch up my actual todoist list at the end of the day. The goal being to a.) preserve a list of completed todos b.) enable myself to link 'i have a meeting' tasks to notes about said meetings at the beginning of the day.

ericlimer avatar Jul 21 '22 16:07 ericlimer

Could you share the script regardless of pull request? This would save so much manual work or using alternatives like VCRecur, which isn't quite the same.

Sure can - sorry for not seeing this for... several months. I will get a Gist together and share it here!

hbarudin avatar Oct 19 '22 01:10 hbarudin

I think there's now a plugin than can do this - https://github.com/Ledaryy/obsidian-todoist-completed-tasks

BrunoGomesCoelho avatar Nov 01 '22 17:11 BrunoGomesCoelho