Bug 84148 - Editing conditional text field condition exposes unrelated hidden section
Summary: Editing conditional text field condition exposes unrelated hidden section
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Section Fields-Variable
  Show dependency treegraph
 
Reported: 2014-09-21 21:53 UTC by Chas Belov
Modified: 2020-10-21 11:16 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
File just before the issue (9.30 KB, application/vnd.oasis.opendocument.text)
2014-09-21 21:53 UTC, Chas Belov
Details
Test document for 84148 with buggy variable evaluation (12.25 KB, application/vnd.oasis.opendocument.text)
2017-04-30 23:09 UTC, Eric Christenson
Details
Retest of steps in LibreOffice version 6.0.7.3 (8.94 KB, application/vnd.oasis.opendocument.text)
2018-11-11 09:55 UTC, Chas Belov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chas Belov 2014-09-21 21:53:15 UTC
Created attachment 106627 [details]
File just before the issue

If I change the condition on a conditional text field, this causes a hidden section to unhide.

Steps:

1. Create a new document

2. Insert variable varA with value "is" (without the quotes) 
-- a. Insert > Fields > Other > Variables > Set Variable
-- b. Name: varA 
-- c. Value: is
-- d. Click Insert

2. Press enter

3. Insert variable varB with value "is" (without the quotes)
-- same as step 1 with name varB

4. Press enter

5. Insert a conditional field based on varA
-- a. Insert > Fields > Other > Functions > Conditional Text
-- b. Condition: varA EQ "is" (with the quotes)
-- c. Then: Ais
-- d. Else: AisNot
-- e. Click OK

6. Press enter

7. Insert two section based on varB
-- a. Type "Hide this section if varB is" (without the quotes)
-- b. Press enter
-- c. Type "Hide this section if varB is not" (ditto)
-- d. Select the first of the two lines
-- e. Insert > Section
-- f. Check Hide
-- g. Condition: varB EQ "is"
-- h. Select the second of the two lines
-- i. Insert > Section
-- j. Check Hide
-- k. Condition: varB NEQ "is"

Attachment is at this point.

8. Double-click "Ais"

9. Change condition from EQ to NEQ

10. Click OK

Actual result:  Hidden section appears
Expected result:  No change to which section is hidden and which isn't

Actually 4.2.6.3 but that's not offered in the dropdown at time of filing.
Hardware is Intel Core 2 Duo
Comment 1 Alex Thurgood 2014-09-23 12:25:50 UTC
Not sure why you entered this bug twice ?

*** This bug has been marked as a duplicate of bug 84144 ***
Comment 2 Chas Belov 2014-09-24 04:21:32 UTC
It's not actually intended as a duplicate.  While the creation steps are nearly identical, the other bug (84144) involved a single variable showing two section opposite to their expected true and false state.  

On the other hand, this bug (84148) involves two unrelated variables, in which making a change to one variable impacts a section that is only supposed to be affected by the unrelated variable.  

I'm removing the duplicate.  That said, if the two different behaviors are caused by the same code and therefore you feel it really is a duplicate, please go ahead and re-close, but also copy the symptom over to the other bug.
Comment 3 Alex Thurgood 2014-09-24 06:42:54 UTC
OK sure, I guess it will takesomeone with a debug build to unwind this.
Comment 4 Alex Thurgood 2014-09-24 06:45:54 UTC
I have linked the two reports instead of calling one a duplicate of the other until it can be investigated in more detail.
Comment 5 Joel Madero 2014-11-04 03:51:22 UTC
Moving to UNCONFIRMED as this has not been confirmed by a QA team member.
Comment 6 Alex Thurgood 2014-11-04 10:29:15 UTC
Confirmed on 

