Skip to content
Discussion options

You must be logged in to vote

This should work to group and sort the tasks by order of appearance of the sections and not alphabetically.
taskList can contain tasks from multiple files as well, just change the first taskList = line to get the tasks you want.

	```dataviewjs
	const summary = true
	const includeSection = true
	let taskList = dv.current().file.tasks
				 .where(t => !t.completed && dv.date(t.start) <= dv.date('today'))
	taskList = taskList
		.sort(t => t.line)
		.sort(t => t.path)
	if (summary) { dv.span("*" + taskList.length + " tasks*\n") }
	if (includeSection) {
		const regex = /> ([^\]]+)/;
		let section = null
		let page = null
		let sectionTaskList = []
		for (let t of taskList) {
			if ((sectionTas…

Replies: 8 comments 14 replies

Comment options

You must be logged in to vote
1 reply
@jesvtb
Comment options

Comment options

You must be logged in to vote
4 replies
@MugenLee
Comment options

@senged
Comment options

@AB1908
Comment options

@claremacrae
Comment options

Comment options

You must be logged in to vote
2 replies
@AB1908
Comment options

@claremacrae
Comment options

Comment options

You must be logged in to vote
1 reply
@claremacrae
Comment options

Comment options

You must be logged in to vote
2 replies
@acdesigns
Comment options

@claremacrae
Comment options

Comment options

You must be logged in to vote
2 replies
@claremacrae
Comment options

@timespacedecay
Comment options

Answer selected by claremacrae
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@randompherret
Comment options

@f3d3r1c098
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet