Excel roundtrip fails to restore document attributes
- create a "new" document
- edit .doorstop.yml and add default doc attributes
- 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
- Export the above document to spreadsheet, make changes
- Import spreadsheet
- 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: []
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
- create a "new" document
- edit .doorstop.yml and add default doc attributes
- 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
- Export the above document to spreadsheet, make changes
- Import spreadsheet
- 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: @.***>
Thanks for picking it back up!
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: @.***>