Version: 4.3.3.1
Build ID: 7d55112667c8fcddb67bc3803796b46c93aa56b0
Comment 7 QA Administrators 2017-01-03 19:41:30 UTC Comment hidden (obsolete)
Comment 8 Eric Christenson 2017-04-30 22:22:46 UTC
Still present in 5.2.6.2, Windows 10 /x64.
Comment 9 Eric Christenson 2017-04-30 23:09:44 UTC
Created attachment 132981 [details]
Test document for 84148 with buggy variable evaluation

From LO Writer 5.2.6.2 under Win10/x64.  Bug 84146 is evident when setting VarA and VarB, but 84148 with updated behavior happens with the conditional text at the end (changing EQ to NEQ doesn't change result) followed by two sections both showing but with opposite conditions to hide.
Comment 10 eisa01 2017-11-10 20:56:48 UTC
Still present, and was also present in 3.3.0 so inherited from OOo

Also a Windows issue, so setting OS to all

Version: 6.0.0.0.alpha1+
Build ID: 7e03c4eed72452fdfb87341214a21956c08ba969
CPU threads: 2; OS: Mac OS X 10.12.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2017-10-25_23:45:02
Locale: en-US (en_US.UTF-8); Calc: group

Version: 5.4.0.3 (x64)
Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c
CPU threads: 1; OS: Windows 6.1; UI render: default; 
Locale: en-US (en_US); Calc: group

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 11 QA Administrators 2018-11-11 03:47:36 UTC Comment hidden (obsolete)
Comment 12 Chas Belov 2018-11-11 09:53:28 UTC
Steps changed slightly in LibreOffice 6.0.7.3:

Steps:

1. Create a new document

2. Insert variable varA with value "is" (without the quotes) 
-- a. Insert > Field > More Fields > Variables > Set Variable
-- b. Name: varA 
-- c. Value: is
-- d. Click Insert

2. Press enter

3. Insert variable varB with value "is" (without the quotes)
-- same as step 1 with name varB

4. Press enter

5. Insert a conditional field based on varA
-- a. Insert > Field > More Fields > Functions > Conditional Text
-- b. Condition: varA EQ "is" (with the quotes)
-- c. Then: Ais
-- d. Else: AisNot
-- e. Click OK

6. Press enter

7. Insert two section based on varB
-- a. Type "Hide this section if varB is" (without the quotes)
-- b. Press enter
-- c. Type "Hide this section if varB is not" (ditto)
-- d. Select the first of the two lines
-- e. Insert > Section
-- f. Check Hide
-- g. Condition: varB EQ "is"
-- h. Select the second of the two lines
-- i. Insert > Section
-- j. Check Hide
-- k. Condition: varB NEQ "is"

Attachment is at this point.

8. Double-click "Ais"

9. Change condition from EQ to NEQ

10. Click OK

Actual result:  Hidden section appears
Expected result:  No change to which section is hidden and which isn't

Same actual result as the issue I originally posted.

So, still an issue.
Comment 13 Chas Belov 2018-11-11 09:55:13 UTC
Created attachment 146535 [details]
Retest of steps in LibreOffice version 6.0.7.3
Comment 14 Chas Belov 2018-11-11 09:57:48 UTC
From LibreOffice > About LibreOffice

Version: 6.0.7.3
Build ID: dc89aa7a9eabfd848af146d5086077aeed2ae4a5
CPU threads: 4; OS: Mac OS X 10.13.6; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 15 QA Administrators 2019-11-12 03:33:09 UTC Comment hidden (obsolete)
Comment 16 sdc.blanco 2020-01-18 15:40:20 UTC
Can repro using STR in comment #12.  Change the conditional function with varA and the section with varB becomes "unhidden"  (even though the controls are still set)

Version: 6.3.4.2 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US

and

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 035c7717c135c66c0ec025500b73ae9c13b7c586
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US
Calc: threaded
Comment 17 Mike Kaganski 2020-10-21 11:16:09 UTC
IMO there's no "change in one field changes condition in another". Rather, there's "wrong and inconsistent work with conditions at all".

To see this, don't modify any conditions, just use Tools->Update->Update All.