Bug 123057 - MAILMERGE: Conditionally hidden sections can lead to wrong page count
Summary: MAILMERGE: Conditionally hidden sections can lead to wrong page count
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Ilhan Yesil
URL:
Whiteboard: target:6.3.0 target:6.2.2
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2019-01-30 15:31 UTC by Ilhan Yesil
Modified: 2019-04-12 11:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Document to test mail merge with hidden sections (11.85 KB, application/vnd.oasis.opendocument.text-template)
2019-01-30 15:33 UTC, Ilhan Yesil
Details
Address list to test mail merge with hidden sections (8.94 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-01-30 15:33 UTC, Ilhan Yesil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilhan Yesil 2019-01-30 15:31:28 UTC
Description:
The page count of mail merged documents can differ, if sections are hidden for some recipients. As example, a merged document has 2 pages with shown section and only 1 page if section is hidden.
But in the mail merging process, page count fields are converted to text fields, and in this process they are set to a wrong page count.

Steps to Reproduce:
1. Open attached "pagecounttest.ott"
2. Run the mail merge wizard and select the attached "db_pagecounttest.ods" as address list.
3. Select "Save Merged Documents" in the mail merge toolbar
4. Select to save as a single large document and click "Save Documents"
5. Save the generated document and afterwards open the generated odt file.

Actual Results:
The header shows a wrong page count, if sections are hidden. So it shows "Page 1 of 2" although only one page is generated

Expected Results:
It should show "Page 1 of 1"


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Ilhan Yesil 2019-01-30 15:33:11 UTC
Created attachment 148759 [details]
Document to test mail merge with hidden sections
Comment 2 Ilhan Yesil 2019-01-30 15:33:45 UTC
Created attachment 148760 [details]
Address list to test mail merge with hidden sections
Comment 3 Ilhan Yesil 2019-02-05 08:25:25 UTC
Self confirming according to https://wiki.documentfoundation.org/QA/Guidelines_for_public_and_private_sector_deployments. Issue has originally been reported by another user in our internal issue tracker.
Comment 4 Xisco Faulí 2019-02-06 17:58:35 UTC
(In reply to Ilhan Yesil from comment #3)
> Self confirming according to
> https://wiki.documentfoundation.org/QA/
> Guidelines_for_public_and_private_sector_deployments. Issue has originally
> been reported by another user in our internal issue tracker.

Yes, it's fine to confirm it if you're going to work on it. Which company is it with the internal issue tracker ?
Comment 5 Ilhan Yesil 2019-02-07 08:55:49 UTC
The company is it@M, Landeshauptstadt München in Germany, which is listed in the "List of deployments with permission to self-confirm reports" on that site.
Comment 6 Commit Notification 2019-02-19 16:23:59 UTC
Ilhan Yesil committed a patch related to this issue.
It has been pushed to "master":

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

tdf#123057 Correct page count in mail merge if sections are hidden

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 7 Commit Notification 2019-02-26 14:35:53 UTC
Ilhan Yesil committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

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

tdf#123057 Correct page count in mail merge if sections are hidden

It will be available in 6.2.2.

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 8 Xisco Faulí 2019-04-12 10:25:10 UTC
A polite ping to Ilhan Yesil:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
Thanks