RogerSelwyn / MS365-ToDo

Microsoft 365 To Do Integration for Home Assistant
MIT License
9 stars 0 forks source link

Wrong (future) tasks dismissed #25

Closed srslykev closed 1 month ago

srslykev commented 1 month ago

Hey there,

unfortunately, when I dismiss a due recurring task, the upcoming task appears and is marked as done, while the due task stays due.

Am I the only one experiencing this?

Thanks a lot for the great work!

RogerSelwyn commented 1 month ago

I don’t think I was aware there was such a thing as a recurring task. I will need to take a look.

Are you dismissing via the HA core ToDo panel, because it is possible it doesn’t support recurring tasks.

srslykev commented 1 month ago

Thanks for the quick reply! It happens both in the panel as well as the todo lovelace card.

RogerSelwyn commented 1 month ago

No idea about the todo Lovelace card since it is not created by me. Again, it probably doesn’t support recurring tasks. However I will take a look next week some time.

RogerSelwyn commented 1 month ago

Can you try this version and see if it fixes the issue. I suspect there will be issues, because I don't believe HA core handles recurring tasks. Looking at the MS Graph Explorer, all occurrences have the same task id, so no idea how you tell which one you are updating. If recurring tasks is newish, it is possible the api doesn't support it, as has been the case for other items.

https://github.com/RogerSelwyn/MS365-ToDo/releases/tag/v0.1.3b1

srslykev commented 1 month ago

I think, this does ist. I've tried a few times and now, the correct task is dismissed. I've just noticed, that in the non beta version, a new recurring task had been created on top of the existing one. But the beta fixes this, thanks a lot! I've been using that feature for years, so it's not really new..

RogerSelwyn commented 1 month ago

I'll try to figure out how updating a recurring task works in the api, to make it more reliable. For sure the HA core does not support it, but I may be able to make it work.

For example, if you try to change the completed task that the todo panel shows, I don't think that will work.

srslykev commented 1 month ago

Cool, thanks! I don't think editing recurring tasks is that important, since they are mostly setup and forgotten about.

RogerSelwyn commented 1 month ago

I've checked again, they all do have unique iDs, so why the wrong one was being completed I have no idea. That said, I am hopeful the change I have made will fix it.