@@ -362,6 +362,14 @@ def get_epic_name_field_name(jira_instance):
362362 return "customfield_" + str (jira_instance .epic_name_id )
363363
364364
365+ def get_jira_finding_text (jira_instance ):
366+ if jira_instance and jira_instance .finding_text :
367+ return jira_instance .finding_text
368+
369+ logger .debug ("finding_text not found in Jira instance" )
370+ return None
371+
372+
365373def has_jira_issue (obj ):
366374 return get_jira_issue (obj ) is not None
367375
@@ -627,12 +635,11 @@ def jira_summary(obj):
627635 return summary .replace ("\r " , "" ).replace ("\n " , "" )[:255 ]
628636
629637
630- def jira_description (obj ):
638+ def jira_description (obj , ** kwargs ):
631639 template = get_jira_issue_template (obj )
632640
633641 logger .debug ("rendering description for jira from: %s" , template )
634642
635- kwargs = {}
636643 if isinstance (obj , Finding ):
637644 kwargs ["finding" ] = obj
638645 elif isinstance (obj , Finding_Group ):
@@ -840,7 +847,7 @@ def failure_to_add_message(message: str, exception: Exception, _: Any) -> bool:
840847 project_key = jira_project .project_key ,
841848 issuetype_name = jira_instance .default_issue_type ,
842849 summary = jira_summary (obj ),
843- description = jira_description (obj ),
850+ description = jira_description (obj , finding_text = get_jira_finding_text ( jira_instance ) ),
844851 component_name = jira_project .component ,
845852 custom_fields = jira_project .custom_fields ,
846853 labels = labels ,
@@ -968,7 +975,7 @@ def failure_to_update_message(message: str, exception: Exception, obj: Any) -> b
968975 project_key = jira_project .project_key ,
969976 issuetype_name = jira_instance .default_issue_type ,
970977 summary = jira_summary (obj ),
971- description = jira_description (obj ),
978+ description = jira_description (obj , finding_text = get_jira_finding_text ( jira_instance ) ),
972979 component_name = jira_project .component if not issue .fields .components else None ,
973980 labels = labels + issue .fields .labels ,
974981 environment = jira_environment (obj ),
0 commit comments