Bug 98793 - MAILMERGE: no logic possibility to start merge in document with database fields
Summary: MAILMERGE: no logic possibility to start merge in document with database fields
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.3.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-03-21 08:05 UTC by Cor Nouws
Modified: 2017-12-26 13:48 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2016-03-21 08:05:45 UTC
In the existing situation, one can
 -  add database fields to a document, for example with a autotext block, or simply copy & paste
 - start Tools > Mail merge wizard .. step 8 (Save, print, send)

That triggers the merge of document and data.

Now in the new situation, with the new mail merge toolbar (thanks!), and trimmed wizard, there is no (I cannot find...) this simple step to do what is needed, without using the first steps in the wizard.
Comment 1 Cor Nouws 2016-03-21 08:06:49 UTC
Thanks for your work on this, Miklos and Kendy :)

Can you please have a look?
Comment 2 Cor Nouws 2016-03-21 08:21:22 UTC
( NB I've hardly ever worked with the Wizard. But testing now I do not seem to be able to go from step 4 'Create salutation' to a merge. Going back to 3 'Insert address block' disables the button Next.. 
Starting clean (restart..), and selecting 'this document shall contain an address block' in step '3', makes the Next button disfunctional.)
Comment 3 Jan Holesovsky 2016-03-21 08:33:08 UTC
Now it should be possible to just add the field, and press the [Print Merged Documents] button in the toolbar right away - is that not possible?  If not, what's blocking that?

The toolbar shows either by opening the MM wizard or using View -> Toolbars -> Mail Merge.  [I guess the choice to show / hide it could be added somewhere to make it more accessible.]

Wrt. comment 2, "I do not seem to be able to go from step 4 'Create salutation' to a merge" - there is no such thing any more.  The merge itself is performed when you use one of the toolbar buttons.  Wrt. the disabling or disfunctional 'Next' button - can you please create a separate bug for that - I'm not sure what you mean there; screenshots would be best.  Thank you!
Comment 4 Cor Nouws 2016-03-21 09:27:04 UTC
(In reply to Jan Holesovsky from comment #3)
> Now it should be possible to just add the field, and press the [Print Merged
> Documents] button in the toolbar right away - is that not possible?  If not,
> what's blocking that?


I find out now that it works when I start the Wizard and cancel it.
Without that, the buttons are disabled.

> The toolbar shows either by opening the MM wizard or using View -> Toolbars
> -> Mail Merge.  [I guess the choice to show / hide it could be added
> somewhere to make it more accessible.]

Good idea. On the toolbar in the datasource window, yes.

( ...
> - I'm not sure what you mean there; screenshots would be best.  Thank you!

Will do later. Some crashes here too.)
Comment 5 Cor Nouws 2016-03-21 12:15:27 UTC
1. Open document with database fields, OR
- Start text document
  Open data source browser (Ctrl+Shft+F4) and in there a database
  Drag fields from the table to the document (pick the headers), and add some text or enters

2. Start Mail Merge tool bar
 > Note the buttons Save and Print merged and Send E-mail are diabled.
 
3. Start Tools > Mail Merge Wizard
4. Cancel the Wizard without doing anything there
 > Now the buttons Save and Print merged and Send E-mail can be used.
Comment 6 Cor Nouws 2016-03-21 12:22:17 UTC
Created separate bug 98797 describing the send e-mail crash
Comment 7 Cor Nouws 2016-03-21 12:35:04 UTC
Linked Bug 98798 : Starting and cancelling Mail Merge Wizard allows to start "merge" in document without database fields
Comment 8 Cor Nouws 2016-03-21 13:04:39 UTC
Adding Bug 98799 - MAILMERGE: Wizard: after in Step#3 selecting with "This document shall.." the Next/Finish button don't work any more

and 

Bug 98800 - MAILMERGE: Wizard: after doing Step#3 with "This document shall.." selected, the next fresh run: Next/Finish are not available
Comment 9 Robinson Tryon (qubit) 2016-05-12 05:48:24 UTC
TESTING with
LO 5.2.0.0.alpha1+
OS Version: Mac OS X 10.10.5
Build: 2016-05-11_01:01:27

(In reply to Jan Holesovsky from comment #3)
> Now it should be possible to just add the field, and press the [Print Merged
> Documents] button in the toolbar right away - is that not possible?

Not currently. Repro Steps:

- Open new Text Document
- View -> Toolbars -> Mail Merge
- Insert -> Field -> More Fields -> (select Database Tab)
- Select 'Type: Mail merge fields', then drill-down in an available database and table to select a single field (e.g. testdb -> Sheet1 -> Name)
- Click the 'Insert' button, then 'Close'

The MM field appears in the document, but the 'Print Merged Documents' button remains greyed-out.
Comment 10 Robinson Tryon (qubit) 2016-07-07 13:46:10 UTC
TESTING with
LO 5.2.0.2
OS Version: Mac OS X 10.10.5

(In reply to Robinson Tryon (qubit) from comment #9)
> - Open new Text Document
> - View -> Toolbars -> Mail Merge
> - Insert -> Field -> More Fields -> (select Database Tab)
> - Select 'Type: Mail merge fields', then drill-down in an available database
> and table to select a single field (e.g. testdb -> Sheet1 -> Name)
> - Click the 'Insert' button, then 'Close'
> 
> The MM field appears in the document, but the 'Print Merged Documents'
> button remains greyed-out.

CONFIRMED:
Following the same steps, the Print Merged Documents button remains greyed-out.
Comment 11 Commit Notification 2016-07-28 15:44:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#98793 create a MailMergeConfigItem if toolbar is active...

It will be available in 5.3.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 12 Caolán McNamara 2016-07-28 15:47:39 UTC
Hopefully this does what you want. If the toolbar is active then behave the same as if you had run the mail merge wizard but immediately cancelled.

If it works out then ping me and I'll backport to 5-2
Comment 13 Timur 2017-08-09 08:08:50 UTC
Very useful. Pity it wasn't backported to 5.2.