Issue 30734

Summary: Query design should quote fieldnames as necessary
Product: Internationalization Reporter: njeisecke <njeisecke>
Component: uiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P4 CC: issues
Version: OOo 1.1.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description njeisecke 2004-06-25 19:55:03 UTC
Some LDAP field names in the german locale contain a dot (Telefon gesch.).
This stops any query from working.
Comment 1 jack.warchold 2004-08-13 12:49:37 UTC
reassigend to msc

can you please take a look on this issue?
Comment 2 christoph.lukasiak 2004-09-14 10:53:13 UTC
clu->njeisecke: if you quote your query (") everything should be fine

clu->fs: i think, we should not use '.'
Comment 3 christoph.lukasiak 2004-09-14 10:54:05 UTC
lower prio
Comment 4 christoph.lukasiak 2004-09-14 10:54:31 UTC
changed to new
Comment 5 Frank Schönheit 2004-09-14 11:03:41 UTC
The alternative to using the . is to fully write down the shortened words, which
would get way too long in some cases. Simply omitting the . would not pass any
linguistic review ...

Thus, and 'cause there's a workaround (quote the column names, as suggested by
clu), we won't change the current situation.
Comment 6 njeisecke 2004-09-16 20:44:32 UTC
Queries composed using drag and drop won't work unless edited manually. 
If quoting will allow using the dot in alias names, the drag and drop operation
should add the quotes automatically.

IMHO localized field names for LDAP queries should not be used at all, queries
won't be portable between different localized OpenOffice versions. Why not
simply use aliases ("o as City" / "o" as "Ort")?
Comment 7 Frank Schönheit 2004-09-17 09:04:02 UTC
> Queries composed using drag and drop won't work unless edited manually

which is a new information and may change the situation.
How exactly do you "compose queries by using drag and drop"?

(Did you ever read
http://qa.openoffice.org/issue_handling/basic_rules.html#reproducibility? :)
Comment 8 njeisecke 2004-09-17 11:01:19 UTC
Sorry for being so blurry.
Please use a german OpenOffice version. 

Select an LDAP Source and create a new query in Design Mode.
Add the LDAP Table. Drag field like "Name", "Nachname" to the query editor. Drag "Telefon (gesch.)" to 
the editor. Execute the Query. "Telefon (gesch.") is missing in the result. Switch from "Design View" to 
"Editor View". You'll see that the column name for "Telefon (gesch.)" is corrupted now. Correct the 
column name using quotes and execute the query again. Fine, it works. Now switch back to "Design 
View" and back again to "Edit View". Quotes gone, column name corrupted again.

The design view should add quotes to the composed query if necessary.

Further improvement: To maintain portability between different localized OpenOffice versions (e.g. 
english vs. german) LDAP attribute names should be used and localized field names as aliases only. 
Example:

SELECT phonenumber as "Telefon (gesch.)" FROM "LDAP Directory" . 
Comment 9 Frank Schönheit 2004-09-17 17:18:15 UTC
Okay, thanks for the clarification. Adjusting summary according to your
description, assigning, targeting.

The second part you suggest - use the localized names as aliases only - is much
more difficult to achieve, as the query design does not know much about the
underlying database. In particular, it does not remotely know about an LDAP
address data source, which would require such special handling as suggested by
you. However, don't let this hinder you submitting an enhancement request (but
please in a separate issue:
http://qa.openoffice.org/issue_handling/basic_rules.html#one_per_issue).

Thanks.