benjypng / logseq-todoist-plugin

MIT License
122 stars 19 forks source link

Retrieve tasks with custom filter displays default project instead of filter #78

Open achennu opened 10 months ago

achennu commented 10 months ago

Hey, firstly thanks for making and sharing this plugin!

I'm trying to decide if logseq would work for my needs, and todoist integration would be an important aspect. I installed and used

logseq: v0.9.18

# from package.json
"repo":"hkgnp/logseq-todoist-plugin",
"title":"logseq-todoist-plugin",
"effect":false,
"version":"v5.1.6"

As I tried to use this logseq todoist plugin, I found these behaviors:

Using a custom filter to retrieve tasks

Let's say I want to retrieve with the filter !no priority & (#Personal), which is a valid todoist filter.

So I make this block in logseq

- These are my tasks for `!no priority & (#Personal)`
  -  !no priority & (#Personal)  |  <-- here I run the "Retrieve custom filter" option

Without a default project

I have no default project in the settings to pull from. Then I get a pop up saying "Please select a default project". And then no tasks load.

With a default project set

If I go to the project settings and choose say Inbox as my default projects to pull from. Now on running the retrieve custom filter task again in todoist, the correct filtered task list is retrieved from todoist and blocks are created and rendered.

However, this makes the block where I ran the command (ie the custom filter) to be changed to Inbox and not the custom filter.

Rendering of parent block

There is an additional issue, the "parent block" (I selected that setting) is not actually a parent block but a sibling block above the tasks block. What I mean is that it shows up in logseq as:

After running the filter on a custom block I get

- Inbox
- Task1
- Task2
- ...

instead of

- Inbox
  - Task1
  - Task2
  - ...

Ideally I would like it to not mangle the custom filter, or find a way to specify what to display instead of the default project. Best output would be

- !no priority & (#Personal)  |  <-- no change, or some way to specify
  - Task1
  - Task2
  - ...

Happy to know if an update like this would be possible.

benjypng commented 9 months ago

Please try the latest version and see if it works?

Also, turn off the setting projectNameAsParentBlk.

achennu commented 8 months ago

Hey @hkgnp thanks for your quick response. I was travelling and could not test out the new version till today.

The automatic update of plugin did not work. So I uninstalled and reinstalled, and am now on v5.1.9

I was able to check that now with no default project set to retrieve tasks from, custom filters can still be retrieved.

However, some filters work and others do not.

In a block, I had all & 7 days (the "upcoming" filter), and this custom filter was retrieved successfully.

In another block, I tried !no priority & (#Work | #Travel) and tried to retrieve custom filter. This did not work somehow.

Could you check to see if this is an issue because the # sign can also be interpreted as a tag in logseq?