Bug Hunting Session
Bug 121652 - Option buttons in forms do not show current value if it is boolean
Summary: Option buttons in forms do not show current value if it is boolean
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.3.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Forms
  Show dependency treegraph
 
Reported: 2018-11-23 08:08 UTC by Evgeny Kuznetsov
Modified: 2019-12-04 04:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample base with a form illustrating the unexpected behaviour (12.15 KB, application/vnd.oasis.opendocument.database)
2018-11-23 08:08 UTC, Evgeny Kuznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeny Kuznetsov 2018-11-23 08:08:43 UTC
Created attachment 146936 [details]
Sample base with a form illustrating the unexpected behaviour

A group of option buttons can be used in a form to select a value from a predefined set. If the underlying field is VARCHAR, INTEGER or any other type, the option buttons reflect the current data available in the record and can be used to modify that data. If, however, the underlying field is BOOLEAN, the option buttons remain empty (or reflect a default value) but still can be used to modify data.

Observed on LibreOffice 6.1.3.2 running on Debian 9 (package version 6.1.3-1~bpo9+2).

Steps to reproduce:
1. Create a table with BOOLEAN field.
2. Create a form based on that table.
3. Add a group to the form while having Element Wizards option on.
 3a. On first step of the wizard add exactly two options to the group.
 3b. On second step of the wizard select "No" (second option) for defaults.
 3c. On third step assign 0 (or FALSE) to one option, 1 (or TRUE) to the other option.
 3d. On last step of the wizard select the BOOLEAN field in the table to save your data to.
4. Populate the table with data.
5. Open the form and use [Ctrl+Alt+left] and [Ctrl+Alt+Right] (or corresponding buttons) to scroll through the record. Observe condition of the option buttons.

Expected behavour:
If data exists, option buttons show the corresponding option.

Actual behaviour:
Option buttons remain empty even if data exists.

The attached sample file has a table with BOOLEAN, VARCHAR and INTEGER fields as well as a form with corresponding controls (created using Form Wizard). Option button groups are created for each field using the procedure described on step 3 above. Table has 4 records with data. The form can be used to scroll through existing records demonstrating option buttons behaviour for the three fields: VARCHAR and INTEGER behave as expected, BOOLEAN behaviour is faulty.
Comment 1 Evgeny Kuznetsov 2018-11-23 08:19:19 UTC
Reproduced on Windows Vista 32bit using LibreOffice 5.3.7.2.
Comment 2 Robert Großkopf 2018-11-23 18:19:15 UTC
Seems this is the reason:
-----
3c. On third step assign 0 (or FALSE) to one option, 1 (or TRUE) to the other option.
-----
Isn't the same for the field. If you set it to 'true' (lower cased) and 'false' (also lower cased) it will work right.

The checkbox for boolean field works the same way. If you set the values here to 1 and 0 it won't show 'true' content.

Don't know why it isn't implemented, because it works well in queries. But the values shown by the queries in Tools > SQL will show with
SELECT * FROM "demo" where "boolean" = 1
Output: 
0,true,1,1,
2,true,0,1,

I will confirm the bug, but it will work right with the value queries return for the boolean fields.
Comment 3 Evgeny Kuznetsov 2018-11-23 19:16:51 UTC
> Isn't the same for the field. If you set it to 'true' (lower cased) and
> 'false' (also lower cased) it will work right.

That's right, it will. Which makes this bugreport more about behaviour inconsistency than anything (perhaps the description should be updated).

What I mean is:

- if TRUE/FALSE or 1/0 is incorrect representation for boolean values (in LibreOffice Base's conventions) then these radiobuttons should not set the values correctly and produce error instead or just fail silently;
- if TRUE/FALSE or 1/0 is considered correct representation of boolean values (as well as true/false) then these cases should be handled properly and the radiobuttons should work as expected.
Comment 4 QA Administrators 2019-12-04 04:21:18 UTC
Dear Evgeny Kuznetsov,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug