Bug 374774

Summary: Allow completed tasks to be displayed on their completion dates instead of their due dates.
Product: [Applications] korganizer Reporter: Alexandre Bonneau <alexandre.bonneau>
Component: incidence editorsAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: alexandre.bonneau, gjditchfield
Priority: NOR    
Version: 5.2.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: No icons showing when task is completed, with Breeze icon theme v5.78
Screenshot of categories

Description Alexandre Bonneau 2017-01-08 19:46:35 UTC
I reopen here the bug #297148 :
"Before 4.8, when setting the completion level to 100% in a task, the expiration date was automatically set with the current date and time.
Using this 'expiration date' is the only way to visually set the task in the agenda view. This way you can have a clear view of which tasks you accomplished for a given period of time.

Please add back this feature !

Reproducible: Always

Steps to Reproduce:
see above"

The problem is still present in v5.2.3.
Comment 1 gjditchfield 2021-09-16 22:07:32 UTC
I believe this has been fixed in recent versions of KOrganizer. When the completion percentage is set to 100%, the completion date is set.  Also, there are at least two ways to view the tasks accomplished in a period of time.

- The Agenda view will display a "completed to-do" icon, if the user has enabled that icon in the Agenda view settings.
- The completion will be recorded in the journal, if the user has enabled it in the To-do View settings.

Is this satisfactory?
Comment 2 Alexandre Bonneau 2021-09-17 07:14:47 UTC
Would you know in which version this has been fixed?

I'm currently using `5.15.3` and it still exhibit the same problem (ie. not setting the date/time to the current date and time when setting the tasks to 100% completion, like it did before).

About the completed to-do icon, when a task is completed I do see the 'not-found' icon instead on my Debian installation for years now.
I have no use for the journal.

