Bug 132887 - Conditional Formatting equal works wrong
Summary: Conditional Formatting equal works wrong
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-09 19:15 UTC by Alfredo
Modified: 2020-05-11 08:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from the link in comment 2 (19.68 KB, application/vnd.oasis.opendocument.spreadsheet-template)
2020-05-10 14:42 UTC, Ming Hua
Details
Screenshot of the "Urlaub" condition (13.35 KB, image/png)
2020-05-10 20:28 UTC, Ming Hua
Details
Sample file (8.56 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-05-11 07:55 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alfredo 2020-05-09 19:15:22 UTC
Description:
Add a Conditional Formatting with Cell Value equals x does not work
But changing the formatting to Cell Value Equals Not works as expected

Steps to Reproduce:
1. Insert a Conditional Formatting with Cell Value equals x to change the Style
2. Insert x into the cell -> nothing happend
3. Change Conditional Formatting with Cell Value equals not x
4. Insert x into the cell -> style changes

Actual Results:
the style changes when the cell DOES NOT contain the correct value
 

Expected Results:
The style changes when a cell contains the correct value


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
na
Comment 1 Oliver Brinzing 2020-05-10 06:50:41 UTC
Thank you for reporting the bug. 

Did you enclose "x" with quotation marks?

If the problem persists, please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 2 Alfredo 2020-05-10 14:11:35 UTC
I've created a template document at

https://extensions.libreoffice.org/templates/urlaubsplaner-holiday-vacation-planning-tool/@@download/file/Urlaubsplaner.ots

Yes, I used "x".

I think the functions Equal and Not Equal are inverted

The Equal works like Not Equal and vice versa
Comment 3 Ming Hua 2020-05-10 14:42:21 UTC
Created attachment 160602 [details]
Example file from the link in comment 2

(In reply to Alfredo from comment #2)
> I've created a template document at
> 
> https://extensions.libreoffice.org/templates/urlaubsplaner-holiday-vacation-
> planning-tool/@@download/file/Urlaubsplaner.ots
It's easier to just upload the example file as an attachment to Bugzilla.

So which conditional style do you think is giving wrong results?  I tested with typing "u" (without quotes) in random cells in the J8:N18 range, and they all make the cell background yellow, which seems to be what the conditional style wants.
Comment 4 Alfredo 2020-05-10 15:44:05 UTC
yes, this works, because I used the wrong rule to fix this issue.

As you can see the rule is: Cell Value IS NOT EQUAL "u" -> this is wrong.
The rule should be: Cell Value IS EQUAL "u" 
 
If you open the document in Excel you can see that there it doesn't work.
The cell rage becomes yellow and when you enter "u" the cell get the standard style format
Comment 5 Ming Hua 2020-05-10 20:28:16 UTC
Created attachment 160627 [details]
Screenshot of the "Urlaub" condition

(In reply to Alfredo from comment #4)
> yes, this works, because I used the wrong rule to fix this issue.
> 
> As you can see the rule is: Cell Value IS NOT EQUAL "u" -> this is wrong.
> The rule should be: Cell Value IS EQUAL "u" 
I have no idea what you mean.  In your example, the rule shows up as [equal to "u"] on my system, see attached screenshot.

> If you open the document in Excel you can see that there it doesn't work.
> The cell rage becomes yellow and when you enter "u" the cell get the
> standard style format
I don't have Excel to test, will have to wait for another tester.
Comment 6 Alfredo 2020-05-11 07:32:59 UTC
I think you can test it as well with this steps:

1. Open a new empty document
2. select a range of cells
3. create a conditional formatting with Equal To x
4. select a style e.g. "bad"

After closing the dialog all the selected cells have "bad" style
That is not correct.
The style should change when you insert a x
Comment 7 m_a_riosv 2020-05-11 07:55:25 UTC
Created attachment 160644 [details]
Sample file

(In reply to Alfredo from comment #6)
>.....
> The style should change when you insert a x
Works fine for me, look at attached file.
I think you are forgotten to put the text in the condition inside quotes "x" not x
Comment 8 Alfredo 2020-05-11 08:28:09 UTC
yes, you're right.
with "x" it works correct
Comment 9 m_a_riosv 2020-05-11 08:31:52 UTC
Not fixed it was not a bug.