Bug 157505 - Data > XML Source . Cannot import record level
Summary: Data > XML Source . Cannot import record level
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Data-XMLsource
  Show dependency treegraph
 
Reported: 2023-09-29 06:56 UTC by Hurri39
Modified: 2023-10-16 13:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Record selected, impossible to select cell to copy to (749.05 KB, image/png)
2023-09-29 06:56 UTC, Hurri39
Details
Field selected, you can choose cell to copy to (765.00 KB, image/png)
2023-09-29 06:57 UTC, Hurri39
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hurri39 2023-09-29 06:56:05 UTC
Created attachment 189880 [details]
Record selected, impossible to select cell to copy to

When trying to import an XML file in Calc, using menu "Data" -> "XML Source", we cannot select the entire record, only individual fields.
In earlier releases (I cannot tell in which one this was broken), we could select the record, then click on the cell where to copy data.

Selecting the record level does not allow to choose the cell where to copy data. 
Selecting a simple field allow to choose the cell, but of course only this field is copied.

See screenshots examples.
Comment 1 Hurri39 2023-09-29 06:57:00 UTC
Created attachment 189881 [details]
Field selected, you can choose cell to copy to
Comment 2 Xisco Faulí 2023-09-29 12:58:04 UTC
I checked with 

Version: 5.0.5.2
Build ID: 55b006a02d247b5f7215fc6ea0fde844b30035b3
Locale: de-DE (es_ES.UTF-8)

and the behaviour is the same as in LibreOffice 7.6.0.3

Could you please explain in which version it was different ?
Comment 3 Hurri39 2023-10-02 05:43:24 UTC
(In reply to Xisco Faulí from comment #2)
> I checked with 
> 
> Version: 5.0.5.2
> Build ID: 55b006a02d247b5f7215fc6ea0fde844b30035b3
> Locale: de-DE (es_ES.UTF-8)
> 
> and the behaviour is the same as in LibreOffice 7.6.0.3
> 
> Could you please explain in which version it was different ?

I tried version 7.5 (older one I can download) without success.
Perhaps it was also broken in 5.0.5, I remember such a regression in the past.

But as I see in another bug report (https://bugs.documentfoundation.org/show_bug.cgi?id=146221), it seems it was working in 7.4 (with a bug on Windows version). You were able to click on a record node.
Comment 4 QA Administrators 2023-10-03 03:16:56 UTC Comment hidden (obsolete)
Comment 5 Stéphane Guillou (stragu) 2023-10-13 16:34:13 UTC
It looks like you won't be able to map a non-recurring element (symbol </>) to as cell if it has nested elements.
I is the same since the feature was introduced in LO 4.0.

Version 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89)

Relevant docs:
- https://help.libreoffice.org/latest/en-US/text/scalc/01/xml_source.html
- https://wiki.documentfoundation.org/Development/Calc/XMLSource

From the wiki page, note this:

"Not all elements or attributes can be mapped to document. If an element or an attribute cannot be mapped, selecting it in the tree will leave the mapped cell reference box grayed. It would be nice to display the reason in the dialog."

CCing Kohei in, but as far as I can tell, this is not a regression and "not a bug" but could be turned into an enhancement request to explain why the element can't be mapped.

What do you think, Hurri39?
Comment 6 Hurri39 2023-10-16 08:47:31 UTC
(In reply to Stéphane Guillou (stragu) from comment #5)
> It looks like you won't be able to map a non-recurring element (symbol </>)
> to as cell if it has nested elements.
> I is the same since the feature was introduced in LO 4.0.
> 
> Version 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89)
> 
> Relevant docs:
> - https://help.libreoffice.org/latest/en-US/text/scalc/01/xml_source.html
> - https://wiki.documentfoundation.org/Development/Calc/XMLSource
> 
> From the wiki page, note this:
> 
> "Not all elements or attributes can be mapped to document. If an element or
> an attribute cannot be mapped, selecting it in the tree will leave the
> mapped cell reference box grayed. It would be nice to display the reason in
> the dialog."
> 
> CCing Kohei in, but as far as I can tell, this is not a regression and "not
> a bug" but could be turned into an enhancement request to explain why the
> element can't be mapped.
> 
> What do you think, Hurri39?

Hi,

Just restarted my old Macbook Pro and tried with 6.3.3.2 (MacOSX 10.13.6) 
And it works, with the same file. 
And it has been working for years, we use this menu option to import specific files once a year. 
So it's a regression.
Comment 7 Hurri39 2023-10-16 12:49:04 UTC
I don't know which setting did change (LO, MacOSX ?), but I was going to make screenshots of 2 versions, 6.3.3.2 and 7.6.0.3 to show differences, and ... My 7.6.0.3 now works. :-/
I searched with disabling Skia, and software rendering, as I know I did some changes in these settings, because of an identified and (nightly) fixed bug. Without success. 
The bug is not there any more, so I think you can close this report.
Comment 8 Stéphane Guillou (stragu) 2023-10-16 13:03:46 UTC
Ok, let's mark as "works for me" then, but if the issue pops up again, please attach an example XML file and let us know which element exactly is the problematic.
Thank you!