如何在EA v15.0中创建需求覆盖可追溯性状态图表
Solution: Custom SQL for Requirement Coverage Summary Chart
First, use this SQL query to get the aggregated count of Customer Requirements split by coverage status:
SELECT CoverageStatus, COUNT(*) AS RequirementCount FROM ( SELECT CASE WHEN EXISTS ( SELECT 1 FROM t_connector c INNER JOIN t_object sr ON c.Start_Object_ID = sr.Object_ID WHERE c.Connector_Type = 'Realisation' AND sr.Stereotype = 'Software Requirement' AND c.End_Object_ID = t_object.Object_ID ) THEN 'YES' ELSE 'NO' END AS CoverageStatus FROM t_object WHERE t_object.Stereotype = 'Customer Requirement' ) AS RequirementCoverage GROUP BY CoverageStatus ORDER BY CoverageStatus DESC;
How to Use This in EA Standard Chart:
- Open your EA project and go to Project > Reports > Standard Chart.
- Select Custom SQL as the data source, then click Next.
- Paste the query above into the SQL input box, then click Execute to confirm it returns two rows (YES/NO with their respective counts).
- Choose your preferred chart type (Pie Chart for percentage breakdown, Bar Chart for absolute counts work well here).
- Map
CoverageStatusto the Category axis andRequirementCountto the Value axis. - Adjust chart titles, labels, and styling as needed, then click Finish to generate the chart.
Notes:
- If you need to filter requirements by a specific package, add a package filter to the inner query. For example, to include only requirements in a package named "Customer Requirements", modify the inner query's WHERE clause:
WHERE t_object.Stereotype = 'Customer Requirement' AND t_object.Package_ID IN (SELECT Package_ID FROM t_package WHERE Name = 'Customer Requirements') - The query uses EA's British spelling (
Realisation) for the connector type, which matches the system's internal naming.
内容的提问来源于stack exchange,提问作者ccollica
相关产品推荐
相关产品推荐

