Issue 122887 - Mail merge does not correctly omit Section formatted with Omit condition
Summary: Mail merge does not correctly omit Section formatted with Omit condition
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: 4.0.0
Hardware: PC All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact: RottenEogat@gmail.com
URL:
Keywords: needmoreinfo, regression
Depends on:
Blocks:
 
Reported: 2013-07-29 16:48 UTC by cabrat
Modified: 2017-05-20 10:11 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
This is my test merge document (9.28 KB, application/vnd.oasis.opendocument.text)
2013-07-29 16:48 UTC, cabrat
no flags Details
Test document (9.18 KB, application/vnd.oasis.opendocument.text)
2013-07-30 20:40 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description cabrat 2013-07-29 16:48:12 UTC
Created attachment 81196 [details]
This is my test merge document

Merging with address, to omit lines of address which are blank have used Section and Omit condition of form Address2 EQ "" etc.  This worked in OO 3 but I have been unable to get it to work in OO 4.0.0  Created simple test case to show problem.
Database is created from Calc sheet column headers Stat, Address1, Address2, Address3, Town, etc.  I use Stat to select records to merge, # indicates include in merge.  Viz:

Stat	Address1	Address2	Address3	Town	Postcode
#	10 Downing Street		London	        Toytown	XX66 6XX
Comment 1 Ariel Constenla-Haile 2013-07-29 16:50:24 UTC
(In reply to cabrat from comment #0)
> This worked in OO 3

which version?
Comment 2 cabrat 2013-07-29 17:05:58 UTC
Worked in all OO 3 most recently used in 3.4.1
Comment 3 Ariel Constenla-Haile 2013-07-29 17:12:40 UTC
Regression from 3.4.1 according to user
Comment 4 Edwin Sharp 2013-07-30 19:09:13 UTC
Please specify steps to reproduce.
Comment 5 cabrat 2013-07-30 19:45:18 UTC
As far as I can tell this occurs with any merge and database with blank fields in the table and a merge doc in which the blank field is referenced in a section with an omit condition of the form Address2 EQ "" or Address2 == ""
I attached my test merge doc and pasted my test table.  When I merge with this or any of my merge documents where the omit condition worked with OO 3.4.1 I get a blank line in the resultant merged document.  System is AMD FX6200 based Win7 64 bit fully updated.  Any other details or examples you want please ask.
Comment 6 Ariel Constenla-Haile 2013-07-30 20:40:54 UTC
Created attachment 81209 [details]
Test document

The document is bound to the Bibliography database.

It has a section that is hidden with condition: Address EQ ""

To test that this works:

- F4 / View - Data Sources
- Select the table on the left: Bibliography - Tables - biblio 
- select the first record where Address == ""
- select the toolbar item "Data to fields" to apply the document content with the current record 

Result: the section is hidden

- modify the selected record, type some text inside the Address field
- select the record again and press "Data to fields"

Result: the section is now visible


A) Test Mail Merge from print form letter:

- try to print the document
- the application will ask you if you want to print a form letter. Click "Yes"
- in the "Mail Merge" dialog, select Output: File, Save merged document: Save as individual document, check "Generate file name", Field: Identifier, choose a Path

Result: all merged document display the section, despite that Address <> ""

B) Test Mail Merge from Tools - Mail Merge Wizard...

- step 1: check "Use the current document"
- step 2: check "Letter"
- step 8: check "Save merged document and "Save as individual document". Press "Save Document"

Result: the section is displayed only when Address <> "", in all other cases the section is hidden and there is no empty paragraph.

-------

Conclusion: I can reproduce the bug with (A) but not with (B)
Comment 7 Ariel Constenla-Haile 2013-07-30 20:44:36 UTC
@cabrat: which merge method are you using?

A) Mail Merge from print form letter
B) Mail Merge from Tools - Mail Merge Wizard...
Comment 8 cabrat 2013-07-31 07:25:11 UTC
Using Tools Mail Merge Wizard, however have now tried merge from Print form letter and get same problem both ways.  Previous Mail Merge problems have behaved differently on different systems possibly affected by speed.  My present system is quite powerful 6 core processor and system on an SSD and data on an HDD. Also note, when I upgraded to OO 4.0 I had to re-register some databases and reconnect some merge documents.
Comment 9 cabrat 2013-08-06 07:15:04 UTC
Have tried test document attachment 81209 [details] and some of my other merge docs all of which worked fine on 3.4.1  -  varied results.
Using attachment 81209 [details] and Tools Mail Merge first record exhibits the problem subsequent records are correct.
Using attachment 81209 [details] and print form letter all records include the section which should be omitted.
With my own merge letter using attachment 81209 [details] first letter includes the blank lines subsequently blank lines correctly omitted.
With a labels merge the blank lines were included on the first 14 labels i.e. first page of the merge and subsequently OK.
Comment 10 cabrat 2013-08-06 07:16:29 UTC
Sorry comment should read:
Have tried test document attachment 81209 [details] and some of my other merge docs all of which worked fine on 3.4.1  -  varied results.
Using attachment 81209 [details] and Tools Mail Merge first record exhibits the problem subsequent records are correct.
Using attachment 81209 [details] and print form letter all records include the section which should be omitted.
With my own merge letter using Tools Mail Merge first letter includes the blank lines subsequently blank lines correctly omitted.
With a labels merge the blank lines were included on the first 14 labels i.e. first page of the merge and subsequently OK.
Comment 11 Oliver-Rainer Wittmann 2013-08-21 09:03:19 UTC
Sorry, I am not sure about the current status of this issue as too much different scenarios are mentioned.

