CSV export does not consider full hierarchy of categories

Bug #628842 reported by tlnd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Financisto
Fix Released
Medium
tlnd

Bug Description

In case of hierarchical categories, only the actual category and its parent are exported, instead of the full hierarchy of the categories. Consider an entry with a multi-level category like expenses/car/gas. The CSV export has a filed for 'category' and one for 'parent'. In this example the following values are exported: category=gas, parent=car. The information that 'car' is a subcategory of 'expenses' is lost.

In my opinion, there should only be one field that reflects the full hierarchy, like category=expense:car:gas. I think, the notation with colons as separator for subcategories or accounts is common in the field of financial software. And in case of a flat hierarchy there wouldn't be any colons to confuse anyone.

However, the current structure of the exported CSV file changes when discarding the parent field. To avoid this, I'd suggest the following compromise: Export the actual category in the field category but consider the hierarchy of the categories in the parent field. Thus the upper examples results in: category=gas, parent=expenses:car. This does not affect people who don't use hierarchical categories, but those who do can extract the full information from the exported data.

Would it be OK to change the structure of the CSV file or should it be preserved. I'd appreciate any comments on this and would do the coding.

Related branches

Revision history for this message
Denis Solonenko (denis-solonenko) wrote :

Great catch! I suggest to follow your proposal to put full category path into 'parent' and the leaf into 'category'.

Changed in financisto:
assignee: nobody → tlnd (tlnd)
importance: Undecided → Medium
status: New → Confirmed
tlnd (tlnd)
Changed in financisto:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.