Bug 135246 - LibreOffice Calc does not apply conditional formatting as expected
Summary: LibreOffice Calc does not apply conditional formatting as expected
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2020-07-28 19:26 UTC by James B. Byrne
Modified: 2022-08-14 04:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
spreadsheet with conditional format bug (9.99 KB, application/octet-stream)
2020-07-28 19:29 UTC, James B. Byrne
Details
Sample file modified. (11.95 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-08-04 15:39 UTC, m_a_riosv
Details
This is an entire sheet copied from the original workbook. (62 bytes, text/plain)
2020-08-04 16:45 UTC, James B. Byrne
Details
Single sheet displaying conditional formatting bug (28.38 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-08-11 15:59 UTC, James B. Byrne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James B. Byrne 2020-07-28 19:26:29 UTC
Description:
Fields possessing both direct and conditional formating have the direct formatting removed (neumeric / data / currency) and replaced with the default format.  However the correct combined format is shown in the conditional format dialogue box.

This is noted to occur erratically.  Some cells have the display format reverted and others do not.

Steps to Reproduce:
1. Open new sheet
2. Apply direct formatting to cell (date 2001-01-01)
3. Input new value in Cell
4. Apply negative warning conditional format to cell
5. Satisfy condition
6. Cell value changes from 2001-01-01 to 36892.00

Actual Results:
Cell displays 36892.00 in white on red background

Expected Results:
Cell should display 2001-01-01 in white on red background


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Not all conditionally formatted cells display this behaviour even when the same conditions and conditional format applies.
Comment 1 James B. Byrne 2020-07-28 19:29:32 UTC
Created attachment 163714 [details]
spreadsheet with conditional format bug

This spreadsheet exhibits the behaviour where the direct format (yyyy-mm-dd) is removed when the conditional format is applied (cell >= 0, background, negative_warning),
Comment 2 m_a_riosv 2020-08-03 20:30:53 UTC
Because you need to set up the date format for numbers to the style used by the condition.
Comment 3 Xisco Faulí 2020-08-04 11:35:28 UTC
it seems to happen only with 'negative_warning' Conditional formatting. Changing it to 'Warning' doesn't change the value

Reproduced in

Version: 7.1.0.0.alpha0+
Build ID: 58937aa4a50ecd681382f03331340da4c843b01e
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

and

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 4 m_a_riosv 2020-08-04 12:08:16 UTC
Right @xisco, modifying 'negative_warning' style in the tab 'numbers' to standard, seems to solve the issue. So in this way it can inherit the date format.

I think not a bug.
Comment 5 James B. Byrne 2020-08-04 15:10:40 UTC
Excuse me, but the example problem I submitted uses neither negative_warning nor is a date format.  

These formatting problems did not appear in this spreadsheet, which has been in use here for years, until very recently. Unfortunately, I cannot successfully return to an earlier version of LO because of the way dependencies work on FreeBSD.  So I cannot determine at which point the problem first evidenced itself.

I have also been able to copy and paste cells exhibiting the problem from one spreadsheet to a new one and some, but not all, of the conditional formatting issues are cured thereby.  This does strike me as expected or desirable behaviour.
Comment 6 James B. Byrne 2020-08-04 15:25:11 UTC
Likely related when I attempt to modify an existing style, say nagative_warning, I do not get a diagoue box to perform the modification.  I do get a dialogue box if I attempt to add a new style.
Comment 7 m_a_riosv 2020-08-04 15:39:13 UTC
Created attachment 163941 [details]
Sample file modified.

Menu/View/Sidebar, top-right click and select styles.
Right-click on the style and select Modify, on tab 'Numbers' click on Standard.
Comment 8 James B. Byrne 2020-08-04 16:08:08 UTC
The trick is that when I open the style sidebar and I select negative_warning and I press Modify nothing happens.  If I press New then a dialogue box opens with the  custom style inheriting from negative_warning.

This behaviour is also exhibited if I try to modify the Default Style, or any other style that I have tried to modify,

I cannot change the style because I do not get a style modification window.
Comment 9 James B. Byrne 2020-08-04 16:39:19 UTC
Creating a new custom style descending from Default / Background and only changing the font colour and cell background when applied as conditional formatting to a cell whose date format is yyyy-mm-dd results in a decimal number.
Comment 10 James B. Byrne 2020-08-04 16:45:28 UTC
Created attachment 163943 [details]
This is an entire sheet copied from the original workbook.

Your correction works on my system.  However even copying and pasting that entire cell to the spreadsheet that has the problem does not cure it. I am attaching an entire sheet from the book in the off  chance there is something about the sheet itself (macro, cross reference, whatever) that is triggering this.

Whatever the reason, this sheet and the workbook it is from, never had this problem until recently.  And the same problem is exhibited if I open files last viewed in 2018 and 2019.
Comment 11 James B. Byrne 2020-08-10 16:31:28 UTC
This is causing a major difficulty.  I have tried to resolved this by removing the customs style used by the conditionally formatted cells displaying the problem.  However, this has proved to be impossible.  Regardless of the view in the Style pane selecting and deleting does not remove the custom style.

In the hierarchical view the style is removed from the list, but opening custom style view shows it still present.  Switching back to the hierarchical view and the 'deleted' style reappears.

Likewise, find and search and replace do not allow me to search for a custom style> I can choose only from: Default, Excel Builtin Normal (whatever that is), and Report Page.

On the affected spreadsheet I cannot modify any style.  I can add but I cannot modify, the dialogue box does not display.

If I go to the affected cells and remove the conditional formatting then the display reverts t o the direct formatting applied.  However, if I then attempt to apply conditional formating using one of the provided styles, say Attention, then the direct formatting is ignored.  Looking at the cell formatting shows the correct format but the display does not match.

I am now faced with the prospect of having to rebuild this entire spreadsheet, and all of its formulas and formats, because of this issue.  If I could roll back to an earlier version of LO then I would do that but this does not seem to be possible with FreeBSD.
Comment 12 m_a_riosv 2020-08-11 06:52:06 UTC
Sorry but your last attachment it's a text file not and ods.
Comment 13 James B. Byrne 2020-08-11 15:59:19 UTC
Created attachment 164167 [details]
Single sheet displaying conditional formatting bug

This sheet displays, to me on my desktop FreeBSD system, the date of birth conditional format misrepresenting the date.  It also exhibits the inability to modify or delete the custom format style.  Finally, the Find & Replace function does not display the available styles in the find selector. The only available values are Default and Excel Built-in Normal.
Comment 14 m_a_riosv 2020-08-13 09:25:07 UTC
I see while defining conditions showed format it is not right.

But negative warning has a numeric style, not date. Modifying it to date, it is not showed right editing CF, but seems to work fine on the sheet.

In any way there is a bug about what is showed on editing the CF.
Comment 15 QA Administrators 2022-08-14 04:11:26 UTC
Dear James B. Byrne,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug