Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: DanG83616 on May 22, 2008, 09:08:15 am

Title: CSV Export/Import
Post by: DanG83616 on May 22, 2008, 09:08:15 am
"Preserve Hierarchy" does not preserve packageA\packageB\element where pacakgeA is the exported package. Neither does it preserve elementA\elementB\elementC. This may be specific to Requirement type elements.

The export appears to work because CSV_KEY and CSV_PARENT_KEY are present. However, the ensuing import results in packageA\elementA\elementB and elementC ends up under packageA.

Dang
Title: Re: CSV Export/Import
Post by: mrf on May 22, 2008, 09:14:19 am
Hi Dang,

I have tried to replicate this behaviour, but without success, it works as intended for me.

Can you please raise a bug for this, marked for my attention, and attach a sample model file.
Title: Re: CSV Export/Import
Post by: DanG83616 on May 22, 2008, 09:40:38 am
I'm busy recovering my model at the moment but I left out a big detail. Between export and import, I modified Phase and Status fields in the CSV file. Unchanged elements stayed put in the hierarchy but the changed ones moved.
Title: Re: CSV Export/Import
Post by: mrf on May 22, 2008, 09:50:24 am
I tried again, this time modifying both phase and status fields, however the hierachy remains unchanged as it did before.

Some more information is needed, such as:

1. Have you included GUID in your specification?
2. Are you importing over the top of your existing model, or importing into a new project?
3. Have you touched the CSV_KEY CSV_PARENT_KEY fields at all? (These fields determine which element the current element is placed under)

A sample model with some detailed instructions on how to replicate this issue would be ideal in trying to troubleshoot the problem.
Title: Re: CSV Export/Import
Post by: DanG83616 on May 22, 2008, 11:08:26 am
[size=14]This was my fault.[/size]
I thought I was being careful by deleting elements from the exported CSV file that I didn't want to change (another big detail I neglected to mention).

User Goal: Update Phase and Status on a whole bunch of requirements
1. Export CSV (including GUID, name, notes, phase and status) preserving hierarchy
2. Open in MS Excel
3. Update Phase and Status fields
4. Delete elements not intending to change (spreadsheet rows)
4.a. Packages
4.b. Requirements that didn't need updating
5. Delete the Name and Notes columns (because I didn't want to risk changing the names or notes)
6. Save to CSV (not .xls)
7. Import to EA

Outcome: Child elements whose parent had been deleted didn't go back into those parents (should have expected this!).

Because I deleted the packages the CSV_KEYs for them were gone. Coresponding child element CSV_PARENT_KEYs had no match so EA moved them to the top level. Very reasonable.
Title: Re: CSV Export/Import
Post by: mrf on May 22, 2008, 11:17:43 am
No worries, that makes a lot more sense. Preserve Hierachy is only effective if you are importing the whole hierachy.

In your case (where you are only reimporting things that have changed) you _should_ be able to uncheck Preserve Hierachy when you import and just let EA match CSV entries to elements with the corresponding GUID (emphasis on should as I haven't tested this yet myself).