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

Show modified task name in dataview that’s still connected to original task #523

Open
blacksmithgu opened this issue Oct 3, 2021 Discussed in #521 · 2 comments
Open

Show modified task name in dataview that’s still connected to original task #523

blacksmithgu opened this issue Oct 3, 2021 Discussed in #521 · 2 comments
Milestone

Comments

@blacksmithgu
Copy link
Owner

@blacksmithgu blacksmithgu commented Oct 3, 2021

Discussed in #521

Originally posted by DeutscheGabanna October 3, 2021
Let’s suppose I have this task.
- [ ] a task [unnecessary filler]

and I want to query it and show it, slightly modified through regex, to look like this


found 1 task:
- [ ] a task

You can quite easily modify the string with this snippet:

for (let i = 0; i < source.length; i++) {
	source[i].text = source[i].text.replace("a", "b");

and then display it:
dv.taskList(source, false);

However, the task that is displayed has no connection to the original task whatsoever! As long as its displayed name differs in any way, the original task doesn't change its state if you check/uncheck its clone from dataview.

Please help

@blacksmithgu blacksmithgu added this to the 0.4.13 milestone Oct 3, 2021
@max-mykhailenko
Copy link

@max-mykhailenko max-mykhailenko commented Nov 4, 2021

Is it possible to have unlink task complete status from the original task, but another parts left as is.
Case
I have some common reading list. I have multiple students and want to interview each student about this reading list. I don't want to copy each time common reading list for each student, I want to have snippet like

dv.taskList(dv.page("Onboarding reading list").file.tasks.map(b => {b.text = b.text.replace(" "," "); return b}))
// this is special replace off all spaces to another utf space for unlinking from the original list

And if I add or change something in common list it automatically should be added to each student.

How it possible to do? Any thoughts?

@blacksmithgu
Copy link
Owner Author

@blacksmithgu blacksmithgu commented Nov 6, 2021

That use case is a little complicated for current task list support - checking and unchecking kind of requires a 1:1 correspondence between a task in an actual file somewhere, and the Dataview view of it.

This will probably get better in the future, though I don't think it's supported right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants