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.
๐ฃ 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
โ Pre-merge checklist
โ Post-merge checklist