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

Preserve Assessment GUIDs on Import #3973

Merged
merged 2 commits into from
Jun 21, 2024
Merged

Conversation

Marcus-Goectau
Copy link
Member

πŸ—£ Description

If an assessment already exists with the same GUID (i.e. you are re-importing an assessment you just exported), then the assessment will be cloned with a new GUID value. However, if no assessment already exists with the same GUID, the GUID linked to the exported assessment should carry over when imported. The overwrite functionality is a specific use case for CRRM, where imports will create/update assessments instead of always creating new assessments like in CSET. If CSET ever wanted to have some sort of option to toggle on and off overwriting import overwriting, that is always be an option now.

πŸ’­ Motivation and context

This change is important for the functionality of CRRM, where assessment importing acts as an update/overwrite mechanism instead of cloning. Preserving the GUIDS on import is the only way we can determine if an import should create a brand new upload record or overwrite an existing one.

πŸ§ͺ Testing

Tested locally and the existing import behavior of CSET should remain unchanged.

βœ… Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

βœ… Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

βœ… Post-merge checklist

  • Create a release.

@randywoods randywoods merged commit 3260a9d into main Jun 21, 2024
3 checks passed
@randywoods randywoods deleted the bug/fix-guids-on-import branch June 21, 2024 19:45
@Marcus-Goectau Marcus-Goectau restored the bug/fix-guids-on-import branch June 21, 2024 20:46
@randywoods randywoods deleted the bug/fix-guids-on-import branch June 21, 2024 20:49
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.

None yet

2 participants