benr77 / obsidian-gitlab-issues

Obsidian plugin to create/update/remove notes based on GitLab issues
MIT License
28 stars 15 forks source link

plugin doesn't remove note when criteria does not match anymore #14

Open matclab opened 1 year ago

matclab commented 1 year ago

My filter is assignee_username=matclab&state=opened, and when I unassigned a gitlab issue, the associated tasks remains in place.

As a side note, I see the following messages in the console when syncing gitlab issues:

Gitlab Issues: File already exists.
benr77 commented 1 year ago

Please can you specify your operating system and the obsidian version and the plugin version. Thanks.

benr77 commented 1 year ago

Also please can you give me the exact title of your Gitlab issue - it's possible any special characters in the title are causing problems.

matclab commented 1 year ago

I'm on Arch linux with obsidian 1.0.3 and plugin 0.1.8.

I remember two issues with the following titles (but since, I've erased the data directory and synced again) :

I tried again by assigning the last one to me, and the unassigning it. The note rests in the gitlab issues directory.

benr77 commented 1 year ago

Ok so we have : and / in the issue titles which may well be causing invalid filenames.

We rationalise the filenames from the issue titles already, but I'm guessing this is not working fully.

I should have some time tomorrow to look into this further.

benr77 commented 1 year ago

I cannot reproduce this issue. Using your example issue titles, I can successfully create and remove notes in Obsidian by changing the issue on Gitlab. I also can't get it to show me the File already exists message during this process.

One point - the notes will only be removed the next time the plugin checks Gitlab, which is automatically 30 seconds after Obsidian starts, followed by every 15 minutes. So the note will only be deleted when the next 15 minute interval expires. I know this sounds obvious but thought I'd best mention it :)

matclab commented 1 year ago

Thank you very much for taking the time to investigate. I'll try to find some time to debug the problem and keep you informed.