Bug 122156 - MAILMERGE: linked sections with hiding conditions get shown unconditionally
Summary: MAILMERGE: linked sections with hiding conditions get shown unconditionally
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.3.0 target:6.2.0.1 target:6.1.6
Keywords: bibisected, bisected
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2018-12-17 14:41 UTC by Mike Kaganski
Modified: 2019-01-23 15:19 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A sample set to test linked sections with conditions in mail merge (21.70 KB, application/x-zip-compressed)
2018-12-17 14:41 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2018-12-17 14:41:20 UTC
Created attachment 147622 [details]
A sample set to test linked sections with conditions in mail merge

In the attachment, there are 3 files:

1. linked-with-condition.odt
2. source-for-link.odt
3. 5-with-blanks.ods

#1 is the mail merge template. Open it, and assign #3 as data source using Mail Merge wizard. In #1, there's a section linked to #2; and the section has a condition to hide, which is when data source's Title field is empty. If you navigate the records in the template, the section is shown and hidden as appropriate.

The problem is, when performing a mail merge, e.g. using Saved Merged Documents, the resulting document has the section always shown, regardless of Title field contents.

Tested with Version: 6.1.4.2 (x64)
Build ID: 9d0f32d1f0b509096fd65e0d4bec26ddd1938fd3
CPU threads: 12; OS: Windows 10.0; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL, but must be reproducible as far as in version 4.4.
Comment 1 Aron Budea 2018-12-17 16:18:36 UTC
Confirmed with LO 6.2 beta1 / Ubuntu 18.04.

Bibisected to the following commit using repo bibisect-44max.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=65981011d84fdcf90533b59f25f01a7f734d6c5e
author		Jan-Marek Glogowski <glogow@fbihome.de>	2014-07-01 21:42:30 +0200
committer	Björn Michaelsen <bjoern.michaelsen@canonical.com>	2014-09-10 19:53:41 +0000

Normalize SwDBManager::Merge{MailFiles,Documents}
Comment 2 Mike Kaganski 2018-12-17 18:26:07 UTC
https://gerrit.libreoffice.org/65286
Comment 3 Commit Notification 2018-12-17 19:18:29 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/fdf4afb25ba38c7be3278bb4bde462c3f9e722fc%5E%21

tdf#122156: closing a section link should not clear its Hidden flag

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 4 Xisco Faulí 2018-12-18 10:20:58 UTC
I guess this is not a regression since the problem existed since the initial export...
Comment 5 Commit Notification 2018-12-18 21:35:15 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/b5069baed681d7b60c4aebebfb5a43a5635d5ba8%5E%21

tdf#122156: closing a section link should not clear its Hidden flag

It will be available in 6.2.0.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2019-01-23 15:19:18 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/0679e01f7ee0b573b6dea3e9b2642cf851e873d2%5E%21

tdf#122156: closing a section link should not clear its Hidden flag

It will be available in 6.1.6.

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

Affected users are encouraged to test the fix and report feedback.