Bug 129261 - EDITING: Clicking with mouse in CLOB of a form throws "Content has been changed" when closing the form.
Summary: EDITING: Clicking with mouse in CLOB of a form throws "Content has been chang...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.3.3.2 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-07 15:16 UTC by Alan Wheeler
Modified: 2023-12-09 17:07 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
ODB database to reproduce anomalies (11.10 KB, application/vnd.sun.xml.base)
2019-12-08 15:08 UTC, Alan Wheeler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Wheeler 2019-12-07 15:16:25 UTC
PREPARATION
Create a new Firebird embedded BASE database.
Create Table "Table1" with 3 fields :-
Field1: Type Integer, AutoValue, Primary Key
Field2: Type TEXT
Field3: Type CLOB
Create Form "Form1" and set its Form Properties/Data as :-
Content type: Table
Content: Table1
Add Text Box "Text Box 1" to Form1 and set its Field Properties/Data as :-
Data field: Field2 
Add Text Box "Text Box 2" to Form1 and set its Field Properties/Data as :-
Data field: Field3
Display Form1 and use it to add a record containing "2" in Text Box 1, and "3" in Text Box 2.
Save the record, close the database, then re-open it.

To demonstrate ANOMALY 1 :-
Open Form1, ensuring that the Form Navigation toolbar is visible. As should be expected, Text Box 1 contains the value "2", Text Box 2 contains the value "3", and the "Save Record" icon in the Form Navigation toolbar is greyed out.
Use the mouse to position the cursor pointer anywhere in Text Box 1 and left-click without doing anything else. As is to be expected, the "Save Record" icon in the Form Navigation toolbar remains greyed out.
Attempt to close the form. As should be expected, the form closes with no warning message.
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 still contains the value "2", Text Box 2 still contains the value "3", and the "Save Record" icon in the Form Navigation toolbar is greyed out.
Use the mouse to position the cursor pointer anywhere in Text Box 2 and left-click without doing anything else. As should be expected, the "Save Record" icon in the Form Navigation toolbar remains greyed out.
Attempt to close the form. Unlike when positioning the cursor in Text Box 1, a warning message is displayed, incorrectly stating that "The content of the current form has been modified". This appears even though the "Save Record" icon in the Form Navigation toolbar is greyed out. Select "No" to close the form.

To demonstrate ANOMALY 2 :-
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 still contains the value "2", Text Box 2 still contains the value "3", and the "Save Record" icon in the Form Navigation toolbar is greyed out.
Modify the value in Text Box 1 from "2" to "2x". As should be expected, the "Save Record" icon in the Form Navigation toolbar becomes highlighted.
Modify the value in Text Box 1 back from "2x" to "2". Ideally, the "Save Record" icon in the Form Navigation toolbar should be greyed out again, but it actually remains highlighted.
Attempt to close the form. The form closes with no warning message, even though the "Save Record" icon was highlighted. 

To demonstrate ANOMALY 3 :-
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 still contains the value "2", Text Box 2 still contains the value "3", and the "Save Record" icon in the Form Navigation toolbar is greyed out.
Modify the value in Text Box 2 from "3" to "3x". As should be expected, the "Save Record" icon in the Form Navigation toolbar becomes highlighted.
Modify the value in Text Box 1 back from "3x" to "3". Ideally, the "Save Record" icon in the Form Navigation toolbar should be greyed out again, but it actually remains highlighted.
Attempt to close the form. Unlike for ANOMALY 2, a warning message is displayed, stating that "The content of the current form has been modified". Select "No" to close the form.

