Bug 74074 - FORMATTING: Ability to rearrange order of conditions in conditional formatting dialogs
Summary: FORMATTING: Ability to rearrange order of conditions in conditional formattin...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: high enhancement
Assignee: Not Assigned
URL:
Whiteboard: BSA target:5.4.0
Keywords: needsDevEval, topicUI
: 74082 90060 90784 (view as bug list)
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2014-01-26 10:10 UTC by boicottms
Modified: 2023-11-01 22:17 UTC (History)
19 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot on 5.4.5 (18.64 KB, image/png)
2018-03-24 16:06 UTC, m_a_riosv
Details
.odf example file for actual Conditional Formatting Priority effects (22.14 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-08-15 12:15 UTC, marc.claes9
Details
conditions - edit mask screenshot (34.50 KB, image/png)
2020-01-08 15:17 UTC, boicottms
Details
editing condition - mask 2 - only current condition is listed (37.13 KB, image/png)
2020-01-08 15:19 UTC, boicottms
Details

Note You need to log in before you can comment on or make changes to this bug.
Description boicottms 2014-01-26 10:10:16 UTC
Problem description: 
If I need to change the order of conditions in conditional formatting i have to rewrite many of them
Steps to reproduce:
1. create two or more conditions in conditional formatting, save
2. try to change their order
3. ....

Current behavior:
not possible (to my knowlege)
Expected (wished) behavior:
drag'n'drop or up/down arrows icon should change the order of conditions
              
Operating System: Windows 7
Version: 4.1.4.2 release
Comment 1 m_a_riosv 2014-01-26 15:32:11 UTC
A very useful option.
Comment 2 m_a_riosv 2014-01-26 15:41:42 UTC
*** Bug 74082 has been marked as a duplicate of this bug. ***
Comment 3 Bernhard 2014-06-13 12:04:28 UTC
(In reply to comment #0)
> Problem description: 
> If I need to change the order of conditions in conditional formatting i have
> to rewrite many of them
> Steps to reproduce:
> 1. create two or more conditions in conditional formatting, save
> 2. try to change their order
> 3. ....
> 
> Current behavior:
> not possible (to my knowlege)
> Expected (wished) behavior:
> drag'n'drop or up/down arrows icon should change the order of conditions
>               
> Operating System: Windows 7
> Version: 4.1.4.2 release

Hi,

a very useful request.
Current workaround (very extensive):
- Adding a new empty condition with EXTRA-button.
- Copying previous conditions one by one to new position.
- Editing the condition to be inserted.

OS: Linux Ubuntu 14.04 i386/32bit
LO-Version: 4.2.4.2 release
Comment 4 JLGianaroli 2015-01-21 18:33:41 UTC
hi

This improved Conditional Formatting seems very important to me.
The order of priority different conditions is fixed for the moment.
Having the ability to add a condition to any place or be able to move around its conditions would allow users to work faster and smarter.

cordially

Of French to English translation with Google
Comment 5 m_a_riosv 2015-03-17 15:06:41 UTC
*** Bug 90060 has been marked as a duplicate of this bug. ***
Comment 6 Murz 2015-03-17 15:12:23 UTC
> Current workaround (very extensive):
> - Adding a new empty condition with EXTRA-button.
> - Copying previous conditions one by one to new position.
> - Editing the condition to be inserted.

This not work correctly, sometimes newly added conditions adds not to end of old conditions, but in middle :(

So I vote for adding interface for re-order condition in libreoffice caclc conditional formatting interface
Comment 7 Murz 2015-03-18 12:11:42 UTC
And example with easy demonstrating the problem from Bug 90060:

If first rule "greater than 5" apply Style "Red color", and second rule "greater than 10" on same cell apply Style "Green color" - all cells less than 10 and less than 5 will have Green color. This can be solved via change rule order, but there are no good way to change it.
Comment 8 raal 2015-04-22 16:29:33 UTC
*** Bug 90784 has been marked as a duplicate of this bug. ***
Comment 9 MarMar 2015-11-05 10:00:57 UTC
Deeply sorry for it but without the possibility to prioritize conditional formatting this feature is almost useless. IMHO, if we want to draw people away from Excel this should be fixed asap. In my case, even with a strong inclination to use Calc whenever possible and even when it sometimes is not as user friendly as Excel, this is a stopper for serious use. Having said this, I am aware of the effort many people are putting into LO and you are doing a great job (huge thanks)but we must sate things as they are...
Comment 10 Yousuf Philips (jay) (retired) 2015-11-05 21:35:12 UTC
As mentioned in my duplicate bug report, "As conditional formatting is applied based on the condition number in the sequence, we need 'Move Up' and 'Move Down' buttons next to the 'Add' and 'Delete' buttons so a user doesnt have to remove and re-add an entry to change the sequence ordering."

This is primarily needed in the conditional formatting management dialog (sc/uiconfig/scalc/ui/condformatmanager.ui) and entries in the dialog shouldnt be sorted alphabetically rather than how they were added into a document (bug 91654), but also needed in the conditional formatting dialog (sc/uiconfig/scalc/ui/conditionalformatdialog.ui) so that individual rules can be managed.
Comment 11 Robinson Tryon (qubit) 2015-12-14 06:09:33 UTC Comment hidden (obsolete)
Comment 12 Aprax 2016-06-23 17:55:13 UTC Comment hidden (me-too)
Comment 13 Philippe 2016-10-28 00:10:15 UTC Comment hidden (me-too)
Comment 14 Commit Notification 2017-04-07 10:44:13 UTC
Manfred Blume committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1a95e2a2bbdd1b95d97d3e79b1ef0bc5da95a110

tdf#74074 Ability to rearrange order of conditions

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 15 m_a_riosv 2017-04-08 11:37:49 UTC
Thanks @Manfred, I think a lot of people will appreciate it.
Tested with
Version: 5.4.0.0.alpha0+
Build ID: 2f7b05988e6853ddac68b614e9d83e05af08bc0f
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-04-08_00:27:58
Locale: es-ES (es_ES); Calc: CL

Should not be solved as fixed?

Can it backported to 5.3?
Comment 16 Katarina Behrens (Inactive) 2017-04-12 09:13:43 UTC
> Should not be solved as fixed?

Resolving accordingly
 
> Can it backported to 5.3?

The bugfix unfortunately involves UI & translatable string change, which excludes the possibility of backport [1]. Sry about that ... 

[1] unless one has L3 support and some1 also backports related translations for them
Comment 17 m_a_riosv 2017-04-12 21:28:17 UTC Comment hidden (obsolete)
Comment 18 Andreas 2018-03-24 13:00:18 UTC
I have just updated LO to Version 5.4.6.2 (x64), but in CALCs Conditional Formatting management dialog I can't find a possebility to change the order of the rules. No clickable arrange buttons, no drag & drop an no cursor keys. 

Did Manfreds patch make it into the 5.4.x releases? 

Cheers Andreas
Comment 19 m_a_riosv 2018-03-24 16:06:33 UTC
Created attachment 140862 [details]
Screenshot on 5.4.5

Find attached an screenshot for 5.4.5.
There are the buttons New Delete Up Down
Comment 20 Andreas 2018-03-24 18:08:11 UTC
Thanks a lot Miguel! 

I expected the buttons within the manage dialog and did not see, that it's possible to add multiple rules within one section. 

Mea culpa! 

And as I tested: The list order represents the priorisation of the rules. The topmost matching rule will be used (if condition is matched). May be it would be a good idea to advise the users, that the rules in the list are not processed from top till down, as I first thought. 

Nice weekend to all! :-)
Cheers Andreas
Comment 21 marc.claes9 2019-08-15 12:15:38 UTC
Created attachment 153411 [details]
.odf example file for actual Conditional Formatting Priority effects
Comment 22 marc.claes9 2019-08-15 12:20:08 UTC
(I hope I didn't add the example at the wrong moment... Sorry.)

I just installed v. 6.3.0.4, and I noticed following effects:
* conditional formatting has priority over unconditional – as expected,
* columns between row 2 and row 55 are colored depending on their value between white (for minimum) and blue (for maximum),
  (do not be fooled by the progressive coloring of the rows – that is an effect of their progressive numbering, NOT of conditional formatting!)
* any non-numeric or non-empty cells are colored red,
* any column between row 2 and row 55 is greyed when the cell in row 1 (of that column) is empty.
The intent is: priority to grey, then to red, then to blue (see order in “Conditional” menu → “Manage...” item → “Edit...” pop-up window)
Obviously that is not honored: grey does have priority over red (see cell H52 and M52), but blue always has top priority…

Additionally, I believe priority should be alterable at at least one more level:
When multiple conditional formats apply (even to different – but overlapping! - ranges), the order of priority of these should ALSO be changeable (with an “Up” and “Down” button in “Conditional” menu → “Manage...” pop-up window)!
Comment 23 marc.claes9 2019-08-15 12:29:18 UTC
Grmpf! Managed to get it all jumbled up! Sorry for the mess...

What I wanted to add was: thanks for 6.3. At have to work with MS Office 365 at work, and that is slowly evolving into molasses... Your work makes LO slowly but shurely coming on par with MSO!

Thanks again!
Marc
Comment 24 boicottms 2020-01-08 15:17:00 UTC
Created attachment 157007 [details]
conditions - edit mask screenshot

this is the first mask that appears when editing conditions
Comment 25 boicottms 2020-01-08 15:19:32 UTC
Created attachment 157008 [details]
editing condition - mask 2 - only current condition is listed

this is the following mask "edit contidion" where the buttons up and down should rearrange the conditions' order.
But only the selected condition is listed, so nothing to rearrange
Comment 26 boicottms 2020-01-08 15:23:35 UTC
Hi, I don't know if this is to file as a new bug:
when I'm in the conditions editing mask (the one with the buttons up and down to rearrange the condition's order) I have not the complete liist of conditions, but only the one that I selected to edit.
see attachments:
https://bugs.documentfoundation.org/attachment.cgi?id=157007&action=edit
and
https://bugs.documentfoundation.org/attachment.cgi?id=157008&action=edit

Versione: 6.3.4.2 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
Thread CPU: 8; SO: Windows 10.0; Resa interfaccia: GL; VCL: win; 
Versione locale: it-IT (it_IT); Lingua interfaccia: it-IT
Calc: threaded
Comment 27 Xisco Faulí 2020-01-20 12:22:13 UTC
hello boicottms@yahoo.it,
This bug has been in RESOLVED FIXED status for more than 6 months.
If the issue is still reproducible with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/, please report a new issue in https://bugs.documentfoundation.org/enter_bug.cgi providing, if needed, the steps and documents to reproduce it.
Thanks for your understanding and collaboration.
Closing as RESOLVED FIXED
Comment 28 Peter Lairo 2023-11-01 21:48:16 UTC
Read me. It's worth it.

*NOT FIXED*

I don't think that this bug is fixed. 

At best, a rare sub-set of the issue was fixed. 

The original intent of this bug was to add the ability to "change the order of conditions" and "create two or more conditions in conditional formatting". There's no mention of rearranging only the conditions within the exact same range of cells. It's clearly about ALL conditions.

*SIMPLIFIED EXAMPLE*

Note: Row 1 contains the TITLES of the columns.

Range: A2:H9999 / Condition: $A2<>"" / top & bottom border = pale-blue
--> Nice "table" formatting that "grows" with more data-rows

Range: G2:G9999 / Condition: $G2>200  / background = light-green 
--> Highlights interesting values

*WHAT WENT WRONG AND WHY*

LibreOffice (incomprehensibly) forcibly orders the conditions by the letter of the cell-column in the "Range". Therefore, the condition for Range "A2:H9999" will ALWAYS be above the condition for the Range "G2:G9999" (A is before G). *The formatting in a Rule that is below another Rule will ALWAYS override the formatting in the Rules above it.* There's no way to rearrange these conditions. In my example above, any cell that receives the light-green background will lose the top+bottom border. *This cross-contamination of Conditional Format rules affects all rules that have non-identical but overlapping Ranges.*

Since it is quite possible that one rule is more important than another, and if its Range starts in a column with a letter further to the FRONT of the alphabet, it will unfortunately ALWAYS be overwritten by the less important Rule whose Range starts in a column with a letter further to the BACK of the alphabet.

*THE STYLES PROBLEM - MAKING THINGS WORSE*

The inability to sort conditions is made even worse by LibreOffice's inability to set any parts of a Style as "do not touch this sub-part of the formatting" (e.g. Don't touch Borders - i.e. make the background light-green, but do not overwrite the pale-blue border. Excel is able to do this, IIRC.

*THREE PATHS FORWARD*

To make LibreOffice's Conditional Formatting not an eternal exercise in frustration, at least one of the following paths needs to be chosen:

1. Reopen this bug until it is actually fixed (i.e. ability to rearrange top-level Conditional Formats).

2. Create a new bug or name an existing bug for rearranging the top-level conditions.

3. Create a new bug or name an existing bug to make it possible to set any parts of a Style as "do not touch this part of the formatting".

My vote is for #1 and #3. :-)

I'd be grateful for any pointers those bug numbers.
Comment 29 Peter Lairo 2023-11-01 22:17:37 UTC
I found two bugs that attempt to add the ability to rearrange the top-level conditions (they call these "outer" conditions): bug 126047 and bug 148154.

I was not able to find a bug to make it possible to set any parts of a Style as "do not touch this part of the formatting".