Bug 117764 - using context menu item "Conditional formatting" opens dialogue "Conditional formatting for ..." with wrong cell range
Summary: using context menu item "Conditional formatting" opens dialogue "Conditional ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.5.0 target:7.4.3
Keywords: implementationError
Depends on:
Blocks: Context-Menu Conditional-Formatting
  Show dependency treegraph
 
Reported: 2018-05-23 15:56 UTC by Roman Kuznetsov
Modified: 2022-10-03 14:06 UTC (History)
3 users (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 Roman Kuznetsov 2018-05-23 15:56:48 UTC
Description:
using context menu item "Conditional formatting" opens dialogue "Conditional formatting for ..." with wrong cell range.
After implement bug 87357 :
Example: there is existing conditional formatting for range A1:A20. Select any cell from this range, right click and select item "Conditional formatting". It opens dialogue "Conditional formatting for <your selects cell>" where cell range is ONLY <your selects cell> instead existing range A1:A20.
User just can change options for his conditional formatting, but he will change it only for ONE cell instead full existing range.

Steps to Reproduce:
1. Create (or open existing) conditional formatting for cell range
2. Open dialogue "Conditional formatting for ..." using cell's context menu from range
3. Look at cell range in to dialogue -> it has only ONE cell instead range

Actual Results:  
in dialogue "Conditional formatting for ..." has wrong cell range if there was existing range

Expected Results:
in dialogue "Conditional formatting for ..." has right full cell range if there was existing range


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
Comment 1 Mike Kaganski 2018-05-23 18:43:59 UTC
Actually, the new feature works absolutely inconsistently:

1. The context menu is only available in areas with conditional formatting (that is how it is advertised).

2. When selected, the context menu item brings a dialog with warning:
> 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?

This is the same warning that is shown using Format->Conditional->... menu (other than "Manage..."). And this dialog suggests *three* things:
a) that since this dialog is shown, it's just one of possibilities that this function had been called on this cell - and if it were called in a "clean" cell, then there were no such warning, so supposedly the function should be *available* on "clean" cells - *which is not the case*;
b) that answering "No", one would not edit the existing format, *but will edit a new format instead*;
c) that answering "Yes", one would edit the existing format.

3. In reality, answering "No" just cancels the function, contrary to expectation b).

4. In reality, answering "Yes" opens a *new clean* conditional format for just this cell, with no conditions defined.

This works this way for both context menu, and for usual Format->Conditional->... menu, which is different from how 6.0 and older versions used to work, so this is clear regression.
Comment 2 Gülşah Köse 2018-05-25 12:33:17 UTC
A correction: This behaviour is not a special case for Conditional formatting item in the "context menu". You can test with Format->Conditional->Condition...
Comment 3 Mike Kaganski 2018-05-25 12:53:19 UTC
(In reply to Gülşah Köse from comment #2)
> A correction: This behaviour is not a special case for Conditional
> formatting item in the "context menu". You can test with
> Format->Conditional->Condition...

... which is why I wrote "This works this way for both context menu, and for usual Format->Conditional->... menu, ...", and also marked it a regression ;-)
Comment 4 Gülşah Köse 2018-05-25 13:32:19 UTC
Yes, I'm just focused on the first comment. Sorry. :)
Comment 5 Buovjaga 2018-05-30 13:01:54 UTC
bibisectRequest not needed since we know it came from implementing bug 87357
Comment 6 QA Administrators 2019-05-31 02:49:54 UTC Comment hidden (noise)
Comment 7 QA Administrators 2021-05-31 04:11:53 UTC Comment hidden (noise, obsolete)
Comment 8 Roman Kuznetsov 2021-06-22 11:18:44 UTC
still repro in

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: de7356c2e0cb099fac396808b5a86a0393b48e5f
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

possibly a better solution would be to open from the context menu Manage Conditional Formatting dialog?
Comment 9 Julien Nabet 2022-09-20 19:40:48 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I gave a try with https://gerrit.libreoffice.org/c/core/+/140258
Comment 10 Commit Notification 2022-09-24 09:33:11 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/45bee7678319325942664d23688367c639bdf83b

tdf#117764: fix context menu item "Conditional formatting"

It will be available in 7.5.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.
Comment 11 Julien Nabet 2022-09-24 09:35:26 UTC
Since there might be other changes, I won't cherry-pick this on 7.4 branch.
Now if someone wants to do it, no pb of course.

Let's put this one to FIXED then.
Comment 12 Roman Kuznetsov 2022-09-25 10:47:41 UTC
Julien, thank you for the patch! I like how it works now!

Verified in

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 943177e0f8074753db25d9a56d15f8010a755ffc
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded
Comment 13 Commit Notification 2022-10-03 14:06:40 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/9330757e4c39b9cecfc2b08294de337129bca317

tdf#117764: fix context menu item "Conditional formatting"

It will be available in 7.4.3.

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.