To demonstrate ANOMALY 4 :-
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 still contains the value "2", Text Box 2 still contains the value "3", and the "Save Record" icon in the Form Navigation toolbar is greyed out.
Modify the value in Text Box 1 from "2" to "2x". As should be expected, the "Save Record" icon in the Form Navigation toolbar becomes highlighted.
Click on the "Save Record" icon in the Form Navigation toolbar. As should be expected, the "Save Record" icon becomes greyed out again. The assumption is that the record has been successfully saved.
Attempt to close the form. As is to be expected, the form closes with no warning message.
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 now contains the value "2x", Text Box 2 still contains the value "3", and the "Save Record" icon in the Form Navigation toolbar is greyed out. This verifies that the previous Save was successful
Modify the value in Text Box 2 from "3" to "3x". As should be expected, the "Save Record" icon in the Form Navigation toolbar becomes highlighted.
Click on the "Save Record" icon in the Form Navigation toolbar. As should be expected, the "Save Record" icon becomes greyed out again. The assumption is that the record has been successfully saved.
Attempt to close the form. Unlike when modifying the value in Text Box 1, a warning message is displayed, incorrectly stating that "The content of the current form has been modified". This appears even though the "Save Record" icon in the Form Navigation toolbar is greyed out. Select "No" to close the form.
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 now contains the value "2x, Text Box 2 now contains the value "3x", and the "Save Record" icon in the Form Navigation toolbar is greyed out. This verifies that the previous Save was successful, even though responding "No". 

To demonstrate ANOMALY 5 :-
Clear the value in Text Box 1. As should be expected, the "Save Record" icon in the Form Navigation toolbar becomes highlighted.
Click on the "Save Record" icon in the Form Navigation toolbar. As should be expected, the "Save Record" icon becomes greyed out again. The assumption is that the record has been successfully saved.
Attempt to close the form. As should be expected, the form closes with no warning message.
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 is now empty, Text Box 2 still contains the value "3x", and the "Save Record" icon in the Form Navigation toolbar is greyed out. This verifies that the previous Save was successful
Clear the value in Text Box 2. As should be expected, the "Save Record" icon in the Form Navigation toolbar becomes highlighted.
Click on the "Save Record" icon in the Form Navigation toolbar. As should be expected, the "Save Record" icon becomes greyed out again. The assumption is that the record has been successfully saved.
Attempt to close the form. As should be expected, the form closes with no warning message. However, this behaviour is different to that in Anomaly 4
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 is now empty, Text Box 2 is now empty, and the "Save Record" icon in the Form Navigation toolbar is greyed out. This verifies that the previous Save was successful.

To demonstrate ANOMALY 6 :-
Use the mouse to position the cursor pointer anywhere in Text Box 1 and left-click without doing anything else. As should be expected, the "Save Record" icon in the Form Navigation toolbar remains greyed out.
Attempt to close the form. As should be expected, the form closes with no warning message.
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 is still empty, Text Box 2 is still empty, and the "Save Record" icon in the Form Navigation toolbar is greyed out.
Use the mouse to position the cursor pointer anywhere in Text Box 2 and left-click without doing anything else. As should be expected, the "Save Record" icon in the Form Navigation toolbar remains greyed out.
Attempt to close the form. The form closes with no warning message. This is actually as should be expected, but is inconsistent with behaviour for Anomaly 1. 

To demonstrate ANOMALY 7 :-
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 is still empty, Text Box 2 is still empty, and the "Save Record" icon in the Form Navigation toolbar is greyed out.
Set the value in Text Box 1 to "2x". As should be expected, the "Save Record" icon in the Form Navigation toolbar becomes highlighted.
Clear the value in Text Box 1 again. Ideally, the "Save Record" icon in the Form Navigation toolbar should be greyed out again, but it actually remains highlighted.
Attempt to close the form. The form closes with no warning message, even though the "Save Record" icon was highlighted. This resembles the behaviour for Anomaly 2.

