private void WriteValues([NotNull] IRowBuffer rowBuffer, [NotNull] Issue issue)
        {
            if (_doubleValue1FieldIndex < 0 &&
                _doubleValue2FieldIndex < 0 &&
                _textValueFieldIndex < 0)
            {
                // there are no error attribute fields
                return;
            }

            double?doubleValue1;
            double?doubleValue2;
            string textValue;

            IssueUtils.GetValues(issue.Values,
                                 out doubleValue1,
                                 out doubleValue2,
                                 out textValue);

            if (_doubleValue1FieldIndex >= 0)
            {
                WriteDouble(rowBuffer, _doubleValue1FieldIndex, doubleValue1);
            }

            if (_doubleValue2FieldIndex >= 0)
            {
                WriteDouble(rowBuffer, _doubleValue2FieldIndex, doubleValue2);
            }

            if (_textValueFieldIndex >= 0)
            {
                WriteText(rowBuffer, _textValueFieldIndex, textValue);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Issue"/> class.
 /// </summary>
 /// <param name="qualitySpecificationElement">The quality condition.</param>
 /// <param name="qaError">The QA error.</param>
 public Issue([NotNull] QualitySpecificationElement qualitySpecificationElement,
              [NotNull] QaError qaError)
     : this(qualitySpecificationElement,
            qaError.Description,
            IssueUtils.GetInvolvedTables(qaError.InvolvedRows),
            qaError.IssueCode,
            qaError.AffectedComponent,
            qaError.Values)
 {
 }
Beispiel #3
0
        private static string FormatIssue([NotNull] Issue issue)
        {
            var props = new List <string>
            {
                issue.QualityCondition.Name,
                issue.Description,
                issue.IssueCode?.ID,
                IssueUtils.FormatInvolvedTables(issue.InvolvedTables),
            };

            return(StringUtils.Concatenate(props, "|"));
        }
        public void WriteAttributes(Issue issue, IRowBuffer rowBuffer)
        {
            Assert.ArgumentNotNull(issue, nameof(issue));
            Assert.ArgumentNotNull(rowBuffer, nameof(rowBuffer));

            IssueCode issueCode = issue.IssueCode;

            WriteText(rowBuffer, _issueDescriptionFieldIndex, issue.Description);
            WriteText(rowBuffer, _issueCodeFieldIndex, issueCode?.ID);
            WriteText(rowBuffer, _issueCodeDescriptionFieldIndex, issueCode?.Description);
            WriteText(rowBuffer, _involvedObjectsFieldIndex,
                      IssueUtils.FormatInvolvedTables(issue.InvolvedTables));
            WriteText(rowBuffer, _qualityConditionFieldIndex, issue.QualityCondition.Name);

            WriteText(rowBuffer, _testTypeFieldIndex, GetTestTypeName(issue.QualityCondition));
            WriteText(rowBuffer, _testNameFieldIndex, GetTestName(issue.QualityCondition));
            WriteText(rowBuffer, _testDescriptionFieldIndex,
                      GetTestDescription(issue.QualityCondition));

            WriteText(rowBuffer, _issueSeverityFieldIndex, GetIssueSeverityValue(issue));
            WriteText(rowBuffer, _stopConditionFieldIndex, GetStopConditionValue(issue));
            WriteText(rowBuffer, _categoryFieldIndex,
                      GetCategoryValue(issue.QualityCondition));
            WriteText(rowBuffer, _affectedComponentFieldIndex, GetAffectedComponent(issue));
            WriteText(rowBuffer, _urlFieldIndex, GetUrl(issue.QualityCondition));

            if (_qualityConditionUuidFieldIndex >= 0)
            {
                WriteText(rowBuffer, _qualityConditionUuidFieldIndex,
                          issue.QualityCondition.Uuid);
            }

            if (_qualityConditionVersionUuidFieldIndex >= 0)
            {
                WriteText(rowBuffer, _qualityConditionVersionUuidFieldIndex,
                          issue.QualityCondition.VersionUuid);
            }

            WriteValues(rowBuffer, issue);
        }