Bug 153053 - Hiding sections in mail merge with multiple fields depends on defining conditions for database fields
Summary: Hiding sections in mail merge with multiple fields depends on defining condit...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mail-Merge Section
  Show dependency treegraph
 
Reported: 2023-01-16 22:07 UTC by Nick
Modified: 2023-04-13 15:03 UTC (History)
2 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 Nick 2023-01-16 22:07:37 UTC
Description:
In Libre Office help for defining conditions for database fileds, NOT Database.Table.Company & Database.Table.Company EQ "" are considered equivalent. That is true for single fileds but I have found that for 2 or more fields, that is not true.

Steps to Reproduce:
1.Insert a section in a writer for mail merge.
2.Insert more than one mail merge field in the section
3.Edit the section to hide it if any of the fileds are missing
4.Enter [Database.Table.Field1]EQ "" OR [Database.Table.Field2] EQ ""

Actual Results:
If Database.Table.Field1 OR Database.Table.Field2 is missing, the section is not not hidden.

Expected Results:
If Database.Table.Field1 OR Database.Table.Field2 is missing, the section should be hidden.


Reproducible: Always


User Profile Reset: No

Additional Info:
I have found that if I change the code to:
NOT[Database.Table.Field1] OR NOT [Database.Table.Field2]

and either filed is missing, the section is hidden as expected. Although EQ "" works for single fields, in this case, it does not work.
Comment 1 Robert Großkopf 2023-01-18 10:23:36 UTC
Could confirm 
[Database.Table.Field1] EQ "" OR [Database.Table.Field2] EQ ""
won't hide anything in a section.

[Database.Table.Field1] EQ ""
will hide content, if there is no entry in Field1

NOT [Database.Table.Field1] OR NOT [Database.Table.Field2]
will hide content, if there is no entry in Field1 or Field2.

Tested with OpenSUSE 15.3 64bit rpm Linux
Version: 7.5.0.2 (X86_64) / LibreOffice Community
Build ID: c0dd1bc3f1a385d110b88e26ece634da94921f58
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

It's the same behavior here in every version I have installed, also LO 5.1.5.2
Might be it has been inherited by OOo.
Has been reported for Windows, here for Linux.
Comment 2 Nick 2023-01-20 16:26:16 UTC
Thanks Robert, your confirmaton is greatly appreciated!

Souldn't the "LibreOffice Help" section be revised?