diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Reports/ReportsDataBusiness.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Reports/ReportsDataBusiness.cs index 365760b7a6..e040ddbcf9 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Reports/ReportsDataBusiness.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Reports/ReportsDataBusiness.cs @@ -1781,6 +1781,12 @@ private void GetQuestionTitleAndText(dynamic f, identifier = f.mq.Question_Title; questionText = f.mq.Question_Text; + // CPG is a special case + if (!String.IsNullOrEmpty(f.mq.Security_Practice)) + { + questionText = f.mq.Security_Practice; + } + // overlay MaturityQuestionOverlay o = _overlay.GetMaturityQuestion(f.mq.Mat_Question_Id, lang); if (o != null) diff --git a/CSETWebNg/src/app/reports/cpg/cpg-deficiency/cpg-deficiency.component.html b/CSETWebNg/src/app/reports/cpg/cpg-deficiency/cpg-deficiency.component.html index 99fcd303aa..7d5c9f6557 100644 --- a/CSETWebNg/src/app/reports/cpg/cpg-deficiency/cpg-deficiency.component.html +++ b/CSETWebNg/src/app/reports/cpg/cpg-deficiency/cpg-deficiency.component.html @@ -45,10 +45,9 @@

{{t('reports.core.cpg.deficiency.deficiencies')}}

{{s.mat.question_Title}} - {{parseQuestionText(s.mat.question_Text)}} + {{s.mat.security_Practice}}
- {{questionsSvc.answerDisplayLabel(11, s.answer.answer_Text)}}
diff --git a/CSETWebNg/src/app/reports/cpg/cpg-deficiency/cpg-deficiency.component.ts b/CSETWebNg/src/app/reports/cpg/cpg-deficiency/cpg-deficiency.component.ts index 353251fa12..66890e1d29 100644 --- a/CSETWebNg/src/app/reports/cpg/cpg-deficiency/cpg-deficiency.component.ts +++ b/CSETWebNg/src/app/reports/cpg/cpg-deficiency/cpg-deficiency.component.ts @@ -87,12 +87,4 @@ export class CpgDeficiencyComponent implements OnInit { this.loading = true; }) } - - parseQuestionText(textWithHtml: string) { - let startOfRealText = textWithHtml.indexOf(this.cpgPracticeTag) + this.cpgPracticeTag.length; - let endOfRealText = textWithHtml.indexOf('<', startOfRealText); - - return textWithHtml.substring(startOfRealText, endOfRealText); - } - }