Bug 104675 - Conditional Format not updated on change value in a cell it depends on by formula
Summary: Conditional Format not updated on change value in a cell it depends on by for...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.0.beta1
Hardware: All All
: high major
Assignee: Eike Rathke
URL:
Whiteboard: target:5.4.0 target:5.3.1 target:5.3.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-12-14 11:55 UTC by Wolfgang Jäger
Modified: 2017-02-01 01:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The demo mentioned in the report (#0) (12.27 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-12-14 11:55 UTC, Wolfgang Jäger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Jäger 2016-12-14 11:55:37 UTC
Created attachment 129627 [details]
The demo mentioned in the report (#0)

To reproduce the bug you should open the attacehd demo with V5.3 beta1+ (or later) AND EDIT the CF formulae defining the conditions in a few steps GETTING BACK to the originally contained formulae.

With Calc V5.3 beta1+ (Build ID: 7f47d68c4310b8bae09286a81036a6fa669a1705
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86_64@62-TDF, Branch:libreoffice-5-3, Time: 2016-12-08_16:10:30
Locale: de-DE (de_DE); Calc: group) 

A conditional format using the 'Formula is' mode does not update for the view if the values of cells the CF formulae depend on are changed. The CF was updated if any cell of the formatted range was edited.
This did ONLY apply to CF that was created or EDITED IN THE CURRENT SESSION under V5.3. A reopened document worked as expected as long as the CF was not edited again. Saving without reloading also fixed the issue. 
'AutoCalculate' was on.
Comment 1 Wolfgang Jäger 2016-12-14 12:02:48 UTC
The editing mentioned above may be reduced to the insertion of a syntactically accepted space into the CF formulae using 
> 'Format' > 'Conditional Formatting' > 'Manage...'. 
There is only one CF defined.
Comment 2 Wolfgang Jäger 2016-12-15 15:46:49 UTC
Unchanged behaviour of 5.3.0.0.beta2
Comment 3 m_a_riosv 2016-12-15 22:04:18 UTC
I can't reproduce with:
Version: 5.3.0.0.beta2 (x64)
Build ID: a7e30712ad6d8bc9286007b37aa581983e0caba3
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: es-ES (es_ES); Calc: CL
Versión: 5.3.0.0.beta2
Id. de compilación: a7e30712ad6d8bc9286007b37aa581983e0caba3
Subprocesos de CPU: 4; Versión de SO: Windows 6.2; Repr. de IU: predet.; Motor de trazado:HarfBuzz; 
Configuración regional: es-ES (es_ES); Calc: CL

For me no matter if OpenCL is enabled or not but maybe can affect in your case.

Please test changing OpenCL state.
Comment 4 Wolfgang Jäger 2016-12-16 17:17:26 UTC
Tested with 
Version: 5.3.0.0.beta2 (x64)
Build ID: a7e30712ad6d8bc9286007b37aa581983e0caba3
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
Locale: de-DE (de_DE); Calc: group

No matter which OpenCL state: unchanged effect. 

(Just emphasising again:) 
The reloaded example works well as expected. 
After inserting a syntactically accepted space into both the formulae for conditions, the updating was broken. (There occured a few erratic effects, however, if mor than one of the three parameters were changed.)

Removing the mentioned spaces by another turn of editing did not recover the document.

(Under V5.2.2.2 everything was ok.)
Comment 5 Wolfgang Jäger 2016-12-16 17:19:25 UTC
Do you (m.a.riosv) think I should test with different UI / locales? 
I might (tomorrow or so) also test with a notebook. (also Win 10).
Comment 6 Wolfgang Jäger 2017-01-20 16:37:45 UTC
Bug still present under V5.3.0.2RC. 

Version: 5.3.0.2 (x64)
Build ID: 5ad7b2889021c491af62f7930a4b1cb631392f16
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: de-DE (de_DE); Calc: group

Please note:

In the reloaded document the CF FIRST is working as expected.

After a functionlally irrelevant editing (insertion of an accepted space into the CF formula next to an = sign) the CF did not update on changes to the parameters in A1:A3. 

The CF now only worked if the view was changed to get the CF range out of sight and then to get it back into sight. (Scroll / scroll back; Minimize / restore window ...) 

Not the CF itself but the proper triggering of its recalculation was broken.

The broken recalculation persisted the reversion of the mentioned editing. After the next reload everything again working as expected.
Comment 7 m_a_riosv 2017-01-20 17:42:36 UTC
Reproducible:
Version: 5.3.0.2 (x64)
Build ID: 5ad7b2889021c491af62f7930a4b1cb631392f16
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
Locale: es-ES (es_ES); Calc: group

Looks the screen it's not refreshed, moving the range of CF out of the screen forces the screen update.
Comment 8 m_a_riosv 2017-01-20 17:48:20 UTC
Work with:
Version: 5.2.5.1 (x64)
Build ID: 0312e1a284a7d50ca85a365c316c7abbf20a4d22
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
Locale: es-ES (es_ES); Calc: group

so regression
Comment 9 m_a_riosv 2017-01-20 17:55:57 UTC
And works with:
Version: 5.4.0.0.alpha0+
Build ID: bc8eb82877f544d8cf80e6f3ea02a9993e058491
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-17_07:28:47
Locale: es-ES (es_ES); Calc: CL

Only 5.3 affected.
Comment 10 Eike Rathke 2017-01-24 10:55:20 UTC
(In reply to m.a.riosv from comment #9)
> And works with:
> Version: 5.4.0.0.alpha0+
> Only 5.3 affected.
Not true, I can reproduce in master as well.
Comment 11 Xisco Faulí 2017-01-24 12:23:19 UTC
to me, this sounds like a duplicate of bug 105351

*** This bug has been marked as a duplicate of bug 105351 ***
Comment 12 Eike Rathke 2017-01-24 14:41:33 UTC
Note that this bug here occurs only if the condition is edited via the Manager, not if directly via Condition. Didn't investigate yet if that's actually the identical cause as bug 105351, but maybe related.
Comment 13 m_a_riosv 2017-01-24 17:27:46 UTC
(In reply to Eike Rathke from comment #10)
> (In reply to m.a.riosv from comment #9)
> > And works with:
> > Version: 5.4.0.0.alpha0+
> > Only 5.3 affected.
> Not true, I can reproduce in master as well.

Maybe I didn't follow the right steps.

BTW hard recalc update the screen.
Comment 14 Eike Rathke 2017-01-25 10:38:00 UTC
Not a duplicate of 105351.
Comment 15 Commit Notification 2017-01-25 10:48:29 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#104675 ScConditionalFormat ranges needed to start listening

It will be available in 5.4.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 16 Eike Rathke 2017-01-25 11:17:17 UTC
Pending review
https://gerrit.libreoffice.org/33525 for 5-3
https://gerrit.libreoffice.org/33526 for 5-3-0
Comment 17 Commit Notification 2017-01-25 20:36:16 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f6587264b2c5b9191a4a7b547416c366db1c5607&h=libreoffice-5-3

Resolves: tdf#104675 ScConditionalFormat ranges needed to start listening

It will be available in 5.3.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 18 Commit Notification 2017-01-26 17:02:16 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ae88b3ad32273d8f37815a61491f69544fbf71c1&h=libreoffice-5-3-0

Resolves: tdf#104675 ScConditionalFormat ranges needed to start listening

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 m_a_riosv 2017-02-01 01:00:49 UTC
Tested.
Versión: 5.3.1.0.0+
Id. de compilación: 096baf452992b91ce07a3ade9e7b3c0f4283df39
Subpr. de CPU: 4; Versión de SO: Windows 6.2; Repr. de IU: predet.; Motor de trazado: HarfBuzz; 
TinderBox: Win-x86@62-merge-TDF, Branch:libreoffice-5-3, Time: 2017-01-31_16:30:19
Configuración regional: es-ES (es_ES); Calc: CL