doorstop-dev / doorstop

Requirements management using version control.
https://doorstop.readthedocs.io
Other
465 stars 126 forks source link

Reverse import from md to document #640

Open villanella opened 6 months ago

villanella commented 6 months ago

Hello! Because our team loves markdown and uses it in all the integrations, I'll be very happy with reverse import feature)

Use case

  1. Analyst publishes document with requirements to one markdown file: doorstop publish REQ REQ.md and commits/merges it into developer's branch.
  2. Lead Developer/Architect/Another analyst reviews and corrects REQ.md.
  3. Analyst makes reverse import doorstop import REQ.md REQ
  4. All changed items are updated in REQ, removed items are removed, new items are added with uid and level defined by markdown, and default values for other attributes. No necessary to import links, but it's important to keep the existing links while importing (import links is also good solution).

Example of exported (by doorstop publish) markdown to reverse import:

# 3.0 Functional requirements <small>REQ-000</small> {#REQ-001 }

The existing requirement with link and header.

*Parent links: UC-001*

## 3.1 REQ-001 {#REQ-001 }

The existing requirement without header.

## 3.2 New requirement <small>REQ-002</small> {#REQ-002 }

New requirement with level and header.

Result:

REQ-000:
  active: true
  derived: false
  header: |
    Functional requirements
  level: 3.0
  links: 
   - UC-001
  normative: true
  ref: ''
  reviewed: l0ocFFatmW8By7f3R7FV6QXELXY-HHzEjs5MsbARlas=
  text: |
    The existing requirement with link and header.

REQ-001:
  active: true
  derived: false
  header: ''
  level: 3.1
  links: |
   The existing requirement without header.

REQ-002:
  active: true
  derived: false
  header: |
    New requirement
  level: 3.2
  links: []
  normative: true
  ref: ''
  reviewed: null
  text: |
   New requirement with level and header.