diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Question/QuestionDetailsBusiness.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Question/QuestionDetailsBusiness.cs index 02dfdb0f04..059f47d217 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Question/QuestionDetailsBusiness.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Question/QuestionDetailsBusiness.cs @@ -18,7 +18,7 @@ using System; using System.Collections.Generic; using System.Linq; -using NPOI.SS.Formula.Functions; +using Microsoft.EntityFrameworkCore; namespace CSETWebCore.Business.Question { @@ -132,7 +132,10 @@ public QuestionDetails GetQuestionDetails(int? questionId, int assessmentId, str if (questionType == "Maturity") { - var matQuestion = _context.MATURITY_QUESTIONS.Where(q => q.Mat_Question_Id == questionId).FirstOrDefault(); + var matQuestion = _context.MATURITY_QUESTIONS + .Include(x => x.MATURITY_QUESTION_PROPS) + .Where(q => q.Mat_Question_Id == questionId).FirstOrDefault(); + qp = new QuestionPoco(_context, newAnswer, matQuestion); } else diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Question/QuestionInformationTabData.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Question/QuestionInformationTabData.cs index 6fe5fe1284..13e986f7d6 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Question/QuestionInformationTabData.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Question/QuestionInformationTabData.cs @@ -17,6 +17,7 @@ using CSETWebCore.Helpers; using CSETWebCore.Interfaces.Helpers; using CSETWebCore.Model.Question; +using Microsoft.EntityFrameworkCore.Query; @@ -569,6 +570,12 @@ public void BuildMaturityInfoTab(MaturityQuestionInfoData info) tabData.ExaminationApproach = info.MaturityQuestion.Examination_Approach; + //Include details stored in MATURITY_QUESTION_PROPS + tabData.Measurement = info.MaturityQuestion.MATURITY_QUESTION_PROPS.FirstOrDefault(x => x.PropertyName == "MEASUREMENT")?.PropertyValue; + tabData.Attestation = info.MaturityQuestion.MATURITY_QUESTION_PROPS.FirstOrDefault(x => x.PropertyName == "ATTESTATION")?.PropertyValue; + + + // apply an overlay if one exists var lang = _tokenManager.GetCurrentLanguage(); diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Helpers/CpgStructure.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Helpers/CpgStructure.cs index 94c92cd6b9..17681cb16d 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Helpers/CpgStructure.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Helpers/CpgStructure.cs @@ -245,6 +245,10 @@ private void GetSubgroups(List domainList, question.Complexity = myQ.MATURITY_QUESTION_PROPS.FirstOrDefault(x => x.PropertyName == "COMPLEXITY")?.PropertyValue; + question.Measurement = myQ.MATURITY_QUESTION_PROPS.FirstOrDefault(x => x.PropertyName == "MEASUREMENT")?.PropertyValue; + question.Attestation = myQ.MATURITY_QUESTION_PROPS.FirstOrDefault(x => x.PropertyName == "ATTESTATION")?.PropertyValue; + + // overlay var o = _overlay.GetMaturityQuestion(question.QuestionId, _lang); if (o != null) diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CPG/ContentModel.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CPG/ContentModel.cs index 70624c6fad..445e64e85b 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CPG/ContentModel.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CPG/ContentModel.cs @@ -52,6 +52,9 @@ public class Question public string Impact { get; set; } public string Complexity { get; set; } + public string Measurement { get; set; } + public string Attestation { get; set; } + public List CsfMappings { get; set; } = []; public List TTP { get; set; } = []; diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Question/RequirementTabData.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Question/RequirementTabData.cs index 1e5ca8a1e3..7f0ac8e217 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Question/RequirementTabData.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Question/RequirementTabData.cs @@ -14,6 +14,9 @@ public class RequirementTabData public string SupplementalFact { get; set; } public string ExaminationApproach { get; set; } + public string Measurement { get; set; } + public string Attestation { get; set; } + public string Set_Name { get; set; } } } \ No newline at end of file diff --git a/CSETWebNg/src/app/assessment/questions/question-extras/question-extras.component.html b/CSETWebNg/src/app/assessment/questions/question-extras/question-extras.component.html index ab6300f48f..a87319374c 100644 --- a/CSETWebNg/src/app/assessment/questions/question-extras/question-extras.component.html +++ b/CSETWebNg/src/app/assessment/questions/question-extras/question-extras.component.html @@ -239,8 +239,8 @@
- +
{{t('extras.scope')}}
@@ -256,6 +256,22 @@
+
+
+ {{t('extras.attestation')}} +
+
+
+
+ +
+
+ {{t('extras.measurement')}} +
+
+
+
+
{{t('extras.implementation guidance')}} diff --git a/CSETWebNg/src/assets/i18n/en.json b/CSETWebNg/src/assets/i18n/en.json index 595f73693f..d9823a9687 100644 --- a/CSETWebNg/src/assets/i18n/en.json +++ b/CSETWebNg/src/assets/i18n/en.json @@ -747,6 +747,8 @@ "recommended action": "Recommended Action", "free services": "Free Services and References", "implementation guidance": "Implementation Guidance", + "attestation": "Attestation", + "measurement": "Measurement", "component type": "Component Type", "override component answer": "Override Component Answer", "override": "Override", diff --git a/CSETWebNg/src/assets/i18n/es.json b/CSETWebNg/src/assets/i18n/es.json index efa3b93929..02120fc518 100644 --- a/CSETWebNg/src/assets/i18n/es.json +++ b/CSETWebNg/src/assets/i18n/es.json @@ -600,6 +600,8 @@ "recommended action": "Acción recomendada", "free services": "Servicios gratuitas y referencias", "implementation guidance": "Guía de implementación", + "attestation": "Atestación", + "measurement": "Medición", "component type": "Tipo de componente", "override component answer": "Sobreescribir Respuesta", "override": "Sobreescribir", diff --git a/CSETWebNg/src/assets/i18n/uk.json b/CSETWebNg/src/assets/i18n/uk.json index 9af8feae53..a7219023da 100644 --- a/CSETWebNg/src/assets/i18n/uk.json +++ b/CSETWebNg/src/assets/i18n/uk.json @@ -554,6 +554,8 @@ "recommended action": "Рекомендована дія", "free services": "Безкоштовні послуги та довідкові матеріали", "implementation guidance": "Посібники із впровадження", + "attestation": "Атестація", + "measurement": "Вимірювання", "component type": "Тип компоненту", "override component answer": "Перевизначення відповіді компоненту", "override": "Перевизначення",