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

In-progress task without due date or scheduled date will disappear #129

Open
sqybi opened this issue Jul 11, 2024 · 5 comments
Open

In-progress task without due date or scheduled date will disappear #129

sqybi opened this issue Jul 11, 2024 · 5 comments

Comments

@sqybi
Copy link

sqybi commented Jul 11, 2024

"Unplanned" panel shows all to-do ([ ]) tasks without due date or scheduled date.

However, if one unscheduled task is now in-progress status ([/]), it will not appear either in "Unplanned" panel or in "Todo" panel.

Should we keep those kind of tasks in "Unplanned" panel, or show them in a new channel, in case users lose their tasks?

@tejas-hosamani
Copy link

This is working fine for me

@LeCheenaX
Copy link

Same Issue here.

Issue Description:

In addition, the issue is not defined to tasks with process status [/], but also scheduled tasks [<]. The cancelled tasks are fine without any issues.
image

For your convenience I add the names of tasks status from main.js
image

Repro Steps:

Copy the following into anywhere valid of your md file:

  • [/] Work In Process (Unplanned)
  • [<] Scheduled (Unplanned)

Observed Result:

The count of ToDo will add 2, but no tasks will be displayed.

Expected Result:

The count of ToDo will add 2, and the tasks will be displayed in taskList whether with ToDo Filter on or not.

Analysis:

I suppose that the issue is regarding dataview. The tasks with anything filled in the blanket '[ ]' will be marked as done, rather than todo, in dataview. Thus, similar mechanism as [>] will be counted correctly into overdue should be applied to both [<] and [/].

Temporary Workaround:

Go to the your obsidian folder: .obsidian\plugins\tasks-calendar-wrapper\main.js

Press ctrl+F to find "const todoCount", you will find the following:

    const overdueCount = taskList.filter((t) => t.status === "overdue" /* overdue */).length;
    const unplannedCount = taskList.filter((t) => t.status === "unplanned" /* unplanned */).length;
    const completedCount = taskList.filter((t) => t.status === "done" /* done */).length;
    const cancelledCount = taskList.filter((t) => t.status === "cancelled" /* cancelled */).length;
    const todoCount = taskList.length - unplannedCount - completedCount - cancelledCount - overdueCount; 

Now replace the last line with the following codes:

    const processCount =  taskList.filter((t) => t.status === "process" /* process */).length; // Lex added
    const scheduledCount =  taskList.filter((t) => t.status === "scheduled" /* scheduled */).length; // Lex added
    const todoCount = taskList.length - unplannedCount - completedCount - cancelledCount - overdueCount - processCount - scheduledCount;  //Lex Test Modify, this is wrongly counted, the fix is to contain other situations into unplanned/todo

Then the counting is fixed as follows:
image
The tasks with [<] and [/] will not be counted into Todo anymore.

However, it would be best to incorporate Todo with process/scheduled tasks that do not have a due, which should be a final fix.

@LeCheenaX
Copy link

"Unplanned" panel shows all to-do ([ ]) tasks without due date or scheduled date.

However, if one unscheduled task is now in-progress status ([/]), it will not appear either in "Unplanned" panel or in "Todo" panel.

Should we keep those kind of tasks in "Unplanned" panel, or show them in a new channel, in case users lose their tasks?

@Leonezz May you have a look on this when available?

@sqybi
Copy link
Author

sqybi commented Sep 19, 2024

@LeCheenaX Great job! I had planned to create a new Vault and reproduce this issue, but I haven't had the time yet.
I agree that there should be a final fix for these kinds of tasks to add them to the Todo list.

@Leonezz
Copy link
Owner

Leonezz commented Sep 20, 2024

"Unplanned" panel shows all to-do ([ ]) tasks without due date or scheduled date.
However, if one unscheduled task is now in-progress status ([/]), it will not appear either in "Unplanned" panel or in "Todo" panel.
Should we keep those kind of tasks in "Unplanned" panel, or show them in a new channel, in case users lose their tasks?

@Leonezz May you have a look on this when available?

Thanks for the work to find out the issue here, I will take a look and work out a fix this weekend.

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

No branches or pull requests

4 participants