requirement convert template added
This commit is contained in:
parent
d24a1280fc
commit
d02aec9aa4
36
templates/py/requirement_specification.py
Normal file
36
templates/py/requirement_specification.py
Normal file
@ -0,0 +1,36 @@
|
||||
def specification(req_spec):
|
||||
req_spec.title({{ data.titel|tojson }})
|
||||
{% set sec = namespace(cnt = 1) %}
|
||||
{%- for uid in data.uid_list_sorted %}
|
||||
{%- with item=data.item_dict[uid] %}
|
||||
{%- if item.system_type_uid == '_4-K5EHYYEem_kd-7nxt1sg' %}
|
||||
#
|
||||
# Section
|
||||
#
|
||||
sec_uuid = req_spec.add(
|
||||
itemtype="SEC",
|
||||
id={{ sec.cnt }},
|
||||
{%- set sec.cnt = sec.cnt + 1 %}
|
||||
heading={{ item.Heading|tojson }},
|
||||
)
|
||||
{%- elif item.system_type_uid == '_MR7eNHYYEem_kd-7nxt1sg' %}
|
||||
|
||||
# Requirement
|
||||
req_spec.add(
|
||||
parent=sec_uuid,
|
||||
itemtype="REQ",
|
||||
id={{ item.ID[4:]}},
|
||||
heading={{ item.Heading|tojson }},
|
||||
{%- if 'Description' in item and item.Description != '' %}
|
||||
description={{ item.Description|tojson }},
|
||||
{%- if 'ReasonForImplementation' in item and item.ReasonForImplementation != '' %}
|
||||
reason={{ item.ReasonForImplementation|tojson }},
|
||||
{%- endif %}
|
||||
{%- if 'Fitcriterion' in item and item.Fitcriterion != '' %}
|
||||
fitcriterion={{ item.Fitcriterion|tojson }},
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
)
|
||||
{%- endif %}
|
||||
{%- endwith %}
|
||||
{%- endfor %}
|
Loading…
x
Reference in New Issue
Block a user