Bug 91312 - Anomalies applying conditional formatting (follow-on Bug 91229)
Summary: Anomalies applying conditional formatting (follow-on Bug 91229)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.2.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0 target:7.6.0
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 20:26 UTC by gmarco
Modified: 2023-05-25 14:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
snipped jpg (122.45 KB, image/jpeg)
2015-05-15 20:26 UTC, gmarco
Details
snipped jpg (102.55 KB, image/jpeg)
2015-05-15 20:28 UTC, gmarco
Details
snipped jpg (109.14 KB, image/jpeg)
2015-05-15 20:29 UTC, gmarco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gmarco 2015-05-15 20:26:16 UTC
Created attachment 115630 [details]
snipped jpg

I verified the anomaly in LO 4.3.7.2, unchanged in 4.4.3.2 (see attached "case2-0.jpg").
Case2-) Create a new sheet and enter the values and formulas (A1 =230, A2 =225, A3 =A1-A2), copy A1/A3 to A5/A7 and to A9/A11 then copy col.A to col.B and to col.C, creates a style and apply the conditional formatting ("Format-Conditional Formatting") on A3 (if = 5 "red backgrounded");
copy it to B3 C3 A7 B7 C7 A11 B11 C11 (select A3 - copy - select B3 and Ctrl+ C3 A7 B7 ... - paste special-formats);
go to "Conditional Formatting-Manage Conditional Formatting" and the window shows only A3 A7 A11 B3 (see attached "case2-1.jpg").
Now, trying to change the condition of C3, a warning window will appear (see attached "case2-2.jpg) that does not appear if you change the condition of B3 (these are only examples, you can prove this even with other cells); however the result in B3 does not change anyway (as already observed at point 1a for bug 91229).
From this point (trying to change the condition of C3) my test takes different ways (warning: for every testing way you must restart from a new base sheet):

w1 --- replying NO from the warning window,  the "Condition" window is nevertheless displayed and you can see that the cell really has no conditional formatting (see too w4 following); now,  if you apply one, that is acquired but the displayed outcome is unchanged (as already observed at point 1a for bug 91229).

w2 --- replying YES from the warning window,  the "Condition" window is displayed and you can see that the cell seems having the condition applied; now,  if you change that one, the new condition is acquired and the displayed outcome appears correct, but looking at "Manage Conditional Formatting" window the cell C3 is not displayed.

w3 --- trying the same as above on cell B11 (instead of C3) other strangeness happen (but, at this point, I think unusefull going any further ....).

w4 --- in reality, cells B7 B11 C3-7-11 have not been conditioned: you get the proof saving/reopening the file; that cells get no more  "red backgrounded" and have no conditional formatting, while B3 displays correctly conditioned and you 
can change successfully its conditional formatting (as already observed at point 1a for bug 91229).
Comment 1 gmarco 2015-05-15 20:28:12 UTC
Created attachment 115631 [details]
snipped jpg
Comment 2 gmarco 2015-05-15 20:29:12 UTC
Created attachment 115632 [details]
snipped jpg
Comment 3 Buovjaga 2015-05-17 16:26:31 UTC
Contrary to the description, I do see all the cells in the cond. formatting manager.
I do not get a warning when changing B3. Changing the condition from = 5 to = 4 does not remove the style, however.
I'll set to NEW. Severity lowered per https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg

Ubuntu 15.04 64-bit 
Version: 4.4.2.2
Build ID: 40m0(Build:2)
Locale: en_US

Version: 5.0.0.0.alpha1+
Build ID: 51d16cc69d8ad9065f61d108ea25d6a025a2e228
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2015-05-17_03:58:58
Locale: en-US (en_US.UTF-8)
Comment 4 gmarco 2015-05-17 20:08:27 UTC
Really I wrote "Now, trying to change the condition of C3, a warning window will appear .... that does not appear if you change the condition of B3".

You have tried changing B3, the same (no warning) you'll get changing A7 and A11 (I too get no warning with that cells).
Instead, if you try with C3 B7 B11 C7 C11 you'll always get the warning I documented.
Comment 5 Buovjaga 2015-05-18 04:58:48 UTC
(In reply to gmarco from comment #4)
> Really I wrote "Now, trying to change the condition of C3, a warning window
> will appear .... that does not appear if you change the condition of B3".
> 
> You have tried changing B3, the same (no warning) you'll get changing A7 and
> A11 (I too get no warning with that cells).
> Instead, if you try with C3 B7 B11 C7 C11 you'll always get the warning I
> documented.

Sorry, I thought you made a mistake as you said you didn't see the condition for C3 so logically you could not have edited it, but would have had to create a new condition.

I tested again and I could edit the condition of C3 without any warnings.

Ubuntu 15.04 64-bit 
Version: 4.4.2.2
Build ID: 40m0(Build:2)
Locale: en_US
Comment 6 gmarco 2015-05-18 11:00:18 UTC
Hi Beluga, forgive my insistence but I too tried again and further confirm everything.
One more thing: do you execute the copy of A3 to the other cells in a single block, clicking on B3 and CTRL+ on the other cells for pasting as I have stated?
If I run single copies I too have your same results.
Comment 7 Buovjaga 2015-05-18 12:31:25 UTC
(In reply to gmarco from comment #6)
> Hi Beluga, forgive my insistence but I too tried again and further confirm
> everything.
> One more thing: do you execute the copy of A3 to the other cells in a single
> block, clicking on B3 and CTRL+ on the other cells for pasting as I have
> stated?
> If I run single copies I too have your same results.

Yep, my bad: I did every paste separately. I could reproduce the cond. manager showing only the ones you mentioned, when I ctrl-clicked and pasted at once.

Some observations: I had saved my earlier try with single pastes. After I reopened it, my changed condition had taken effect after all ie. C3 did not have red bg anymore.

After I did the ctrl-click mass paste, altered B3 (no warning window came up), saved & reloaded, the red bg disappeared from B3 + all the others that were not in the manager list!

Tested also with 5.0 to be sure.

Ubuntu 15.04 64-bit 
Version: 4.4.2.2
Build ID: 40m0(Build:2)
Locale: en_US

Version: 5.0.0.0.alpha1+
Build ID: 51d16cc69d8ad9065f61d108ea25d6a025a2e228
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2015-05-17_03:58:58
Locale: en-US (en_US.UTF-8)
Comment 8 gmarco 2015-05-18 15:56:30 UTC
(In reply to Beluga from comment #7)
> Yep, my bad: I did every paste separately. I could reproduce the cond.
> manager showing only the ones you mentioned, when I ctrl-clicked and pasted
> at once.
> 
> Some observations: I had saved my earlier try with single pastes. After I
> reopened it, my changed condition had taken effect after all ie. C3 did not
> have red bg anymore.
> 
> After I did the ctrl-click mass paste, altered B3 (no warning window came
> up), saved & reloaded, the red bg disappeared from B3 + all the others that
> were not in the manager list!
> 
> Tested also with 5.0 to be sure.
> 
> Ubuntu 15.04 64-bit 
> Version: 4.4.2.2
> Build ID: 40m0(Build:2)
> Locale: en_US
> 
> Version: 5.0.0.0.alpha1+
> Build ID: 51d16cc69d8ad9065f61d108ea25d6a025a2e228
> TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time:
> 2015-05-17_03:58:58
> Locale: en-US (en_US.UTF-8)

Well! I already tested many variables, results change consequently, but I did not want to bore you with too many examples.

You say "I had saved my earlier try with single pastes. After I reopened it, my changed condition had taken effect after all ie. C3 did not have red bg anymore":   it is so, I tried changing B3 C11, red not removed, after saving and reopening all were OK.
 
You say "After I did the ctrl-click mass paste, altered B3 (no warning window came up), saved & reloaded, the red bg disappeared from B3 + all the others that  were not in the manager list":   It is so!

If it is usefull, I observed other oddities, it seems that normally only 4 cells are formatted, but not always it is so, and a kind of "priority" is given sequentially to cells in column A, then B, C, ...
Try to click-CTRLclick (respecting the sequence) on C11 C7 B11 B7 A11 A7 and look at manager list (I see A11 A7 A3 only)
now try C3 C7 C11 B11 A11 (I see C3 C7 A11 A3)
then try C3 C7 C11 B11 A11 A7 (I see A11 C7 C3 A7 A3).
Comment 9 QA Administrators 2016-09-20 09:41:43 UTC Comment hidden (obsolete)
Comment 10 gmarco 2016-09-21 17:19:00 UTC
LO 5.2.1.2 Win10
bug still present, nothing has changed
Comment 11 Buovjaga 2016-09-22 19:41:32 UTC
gmarco: Markus very recently did a lot of work on conditional formatting. Some fixes went in just 2 days ago.
So I decided to test with a fresh build and I can't reproduce the problems anymore.

I see the full list of conditional formats and I do not get a warning from editing C3 condition.

I see only a different issue: changing the condition (eg. from 5 to 6) for C3 does not update the cell display.

You could try with a fresh 5.3 build: http://dev-builds.libreoffice.org/daily/master/Win-x86@42/current/
You could also test your bug 91229 with 5.3.
Comment 12 gmarco 2016-09-23 13:19:32 UTC
sorry, I have no ability to download 5.3 (is it a still test version?):

Available Versions
LibreOffice is available in the following released versions:

5.1.5 
5.2.0 
5.2.1
Comment 13 Markus Mohrhard 2016-09-23 14:31:44 UTC
(In reply to Buovjaga from comment #11)
> 
> I see only a different issue: changing the condition (eg. from 5 to 6) for
> C3 does not update the cell display.
> 


Can you add detailed steps for me how to reproduce that?
Comment 14 Buovjaga 2016-09-23 14:44:17 UTC
Markus: minimal steps:
1. Input value 5 to both A1 and B1
2. Create a new cell style with a background color
3. Add condition to A1; if equal to 5, set to the new style
4. Copy cell A1
5. Paste special - Formats to B1
6. Manage conditional formatting, edit the one for B1
7. Change the condition: if equal to 6. OK.

Now the change is only applied after save & reload.

So this is affecting only a format that was pasted.

gmarco: I gave you the link in my comment 11 :) http://dev-builds.libreoffice.org/daily/master/Win-x86@42/current/
Comment 15 gmarco 2016-09-23 15:53:24 UTC
(In reply to Markus Mohrhard from comment #13)
> (In reply to Buovjaga from comment #11)
....> Can you add detailed steps for me how to reproduce that?

Look at my initial post for a full testing, there is also a warning ((warning: for every testing way you must restart from a new base sheet)
Comment 16 gmarco 2016-09-23 15:57:54 UTC
(In reply to Buovjaga from comment #14)
> gmarco: I gave you the link in my comment 11 :)
> http://dev-builds.libreoffice.org/daily/master/Win-x86@42/current/

OK but that is an Alpha version and I had to manage two LO installations.
If you have it already tested I have no reason not to believe you !!!
Ciao, let me know.
Comment 17 gmarco 2016-09-23 16:16:49 UTC
(In reply to Buovjaga from comment #14)
> Markus: minimal steps:
....
> 7. Change the condition: if equal to 6. OK.
> 
> Now the change is only applied after save & reload.
> 

Note too that (before save&reload) the format is applied changing the B1 cell value to both 5 and 6
Comment 18 Commit Notification 2016-09-25 23:07:40 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

tdf#91312, don't forget to delete the old cond format indices

It will be available in 5.3.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 19 gmarco 2017-05-18 07:37:24 UTC
In LO 5.3.3.2 appears OK, you may change to FIXED.
Comment 20 Commit Notification 2023-05-25 14:45:46 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f447cb9bc8ab43a5f737d27dfa61bf0e71667bbb

tdf#107965: partially revert fix for tdf#91312

It will be available in 7.6.0.

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

Affected users are encouraged to test the fix and report feedback.