Skip to content

Commit

Permalink
Merge pull request #40 from GSA-TTS/document-revision-support
Browse files Browse the repository at this point in the history
Update frontmatter to pull revision details
  • Loading branch information
rahearn authored Sep 24, 2024
2 parents 3b420d3 + ede49d1 commit eb264a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
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>

0 comments on commit eb264a7

Please sign in to comment.