To demonstrate ANOMALY 8 :-
Re-open Form1, ensuring that the Form Navigation toolbar is visible. Text Box 1 is still empty, Text Box 2 is still empty, and the "Save Record" icon in the Form Navigation toolbar is greyed out.
Set the value in Text Box 2 to "3x". As should be expected, the "Save Record" icon in the Form Navigation toolbar becomes highlighted.
Clear the value in Text Box 2 again. Ideally, the "Save Record" icon in the Form Navigation toolbar should be greyed out again, but it actually remains highlighted.
Attempt to close the form. The form closes with no warning message, even though the "Save Record" icon was highlighted. This resembles the behaviour for Anomalies 2 and 7, but differs from the behaviour for Anomaly 3.

I haven't done extensive testing, but I believe that all field types apart from CLOB behave similarly to TEXT. I reported similar anomalies for fields of the equivalent LONGVARCHAR type when using an HSQL embedded database - see bug report #72205, which is marked as RESOLVED.
Comment 1 Julien Nabet 2019-12-07 15:51:52 UTC
I don't know if you'll create other bugtrackers but before doing it, take a look at https://wiki.documentfoundation.org/QA/BugReport.

It's quite a long page, 8 anomalies with 10 paragraphs. We expect 1 bugtracker for 1 bug. There are a lot of bugs declared so it'd be practical to read a far more short description with just minimal step by step process to reproduce the pb.
- action1
- action2
...
=> actual result

=> expected result
Comment 2 Alan Wheeler 2019-12-07 17:32:05 UTC
I understand what you're saying, but I suspect it's only one bug (or possibly two bugs in the same area) and I was trying to list the various symptoms.
Comment 3 Robert Großkopf 2019-12-08 14:03:01 UTC
Please add a database as attachment.
So other people could better have a look at this bug.

Then please describe in a short way one buggy behavior.
Comment 4 Alan Wheeler 2019-12-08 15:08:33 UTC
Created attachment 156411 [details]
ODB database to reproduce anomalies
Comment 5 Alan Wheeler 2019-12-08 15:12:18 UTC
1. Database attached to demonstrate anomalies.

2. Expected behaviour and actual behaviour for closing forms and saving form field values can be summarised as follows :-

If any field value has changed from when the form was first displayed or last saved, the "Save Record" icon on the Form Navigation toolbar should be highlighted and, if an attempt is made to close the form, a warning message should be displayed. I believe that this situation is always handled correctly.

However, If no field value has changed from when the form was first displayed or last saved (including any cases where a field value was selected but not changed, or was changed but then reverted to the initial value), the "Save Record" icon on the Form Navigation toolbar should be greyed out and, if an attempt is made to close the form, no warning message should be displayed. This is not always handled correctly, especially for fields of type CLOB.
Comment 6 Robert Großkopf 2019-12-08 17:55:23 UTC
I could confirm the following bug:
Open the form of the attachment.
Click in textbox 2, which contains the content of a CLOB-field (shouldn't be empty).
Nothing has been changed, save-button is greyed out but the message appears:
  "Do you want to save your changes?
  The content of the current form has been modified."

Expected behavior: Nothing has been changed, no message should appear.

Tested with LO 6.3.3.2 and also 6.4.0.0beta1 on OpenSUSE 15.1 64bit rpm Linux.
Comment 7 QA Administrators 2021-12-08 04:36:01 UTC Comment hidden (obsolete)
Comment 8 Alan Wheeler 2021-12-08 12:11:43 UTC
Still present on 08 Dec 2021

Version: 7.2.4.1 (x64) / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 4; OS: Windows 10.0 Build 22000; UI render: default; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: CL
Comment 9 QA Administrators 2023-12-09 03:14:38 UTC Comment hidden (obsolete)
Comment 10 Alan Wheeler 2023-12-09 17:07:54 UTC
Still present on 9 Dec 2023 with LibreOffice 7.6.4 on Windows 11

Version info copied from LibreOffice Help "About" :-
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 4; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

It is probably not significant, but the above info specifies Windows 10, whereas LibreOffice was actually installed and run on Windows 11 version 23H2 (OS Build 22631.2715), not Windows 10.