5. Scenario Mapping
{% if scenario_mapping %}
{% set ns = namespace(has_hier=False) %}
{% for item in scenario_mapping %}{% if item.scenario or item.sub_scenario or item.scenario_item %}{% set ns.has_hier = True %}{% endif %}{% endfor %}
{% if ns.has_hier %}
{% set groups = {} %}
{% for item in scenario_mapping %}
{% set s = item.scenario or 'Uncategorized' %}
{% set sub = item.sub_scenario or '—' %}
{% set si = item.scenario_item or '—' %}
{% if s not in groups %}{% set _ = groups.update({s: {}}) %}{% endif %}
{% if sub not in groups[s] %}{% set _ = groups[s].update({sub: {}}) %}{% endif %}
{% if si not in groups[s][sub] %}{% set _ = groups[s][sub].update({si: []}) %}{% endif %}
{% set _ = groups[s][sub][si].append(item) %}
{% endfor %}
{% for scenario_name in groups|sort %}
{{ scenario_name }}
{% for sub_name in groups[scenario_name]|sort %}
{{ sub_name }}
| Source | Service Provider | Scenario Item | Type | Provider | Pricing | Weeks | Team | Phase |
{% for item_name in groups[scenario_name][sub_name]|sort %}
{% for s in groups[scenario_name][sub_name][item_name] %}
| {{ s.categorization }} |
{{ s.service_provider }} |
{{ item_name }} |
{{ s.scenario_type }} |
{{ s.provider }} |
{{ s.pricing_strategy }} |
{{ s.effort_weeks }} |
{{ s.team_size }} |
{{ s.phase }} |
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% else %}
| Req ID | Capability | Provider | Scenario_Type | Complexity | Weeks | Team | Phase |
{% for item in scenario_mapping %}
| {{ item.requirement_id }} |
{{ item.capability }} |
{{ item.provider }} |
{{ item.scenario_type }} |
{{ item.complexity }} |
{{ item.effort_weeks }} |
{{ item.team_size }} |
{{ item.mandays }} |
{{ item.phase }} |
{% endfor %}
{% endif %}
{% else %}
No scenario mappings recorded.
{% endif %}