Is keyword 'needmoreinfo' still valid?
If not, please remove it.
Are the needed information provided already?

Has the defect been reproduced _as reported_ by a second person?
If yes, please change status to 'CONFIRMED'

Thanks in advance.
Comment 12 Oliver-Rainer Wittmann 2013-08-26 13:14:48 UTC
I was not able to reproduce the defect on my Windows 7 in AOO 4.0.0 as described by cabrat.
All sections in the given sample are visible as Address2=="Whitehall" and Address3="London". Thus Address2 does not correspond to the given data values.

@cabrat:
Do I miss anything here?


I also was not able to reproduce the defect on my Windows 7 in AOO 4.0.0 as described by Ariel in comment 6

@Ariel:
I exactly tried the steps you have been provided, but all documents correct show resp. hide the section.
Comment 13 cabrat 2013-08-27 06:07:14 UTC
It appears that this bug does not behave identically on different systems since  Ariel Constenla-Haile and I are not getting identical results from our two test cases.  Also there is some inconsistency just on my own system, it seems only to affect the first letter in a merge and the first page when merging to labels. Earlier bug 121143 in mail merge test results were not identical on different systems so this can happen.
Comment 14 Oliver-Rainer Wittmann 2014-01-15 10:12:09 UTC
Status of this issue is still unclear.

Was somebody able to reproduce the described defect in AOO 4.0.1?
Comment 15 Oliver-Rainer Wittmann 2014-02-12 12:33:16 UTC
Issue status still unclear to me --> adding keyword 'needmoreinfo'.
Comment 16 Rainer Bielefeld 2014-03-21 06:44:24 UTC
I tried Sample document <<2013-07-30 22:40 CEST, Ariel Constenla-Haile >> with "AOO 4.0.1 Release – German UI / German locale [AOO401m5(Build:9714)  -  Rev. 1524958 2013-09-20 11:40:29]" on German WIN7 Home Premium (64bit)", “historic” 4.0 User Profile used for all predecessor versions	

(a) Original Sample, Menu 'File -> Print -> Form Letter"
     Result: Section hidden in all print pages because column in biblio is
             empty
(b) Sample with modified omit condition 'Identifier EQ "BOE00"', what
    should hide section only for Identifier BOE00
    Menu 'File -> Print -> Form Letter -> to FreePDF'
    Result: Section hidden correctly only for that one Identifier 

(c) Sample with modified omit condition 'Identifier EQ "BOE00"', what
    should hide section only for Identifier BOE00
    menu 'Tools -> Meil Merge Wizard
    Result: did not work, details see below.

Results (c)
The form letter test worked immediately without any problems.
The Mail Merge Wizard test showed some problems what still need some research until I will have understood all details.

(c1) There was some strange ambiguity concerning biblio database, probably
     caused by the lots of configuration changes I do for my tests
(c2) I re-added the biblio database from user profile as address list, tested
     with <f4> and icon "data to fields", worked fine, so that I started the
     MMW test.
(c3) MMW Test: In step 6 I stepped through the 32 documents, and as expected 
     for "BOE00" section was hidden
     I continued and printed the result (to FreePDF) 
     Result: Not hidden for "BOE00"  

(d) Did some further research. Strange result (c3) was caused by Identifier fields of invalid Database from ambiguity research under (c). After I had deleted these fields and only Identifier of the correct biblio database are in Letter document everything works fine.

So currently I can not reproduce the problem from original report, but will do some research concerning address list definition differences between form letter and MMW.

I will not test with reporter's sample because database is missing.

@cabrat:
Can you please contribute a complete test kit? I would prefer a solution with biblio database.

@Ariel Constenla-Haile:
Any idea how we can find out why we got opposite results with your test kit?
Comment 17 Rainer Bielefeld 2014-03-21 06:45:24 UTC
Comment on attachment 81196 [details]
This is my test merge document

Obsoleted sample document because it is useless without database.

@reporter:
Please contribute a complete test kit or a document using biblio database
Comment 18 cabrat 2014-03-21 08:27:58 UTC
I cannot now reproduce this fault consistently, sometimes it works properly sometimes sections are not omitted despite being blank, this with same databases and merge documents.  Sorry.
Comment 19 Edwin Sharp 2014-04-15 19:29:34 UTC
Irreproducible per comment 18