Bug 96302 - Wrong field variables and selections shown in Fields dialog after creating a new document with the dialog still open
Summary: Wrong field variables and selections shown in Fields dialog after creating a ...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.8.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-12-07 07:22 UTC by Jan Skarvall
Modified: 2018-12-08 13:38 UTC (History)
2 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 Jan Skarvall 2015-12-07 07:22:47 UTC
Steps to reproduce:

1. Start LibreOffice Writer.
2. Select Insert>Fields>Other...
3. Enter a User Field, Text, Name v1, Value v1 and click Insert.
4. Note that v1 gets selected.
5. Select New>Text Document.
6. Note that v1 is still shown and is selected, even though there is no such variable in the new document. This is definitely wrong. I now believe that the expected behaviour would be that the Fields dialog should have been closed, as I now understand that one may have one Fields dialog shown per open document.
7. Click on Insert.
8. Enter a User Field, Text, Name v2, Value v2 and click Insert.
9. Note that v1 is still selected even if Name/value shows v2. This seems wrong to me.

I'm running this on Ubuntu 14.04 Desktop.
Comment 1 Buovjaga 2015-12-08 10:27:59 UTC
I see this on Ubuntu, but not on Win. On Windows the insert field dialog does not have the user field v1. On Ubuntu v1 is carried over to the new document.

However, this is not true for me: "9. Note that v1 is still selected even if Name/value shows v2."
After creating a v2 field with the Apply button, it inserts v2 to the new document.

On Ubuntu there was some strange reaction when opening a new document with the dialog open. It did some weird window focus switching ritual, perhaps 10 focus switches, I thought it would crash.

Win 7 Pro 64-bit, Version: 5.0.3.2 (x64)
Build ID: e5f16313668ac592c1bfb310f4390624e3dbfb75
Locale: fi-FI (fi_FI)

Ubuntu 15.10 64-bit 
Version: 5.0.3.2
Build ID: 1:5.0.3~rc2-0ubuntu1
Locale: en-US (en_US.UTF-8)
Comment 2 Jan Skarvall 2015-12-08 10:53:01 UTC
Have a look again at step 9. v2 gets inserted, but in the selection view, v1 is still selected. It bit misleading.

It may have been this "error" that made me think that the Fields dialog got "out of sync", as I mention in https://bugs.documentfoundation.org/show_bug.cgi?id=96301. That was before I understood that a new Fields dialog pops up for ever open document.

