It's all about the answers!

Ask a question

Export query of work item with children links

Flavio Peralta (2337) | asked Sep 16 '16, 9:50 a.m.
 Hi everyone,

I'm trying to export the results of a query that shows information of about 2250 work items and includes the children link as column but the generated csv is truncated. I mean, i.e., the csv shows only 2057 rows and the last one has the information on the first half columns. If I run the query without the children links and export it, the csv is generated correctly. BTW I'm using RTC 4.0.6.

Does someone know if there is some configuration that can fix this?

Ralph Schoon commented Sep 16 '16, 10:42 a.m.

What client are you using? Web, Eclipse?

Please be aware that for some list type objects the CSV export uses cr+lf (line break), so that one table line of the CSV could be spread across multiple lines. So if you open them with a text editor you would get even more lines. So what kind of editor do u use to open the CSV file?

Just limit the query to one work item with several children to understand how the CSV would look like.

Flavio Peralta commented Sep 16 '16, 11:14 a.m. | edited Sep 16 '16, 11:16 a.m.

 Hi Ralph,

Both clients have the same issue. I open the CSV with Excel and Notepad ++. I'm aware of the line break but that's not the problem. The last lines looks like this:
"Requerimiento Gestión de la Demanda" "54992" "Summary 1" "Grupo G.Ambientes" "Pasaje a Producción" "Alta" "Aug 13, 2015 11:49 AM" "Aug 13, 2015 11:49 AM" "Jan 12, 2016 7:36 PM" "Mar 13, 2015 11:51 AM" "#54999"
"Requerimiento Gestión de la Demanda" "54993" "Summary 2" "Grupo G.Ambientes" "Pasaje a Producción" "Alta" "Aug 21, 2015 11:50 AM" "Aug 21, 2015 11:50 AM" "Dec 18, 2015 6:42 PM" "Mar 13, 2015 11:57 AM" "#55000"
"Requerimiento Gestión de la Demanda" "55279" "Summary 3" "G <-- HERE IT ENDS

Accepted answer

permanent link
Lily Wang (4.9k714) | answered Sep 19 '16, 12:43 a.m.
Per my experience, if there's any issue or mis-configuration with the child work items the export may fail.
You said "If I run the query without the children links and export it, the csv is generated correctly." From this operation, you can find out which work item is exported after workitem "55279".
Then build a query and test whether you can export workitem "55279" and the worktiem after it which child links successfully. If the exporting fails, you need to further check if any mis-configuration in the child work items.

Flavio Peralta selected this answer as the correct answer

Flavio Peralta commented Sep 20 '16, 8:29 a.m.

 Lily, thanks so much! You are right. The problem was on one work item after the last one exported (55279) that had a corrupted child link.

Your answer

Register or to post your answer.