Bug 115013 - Merge fields aren't substituted after saving/reopening DOC(X) with added mail merge fields, and running mail merge
Summary: Merge fields aren't substituted after saving/reopening DOC(X) with added mail...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.1 rc
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.1.0 target:6.0.1
Keywords: implementationError
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2018-01-15 05:32 UTC by Aron Budea
Modified: 2018-03-02 12:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample DOCX (saved at step 4) (4.09 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-01-15 05:32 UTC, Aron Budea
Details
Sample DOC (saved at step 4) (9.00 KB, application/msword)
2018-01-15 11:13 UTC, Aron Budea
Details
Sample DOCX (saved in Word) (16.55 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-01-15 11:15 UTC, Aron Budea
Details
Sample DOC (saved in Word) (24.50 KB, application/msword)
2018-01-15 11:16 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-01-15 05:32:10 UTC
Created attachment 139100 [details]
Sample DOCX (saved at step 4)

1. Save an empty document as DOC or DOCX.
2. Start mail merge, add an address list (eg. attachment 134068 [details]), and don't set an address block or salutation.
3. In Fields (Ctrl-F2) add a field from the data source to the document.
4. Save the document.
5. Note how you can cycle through the merged entries, and the field gets substituted.

6. Reopen the document.
7. Repeat steps 2-3 (the data source doesn't get saved in DOC(X), so it has to be added again).
8. Note how the field content isn't substituted anymore when cycling through merged entries: it's not matched to the same data source field as before.

Attaching a sample DOCX after step 4.

Observed using LO 6.0.0.1 / Windows 7. The saving of DOC(X) mail merge fields was added for bug 67207 in 6.0.
Comment 1 Aron Budea 2018-01-15 11:13:30 UTC
Created attachment 139105 [details]
Sample DOC (saved at step 4)
Comment 2 Aron Budea 2018-01-15 11:15:56 UTC
Created attachment 139106 [details]
Sample DOCX (saved in Word)

Word also inserts the data source, but let's disregard that for now, it's also possible to only insert a standalone MERGEFIELD.
Comment 3 Aron Budea 2018-01-15 11:16:31 UTC
Created attachment 139107 [details]
Sample DOC (saved in Word)
Comment 4 Mike Kaganski 2018-01-16 07:02:18 UTC
https://gerrit.libreoffice.org/47895
Comment 5 Commit Notification 2018-01-16 08:37:26 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=46b3202bf883618f1585850191c19776861013ed

tdf#115013: write merge field column into docx merge fields

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2018-01-17 18:48:28 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ba43d4c596c9c6b8d98b749ffd7f69d4faf9826d

tdf#115013: quote columns with spaces and properly escape characters

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Timur 2018-01-23 17:20:39 UTC
Is this fixed? Can it be backported to 6.0?
Comment 8 Commit Notification 2018-01-30 15:08:25 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ec48a5a196b86678b01ba33e6589609dd4cecf39&h=libreoffice-6-0

tdf#115013: write merge field column into docx merge fields

It will be available in 6.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2018-01-30 15:15:22 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ba30faa87a9b3550103cfe5372640f928c47d8d3&h=libreoffice-6-0

tdf#115013: quote columns with spaces and properly escape characters

It will be available in 6.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Xisco Faulí 2018-03-02 09:03:35 UTC
A polite ping to Mike Kaganski: is this bug fixed? if so, could you
please close it as RESOLVED FIXED ? Thanks