Bug 333066 - Incorrect behaviour of "today" button in month view during first week of month
Summary: Incorrect behaviour of "today" button in month view during first week of month
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: monthview (show other bugs)
Version: 5.3.1
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 423797 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-04 10:57 UTC by mel
Modified: 2022-05-03 16:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mel 2014-04-04 10:57:06 UTC
During the first week of a month (in this case April 2014, where the Monday was March 31), clicking the "today" button on the toolbar while in month view centres on the *previous* month (March 2014).

Process to reproduce:
* Have date be 2014-04-04
* Switch to month view
* Click "today"
* Unexpected: Month view switches to March
* Unexpected: Sidebar date-picker switches to March

Additionally, possibly related:
* Have date be 2014-04-04
* Switch to month view for April
* Click "today" on the toolbar
* Unexpected: Month view switches to March (as above)
* Expected: Sidebar date picker continues to correctly show April
* Click "forwards" on the toolbar or date-picker
* Unexpected: Month view switches to May, skipping April altogether.

It looks like this is a regression, since it's apparently been fixed twice before: Once in 2009 (https://bugs.kde.org/show_bug.cgi?id=142355) and once in 2011 (https://bugs.kde.org/show_bug.cgi?id=258866).
Comment 1 Denis Kurz 2016-09-24 18:49:41 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of korganizer (version 5.0 or later, as part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 2 mel 2016-11-02 14:59:14 UTC
I can confirm that this behaviour is still present, as of 2016-11-02 (a Wednesday):

Version 5.2.3
Using:
* KDE Frameworks 5.27.0
* Qt 5.6.1 (built against 5.6.1)
* The xcb windowing system

The installed Debian package has version: 4:16.04.3-2


Additionally, I have been able to determine some extra pre-requisite steps to more reliably reproduce the issue:

1. Have date be 2016-11-02
2. Switch to *agenda* view
3. Select *week* view
4. Switch to month view
5. Click "today"
6. Result: October is displayed, rather than November.
Comment 3 Denis Kurz 2016-11-03 14:32:08 UTC
Indeed! Thanks for reporting back, setting to confirmed
Comment 4 Michael Büker 2022-02-02 09:58:05 UTC
Confirmed to still be present in:

Linux: Kubuntu 21.10
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2 (built against 5.15.2)
Comment 5 gjditchfield 2022-04-03 19:21:25 UTC
Git commit c8809c2dc0be2c48eedd956620a8c48e483f11b9 by Glen Ditchfield, on behalf of Glen Ditchfield.
Committed on 02/04/2022 at 19:05.
Pushed by gditchfield into branch 'release/22.04'.

Today button moves Month view to today's month

If the date navigator has selected a week or a work week, the `Today`
button switches the Month view to the month containing the first day of
the selected period containing "today".  On April 2 2022 it showed
March, because the week started on March 28.

This patch uses the "preferred month" infrastructure.  On March 31 it
would show March, and on April 1 it would show April.

M  +2    -2    src/datenavigator.cpp

https://invent.kde.org/pim/korganizer/commit/c8809c2dc0be2c48eedd956620a8c48e483f11b9
Comment 6 gjditchfield 2022-05-03 16:33:44 UTC
*** Bug 423797 has been marked as a duplicate of this bug. ***