Allow automatic migration of incomplete tasks in weekly notes

Hey everyone,
I have a journal system that seems to differ from everybody else. I don’t use daily notes for my daily tasks, instead I have a weekly note with a header for each day.

I’ve been trying to take inspiration from the “rollover-daily-todos” plugin to find a way to automatically transfer my uncompleted tasks from last week’s note and put them all in the current week’s note.

I’m sure there are other ways to do this, but that is way out of my league, so for now, I’m trying to figure it out using Dataview.

I’m already using periodic notes and templater to automate the creation of my weekly notes.
So far, I’ve included this in the template :

task  
from "Weekly"
where !completed

(weekly being my folder where I keep all my weekly notes)

I would like to add a line that tells dataview to look for last week’s note, and that’s where I’m stuck.
I suppose it should go something like : WHERE file.name = dateformat(date, etc…) but I don’t know how to tell it to look at last week’s date and then pull up the note based on that.

I’ve looked into @ryanjamurphy dataview code for daily notes, but I lack the knowledge to transfer it to weekly notes.

dv.taskList(dv.pages('"Calendar"')
    .where(p => p.file.day && p.file.day <= (luxon.DateTime.now().minus({days: 1})))
    .file.tasks
    .where(t => !t.completed), true)

If anyone has any ideas, it’d be of great help

I believe there must be a way to do this. Have you gotten anywhere with this? Can you provide a link to the dataview code you’re referencing?

I’m working with this option but need to find a way to call the last week’s note:

```dataviewjs
dv.taskList(dv.pages().file.tasks
    .where(p => p.file && p.file <= (luxon.DateTime.now().minus({days: 1})))
    .file.tasks
    .where(t => !t.completed), true)

Hey Mjl,
no sorry, haven’t made any progress ! To be honest, I realized I have very few tasks to move from one week to another, and decided it wasn’t worth the hastle !

I am interested if you do find the solution though !
I am terribly bad at dataview so I am of little help.

And the code I’m referencing is in my initial post