-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Bug Description
When I create a task, it doesn't have the timeEstimate property.
Expected behavior: timeEstimateCategory shows "No estimate" on kanban task card.
Actual behavior: timeEstimateCategory shows "Long (>2h)" on kanban task card.
Not sure if the condition should be fixed or default value for the timeEstimate property on task creation.
But changing the condition from:
if(!timeEstimate || timeEstimate == 0, "No estimate", if(timeEstimate < 30, "Quick (<30m)", if(timeEstimate <= 120, "Medium (30m-2h)", "Long (>2h)")))
to:
if(!timeEstimate || timeEstimate == 0 || timeEstimate == null, "No estimate", if(timeEstimate < 30, "Quick (<30m)", if(timeEstimate <= 120, "Medium (30m-2h)", "Long (>2h)")))
solves the issue for me.
It looks like fix might be pretty easy here:
to update these two lines:
tasknotes/src/templates/defaultBasesFiles.ts
Line 321 in d03ce2e
| timeEstimateCategory: `if(!${timeEstimateProperty} || ${timeEstimateProperty} == 0, "No estimate", if(${timeEstimateProperty} < 30, "Quick (<30m)", if(${timeEstimateProperty} <= 120, "Medium (30m-2h)", "Long (>2h)")))`, |
| | `timeEstimateCategory` | Task size by time estimate | "No estimate", "Quick (<30m)", "Medium (30m-2h)", "Long (>2h)" | `if(!timeEstimate \|\| timeEstimate == 0, "No estimate", if(timeEstimate < 30, "Quick (<30m)", if(timeEstimate <= 120, "Medium (30m-2h)", "Long (>2h)")))` | |
@callumalpass I might try to create a PR with the changes needed, though I never did that on public repositories, so not sure how to do it.
Metadata
Metadata
Assignees
Labels
Projects
Status