Bug 155674 - MAILMERGE: next record hides all fields during edit (output result is OK)
Summary: MAILMERGE: next record hides all fields during edit (output result is OK)
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2023-06-04 19:55 UTC by Luiz Angelo Daros de Luca
Modified: 2024-01-03 19:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
The editing file (14.16 KB, application/vnd.oasis.opendocument.text)
2023-06-04 19:55 UTC, Luiz Angelo Daros de Luca
Details
Simple database (10.18 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-06-04 19:55 UTC, Luiz Angelo Daros de Luca
Details
The final output (which is correct) (11.00 KB, application/vnd.oasis.opendocument.text)
2023-06-04 19:57 UTC, Luiz Angelo Daros de Luca
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luiz Angelo Daros de Luca 2023-06-04 19:55:00 UTC
Description:
Hello,

I created a simple ods named data, a single sheet tb1 with Field1, Field2 and Field3

field1	field2	field3
a	1	!
b	2	@
c	3	#

And then I used it in a writer doc:

Num: <Record number:data.tb1> Field1: <data.tb1.field1> Field 2: <data.tb1.field2> Field 3: <data.tb1.field3>
Num: <Record number:data.ods> Field1: <data.tb1.field1> Field 2: <data.tb1.field2> Field 

When I generate the final doc, I do get the right output:

Num: 1 Field1: a Field2: 1 Field3: !

Num: 2 Field1: b Field2: 2 Field3: @

<new page>

Num: 3 Field1: c Field2: 3 Field3: #

But when I'm editing it and select a record using the maildirect toolbar, I get:

Num: 1 Field1: a Field2: 1 Field3: !

Num: 1 Field1:  Field2:  Field3: !

With record number repeating the last one used and all other fields empty.

Steps to Reproduce:
1. Create any mail merge doc with two records per page
2. see the problem

Actual Results:
I cannot preview the multiple records

Expected Results:
It should look like the final output when I merge the records


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Reproduced with version 7.3 as well.
Comment 1 Luiz Angelo Daros de Luca 2023-06-04 19:55:31 UTC
Created attachment 187717 [details]
The editing file
Comment 2 Luiz Angelo Daros de Luca 2023-06-04 19:55:44 UTC
Created attachment 187718 [details]
Simple database
Comment 3 Luiz Angelo Daros de Luca 2023-06-04 19:57:08 UTC
Created attachment 187719 [details]
The final output (which is correct)

The issue is while editing the main file
Comment 4 Luiz Angelo Daros de Luca 2023-06-19 05:27:20 UTC
I missed something during ctrl+c/ctrl+v. The text is like this (There is a "Next Record"):

Num: <Record number:data.tb1> Field1: <data.tb1.field1> Field 2: <data.tb1.field2> Field 3: <data.tb1.field3>
<Next Record: data.tb1>
Num: <Record number:data.ods> Field1: <data.tb1.field1> Field 2: <data.tb1.field2> Field 3: <data.tb1.field3>

The uploaded files were fine.
Comment 5 Dieter 2023-12-28 18:24:25 UTC
Luiz, thank you for reporting the bug. Unfortunatelay nobody could confirm it for more than six month. I only can test with Windows and I'm not familiar with mailmerge, so I need a proper set of steps.

I've started with the following steps:
1. Download attachment 187718 [details]
2. Open attachment 187717 [details]
3. Select a field -> Edit -> Fields
4. Add database file -> Add downloaded file "data.ods"
5. ???

Could you please complete the steps? thank you
=> NEEDINFO
Comment 6 Luiz Angelo Daros de Luca 2023-12-28 23:16:41 UTC
3. Edit the first field (Record Number) "Num: <double click or right click/edit fields> Field1:..."
4. Add database file -> Add downloaded file "data.ods"
5. Select the table from data->tb1

Now you can use the "Mail Merge" toolbox to navigate between records. At first, you'll be at record -1 (because you were missing the database at start). When you select the first record, you'll get (# means empty field):

Num: # Field1: a Field2: 1 Field3: !

Num: 1 Field1: # Field2: # Field3: #

While it should be:

Num: 1 Field1: a Field2: 1 Field3: !

Num: 2 Field1: b Field2: 2 Field3: @

Now we have multiple issues:

1) The field we edited (record number or any other) seems to be broken, although it is the same as the one in the second line (if you show field names with ctrl+f9). If we copy the one from the second line, over it, it works as expected. If we duplicate it, the copy is kept broken

2) The record number after the "Next Record:data.tb1" is still 1 while it should be 2

3) All other fields in the second line are empty during edition but they do work while merging the doc

4) If you reload this file a couple of times, LibreOffice frequently crashes.
Comment 7 Dieter 2024-01-03 16:25:16 UTC
Luiz, thank you for further steps. But unfortunately I can't change the mail merge entry. It's alwys -1. Don't know what I did wrong. I hope somebody else can help.
Comment 8 Luiz Angelo Daros de Luca 2024-01-03 19:12:44 UTC
(In reply to Dieter from comment #7)
> Luiz, thank you for further steps. But unfortunately I can't change the mail
> merge entry. It's alwys -1. Don't know what I did wrong. I hope somebody
> else can help.

You just need to navigate to the next record. It is the arrow pointing to the right, the one right to the -1 textbox in the mail merge toolbox.