Have you considered sharing a single Fields dialog?
Comment 3 Buovjaga 2015-12-08 11:06:09 UTC
(In reply to Jan Skarvall from comment #2)
> Have a look again at step 9. v2 gets inserted, but in the selection view, v1
> is still selected. It bit misleading.

Not for me.
Comment 4 Jan Skarvall 2015-12-08 11:12:31 UTC
So what is the semantic behind highlighting anything in the Select frame?
Comment 5 Buovjaga 2015-12-08 11:20:28 UTC
(In reply to Jan Skarvall from comment #4)
> So what is the semantic behind highlighting anything in the Select frame?

What do you mean by this?

Again: v1 for me is not selected. Please upgrade to LibO version 5.
Comment 6 Jan Skarvall 2015-12-08 11:32:14 UTC
It seems that LibO 5 is not yet available on Ubuntu 14.04, at least if you stick to packages that are supported. So, for now, I refrain from cluttering up my installation, getting out of sync with the management of versions that the Ubuntu Software thinks I have installed. Not (yet) willing to take the risk.

With the semantics I mean: How would you describe what the highlighting means to a user? I think it will be tough to describe it if the highlighting does not follow what is seen in the Name and Value boxes.
Comment 7 Buovjaga 2015-12-08 11:37:05 UTC
(In reply to Jan Skarvall from comment #6)
> With the semantics I mean: How would you describe what the highlighting
> means to a user? I think it will be tough to describe it if the highlighting
> does not follow what is seen in the Name and Value boxes.

But this is apparently the case only in versions prior to 5.

The remaining problem is that the variable from the older document is carried over to the new, which is seen on Linux.
Comment 8 Jan Skarvall 2015-12-08 11:52:54 UTC
OK.Thanks for your time!

So, you agree that what I reported indeed are problems with the 4.2.8.2 version and that the solution to the step 9 issue is to upgrade to Lib0 5, and that there is not yet a solution on the step 6 issue for Ubuntu.

There is no option to indicate the particular Linux port as OS when classifying the the bug report :-(. Should it be added as a keyword? Including Ubuntu version? I don't know. Ubuntu versions changes content.
Comment 9 Buovjaga 2015-12-08 11:59:16 UTC
(In reply to Jan Skarvall from comment #8)
> There is no option to indicate the particular Linux port as OS when
> classifying the the bug report :-(. Should it be added as a keyword?
> Including Ubuntu version? I don't know. Ubuntu versions changes content.

It might be considered after we figure out how to display the Bugzilla lists as treeviews: then "Linux" could be expanded and you would see some major distros.
Comment 10 Jan Skarvall 2015-12-08 12:04:01 UTC
Yes, but as I said, an Ubuntu release is not a static thing. A fault report may be valid or not depending on upgrades that you made to the particular Ubuntu version.
Comment 11 Julien Nabet 2015-12-19 19:53:34 UTC
You can find 5.0.3RC2 in LO ppa (see https://launchpad.net/~libreoffice/+archive/ubuntu/ppa)
Comment 12 QA Administrators 2017-01-03 19:47:18 UTC Comment hidden (obsolete)
Comment 13 Timur 2017-11-28 11:55:40 UTC
I was willing to retest, but I didn't reproduce it at all in Ubuntu with LO 4.2.8.
Please add screencast and test in 6.0+.
Comment 14 Jan Skarvall 2017-12-06 21:05:57 UTC
I just tried to follow the steps to reproduce, and the problem is still there.

I am using LibreOffice Writer 5.1.6.2 on Ubuntu 16.04 LTS. LO 6.0+ is not available on this Ubuntu version.

I do not know if there is something that I am not understanding.

It seems that my description of the behaviour in step 6 does not match the behaviour I see now. It seems not to be possible to have one Fields dialog open per document. If I try to open a new one having the second document, the dialog is closed instead. If I then select the second document and open the Fields dialog, there is no v1 variable, and if I then select the first document, v1 is shown and selected, selecting the second document and v1 is missing as it should.

But if I follow the procedure, i.e. not try to open a second Fields dialog, v1 is shown and selected irrespective of which document is selected. Going on with step 7-9 also results in the behavior I reported.

I also noted that the creation of the second document sometimes is very slow.

Also, when I move the Fields dialog, and then change selection of the two documents back and forth, the Fields dialog may change position, but not in a logical way, which could be that the position is specific for each open document.
Comment 15 Buovjaga 2017-12-07 07:41:07 UTC
(In reply to Jan Skarvall from comment #14)
> I am using LibreOffice Writer 5.1.6.2 on Ubuntu 16.04 LTS. LO 6.0+ is not
> available on this Ubuntu version.

Thankfully you can free yourself from Ubuntu's version dictatorship by using AppImages: http://libreoffice.soluzioniopen.com/
Comment 16 Julien Nabet 2017-12-07 07:45:27 UTC
Also: https://launchpad.net/~libreoffice/+archive/ubuntu/ppa
Comment 17 QA Administrators 2018-12-08 03:47:29 UTC Comment hidden (obsolete)
Comment 18 Jan Skarvall 2018-12-08 13:34:57 UTC
I tested using LibreOffice 6.1.3.2 on Ubuntu Desktop 18.04.1 LTS, and the behaviour is now OK.

The current LibreOffice version on Ubuntu Desktop 18.04.1 LTS is 6.0.6.2 and it has the erroneous behaviour.
Comment 19 Buovjaga 2018-12-08 13:38:30 UTC
Great news, let's close.