Bug 105171 - Anomaly in Date fields in dialogues
Summary: Anomaly in Date fields in dialogues
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: BASIC-Dialog-Designer
  Show dependency treegraph
 
Reported: 2017-01-07 12:20 UTC by Peter Toye
Modified: 2023-06-26 17:35 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Document showing the bug (11.68 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-01-07 12:20 UTC, Peter Toye
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Toye 2017-01-07 12:20:11 UTC
Created attachment 130236 [details]
Document showing the bug

There appears to be an anomaly in the way that Date fields in dialogues are changed and displayed. Date fields can be changed in three ways (at least):

1) by typing a date into the field
2) by changing the Date property by program
3) by changing the Text property by program 

However, they give different results. (1) update both the Date and Text properties, (2) updates only the Date property and (3) updates only the Text property. The attached document shows this.

If date fields are to follow the model/view paradigm there should be only one underlying data item: the (abstract) date, which can be viewed either as text or as a (uno) Date.

There are two obvious workarounds: either change both properties by program, or only read the property that was updated.
Comment 1 Peter Toye 2017-01-09 11:15:09 UTC
I should have added - even if it's not accepted as a program bug, the documentation should mention it.
Comment 2 Buovjaga 2017-01-13 18:35:18 UTC
(In reply to Peter Toye from comment #0)
> Created attachment 130236 [details]
> Document showing the bug

Ok, what should we do with the document?

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 3 Peter Toye 2017-01-14 10:08:37 UTC
Sorry, I thought I'd put the instructions in. Finger trouble.

Run the Standard|Module1|Main macro. You get a dialogue box with 3 date fields.  From top to bottom:

Date 1: This was initialised in the IDE and the Date field changed by the macro.

Date 2: This was initialised in the IDE and the Text field changed by the macro.

Date 3: This was not initialised in the IDE and should be set by the user to any valid date.

When the "OK" button is pressed three msgboxes are displayed showing the values of the initialised Date field, the final Date field and the final Text field. You will see that the last two values are not always the same, in the way that I indicated in my initial message.
Comment 4 Buovjaga 2017-01-14 14:43:31 UTC
I got these:

Date1 originally 14/5/2016 set to 15/4/2017 read as Date field: 15/4/2017 , text: 

Date2 originally 21/7/2018 set to 16/5/18 read as Date field: 21/7/2018 , text: 16/5/18

Date3 originally 0/0/0 read as Date field: 14/1/2017 , text: 14.01.17

Seems to match the desc, so setting to NEW.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 57779b5f3a49fedd952aed70ddcce22f48b98ea5
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on January 13th 2016
Comment 5 QA Administrators 2018-05-31 02:52:15 UTC Comment hidden (obsolete)
Comment 6 Peter Toye 2018-06-15 10:36:12 UTC
Bug is still present.

LO "about":

Version: 6.0.4.2 (x64)
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Locale: en-GB (en_GB); Calc: group

I'm afraid I haven't tried the regression text as I don't want the hassle of uninstalling and reinstalling. Have you a machine set up with LO3.3 that you can test on? It only takes a minute to run the macro (if that).
Comment 7 QA Administrators 2019-06-16 02:58:08 UTC Comment hidden (obsolete)
Comment 8 Peter Toye 2019-06-16 12:34:55 UTC
Bug still here.
Version: 6.1.6.3 (x64)
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 4; OS: Windows 6.1; UI render: GL; 
Locale: en-GB (en_GB); Calc: group threaded
Comment 9 QA Administrators 2021-06-16 03:55:40 UTC Comment hidden (obsolete)
Comment 10 Peter Toye 2021-06-16 11:07:30 UTC
Still there.

Version: 7.1.4.2 (x64) / LibreOffice Community
Build ID: a529a4fab45b75fefc5b6226684193eb000654f6
CPU threads: 12; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded
Comment 11 QA Administrators 2023-06-17 03:15:13 UTC Comment hidden (obsolete)
Comment 12 Peter Toye 2023-06-26 17:35:19 UTC
Bug still there.

Version 7.4.7.2 (x64)