Skip to content

Excel roundtrip fails to restore document attributes #702

@sarnold

Description

@sarnold
  1. create a "new" document
  2. edit .doorstop.yml and add default doc attributes
  3. add document items, each one gets defaults

example:

settings:
  digits: 3
  itemformat: yaml
  prefix: YYY
  sep: ''
attributes:
  defaults:
    doc:
      name: Requirements
      title: Requirements for _XXXXXX_
      ref: ''
      by: XXX
      major: '1'
      minor: A
      copyright: Company A

To reproduce

  1. Export the above document to spreadsheet, make changes
  2. Import spreadsheet
  3. document attributes are restored as a single JSON string

Expected Result

only changed items are restored
doc attributes are not changed and are restored as attributes

Actual Result

all reqs items are changed
doc attributes are restored as a single JSON string for all existing reqs items

example:

 active: true
 derived: false
-doc:
-  by: XXX
-  copyright: Company A
-  major: '1'
-  minor: A
-  name: Requirements
-  ref: ''
-  title: Requirements for _XXXXXX_
+doc: |
+  {'by': 'XXX', 'copyright': 'Company A', 'major': '1', 'minor': 'A', 'name': 'Requirements', 'ref': '', 'title': 'Requirements for _XXXXXX_'}
 header: ''
 level: 1.1
 links: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions