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

✨ Analysis archiving #493

Merged
merged 9 commits into from
Sep 27, 2023
Merged

✨ Analysis archiving #493

merged 9 commits into from
Sep 27, 2023

Conversation

jortel
Copy link
Contributor

@jortel jortel commented Sep 26, 2023

Add analysis archiving.

Adds (2) fields to the Analysis:

  • Archived (bool)
  • Summary JSON which contains the analysis summary when archived.

When an analysis is created, all previously unarchived (archived=FALSE) resources will be archived. There should not be more than one but the logic will do them all just to be sure. Archived is:

  • Summary is created. This is an array of archived issues.
  • Archived flag set.
  • Issues deleted (cascade delete incidents).
  • TechDependencies deleted.

fixes: #428

Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
type Analysis struct {
Model
Effort int
Archived JSON `gorm:"type:json"`
Copy link
Contributor Author

@jortel jortel Sep 26, 2023

Choose a reason for hiding this comment

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

hint: Added ^

@jortel jortel changed the title Analysis archiving ✨ Analysis archiving Sep 26, 2023
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Copy link
Collaborator

@mansam mansam left a comment

Choose a reason for hiding this comment

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

LGTM


//
// ArchivedAIssue resource created when issues are archived.
type ArchivedAIssue struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the A in the middle of this name a typo? It doesn't match how it's aliased elsewhere.

Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
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.

Analysis Archiving
2 participants