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

Update frontmatter to pull revision details #40

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion OSCAL_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ For docker-trestle, the `control-implementation` section is maintained and edite
| `title` | Title of the SSPP document |
| `last-modified` | Do not edit - automatically generated timestamp |
| `version` | Version of the SSP document. Revise whenever submitting final doc for approvals |
| `oscal-version` | Version of OSCAL in use. trestle currently supports `1.0.4` |
| `oscal-version` | Version of OSCAL in use. trestle currently supports `1.1.2` |
| `revisions` | Version history of the document. Used to populate `Document Revision History` table in the templates |
| `roles` | Names of roles referenced within `responsible-parties` lists |
| `parties` | People and organizations involved with the creation of the System and SSPP |
| `responsible-parties` | Mappings of parties to roles |

### System Characteristics

Expand Down
6 changes: 5 additions & 1 deletion templates/ssp-rendering/lato/templates/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ Document Prepared By

Document Revision History

{% set prepared_by = ssp_interface.first_array_entry(ssp_interface.get_parties_for_role(ssp.metadata.responsible_parties, "prepared-by")) %}
| Date | Comments | Version | Author |
| ---- | -------- | ------- | ------ |
| | | | |
{% for revision in ssp_interface.safe_retrieval(ssp.metadata, 'revisions', []) %}
{% set revision_prepared_by = ssp_interface.get_party_by_uuid(control_interface.get_prop(revision, 'prepared-by')) or prepared_by %}
| {{ revision.last_modified.strftime('%Y-%m-%d') if revision.last_modified else '' }} | {{ revision.title }} | {{ revision.version }} | {{ revision_prepared_by.name }} |
{% endfor %}

<div class="pagebreak"></div>