doorstop icon indicating copy to clipboard operation
doorstop copied to clipboard

Excel roundtrip fails to restore document attributes

Open sarnold opened this issue 8 months ago • 3 comments

  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: []

sarnold avatar Apr 29 '25 21:04 sarnold

I've got a half finished draft of this functionality, thanks for reminding me to finish it!

On Tue, 29 Apr 2025 at 22:36, Steve Arnold @.***> wrote:

sarnold created an issue (doorstop-dev/doorstop#702) https://github.com/doorstop-dev/doorstop/issues/702

  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: []

This makes things really painful to export/import with a large number of items.

— Reply to this email directly, view it on GitHub https://github.com/doorstop-dev/doorstop/issues/702, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB4O4FGANET62SGAX5PVUD237WHBAVCNFSM6AAAAAB4ECOAUSVHI2DSMVQWIX3LMV43ASLTON2WKOZTGAZDSNJZGEYTAMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

robtaylor avatar Apr 30 '25 16:04 robtaylor

Thanks for picking it back up!

sarnold avatar May 01 '25 21:05 sarnold

If I don't get round to this for a while, and you want to dig in - https://github.com/doorstop-dev/doorstop/pull/682

On Thu, 1 May 2025 at 22:08, Steve Arnold @.***> wrote:

sarnold left a comment (doorstop-dev/doorstop#702) https://github.com/doorstop-dev/doorstop/issues/702#issuecomment-2845781750

Thanks for picking it back up!

— Reply to this email directly, view it on GitHub https://github.com/doorstop-dev/doorstop/issues/702#issuecomment-2845781750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB4O4APA54765XGXQIVNJD24KENTAVCNFSM6AAAAAB4ECOAUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNBVG44DCNZVGA . You are receiving this because you commented.Message ID: @.***>

robtaylor avatar May 01 '25 21:05 robtaylor