Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tasks set in status "COMPLETED" by other means still appears uncompleted until Completion % set to 100 #2428

Closed
koying opened this issue Dec 31, 2023 · 4 comments · Fixed by #2429

Comments

@koying
Copy link

koying commented Dec 31, 2023

Steps to reproduce

  1. Use, e.g., Android app "Tasks" to set a task as completed
  2. See that task still appear in uncompleted task list

Expected behavior

Only the completion status to be taken into account (STATUS:COMPLETED)

Actual behaviour

STATUS and percentage seems to be taken into account

Tasks app version

0.15.0

CalDAV-clients used

Android Tasks

Browser

No response

Client operating system

No response

Server operating system

No response

Web server

None

Database engine version

None

PHP engine version

None

Nextcloud version

No response

Updated from an older installed version or fresh install

None

List of activated apps

No response

Nextcloud configuration

No response

Web server error log

No response

Log file

No response

Browser log

No response

Additional info

image

image

@raimund-schluessler
Copy link
Member

The problem is likely not that PERCENT-COMPLETE is not 100%, but that the COMPLETED property is missing, see https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.2.1.

Could you please export one of these tasks as ICS file (in the sidebar, click export) to check how its properties do look like?

@koying
Copy link
Author

koying commented Jan 1, 2024

Here you are:

image

BEGIN:VCALENDAR
VERSION:2.0
PRODID:+//IDN tasks.org//android-130605//EN
BEGIN:VTODO
CREATED:20240101T104632Z
DTSTAMP:20240101T094745Z
LAST-MODIFIED:20240101T094745Z
STATUS:COMPLETED
SUMMARY:Test completion
UID:1ca8f0ee-fb86-49c9-a4a9-7c696f6c970e
END:VTODO
END:VCALENDAR

Both Android Tasks and Home Assistant Todo are aligned on this, just not the Nextcloud app...
Tad more subtile: For Android Task, STATUS:COMPLETED is enough, but I see it sets COMPLETED and PERCENT itself

BEGIN:VCALENDAR
VERSION:2.0
PRODID:+//IDN tasks.org//android-130605//EN
BEGIN:VTODO
DTSTAMP:20240101T100221Z
UID:ca277d0b-5992-40f7-8575-f2de8883920a
CREATED:20240101T110127Z
LAST-MODIFIED:20240101T100142Z
SUMMARY:Test completion
STATUS:COMPLETED
COMPLETED:20240101T100142Z
PERCENT-COMPLETE:100
END:VTODO
END:VCALENDAR

So the issue is on the Homeassistant side, I guess

@raimund-schluessler
Copy link
Member

Yes, I think that is a bug by Homeassistant. It should set COMPLETED:20240101T100142Z as well. However, I guess we could work around this by checking for STATUS:COMPLETED here as well:

tasks/src/models/task.js

Lines 259 to 261 in 68f3747

get closed() {
return this._completed || this._status === 'CANCELLED'
}

But it should nonetheless be adjusted in Homeassistant, as this might well lead to issues with other apps as well.

@raimund-schluessler
Copy link
Member

I added a PR to adjust the behaviour of the Tasks app. However, other apps will likely still interpret a task with missing COMPLETED property as uncompleted, e.g. Nextcloud server does it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants