Bug 88802 - Editing Labels - label wizard allows incomplete or erroneous field names to be inserted into layout window
Summary: Editing Labels - label wizard allows incomplete or erroneous field names to b...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Ekansh Jha
URL:
Whiteboard: target:6.1.0 target:6.0.2 target:5.4.6
Keywords: easyHack
Depends on:
Blocks:
 
Reported: 2015-01-26 11:04 UTC by Alex Thurgood
Modified: 2018-02-24 11:05 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
test label document (9.90 KB, application/vnd.oasis.opendocument.text)
2015-01-26 11:12 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2015-01-26 11:04:53 UTC
How to reproduce :

1) File > New > Labels
2 Choose Bibliography from the list of databases.
3) Click on the activated arrow button in the middle of the dialogue and notice that the following field reference gets inserted into left hand label layout window :

<Bibliography..0.>

This is surely incorrect. The arrow button shouldn't be activated until all of the dropdown menu entries have been chosen, otherwise an incomplete reference gets inserted that does nothing.
Comment 1 Alex Thurgood 2015-01-26 11:10:05 UTC
Tested on

Version: 4.5.0.0.alpha0+
Build ID: a4f97070bdb6172c684ec175c3e6e2a550eb9630
Locale: fr_


I would add that if you confirm creation of the label document after step 3, you get an empty label sheet, each one filled with an empty field reference <>, the tooltip indicating that it points to Bibliography, but when you double-click on said reference, the database field insert dialog opens up and selects the first database source in the list of registered datasources rather than Bibliography.
Comment 2 Alex Thurgood 2015-01-26 11:12:40 UTC
Created attachment 112802 [details]
test label document

Adding test label document showing problem
Comment 3 Alex Thurgood 2015-01-26 11:30:46 UTC
Already present in OOo321, changing version number accordingly.
Comment 4 Julien Nabet 2015-01-27 22:09:21 UTC
Code pointer I think: http://opengrok.libreoffice.org/xref/core/sw/source/ui/envelp/label1.cxx#231
Comment 5 QA Administrators 2016-02-21 08:38:04 UTC Comment hidden (obsolete)
Comment 6 Alex Thurgood 2016-07-22 15:13:40 UTC
Still present in 

Version: 5.1.4.2
Build ID: f99d75f39f1c57ebdd7ffc5f42867c12031db97a
CPU Threads: 2; OS Version: Mac OS X 10.11.5; UI Render: default; 
Locale: fr-FR (fr.UTF-8)
Comment 7 Julien Nabet 2016-07-23 10:37:46 UTC
On pc Debian x86-64 with master sources updated yesterday I could reproduce this.

In fact, the pb appears even when you don't choose any database and just click on arrow button.

ux-team: what should be done here?
1) disable arrow if database or table or field not selected
2) a popup which appears with error message (with lacking fields)
3) other?
Comment 8 Robinson Tryon (qubit) 2016-08-25 05:49:37 UTC Comment hidden (obsolete)
Comment 9 Heiko Tietze 2017-08-23 12:06:30 UTC
(In reply to Julien Nabet from comment #7)
> 1) disable arrow if database or table or field not selected

Go with option 1 and disable functions that temporarily make no sense / are out of scope / need further specification etc. In this example I cannot imagine any case where a database without table or with table but no specified field would be of interest (e.g. as a dummy field). So yes, please do the change.

(Sorry for the UX delay, there is no excuse for no answer at all over two years)
Comment 10 Ekansh Jha 2018-02-06 15:18:22 UTC
Hi! I would like to work on this issue!.
Comment 11 Heiko Tietze 2018-02-07 10:49:29 UTC
(In reply to Ekansh Jha from comment #10)
> Hi! I would like to work on this issue!.

Excellent! Please ask in case you need help.
Comment 12 Commit Notification 2018-02-09 08:51:46 UTC
ekuiitr committed a patch related to this issue.
It has been pushed to "master":

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

tdf#88802 disable arrow if database or table or field not selected

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 13 Julien Nabet 2018-02-09 08:52:33 UTC
Alex/Heiko: before cherry-picking the patch on 6.0 branch, could you give it a try when a build with it will be available?
Comment 14 Heiko Tietze 2018-02-10 11:19:26 UTC
(In reply to Julien Nabet from comment #13)
> Alex/Heiko: before cherry-picking the patch on 6.0 branch, could you give it
> a try when a build with it will be available?

Don't get the "when it will be avail" but the patch works well, fixes the issue, and should be backported. Would be good if you do it as the reviewer.

Ticket can be closed, I guess.
Comment 15 Julien Nabet 2018-02-18 19:59:40 UTC
The cherry-pick for 6.0 is in review now:
https://gerrit.libreoffice.org/#/c/49948/
Comment 16 Commit Notification 2018-02-21 13:22:03 UTC
ekuiitr committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

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

tdf#88802 disable arrow if database or table or field not selected

It will be available in 6.0.2.

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 17 Commit Notification 2018-02-24 11:05:29 UTC
ekuiitr committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

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

tdf#88802 disable arrow if database or table or field not selected

It will be available in 5.4.6.

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.