Bug 113884 - Add Fields sometimes wrong when based on * query of underlying query with Alias field name
Summary: Add Fields sometimes wrong when based on * query of underlying query with Ali...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.3.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-16 17:26 UTC by Howard Johnson
Modified: 2019-06-13 03:02 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Add Fields not working when Report based on a select all query from an Alias (8.15 KB, application/zip)
2017-11-16 17:26 UTC, Howard Johnson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Howard Johnson 2017-11-16 17:26:42 UTC
Created attachment 137814 [details]
Add Fields not working when Report based on a select all query from an Alias

Report editor does not always correctly find list of field names when Data Content is a query using "*" (select all fields) and based on an underlying query which declares a field name alias.

1) Open the attached demonstration data base,

2) Open Report then Edit 'A report',

3) Open Add Field,

Bug: Notice that the available fields are: ID and Txt.

Expected them to be: ID and Txt-Alias.

(The Data Content of 'A report' is Query_Query_Table1.  Query_Query_Table1 is just a "*" select of Query_Table1.)

If you edit this report and change the Data Content to Query_Table1, then Add Field correctly shows the available fields as: ID and Txt-Alias.

Workaround: If you Copy Query_Query_Table1 to Query_Query_Table2, then Edit the report, and change the Data Content to Query_Query_Table2, then Add Field correctly shows the list of fields as ID and Txt-Alias.
Comment 1 Robert Großkopf 2017-11-16 20:16:59 UTC
Have tested this one with
Version: 5.4.3.1
Build-ID: 32c8895c6cae21571f364dbb059f419a743ee44d
CPU-Threads: 4; Betriebssystem:Linux 4.4; UI-Render: Standard; VCL: kde4; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
on OpenSUSE 42.2 64bit rpm Linux.

Data is connected to "Query_Query_Table1".
Opened "Add Field" and could add "Txt-Alias". "Txt" isn't available here. So I can't confirm the buggy behavior.

Which system and which Build of LO do you use?
Comment 2 Howard Johnson 2017-11-17 17:59:04 UTC
:-) I love bugs. So I tested again and could NOT make it fail this time (LO v5.3.3.2/Debian linux 9.2 x64/Cinnamon 3.2.7), ... but not giving up I also installed v5.4 and re-tested, same result: could not make it fail, (and same on v5.2).

......Then I tinkered w/ it some more:  Edited Query_Table1 and re-named the Alias to Txt-Alias2, then Edit 'A Report', and now it fails.

After tinker a bit more the bug is still there.  Here is a full procedure of steps to re-produce it from scratch on 5.4.  If you can confirm this, I'll submit this as a brand new, clean verifiable bug report and we can close this one.  The following procedure shows this in Editing Forms, so it is in both Forms and Reports.  It does seem to involve the order in which things are done.

--- In short ------------------------------------

0) Open LO 5.4
1) Create a new database
2) Create a table
3) Create 2 queries, the 2nd  one based on the first one
4) Create a new form
5) Edit 2nd query to add an Alias name
6) Edit Form 1 again; change Content to Query2; Add Field -> bug

--- In detail -----------------------------------
0) Open LO Base 5.4

1) Create a new database: HSQLDB; Finish; Name it 'Query bug'

2) Create table in design view
  Field name ID, Int, Primary key, Autovalue Yes
  Field name Txt, Text [Varchar]
Close and save as 'Table1'

3a) Create a query in design view
Tables: Table1; Add; Close
Double click ID
Double click Txt
Close; Save as Query1; Ok

3b) Create query in design view
Queries, Query1; Add; Close
Double click: *
Close; Save as Query2; Ok

4) Create form in design view
Form navigator
Right click on Forms; New: Form
Right click on Form; Properties
Content type: Query
Content: Query 1
Add field
Shows ID, Txt
Close form and save as Form1

5) Edit Query1
Enter 'Txt-Alias' for Txt Alias
Close; Save the changes

6) Edit Form1
Right click on Form; Properties
Change Content to Query2
Click Add Field
Shows: ID, Txt

BUG: Expected it to show: ID, Txt-Alias.

-----------------------


Thanks Robert.
Comment 3 Buovjaga 2017-11-17 18:23:13 UTC
Thank you for the detailed steps. I don't think there is a need to open a new report as there are so few comments.

I went through the steps and at 6) I looked in Filter and Sort and in the Field name dropdowns I did see Txt-Alias. So I cannot reproduce. I even tried renaming it to Txt-Alias2 afterwards, but it updated fine.

Arch Linux 64-bit
Version: 6.0.0.0.alpha1+
Build ID: 121303615054568c204def97872343d2014af4a0
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 17th 2017
Comment 4 Howard Johnson 2017-11-18 06:32:35 UTC
I'll be darned.  Well, something is wrong, but I just don't know what.  I'll study it again tomorrow.  Thank you again.  

