Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to jinja filters in ssp markdown #45

Merged
merged 3 commits into from
Sep 26, 2024
Merged

Conversation

rahearn
Copy link
Contributor

@rahearn rahearn commented Sep 25, 2024

🎫 Addresses issue: #29 & https://github.com/GSA-TTS/devtools-compliance/issues/26

closes #29
closes https://github.com/GSA-TTS/devtools-compliance/issues/26

🛠 Summary of changes

@rahearn rahearn requested a review from a team September 25, 2024 17:31
Comment on lines -25 to +22
{% set isso = ssp_interface.get_parties_for_role(ssp.system_characteristics.responsible_parties, "information-system-security-officer") | list %}
{% if isso | count > 0 %}
{{ isso[0].name }}
{% else %}
[Name]
{% endif %}
{% set isso = ssp.system_characteristics.responsible_parties | parties_for_role("information-system-security-officer", ssp) | first_or_none %}
{{ isso.name | default('[Name]') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are much easier to read 👍🏼

| **{{ party.type.value | title }} Name** | {{ party.name }} |
{% set address = party.addresses | first_or_none %}
{% for addr_line in address.addr_lines | as_list %}
| **Address Line {{ loop.index }}** | {{ addr_line }} |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: are these 1 indexed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@rahearn rahearn merged commit e1fd2a4 into main Sep 26, 2024
1 check passed
@rahearn rahearn deleted the switch-to-jinja-filters branch September 26, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancements to compliance-trestle to provide more jinja template helpers for formatting SSP data
2 participants