Bug 143950 - xxxxIF functions taking care of cell format to calculate. (Calc conditional formatting based on formula misfunction)
Summary: xxxxIF functions taking care of cell format to calculate. (Calc conditional f...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0 target:7.2.2 target:7.2.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2021-08-19 08:04 UTC by Viktor
Modified: 2021-09-03 14:16 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
LO7.2.0.4_failure under 7.2RCx (132.98 KB, image/gif)
2021-08-19 08:04 UTC, Viktor
Details
conditional formatting under 7.1.5.2 was working fine (158.17 KB, image/gif)
2021-08-19 08:05 UTC, Viktor
Details
TESTFILE to play arround for better understanding of the problem (24.36 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-08-19 08:05 UTC, Viktor
Details
Sample file (30.56 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-08-19 15:43 UTC, m_a_riosv
Details
attachment 174420 in 7.1.0 and current master after a hard recalculate (128.66 KB, image/png)
2021-08-30 14:26 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Viktor 2021-08-19 08:04:08 UTC
Description:
under <7.2 the Testfile is working as espected.
The conditional formatting based on a formula is used to highlight duplicate entries in color. This is used by me to prevent that e.g. orders are entered twice. 

Since 7.2xx this function doesn't works as before.


█ last tested under:█

Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 12; OS: Windows 10.0 Build 22000; UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

Steps to Reproduce:
► see GIF "LO7.1.5.2_working.gif" and "LO7.2.0.4_failure.gif"
1. open the testfile with LO7.1xx and it is working as before


Actual Results:
1. open the testfile with >LO7.2 and see the difference

Expected Results:
conditional formatting should work as under <7.2 Versions


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Also tested under Win10 21H1 19043.1165 and different 7.2.0 RC Versions
Comment 1 Viktor 2021-08-19 08:04:51 UTC
Created attachment 174400 [details]
LO7.2.0.4_failure under 7.2RCx
Comment 2 Viktor 2021-08-19 08:05:23 UTC
Created attachment 174401 [details]
conditional formatting under 7.1.5.2 was working fine
Comment 3 Viktor 2021-08-19 08:05:55 UTC
Created attachment 174402 [details]
TESTFILE to play arround for better understanding of the problem
Comment 4 BogdanB 2021-08-19 08:25:28 UTC
Confirm with
Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded
Comment 5 m_a_riosv 2021-08-19 15:43:45 UTC
Created attachment 174420 [details]
Sample file

The issue it's not related with the conditional format, seems the problem it's that COUNTIF() taking care of the cell format.

In the attached file, cells Sheet1.A16:B25 has a format "BA "Estandar, on the second sheet the format is Estandar, with LO 7.2 gives different results in E2:F11 and C15:C25 between the two sheets, and the only difference it's the mentioned format.
Do a hard recalc on 7.2 to see the issue.
Comment 6 m_a_riosv 2021-08-19 15:48:33 UTC
I don't think it is a new default behavior. It looks like a critical issue.
Comment 7 Viktor 2021-08-19 17:45:48 UTC
(In reply to m.a.riosv from comment #5)
> Created attachment 174420 [details]
> Sample file
> 
> The issue it's not related with the conditional format, seems the problem
> it's that COUNTIF() taking care of the cell format.
> 
> In the attached file, cells Sheet1.A16:B25 has a format "BA "Estandar, on
> the second sheet the format is Estandar, with LO 7.2 gives different results
> in E2:F11 and C15:C25 between the two sheets, and the only difference it's
> the mentioned format.
> Do a hard recalc on 7.2 to see the issue.

Hi (Matrisov)?,

yeah, you are right!
When I change the cell formating to "normal" decimal the conditionaL formating the conditional formating is workiung again. But I woul like to keep the asigned "BA " in front of our "BA" → is our "Job Number"...

The Solution for me is in the moment to switch the format-code to: ["BA "0] instead of  ["BA "Standard]
→ so it is possible for me to work as before but with the newer Version (I love the Autofilter update ☺ )

Thanks again for your advice
Comment 8 m_a_riosv 2021-08-19 20:44:47 UTC
Let's change to critical, l think it's unacceptable calculations being affected by the cell format.
Comment 9 Julien Nabet 2021-08-20 09:54:28 UTC
On pc Debian x86-64 with master sources updated today, I confirm this.
(I did a hard recalc on Mario's file and have different results between both sheets).
Comment 10 Buovjaga 2021-08-26 08:36:57 UTC
Bibisected with linux-64-7.2 to
https://git.libreoffice.org/core/commit/3069df790cca2917e5aedd87bac1af65f9605d51
tdf#142910 sc filter: fix "greater than" or "smaller than" etc

Adding Cc: to Balazs Varga
Comment 11 NISZ LibreOffice Team 2021-08-30 14:26:03 UTC
Created attachment 174644 [details]
attachment  174420 [details] in 7.1.0 and current master after a hard recalculate

Several values indeed change after a hard recalculate in:

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: d350a1364a1c34b96d00f2f716c44882b7b57fe9
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL
Comment 12 Eike Rathke 2021-09-01 21:48:41 UTC
Seeing that change mentioned in comment 10 uses ScDocument::RoundValueAsShown() this is fixed with the commit for bug 144209
https://git.libreoffice.org/core/commit/71b003a12f8afdff42a25786ad0a12ddd6609d59

I tried the "Sample file" https://bugs.documentfoundation.org/attachment.cgi?id=174420 and results after Shift+Ctrl+F9 hard recalc are the same as in 7.1.5.
Note that E2 =COUNTIFS($A$2:$B$30;A2)>1 loads as (however) stored TRUE in both versions and is recalculated to FALSE, which is correct, the value 1 occurs only one time.
Comment 13 Eike Rathke 2021-09-01 23:07:16 UTC
Note the pending reviews
https://gerrit.libreoffice.org/c/core/+/121459 for 7-2
https://gerrit.libreoffice.org/c/core/+/121460 for 7-2-1