Bug 133242 - Calc conditional formatting condition dialog (ui) changes to no condition after copy: regression
Summary: Calc conditional formatting condition dialog (ui) changes to no condition aft...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2020-05-21 18:41 UTC by pb
Modified: 2022-05-23 03:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pb 2020-05-21 18:41:27 UTC
Description:
Conditional formatting dialog claims there is no conditional formatting after conditional formatting has been copied, but actual conditional formatting still appears to work as expected.

Steps to Reproduce:
New spreadsheet.
Create a condition in say cell e5 using condition tool, for example if =1, make it yellow.
Condition works.
Re-opening conditional formatting dialog shows the expected condition and result.
Copy cell e5.
Paste special formats only into cell c5.
Reopen conditional formatting dialog for cell e5.  It now shows no format.
Test whether e5 conditional formatting still works.  It does.
Test whether c5 conditional formatting works.  It does.
Open conditional formatting dialog for cell e5.  It now shows no format.
Open conditional formatting dialog for cell c5.  It shows no format.


Actual Results:
Open conditional formatting dialog for cell e5.  It now shows no format.
Open conditional formatting dialog for cell c5.  It shows no format.

Expected Results:
Conditional formatting dialog for both cells should show condition and action that was originally set for the original cell.


Reproducible: Always


User Profile Reset: No



Additional Info:
Running windows 7 64bit, quad core i5 processor.

Version: 6.4.3.2 (x86)
Build ID: 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 1 pb 2020-05-21 18:42:28 UTC
This exact bug did not exist in v 5.0.1, not sure when it reappeared.
Comment 2 Ming Hua 2020-05-21 19:39:15 UTC
I think I know what you mean, but I need clarification:

(In reply to pb from comment #0)
> Steps to Reproduce:
> New spreadsheet.
> Create a condition in say cell e5 using condition tool, for example if =1,
> make it yellow.
> Condition works.
> Re-opening conditional formatting dialog shows the expected condition and
> result.
What exactly do you mean by "Re-opening conditional formatting dialog"?  If I choose menu Format > Conditional > Condition..., a dialog pops up asking me if I want to edit the existing conditional format.  Clicking Yes gets me back to the same dialog used for creating the conditional format.

On the other hand, there is the Format > Conditional > Manage... dialog, which is different.

> Copy cell e5.
> Paste special formats only into cell c5.
> Reopen conditional formatting dialog for cell e5.  It now shows no format.
> Test whether e5 conditional formatting still works.  It does.
> Test whether c5 conditional formatting works.  It does.
> Open conditional formatting dialog for cell e5.  It now shows no format.
> Open conditional formatting dialog for cell c5.  It shows no format.
If your answer to my previous question is the same dialog after clicking yes, then you want to try reopening the dialog while both C5 and E5 are selected (hold Ctrl key while clicking them with mouse), this way the condition (equals to 5) is correctly displayed.
Comment 3 pb 2020-05-21 20:24:28 UTC
The answer to your question is yes, the same dialog obtained by clicking the 'condition' conditional formatting icon.

Checking Format > Conditional > Condition..., it does indeed show that both cells have the correct formatting information.

However, what I report is still a bug.  Because the 'condition' tool refers to the single cell which is selected (or at least that's what a reasonable user would expect), it should report what the formatting is *for that cell*.  It does have what I consider to be the correct behavior in v5.0.1.

In addition,
If, again using the condition tool as in my original report, I create a format for a random cell, then use it again to create the same format for some other random cell, after that the condition tool *does* still show each cell's conditional format.  There is no reason *from the user's perspective* why that should result in different behavior.  (...even if it might make sense from the perspective of simplifying the code.)

As for the 'manage' dialog, it is also inconsistent, because when the condition is copied, it shows the copies as a list, but when created independently, it shows them independently.  What's more, it appears that using the condition tool (icon) ADDS a shadowing condition, rather than EDITING the existing condition as the intervening dialog asserts.

Most of this is counterintuitive, i.e. bad UI/UX design.

At the very least, the "condition" tool should be called "add a condition without showing you any previous conditions that might apply to this cell, and that will not change any of the previous conditions."

The way I would expect this all to work would be that the 'condition' tool would show the user ALL conditions that apply to that cell, and allow the user to edit each of them.  If a cell's property is copied, the state of the copied cell should not change when interrogated by that tool.

As for the 'manage' dialog, it appears that if you have thousands of conditions, the manage dialog could become unmanageable.  Maybe that's the motivation of the feature to group copied formats together.  However, that should then also happen when the CF is created independently.

I'm therefore not seeing any way to query the conditional formatting state of a single selected cell, without using the manage dialog that will show it for all cells.  Am I missing that?
Comment 4 pb 2020-05-21 20:42:57 UTC
I'm now thinking that the main bug might really be in the intervening modal dialog when I click on the 'condition' tool.  Doing so launches a yes/no dialog that asks:

"The selected cell already contains conditional formatting. You can either edit the existing conditional format or you define a new overlapping conditional format.

 Do you want to edit the existing conditional format?"

If I click 'yes' I get what I have been reporting, which in fact does NOT allow me to edit the existing format.  If I click 'no', it just exits and does nothing.  Maybe what is supposed to be happening is that if I click 'yes' it sends me to the dialog I expect, which would show the existing CF, and if I click 'no' it should send me to the dialog which shows only the "overlapping" creation option (which I would call 'shadowing').

However, even if that is the bug, what it really should do is avoid that intervening dialog altogether, and just send me to a dialog that shows all conditional formatting on the selected cell, and offers an 'add a condition' button, as well as a 'cancel' button.
Comment 5 Ming Hua 2020-05-21 20:59:59 UTC
Yes, I agree it's a bug.  However it's more about "grouped CF can't be edited individually, and the UI showing individual cell's CF is confusing".

Reproduced with 6.4.4 on Windows 10:
Version: 6.4.4.2 (x64)
Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: zh-CN (zh_CN); UI-Language: en-US
Calc: threaded
Comment 6 pb 2020-05-21 23:51:56 UTC
Well, as long as you agree it's a bug, I'm happy.  I've provided a lot of details, so if someone decides to work on it, hopefully it'll be clear at least what I think it should be doing.

It seems that conditional formatting is a bit of a mess, based on the other bug reports I see.  I'd be curious to look at the code for that, although I'm not in a position to learn enough to fix it.  Can you point me to which module it would be in?
Comment 7 Ming Hua 2020-05-22 04:06:21 UTC
(In reply to pb from comment #6)
> I'd be curious to look at the code for that, although
> I'm not in a position to learn enough to fix it.  Can you point me to which
> module it would be in?
That's great!  The UI part should all be in sc/uiconfig/scalc/ui/ (the files condformatmanager.ui, conditionalentry.ui, and conditionalformatdialog.ui):
https://opengrok.libreoffice.org/xref/core/sc/uiconfig/scalc/ui/
There is also this commit that should be the source of this regression (see the bisect log of bug 123927):
https://git.libreoffice.org/core/+/5b8c22379e2eae74f7ed78326ab89483db5c6624%5E%21/

I'm not a developer either, so if you have further quesions I'd like to direct you to the dev mailing list:
https://lists.freedesktop.org/mailman/listinfo/libreoffice
I'm sure the developers there will be happy to anwser questions regarding the code.
Comment 8 QA Administrators 2022-05-23 03:37:25 UTC
Dear pb,

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