Bug 128458

Summary: mailmerge: Fields "File name" and "Last printed" not filled
Product: LibreOffice Reporter: Christian <me>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: buzea.bogdan, m.weghorn, oliver.brinzing, telesto
Priority: medium    
Version: 6.1.6.3 release   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 102998    
Attachments: mailmerge.odb
mailmerge.odt

Description Christian 2019-10-29 13:31:07 UTC
Description:
I made a ott for different letters in my organisation
I have differnt textfields (page, page number, date of last print, filename, etc.). Everything is OK, but when the document is printed via mail merge some textfields are empty/missing (date of last print, filename, others (number of page, page) are OK.
Jürgen Kirsten dscheikey@gmail.com on users@de.libreoffice.org could reproduce the problem.
It worked at least in earlier versions on linux, never tried in on Windows before :-)

Thanks for fixing :-) I can give additional information if needed.

Steps to Reproduce:
1. enter textfield page, filename and date of last print in a mail merge document
2. print and choose mail merge entry - 
3. print w/o mail merge - 

Actual Results:
2. print and choose mail merge entry - some fields will be empty
3. print w/o mail merge - all fields will be OK

Expected Results:
every textfield should always be filled


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.2.2 (x64)
Build-ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU-Threads: 2; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded
Comment 1 Oliver Brinzing 2019-11-01 08:35:03 UTC
reproducible with:

Version: 6.1.6.3 (x64)
Build-ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: 

Version: 6.4.0.0.alpha1+ (x64)
Build ID: 885ae558d34dd76955c727b90eb9ae52ce85df7f
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Field "Last printed" is only filled if the document has been printed and saved without mailmerge before.

Field "File Name" is not printed at all.
Comment 2 Oliver Brinzing 2019-11-01 08:37:34 UTC
Created attachment 155439 [details]
mailmerge.odb
Comment 3 Oliver Brinzing 2019-11-01 08:37:52 UTC
Created attachment 155440 [details]
mailmerge.odt
Comment 4 Michael Weghorn 2020-09-21 06:53:45 UTC
(In reply to Oliver Brinzing from comment #1)
> Field "Last printed" is only filled if the document has been printed and
> saved without mailmerge before.
> 
> Field "File Name" is not printed at all.

As far as I can see, that behaviour is the same as for a new document that has not been saved. (I created a new Writer document, then inserted the "Last printed" and "File name" and printed the doc, both are empty.)

From a technical perspective, an explanation could be that the mail merge documents are only temporary documents and not the same as the "source" document, and as such actually have not been saved, so they behave the same as a newly created unsaved document.

(In reply to Christian from comment #0)
> It worked at least in earlier versions on linux, never tried in on Windows
> before :-)

In this case, it would be interesting to know when that changed, i.e. to bibisect this.
Comment 5 QA Administrators 2022-09-22 03:55:10 UTC Comment hidden (obsolete)
Comment 6 Christian 2022-09-22 09:19:16 UTC
Version: 7.4.1.2 (x64) / LibreOffice Community
Build ID: 3c58a8f3a960df8bc8fd77b461821e42c061c5f0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

I tested it with this LO-Version:
working with mail merge doesn't set the "last printed" fields correctly to the mail merge print date/time (doesn't matter if its printed really or if a file is generated).
The "last printed" fields are empty or keep the date/time from printing directly (not via mail merge).