Bug 119402 - Wrong result of Conditional formatting with type Date: condition "This week" shows 9 days in week instead 7 days
Summary: Wrong result of Conditional formatting with type Date: condition "This week" ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.2.0 target:6.1.1 target:6.0.7
Keywords: bibisected, bisected, regression
: 119494 (view as bug list)
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2018-08-21 14:44 UTC by Roman Kuznetsov
Modified: 2018-08-26 10:29 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
wrong CF with Date (this week) (15.92 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-08-21 14:44 UTC, Roman Kuznetsov
Details
wrong CF with Date (this week).ods in LibreOffice Calc 6.0.4 (66.77 KB, image/png)
2018-08-21 14:49 UTC, Roman Kuznetsov
Details
wrong CF with Date (this week).ods in LibreOffice Calc 5.4.7 (68.39 KB, image/png)
2018-08-21 14:49 UTC, Roman Kuznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2018-08-21 14:44:01 UTC
Description:
Wrong result of Conditional formatting with type Date: condition "This week" shows 9 days in week instead 7 days

Steps to Reproduce:
1. Open file from attach
2. 9 cells have green fill instead 7

Actual Results:
condition "This week" shows 9 days in week instead 7 days

Expected Results:
condition "This week" shows correct 7 days in week


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Roman Kuznetsov 2018-08-21 14:44:42 UTC
Created attachment 144348 [details]
wrong CF with Date (this week)
Comment 2 Roman Kuznetsov 2018-08-21 14:47:22 UTC
bug repro in

Version: 6.0.4.2 (x64)
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL

and doesn't repro in

Version: 5.4.7.2 (x64)
Build ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL

regression
Comment 3 Roman Kuznetsov 2018-08-21 14:49:28 UTC
Created attachment 144350 [details]
wrong CF with Date (this week).ods in LibreOffice Calc 6.0.4
Comment 4 Roman Kuznetsov 2018-08-21 14:49:55 UTC
Created attachment 144351 [details]
wrong CF with Date (this week).ods in LibreOffice Calc 5.4.7
Comment 5 Xisco Faulí 2018-08-21 17:03:18 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=667aa6ade94a4dee441868d21db037e42c871932

author	Eike Rathke <erack@redhat.com>	2017-07-19 19:10:32 +0200
committer	Eike Rathke <erack@redhat.com>	2017-07-19 20:13:58 +0200
commit 667aa6ade94a4dee441868d21db037e42c871932 (patch)
tree 148c76752126ba4b9322300c3d0b7c8b9d248f82
parent ef8f13e08bccb7c082d3c5b19cce8a7a63c0b2fa (diff)
Avoid temporary Date and normalization
Rather than possibly calculating Date=((Date=(Date+int))+int) with a
normalization involved for each operator+() force Date=(Date+(int+int))

Bisected with: bibisect-linux64-6.0

Adding Cc: to Eike Rathke
Comment 6 Eike Rathke 2018-08-22 17:33:36 UTC
grml.. stupid me.
Comment 7 Commit Notification 2018-08-22 21:46:47 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cadd6c595b250b3ce0025a2a09c160eaae483d5a

Resolves: tdf#119402 +- typo sign flip

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Eike Rathke 2018-08-22 21:48:14 UTC
Pending review
https://gerrit.libreoffice.org/59475 for 6-0
https://gerrit.libreoffice.org/59476 for 6-1
Comment 9 Commit Notification 2018-08-23 08:47:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=40a7c1c1ef133950ddb4c2052d460a9ce2b02b15&h=libreoffice-6-1

Resolves: tdf#119402 +- typo sign flip

It will be available in 6.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2018-08-23 10:36:03 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6d6136398afd1581c6292ba8091c3c5186eaf4b1&h=libreoffice-6-0

Resolves: tdf#119402 +- typo sign flip

It will be available in 6.0.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Xisco Faulí 2018-08-25 16:57:51 UTC
*** Bug 119494 has been marked as a duplicate of this bug. ***
Comment 12 Roman Kuznetsov 2018-08-26 10:29:01 UTC
verified in LO 6.1.1.1

Thank you, Eike