Someday tell me how I also get on the list to see the new incoming bug reports, like you seem to do.  I looked for that option but did not find it so far.
Comment 5 Robert Großkopf 2017-11-18 10:54:34 UTC
Have tested again with the detail-description. Couldn't confirm the buggy behavior with LO 5.4.3.1 on OpenSUSE 42.2.
Comment 6 Robert Großkopf 2017-11-18 10:59:33 UTC
(In reply to Howard Johnson from comment #4)
> 
> Someday tell me how I also get on the list to see the new incoming bug
> reports, like you seem to do.  I looked for that option but did not find it
> so far.

Hi Howard,

I only have a look at https://bugs.documentfoundation.org/buglist.cgi?chfieldfrom=24h every day.
Seems there is something wrong with sending mails from bugzilla to the addresses in CC-List (or special to my address). Doesn't work since some days. Last mail I got was 13-11-2017.
Comment 7 Buovjaga 2017-11-18 13:14:49 UTC
Robert: you might have a problem with your own email inbox (spam filter?) as I have not had any trouble getting BZ mail.

(In reply to Howard Johnson from comment #4)
> Someday tell me how I also get on the list to see the new incoming bug
> reports, like you seem to do.  I looked for that option but did not find it
> so far.

You can use this search query to see unconfirmed ones: https://bugs.documentfoundation.org/buglist.cgi?bug_status=UNCONFIRMED&product=LibreOffice

By clicking either ID or Changed, you have the ability to sort by the bug number or the date when it was last changed or commented on.

The query leaves out some other products, such as LibreOffice Online. You can see all the products here: https://bugs.documentfoundation.org/query.cgi?format=advanced

Personally, I use a custom query with these filters:
Keywords: (contains none of the words) needsUXEval
Status: UNCONFIRMED
Product: LibreOffice
Commenter: (does not contain the string) my own email here
Component: (is not equal to) Android Viewer
Comment 8 Howard Johnson 2017-11-18 16:43:35 UTC
re seeing new unconfirmed bugs: I'll check it out.  Thanks!

re this bug: I can't yet reliably demonstrate it, but I did see it twice again this am while testing for it, that was twice out of about 50 tests, where the other 48 times it worked correctly.  

At some point I'll figure it out.  Might have something to do with the order certain associated dialogs are opened or closed in.  Seems to not be there if I change the alias name, save db and re-open base.

Thanks for all of your time on it.  I'll try to come up with a more reliable demonstration of it if I can.
Comment 9 Alex Thurgood 2018-03-21 13:21:04 UTC
No repro with

Version: 6.1.0.0.alpha0+
Build ID: 234d0368c823eb1a74e973e051ac522e6b86e833
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group


The correct alias name always shows up in the list of possible fields to add.
Comment 10 Xisco Faulí 2018-05-08 10:07:22 UTC
Dear Howard,
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 11 QA Administrators 2018-11-05 16:07:52 UTC Comment hidden (obsolete)
Comment 12 Howard Johnson 2018-11-05 18:28:25 UTC
re:

"Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. ..."


Base reports is so full of bugs and lacks so many needed features, that I don't even use it anymore.  Instead I've switched to using JasperReports.

HOWEVER, I do hope in the future to be able to work on it and am slowly learning the stuff I need to be able to do that.

As far as I can tell there is no one, or almost no one, working on base.  So the bugs just hang there for years!  

So I would say lighten up.  It's so easy for you to just say that nothing is happening.

I think better to just leave these bug reports in place for now, and for years if necessary, until someone has the time and skills to work on this.

Mahalo.
Comment 13 Xisco Faulí 2018-11-12 15:07:18 UTC
> As far as I can tell there is no one, or almost no one, working on base.  So
> the bugs just hang there for years! 

Really? You think no one is working on base?
Lionel is working on it ( https://cgit.freedesktop.org/libreoffice/core/log/?qt=author&q=lionel ) as well as Tamas ( https://cgit.freedesktop.org/libreoffice/core/log/?qt=author&q=Tamas+Bunth )
Comment 14 Howard Johnson 2018-11-13 18:05:41 UTC
(In reply to Xisco Faulí from comment #13)
> > As far as I can tell there is no one, or almost no one, working on base.  So
> > the bugs just hang there for years! 
> 
> Really? You think no one is working on base?
> Lionel is working on it (
> https://cgit.freedesktop.org/libreoffice/core/log/?qt=author&q=lionel ) as
> well as Tamas (
> https://cgit.freedesktop.org/libreoffice/core/log/?qt=author&q=Tamas+Bunth )

Xisco, In the 6.0 release notes there was no base work done. 

    https://wiki.documentfoundation.org/ReleaseNotes/6.0#Base


In the 6.1 notes it seems that most of the work was about the transition to firebird.  

    https://wiki.documentfoundation.org/ReleaseNotes/6.1#Base


So still, I think we are a long, long way from fixing the many bugs in base that I and others have reported here.  

In fact I suspect that this transition to firebird will create many new bugs and problems and will break many working databases.

So I think my point stands that these bugs reported here are not being worked on.

Personally, I am struggling to learn C++ better, but it's a steep hill for me.  

I am also disheartened at the serious lack of comments in the LO c++ code to help those unfamiliar with it, ... as called for even by no less than Bjorne Stroustroup in his book on C++ where he makes specific recommendations as to commenting guidelines.  

One of the first things I think we need to work on, and I mean *I want to work on*, is to simply read the code and add enough comments so that others don't have to fully read the code to see what is going on.  .. in an effort to speed the ability to understand the code.

Thanks for your thoughts.
Comment 15 Robert Großkopf 2018-11-13 19:04:36 UTC
(In reply to Howard Johnson from comment #14)

> So I think my point stands that these bugs reported here are not being
> worked on.

This bug isn't confirmed, because nobody has been able to reproduce the buggy behaviour. And a bug, which isn't confirmed, couldn't be fixed.

But: Many Base-bugs are there hanging around and nothing happens. There are 78 Base-bugs reported by me, all set to New, but nobody knows enough of bug fixing and has time enough and to solve this bugs. Solving of bugs in Base is too slow (there have been fixed bugs also!) so the number of bugs are expanding much. When I begun with QA, submitted my fist Base-bugs, the counter for Base-bugs was at 200 bugs. If I 'm looking now for Base-bugs it is at 500 bugs.
Comment 16 QA Administrators 2019-05-13 08:36:47 UTC Comment hidden (obsolete)
Comment 17 QA Administrators 2019-06-13 03:01:58 UTC
Dear Howard Johnson,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp