@@ -2422,13 +2422,22 @@ def create_new_job(self, execute_now=False):
24222422
24232423
24242424ISSUE_TYPE_CHOICES = [
2425- ("MISSING_AFFECTED_PACKAGE" , "Advisory is missing affected package" ),
2426- ("MISSING_FIXED_BY_PACKAGE" , "Advisory is missing fixed-by package" ),
2425+ (
2426+ "MISSING_AFFECTED_PACKAGE" ,
2427+ "Advisory is missing affected package" ,
2428+ ),
2429+ (
2430+ "MISSING_FIXED_BY_PACKAGE" ,
2431+ "Advisory is missing fixed-by package" ,
2432+ ),
24272433 (
24282434 "MISSING_AFFECTED_AND_FIXED_BY_PACKAGES" ,
24292435 "Advisory is missing both affected and fixed-by packages" ,
24302436 ),
2431- ("MISSING_SUMMARY" , "Advisory is missing summary" ),
2437+ (
2438+ "MISSING_SUMMARY" ,
2439+ "Advisory is missing summary" ,
2440+ ),
24322441 ("CONFLICTING_FIXED_BY_PACKAGES" , "Advisories have conflicting fixed-by packages" ),
24332442 ("CONFLICTING_AFFECTED_PACKAGES" , "Advisories have conflicting affected packages" ),
24342443 (
@@ -2502,22 +2511,22 @@ class AdvisoryToDoV2(models.Model):
25022511 # (see https://code.djangoproject.com/ticket/702), we use related_advisories_id
25032512 # to avoid creating duplicate issue for same set of advisories,
25042513 related_advisories_id = models .CharField (
2505- max_length = 40 ,
2506- help_text = "SHA1 digest of the unique_content_id field of the applicable advisories." ,
2514+ max_length = 64 ,
2515+ help_text = "Computed unique content ID that identifies the related advisories." ,
25072516 )
25082517
25092518 advisories = models .ManyToManyField (
25102519 "AdvisoryV2" ,
25112520 through = "ToDoRelatedAdvisoryV2" ,
25122521 related_name = "advisory_todos" ,
2513- help_text = "Advisory/ies where this TODO is applicable ." ,
2522+ help_text = "Advisories for this TODO." ,
25142523 )
25152524
25162525 issue_type = models .CharField (
25172526 max_length = 50 ,
25182527 choices = ISSUE_TYPE_CHOICES ,
25192528 db_index = True ,
2520- help_text = "Select the issue that needs to be addressed from the available options ." ,
2529+ help_text = "The issue type that needs to be addressed." ,
25212530 )
25222531
25232532 issue_detail = models .TextField (
@@ -2530,12 +2539,6 @@ class AdvisoryToDoV2(models.Model):
25302539 help_text = "Timestamp indicating when this TODO was created." ,
25312540 )
25322541
2533- is_resolved = models .BooleanField (
2534- default = False ,
2535- db_index = True ,
2536- help_text = "This TODO is resolved or not." ,
2537- )
2538-
25392542 resolved_at = models .DateTimeField (
25402543 null = True ,
25412544 blank = True ,
@@ -2547,10 +2550,24 @@ class AdvisoryToDoV2(models.Model):
25472550 help_text = "Additional detail on how this TODO was resolved." ,
25482551 )
25492552
2553+ curation_advisory = models .ForeignKey (
2554+ "AdvisoryV2" ,
2555+ null = True ,
2556+ blank = True ,
2557+ on_delete = models .SET_NULL ,
2558+ related_name = "curated_todos" ,
2559+ help_text = "The advisory that was created/updated to resolve this TODO." ,
2560+ )
2561+
2562+ status = models .CharField (
2563+ max_length = 20 ,
2564+ default = "open" ,
2565+ help_text = "The current status of the TODO item." ,
2566+ )
2567+
25502568 class Meta :
25512569 unique_together = ("related_advisories_id" , "issue_type" )
25522570
2553-
25542571class AdvisorySeverity (models .Model ):
25552572 url = models .URLField (
25562573 max_length = 1024 ,
0 commit comments