My use case is that using a mix of the Get Things Done methodology and other ones, I plan my day/week by putting my tasks at certain time in the following day. When I complete a task, I want it to stay where(when really!) I completed it, so that I can keep a clear view at one glance of what I did and when.
It's very useful for reporting to clients for instance, as well as organizing your time.
Comment 3 gjditchfield 2021-09-17 20:56:25 UTC
(In reply to Alexandre Bonneau from comment #2)
> About the completed to-do icon, when a task is completed I do see the
> 'not-found' icon instead on my Debian installation for years now.

The icon depends on the theme, of course; if you are using a Breeze theme, they added task-complete icons in version 5.76, which was released in November 2020.  You can see them at https://invent.kde.org/frameworks/breeze-icons/-/merge_requests/53
Comment 4 gjditchfield 2021-09-17 21:50:16 UTC
(In reply to Alexandre Bonneau from comment #2)
> I'm currently using `5.15.3` and it still exhibit the same problem (ie. not
> setting the date/time to the current date and time when setting the tasks to
> 100% completion, like it did before).

I think I misunderstood your original request.

A task can have a due date and a "completed" date.  The Agenda View displays tasks on their due dates (and does not display tasks that do not have due dates).  If I now understand correctly, you would like either
- the Agenda View to display completed tasks on their completion dates, or
- the due date to be reset to the completion date.
Do I have that right?

> I have no use for the journal.

It might be useful for this purpose.  If the setting is enabled, KOrganizer will automatically create one journal entry per day that lists the tasks you completed and the times at which you completed them.  The journal entry is not deleted if you purge completed tasks, which can be useful for future reference.
Comment 5 Alexandre Bonneau 2021-09-20 07:14:39 UTC
Created attachment 141713 [details]
No icons showing when task is completed, with Breeze icon theme v5.78

Using Debian Bullseye with breeze-icon-theme version 4:5.78.0-2, I cannot see the completed task icon shown in https://invent.kde.org/frameworks/breeze-icons/-/merge_requests/53
Comment 6 Alexandre Bonneau 2021-09-20 07:49:15 UTC
Created attachment 141714 [details]
Screenshot of categories

About the journal since it's a list, it's not visual enough for my use case, as I use category colors a lot to differentiate the work I do (see the attached screenshot of a 'light week') .


About the bug report, sorry, in my initial comment in 2017 I mentioned a poorly translated 'expiration date', which should have been 'due date'.

Before Korganizer 4.8, when you set a task to 100% completion, then the due date was automatically set to the current date and time.
This was very useful since you just had to change the completion to 100%, and the tasks was then correctly displayed in the agenda view at the right time and day.

Since 4.8 this behavior has changed ; now when you finish a task by setting its completion to 100%, the due date is _not_ updated, therefore the task placement (via the due date) in the agenda view is not updated.
In order to get the same behavior pre-4.8, you have to :
- Set the task completion to 100%
- Then set the due date manually (setting the exact time each time is a bit of a pain)


I understand that there are 2 different date/time here:
- The completion date (set when the task is saved at 100% (by the way, does that date gets updated if the tasks is set back to a value <100%, then again at 100% (in case of entry error)?)
- The due date (when the tasks is supposed to be done)

However while both completion and due dates are important information (to me at least), only the due dates gets the attention of Korganizer:
- The tasks are displayed on their due date in the agenda view, and in the task/event detail on the left
- The completion date is displayed, _but not the time_ in the task/event detail on the left



One solution to this could be to allow the user to choose where the tasks should be displayed ; either on their due dates, or on their completion date.
That way there wouldn't be a need to update the due date with the completion date like before 4.8, in order for the tasks to be displayed at their completion date.
All in all, it would be more logical.


In my opinion, both use case could be useful (and in my dreams I wish there could be a way to view both the due and completion date in a way that shows you how in advance or late you managed your tasks, but that's for another bug report ;))
Comment 7 gjditchfield 2021-09-21 02:46:00 UTC
(In reply to Alexandre Bonneau from comment #5)
> Using Debian Bullseye with breeze-icon-theme version 4:5.78.0-2, I cannot
> see the completed task icon shown in
> https://invent.kde.org/frameworks/breeze-icons/-/merge_requests/53

I don't know what has gone wrong here. The breeze-icon-theme 5.78.0-2 deb package contains
/usr/share/icons/breeze-dark/status/{16,22,24}/task-complete.svg and
/usr/share/icons/breeze/status/{16,22,24/task-complete.svg
so they should have been installed in your file system.

Perhaps reinstall the package?  Check which icon themes are available in System Settings?  (Obviously I am floundering.)
Comment 8 gjditchfield 2021-09-21 02:56:50 UTC
(In reply to Alexandre Bonneau from comment #6)
> I use category colors a lot to differentiate the work I do (see the
> attached screenshot of a 'light week') .

Would it be helpful to put a "Completed Date" column in the To-do List view?  That view already has a category color swatch.
Comment 9 Alexandre Bonneau 2021-09-21 05:54:59 UTC
# dLg breeze-icon-theme task-complete
/usr/share/icons/breeze/status/16/task-complete.svg
/usr/share/icons/breeze/status/22/task-complete.svg
/usr/share/icons/breeze-dark/status/16/task-complete.svg
/usr/share/icons/breeze-dark/status/22/task-complete.svg

# dlg breeze-icon-theme
ii  breeze-icon-theme      4:5.78.0-2   all  Default Plasma icon theme
ii  breeze-icon-theme-rcc  4:5.78.0-2   all  RCC resources for the breeze icon theme

The task-complete.svg icon is only available in size 16 and 22, not 24. Perhaps that's the cause of it not showing?
Comment 10 Alexandre Bonneau 2021-09-21 05:57:43 UTC
> Would it be helpful to put a "Completed Date" column in the To-do List view?  That view already has a category color swatch.

Perhaps, but since I have a LOT of tasks, and need to visualize them when they will be dealt with, I do not use the task list, but the agenda view where it's easier at a glance to see when you have have to do, and when you have some 'free time'.

I really think being able to choose how to display the tasks (either at the due date, or completion date), could be the answer to the change of behavior after v4.8.
Comment 11 gjditchfield 2021-09-21 21:11:06 UTC
(In reply to Alexandre Bonneau from comment #9)
> The task-complete.svg icon is only available in size 16 and 22, not 24.
> Perhaps that's the cause of it not showing?

I was incorrect saying that the Debian deb has a "24" folder.  The deb in my distribution, Neon, does.  Ubuntu Hirsute's deb does not, but I don't have a Ubuntu installation to test.

Debian has size 16 and 22 of the "incomplete task" icon view-calendar-tasks.svg.  (You can see it in the above-mentioned merge request.) Do you see it, or is it also missing?

Do you have a high-dpi screen?

Have you set global scaling to something other than 100%?
Comment 12 Alexandre Bonneau 2021-09-22 03:52:25 UTC
I have a both type of screens, and in both my setup:
- on my laptop (usual 1920x1080),
- nor my 27" 4k screen,
the task icon is correctly shown, while the task-complete is not.
Global scaling is untouched at 100%.
Comment 13 gjditchfield 2021-09-23 02:22:16 UTC
Git commit aaad52f26ff6ac7ec529671f979bf4203b2744d2 by Glen Ditchfield.
Committed on 23/09/2021 at 02:17.
Pushed by gditchfield into branch 'release/21.08'.

Display completion date as a date and time

A  +66   -0    autotests/data/todo-2.html
A  +17   -0    autotests/data/todo-2.ical
M  +1    -0    autotests/testincidenceformatter.cpp
M  +1    -1    src/templates/todo.html

https://invent.kde.org/pim/kcalutils/commit/aaad52f26ff6ac7ec529671f979bf4203b2744d2
Comment 14 gjditchfield 2021-09-23 21:08:50 UTC
(In reply to Alexandre Bonneau from comment #12)
> I have a both type of screens, and in both my setup:
> - on my laptop (usual 1920x1080),
> - nor my 27" 4k screen,
> the task icon is correctly shown, while the task-complete is not.
> Global scaling is untouched at 100%.

I tried the KDE flavor of the Bullseye Live USB, and both icons show correctly.  (1080 screen, 100% scaling.)  The live image only has sizes 16 and 22, not 24.

So, I dunno.
apt-get install --reinstall breeze-icon-theme ?
Update the icon caches?
Comment 15 Alexandre Bonneau 2021-09-24 09:27:18 UTC
I re-installed breeze-icon-theme using `apt install --reinstall breeze-icon-theme`, ran `update-icon-caches /usr/share/icons/*`, they closed and restarted kde and korganizer, and the icon is still missing from the agenda view.

By the way, thanks for committing the change to display the time and hour for the completion time Glen.

Though I still think being able to choose at which time tasks should be displayed (either on completion date or due date) is the best way to solve this current issue.
Comment 16 Bug Janitor Service 2021-09-28 16:34:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/eventviews/-/merge_requests/44
Comment 17 gjditchfield 2021-09-28 16:48:03 UTC
The change to the sidebar task detail to show a time of day, and the addition of a "completed date" column to the To-do List, do not entirely satisfy the original wish, but seemed worthwhile for their own sakes.
Comment 18 gjditchfield 2021-09-29 00:59:22 UTC
Git commit 25b7024b401f5a2fcc0b19e9e3aec831ed5f984b by Glen Ditchfield, on behalf of Glen Ditchfield.
Committed on 28/09/2021 at 16:34.
Pushed by gditchfield into branch 'master'.

Add a Completed Date column to the To-Do List view

M  +6    -0    src/todo/todomodel.cpp
M  +1    -0    src/todo/todomodel.h
M  +2    -0    src/todo/todoview.cpp
M  +34   -0    src/todo/todoviewsortfilterproxymodel.cpp
M  +1    -0    src/todo/todoviewsortfilterproxymodel.h

https://invent.kde.org/pim/eventviews/commit/25b7024b401f5a2fcc0b19e9e3aec831ed5f984b