obsidian-kanban icon indicating copy to clipboard operation
obsidian-kanban copied to clipboard

[Bug]: Archiving does not honor cancelled and in progress task statuses

Open lzilioli opened this issue 1 year ago • 0 comments

Describe the bug

I have some tasks in my kanban list like:

- [x] completed task
- [ ] incomplete task
- [-] cancelled task
- [/] in progress task

Right now,

tl;dr

When I "archive completed tasks" the plugin:

  1. moves cancelled and in progress tasks to the archive section
  2. changes their status to completed ([x])

Expected Behavior

When I "archive completed tasks" the plugin:

  1. moves cancelled tasks to the archive section
    1. Arguably this should be a setting
    2. preserve their status as cancelled ([-])
  2. leaves in progress tasks in their place and do not change them

I have these task statuses defined using the Obsidian Tasks plugin, it may be worth trying to integrate with that plugin's config for task statuses, if installed.

Steps to reproduce

Open the following file in an obsidian vault with kanban enabled

---
kanban-plugin: basic
---
## TODO

- [x] completed task
- [ ] incomplete task
- [-] cancelled task
- [/] in progress task

%% kanban:settings
```
{"kanban-plugin":"basic","show-checkboxes":true,"hide-card-count":false,"lane-width":320,"hide-tags-in-title":true,"date-colors":[{"distance":1,"unit":"days","direction":"after","backgroundColor":"rgba(255, 0, 0, 1)","isBefore":true}],"archive-with-date":true,"append-archive-date":true}
```
%%

Press the "archive completed tasks button"

Observe the new file:

---
kanban-plugin: basic
---

## TODO

- [ ] incomplete task


***

## Archive

- [x] completed task 2023-12-20 02:40:27 pm
- [x] cancelled task 2023-12-20 02:40:27 pm
- [x] in progress task 2023-12-20 02:40:27 pm

%% kanban:settings
```
{"kanban-plugin":"basic","show-checkboxes":true,"hide-card-count":false,"lane-width":320,"hide-tags-in-title":true,"date-colors":[{"distance":1,"unit":"days","direction":"after","backgroundColor":"rgba(255, 0, 0, 1)","isBefore":true}],"archive-with-date":true,"append-archive-date":true}
```
%%

Expected file contents:

---
kanban-plugin: basic
---

## TODO

- [ ] incomplete task
- [/] in progress task 2023-12-20 02:40:27 pm


***

## Archive

- [x] completed task 2023-12-20 02:40:27 pm
- [-] cancelled task 2023-12-20 02:40:27 pm

%% kanban:settings
```
{"kanban-plugin":"basic","show-checkboxes":true,"hide-card-count":false,"lane-width":320,"hide-tags-in-title":true,"date-colors":[{"distance":1,"unit":"days","direction":"after","backgroundColor":"rgba(255, 0, 0, 1)","isBefore":true}],"archive-with-date":true,"append-archive-date":true}
```
%%

Relevant errors (if available)

No response

Operating system

macOS

lzilioli avatar Dec 20 '23 19:12 lzilioli