Bug 77241 - MAILMERGE - Defined database in document not stored in wizard
Summary: MAILMERGE - Defined database in document not stored in wizard
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.2.1 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: target:4.3.7 target:4.5.0 target:4.4.1
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-04-09 13:15 UTC by me
Modified: 2015-02-03 13:28 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Template ready for mail merge (18.58 KB, application/vnd.oasis.opendocument.text-template)
2015-02-02 18:48 UTC, me
Details
Data source (35.28 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-02-02 18:49 UTC, me
Details

Note You need to log in before you can comment on or make changes to this bug.
Description me 2014-04-09 13:15:23 UTC
Create a document to be used as a mailmerge. Under Edit >Exchange Database select or browse to a database and the relevant sheet/table and define. Save document. Under mailmerge wizard you will now have to again select a database and table every time even if wizard is completed and master doc saved.

Current behaviour: Another regression and annoyance on the mailmerge front.

Expected behaviour: The wizard knows what database and table have been saved in the document; before and after it has been used.
Comment 1 Alex Thurgood 2014-06-30 09:26:28 UTC
It is all very well saying that it is a regression, but compared to which version ?

Surely, if you change the address database for the whole application, you can not expect a previously made document to automatically accept that change, that choice should be left up to the user ? Who is to guarantee that the datasource fields are the same between the new globally attributed address datasource and the one you used for your previous mailmerge document ?

I believe that the database source is stored in the mailmerge document template used to create the mailmerge document - updating it automatically to the new global one might cause all sorts of problems.

Or am I just misunderstanding the whole thing ?
Comment 2 me 2014-06-30 14:20:37 UTC
Yes you are misunderstanding. Define the database per document not the whole application.

Create a document for mail merge. Use exchange database to define your database that you wish to call upon for that document. When opening the wizard for that document you should not have to define the database again, every time you open the document.

I have reverted to 4.1.6 as it is much more stable and behaves as one would expect. You define a database to a particular document, it remembers this.
Comment 3 Buovjaga 2014-11-25 08:51:20 UTC
Back to UNCONFIRMED.
Comment 4 Alex Thurgood 2015-01-03 17:39:29 UTC
Adding self to CC if not already on
Comment 5 Alex Thurgood 2015-02-01 16:20:35 UTC
I don't see this on Linux Mint 17 with

Version: 4.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale : fr_FR

If I change the Addressbook datasource, it gets saved in the document - when I next open the file and press Ctrl-P, the correct datasource is referenced.

That version of LO you originally filed the bug against is obsolete. Please test with a current production release and report back here. Setting to NEEDINFO until requested information provided.
Comment 6 Alex Thurgood 2015-02-01 16:37:35 UTC
With further testing, I can confirm this bug.
In previous tests, I didn't shut down LibreOffice, merely closed and re-opened the document, (in other words the dbcontext was maintained).

How to reproduce :
1)Open a new Writer document
2) Choose Edit > Exchange Databases
3) Define a datasource.
4) Press F4, drag some field headers into the document.
5) Save the document.
6) Close the document.
7) Shut down LibreOffice.
8) Restart LibreOffice
9) Re-open the previously saved Writer document
10) Edit > Exchange database
11) Select another datasource.
12) Save as a differently named document.
13) Close document, close LibreOffice
14) Restart LibreOffice, reopen document
15) Edit > Exchange database

Notice how only the first datasource in the list is selected as opposed to the one selected, and supposed saved previously.
Comment 7 Alex Thurgood 2015-02-01 16:38:49 UTC
Removed regression keyword as no information provided as to when it last worked.


Tested on 
Version: 4.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale : fr_FR

Linux Mint 17.1
Comment 8 Lionel Elie Mamane 2015-02-02 12:31:15 UTC
Reporter made it perfectly clear that it used to work in 4.1.6.

Adding our Writer "find the expert" in CC.
Comment 9 Michael Stahl 2015-02-02 16:37:47 UTC
Lionel and I tried to reproduce the bug and couldn't.

Following the bug description by original bug reporter, no difference between 4.1.6 1nd 4.3.4 was observed.

Following the steps by Alex in comment 6 likewise didn't lead to any difference in behaviour between these two versions.

me@willpom.com, could you please give us click-by-click detailed reproduction instructions?

Thanks!
Comment 10 me 2015-02-02 18:48:35 UTC
Created attachment 113061 [details]
Template ready for mail merge
Comment 11 me 2015-02-02 18:49:09 UTC
Created attachment 113062 [details]
Data source
Comment 12 me 2015-02-02 19:11:30 UTC
Firstly this was regards to 4.2.2.1, and is still current in Version: 4.2.8.2 Build ID: 48d50dbfc06349262c9d50868e5c1f630a573ebd

I am loathed to bother upgrading past 4.1.6 because every time I do something else fucks up; mailmerge, line formats, cell referencing, spacing, yawn yawn yawn. Running a small business and looking after an autistic kid at the same time I don't have the energy to re format my work every time and submit bugs. Instead I now donate.

Use the 2 attachments. Follow my previous instructions.

Simply
Open template >Edit >Exchange database >Browse - find the attached Data source - expand - select 'data' sheet.
>File >Save as >'Test_doc.odt'
Exit/close document - I simply click the top right 'x'.

You'd expect the 'data' sheet from 'Test_Data.ods' to be now linked to 'Test_doc.odt' as the datasource.

Re-open 'Test_doc.odt' >Tools >Mailmerge wizard... >Next to '3.Insert address block' - here the 'Select Address List' should display the datasource previously saved underneath ie "Current address list: Test_Data"

It does not! You then have to go through the rigmarole of selecting the datasource, changing the table everytime you want to use the mailmerge.

4.1.6 the datasource from the exchange database is saved in the wizard. If this is the same for 4.3.x then fair play, if you can confirm that and there are no other silly bugs, format changes etc I may consider upgrading.
Comment 13 Commit Notification 2015-02-03 13:27:21 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ce1af2f54e06933b372f832cc110bdd4d9edfb8f&h=libreoffice-4-3

tdf#77241: sw: fix creation of field data source string

It will be available in 4.3.7.

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 14 Commit Notification 2015-02-03 13:27:36 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#77241: sw: fix creation of field data source string

It will be available in 4.5.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 15 Commit Notification 2015-02-03 13:28:00 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f8cc202803b08f00117d2b8e76a13b76cbf2d6ce&h=libreoffice-4-4

tdf#77241: sw: fix creation of field data source string

It will be available in 4.4.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 16 Lionel Elie Mamane 2015-02-03 13:28:40 UTC
Thanks for the additional reprodction instructions. We could reproduce and fix.