Spira Minimal Entity Relationship Diagram Experimental Initiative



An Experimental Initiative from Sri



Goal 1: Visually improve customers' understanding of the minimalized schema to develop their own queries

Goal 2: Support parnters' knowledge of the structural schema to support clients and develop their own queries

Goal 3: Augment SpiraDocs on the reporting related support for database sections for the implementation services


Why do we need the ER diagram?

Too frequently, both in training and implementation, people ask me about the entity relationship. Although we added the list of available tables in SpiraDocs, I find it missing fields and has inconsistent names. Further, as we grow the functionality, we keep adding more tables and views which are not consistent with the list of queries in the Query Builder.


Initial Attempts




So, I began taking this as a pet project!

Challenges in creating the Model

Frequently, people think of using the diagramatic tools (e.g.: Visio, PowerPoint) to create the ER diagram. Some with experience to SQL Management studio can create this ER diagram. But, creating the schema with the crowfoot notation for relationship is cumbersome when there are too many entities. In addition, some entities on SpiraDocs is very long because not all of them are not just stand-alone entitites. So, when representing all the available entities on SpiraDoc, the result will not be visually appealing. Nor will it be helpful. Besides, such an approach will also be difficult for ongoing maintenance when this approach is handed over to the product support team for continued updates. So, I began experimenting ideas.


Sri's Minimal ERD Approach

Having reviwed a few known tools and explored other ideas, I decided to use the DBNL syntax to create these minimal ER model (only primary and foreign keys). If I enforce all the referential integrities, it will be too cumbersome and less usable for anyone. I also decided to refer to the SpiraDocs where additioanl attributes exist. So, after checking a few tools, I landed on dbdiagram that allowed the data definition langauge (DDL) and Data Control Lanaguage (DCL) syntax to create the ER diagrams.


I don't have a name for the model but I see this as "Spira Minimal Entity Relationship "Diagram.




Experiment Details


  1. I categorized the large ER model into smaller subgroups so that the models becomes self-explanatory as much as possible. Thease groups are listed in Table 1.
  2. For each group, I created an "Overview" table listing the entity name, primary key, and a link to SpiraDocs for SpiraDocs Reference for Additional fields.
  3. I also created the "Schema" using the DBNL syntax and repositioned the diagram for better readability. I have also linked the code I created for the DBNL schema.
  4. For each group, I created "Tips & Tricks" to give some guidance on the schema and write queries.
  5. For each group, I also created "Example Queries" with 3 specific use-cases and wrote the queries.


NOTE: While this dbdiagram tool provided a means to embed images directly from the code created, it required an advanced premium, which I was not sure required at least for now. So, I used the free tool features to design the SMEAR model in phases and downloaded the schema to complete my experiment.


Table 1: Sri' ERD Summary

Group NameSummary Description
Essential PPMA collection of entities representing how the workspaces are organized as products, programs, and portfolios. Products derive properties from templates.
Essential TraceabilityA collection of entities representing how essential artifact traceability is maintained using requirements, testcases, and incidents.
Scenario TraceabilityA collection of entities that allow scenario level traceabilities using test sets, configurations, and automation hosts.
Artifact ConnectionsA collection of entities that allow track documents, associations, and comments.
Team AccountabilityA collection of entities that use tasks and risks.
Product AuditabilityA collection of entitites that use baselines and history tracking.
Program FunctionsA collection of entities for program and portfolio level information to support scaled agile functions.

Given below is the high level visual summary of these entity groups.

High Level Schema

Note: Please note that some entities do not fall within any of these groups. At this point, it is the "Events" table.


Next Steps


  1. My goal is to validate my schema and approach in this document.
  2. Although I have done my best to validate the primary keys and foreign keys and the type of cardinal relationship, it will good to verify.
  3. Then, request the product team to incorporate this as an SpiraDocs Reference for Additional navigational menu item in SpiraDocs under reporting.
  4. Verify, review, and revise the "Tips & Tricks" to give some guidance on the schema and write queries.
  5. With every product release that contain database changes, request that this documentation be updated as well.


Sri's Next Experiment


My next experiment is to use AI to use this model to create queries. But, one at a time!


Top of the Page


ERD Model - An Attempt by Sri


Each section has four tabs that contain details for that section. Please click on the tabs to review the details.


Essential PPM

This group represents a collection of entities representing how the workspaces are organized as products, programs, and portfolios. Products derive properties from templates.


Overview Schema Tips & Tricks Example Queries

The list of entities in this group include:
Scheme RefPrimary KeySpiraDocs Reference for Additional Fiels
PortfoliosPortfolio_IdSpiraTestEntities.R_Portfolios
ProjectGroupsProject_Group_IdSpiraTestEntities.R_ProjectGroups
ProductTemplateProduct_Template_IdSpiraTestEntities.R_ProductTemplate
ProjectsProject_IdSpiraTestEntities.R_Projects
ComponentsComponent_IdSpiraTestEntities.R_Components
ReleasesRelease_IdSpiraTestEntities.R_Releases
ProjectTagsProject_IDSpiraTestEntities.R_ProjectTags

Figure 1: Essetntial Product, Program, Portfolio Schema

Please click here for the DBNL reference file.


Essential PPM

  • Template Id is connected with the Product.
  • Even SpiraTest and SpiraTeam allows grouping of projects into project groups identified by Project_Group_Id.
  • Project Groups are called as Programs in SpiraPlan with SpiraDocs Reference for Additional functionalities like capabilities, milestones, etc.
  • Projects are actually prodocuts in Spira. Products have a longer time frame.
  • Components lend a business lens to the way the requirements are organized for product delivery.
  • Releases are timeboxed intervals that represent the projects within the products.
  • Project level tags are kept in a separate table. Artifact level tags are associated at the artifact specific tables.
  • Use special tokens such as ${ProjectGroupId}, ${ProjectId}, ${ReleaseId} and ${ReleaseAndChildIds} as needed to connect with the current UI selection.


Use Case 1: Find out all the programs associated with a portfolio
QueryResult

select
pf.portfolio_id,
pf.name as portfolio_name,
pg.project_group_id,
pg.name as program_name

from
SpiraTestEntities.R_Portfolios as pf

join
SpiraTestEntities.R_ProjectGroups as pg on
pf.portfolio_id = pg.portfolio_id




UC 1 Results


Use Case 2: Find out all the projects related using a specific project Template
QueryResult

select
pt.project_template_id,
pt.name as template_name,
p.project_id,
p.name as project_name

from
SpiraTestEntities.R_ProjectTemplates as pt

join
SpiraTestEntities.R_Projects as p on
pt.project_template_id = p.project_template_id




UC 2 Results


Use Case 3: Find all the components associated with a Project
QueryResult

select
p.project_id,
p.name as project_name,
c.component_id,
c.name as component_name

from
SpiraTestEntities.R_Projects as p

join
SpiraTestEntities.R_Components as c on
p.project_id = c.project_id



UC 3 Results


Top of the Page
Essential Traceability

This group represents a collection of entities representing how essential artifact traceability is maintained. The traceability is mainly around Requirements, Test Cases, and Incidents and the associated tables that faciliate running queries.


Overview Schema Tips & Tricks Example Queries

The list of entities in this group include:
Scheme RefPrimary KeySpiraDocs Reference for Additional Fiels
RequirementStepsPositionSpiraTestEntities.R_RequirementSteps
RequirementsRequirement_IDSpiraTestEntities.R_Requirements
RequirementTypesRequirement_Type_IDSpiraTestEntities.R_RequirementTypes
RequirementTestCasesRequirement_ID, Test_Case_IDSpiraTestEntities.R_RequirementTestCases
RequirementIncidentsRequirement_ID, Incident_IDSpiraTestEntities.R_RequirementIncidents
TestCasesTest_Case_IDSpiraTestEntities.R_TestCases
TestStepsTest_Step_IDSpiraTestEntities.R_TestSteps
TestCaseIncidentsTest_Case_ID, Incident_IDSpiraTestEntities.R_TestCaseIncidents
TestCaseFoldersTest_Case_Folder_IDSpiraTestEntities.R_TestCaseFolders
TestCaseTypesTest_Case_Type_IDSpiraTestEntities.R_TestCaseTypes
TestRunsTest_Run_IDSpiraTestEntities.R_TestRuns
TestRunStepsTest_Run_Step_IDSpiraTestEntities.R_TestRunSteps
TestRunIncidentsTest_Run_ID, Incident_IDSpiraTestEntities.R_TestRunIncidents
IncidentsIncident_IDSpiraTestEntities.R_Incidents
IncidentPrioritiesPriority_IDSpiraTestEntities.R_IncidentPriorities
IncidentSeveritiesSeverity_IDSpiraTestEntities.R_IncidentSeverities
IncidentStatusesIncident_Status_IDSpiraTestEntities.R_IncidentStatuses
IncidentTypesIncident_Type_IDSpiraTestEntities.R_IncidentTypes

Figure 2: Essential Traceability Schema

Please click here for the DBNL reference file.


Essential Artifact Traceability

  • Requirement Steps are relevant only when the requirement has scenario steps associated with it.
  • Consolidated tables exist for RequirementIncidents, RequirementTestCases, TestCaseIncidents, TestRunIncidents to bring information related to requirements, testcases, and incidents efficiently.
  • Test Runs represent the snapshot of test case or test set. Details of the steps inside a test case execution is captured in TestRunSteps.
  • TestCaseFolders table contains information of test cases grouped in the test case folder hierarchy.
  • Requirement Type are at the template level and contain types of requirements.
  • Components lend a business lens to the way the requirements are organized for product delivery.
  • Releases are timeboxed intervals that represent the projects within the products.
  • The Spira interface will not show deleted artifacts. To supporess them in custom queries, use the Is_Deleted = "False" on the artifacts where this field is supported.
  • The Spira interface may support hierarchical deinitions which may not be required in the custom reports. In such cases, use the Is_Summary = "False" on the artifacts where this field is supported.


Use Case 4: Find out all the requirements with test cases
QueryResult

select
r.requirement_id,
r.name as requirement_name,
t.test_case_id,
t.name as test_case_name

from
SpiraTestEntities.R_Requirements as r

left join
SpiraTestEntities.R_RequirementTestCases as rt on
r.requirement_id = rt.requirement_id and
r.project_id = rt.project_id

join
SpiraTestEntities.R_TestCases as t on
t.test_case_id = rt.test_case_id and
t.project_id = rt.project_id
where
r.is_summary = False and
r.is_deleted = False





UC 4 Results


Use Case 5: Find all the incidents associated with a test case for the current project
QueryResult

select
i.incident_id,
i.name as incident_name,
t.test_case_id,
t.name as test_case_name
from
SpiraTestEntities.R_Incidents as i
join
SpiraTestEntities.R_TestCaseIncidents as ti
on i.incident_id = ti.incident_id
join
SpiraTestEntities.R_TestCases as t on
t.test_case_id = ti.test_case_id
where
i.project_id = ${ProjectId} and
i.is_deleted = False



UC 5 Results


Use Case 6: Find all the execution status of all test runs for test cases for the current release
QueryResult

select
tr.release_id,
t.test_case_id,
t.name as test_case_name,
tr.execution_status_name

from
SpiraTestEntities.R_TestCases as t
join
SpiraTestEntities.R_TestRuns as tr
on tr.test_case_id = t.test_case_id and
t.project_id = tr.Project_ID
where
tr.release_id is not null and
tr.release_id = ${ReleaseId}
order by
tr.release_id



UC 6 Results



Top of the Page
Scenario Traceability

This group represents a collection of entities that allow scenario level traceabilities. This collection includes Test Sets, Test Configuration, Automation Host, and information about Test Case and Test Incident collections for a test set.


Overview Schema Tips & Tricks Example Queries

  • Many organizations use a development pipeline enabled by continuous integration, continuous delivery, and continuous deployment (CICD) that require specific scenarios to be tested.
  • Other small-to-medium organizations may require promotion of role based testing to increase the confidence of verification.
  • Still organizations that involve regulated products, services, and results may involve validation after verification involving performance qualification, operational qualification, and installation qualification.

In all these scenarios, test sets, configurations, and automation may be involved. The list of entities in this group include:

Entity NamePrimary KeySpiraDocs Reference for Additional Fiels
TestSetsTest_Set_IdSpiraTestEntities.R_TestSets
TestConfigurationEntriesTest_Configuration_IdSpiraTestEntities.R_TestConfigurationEntries
TestConfigurationSetsTest_Configuration_Set_IdSpiraTestEntities.R_TestConfigurationSets
TestSetTestCasesTest_Set_Test_Case_IdSpiraTestEntities.R_TestSetsTestCases
TestSetIncidentsTest_Set_Id, Incident_IDSpiraTestEntities.R_TestSetIncidents
TestSetFoldersTest_Set_Folder_IdSpiraTestEntities.R_TestSetFolders
AutomationHostsAutomation_Host_IdSpiraTestEntities.R_AutomationHosts

Figure 3: Scenario Traceability Schema

Please click here for the DBNL reference file.


Scenario Artifact Traceability

  • Test_Configuration_Ids contain the combination values for every configurations.
  • Test Set Configuration Ids contain the list of all combination of values for every combination added to to the test set.
  • Test_Set_Test_Cases contain information about the test cases within a test set.
  • TestSetFolders table contains information of test sets grouped in the test set folder hierarchy.
  • Test Set Incidents contain all the incidents associated with the Test Sets.
  • Automation Hosts contain information about the automation at the test set level.
  • Remember to connect with Test Cases, Test Runs, Projects table with appropriate keys as needed.


Use Case 7: Find out all the test cases associated with test sets for the current project and release.
QueryResult

select
tsc.test_set_id,
tsc.test_set_name,
tsc.test_case_id,
tsc.test_case_name

from
SpiraTestEntities.R_TestSetTestCases as tsc
join
SpiraTestEntities.R_TestSets as ts on ts.test_set_id = tsc.test_set_id
where
ts.project_id = ${ProjectId} and ts.release_id = ${ReleaseId}


UC 7 Results


Use Case 8: Find all the incidents associated with a test set
QueryResult

select
i.project_id,
t.release_id,
i.incident_id,
i.name as incident_name,
t.test_set_id,
t.name as test_set_name

from
SpiraTestEntities.R_Incidents as i
join
SpiraTestEntities.R_TestSetIncidents as ti on i.incident_id = ti.incident_id
join
SpiraTestEntities.R_TestSets as t on t.test_set_id = ti.test_set_id
where
i.incident_id = ${ProjectId} and t.release_id = ${ReleaseId}




UC 8 Results


Use Case 9: Find all the configurations for a test set for a specific project and release.
QueryResult

select
ts.project_id,
ts.release_id,
ts.test_set_id,
ts.name,
ts.test_configuration_set_id as config_id,
tcs.name as Test_Config_Name,
tc.test_case_parameter_value

from
SpiraTestEntities.R_TestSets as ts
join
SpiraTestEntities.R_TestConfigurationSets as tcs
on ts.test_configuration_set_id = tcs.test_configuration_set_id and
tcs.project_id = ts.project_id

join
SpiraTestEntities.R_TestConfigurationEntries as tc
on tcs.test_configuration_set_id = tc.test_configuration_set_id

where
tcs.is_deleted = False and
tcs.is_active = True and
ts.project_id = ${ProjectId} and
ts.release_id = ${ReleaseId}




UC 9 Results


Top of the Page
Artifact Connections

This group represents a collection of entities that allow track documents, associations and comments that can be added to artifacts.


Overview Schema Tips & Tricks Example Queries

Many organizations can upload documents to many artifacts and also establish associations. As part of the ways of working to support traceability and auditability, comments can be added as well to the artifacts. This section addresses entities related to these features.


Furthermore, Spira also allows visibility into the source code associations to specific artifacts increasing the transparency of the development process and traceabilty to artifacts.



Scheme RefPrimary KeySpiraDocs Reference for Additional Fiels
ArtifactAssociationsArtifact_Link_Type_IdSpiraTestEntities.R_ArtifactAssociations
ArtifactTagsArtifact_IdSpiraTestEntities.R_ArtifactTags
AttachmentFoldersProject_Attachment_Folder_IdSpiraTestEntities.R_AttachmentFolders
AttachmentsAttachment_IdSpiraTestEntities.R_ArtifactAttachments
ArtifactTypesArtifact_Type_IdSpiraTestEntities.R_ArtifactTypes
CommentsArtifact_Type_Id, Artifact_IdSpiraTestEntities.R_Comments
AttachmentsAttachment_IdSpiraTestEntities.R_Attachments
AttachmentVersionsAttachment_Version_IdSpiraTestEntities.R_AttachmentVersions
SourceCodeAssociationsArtifact_Source_Code_Revision_IdSpiraTestEntities.R_R_SourceCodeAssociations
SourceCodeCommitsVersion_Control_System_IdSpiraTestEntities.R_SourceCodeCommits
DocumentStatusesDocument_Status_IdSpiraTestEntities.R_DocumentStatuses
DocumentTypesDocument_Type_IdSpiraTestEntities.R_DocumentTypes

Figure 4: Artifact Association and Comments Schema

Please click here for the DBNL reference file.


Associations, Artifacts, and Comments

  • ArtifactAssociations has botu source and desiniation for artifact_id and artifact_type_id.
  • Some entities serve (comments, artifact attachments) as a look up table without primary keys that may require multiple joins.
  • Artifact_Id can be combined with the appripriate tables (Requirements, Test Cases, Tasks, etc.) based on the type of Artifact_Type_Id.
  • Attachments refer to the documents created or uploaded.
  • Artifact Types refer to the type of document.
  • Attachment Versions refer to the multiple versions of the same document.
  • Source Code association is done through artifact_id.


Use Case 10: Find all attachments related to a project.
QueryResult

select
a.filename,
a.document_type_name,
a.project_attachment_folder_name,
a.project_id

from
SpiraTestEntities.R_Attachments as a
where
a.project_id = ${ProjectId}


UC 10 Results


Use Case 11: Find all the comments related to a specific artifact (e.g.: requirement).
QueryResult

select
c.artifact_id,
r.name,
c.comment_text,
c.creation_date,
c.creator_name

from
SpiraTestEntities.R_Comments as c
join
SpiraTestEntities.R_ArtifactTypes as at on
c.artifact_type_id = at.artifact_type_id and
at.name = "Requirement"
join
SpiraTestEntities.R_Requirements as r
on c.artifact_id = r.requirement_id and
r.is_deleted = false and
r.is_summary = false
where
R.project_id = ${ProjectId}


UC 11 Results


Use Case 12: Find all the tags associated with an artifact in a project.
QueryResult

select
at.artifact_id,
at.artifact_type_id,
at.tags,
at.artifact_Type_name

from
SpiraTestEntities.R_ArtifactTags as at
where
at.project_id = ${ProjectId} and
at.tags is not null


UC 12 Results



Top of the Page
Team Accountability

This group represents a collection of entities that allow track tasks and risks that are associated with a project delivery team to monitor their progress towards completion while addressing any impediment, blocker, or obstacles.


Overview Schema Tips & Tricks Example Queries

Project delivery teams, regardless of their chosen delivery methodology, uses tasks monitor the progress of their work within their release cadence. In plan driven approaches, the project managers use tasks to monitor the progress. In change driven approaches, the delivery team uses the tasks to monitor their definition of done. At the same time, every team uses risks to identify, evaluate, and treat risks that challenge their delivery. This section addresses entities related to these features.


Scheme RefPrimary KeySpiraDocs Reference for Additional Fiels
TasksTask_IdSpiraTestEntities.R_Tasks
TaskPrioritiesTask_Priority_IdSpiraTestEntities.R_TaskPriorities
TaskTypesTask_Type_IdSpiraTestEntities.R_TaskTypes
RisksRisk_IdSpiraTestEntities.R_Risks
RiskProbabilitiesRisk_Probability_IdSpiraTestEntities.R_RiskProbabilities
RiskImpactsRisk_Impact_IdSpiraTestEntities.R_RiskImpacts
RiskStatusesRisk_Status_IdSpiraTestEntities.R_RiskStatuses
RiskTypesRisk_Type_IdSpiraTestEntities.R_RiskTypes
RiskMitigationsRisk_Mitigation_IdSpiraTestEntities.R_RiskMitigations

Figure 5: Team Accountability Schema

Please click here for the DBNL reference file.


Associations, Artifacts, and Comments

  • Task Priority and Task Type are at the template level.
  • Risk Priority, Risk Impact, Risk Type, and Risk Status are at the template level.
  • Join with Projects, Project Groups, Releases, and Components with appropriate primary keys for SpiraDocs Reference for Additional details.


Use Case 13: Find all risks specific to a project and release.
QueryResult

select
r.risk_id,
r.name as Risk_Name,
R.risk_probability_name as probability,
r.risk_impact_name as impact,
r.risk_exposure as exposure,
p.name as Project_Name,
rl.name as release

from
SpiraTestEntities.R_Risks as r
join
SpiraTestEntities.R_Projects as p on
r.project_id = p.project_id and r.is_deleted = false
join
SpiraTestEntities.R_Releases as rl
on r.release_id = rl.release_id


UC 13 Results


Use Case 14: Find all the tasks of a specific task type.
QueryResult

select
t.task_Id,
t.name,
t.task_type_name,
t.task_status_name

from
SpiraTestEntities.R_Tasks as t
where
t.project_id = ${ProjectId} and
t.task_type_name = "Development" and
t.is_delted = false


UC 14 Results


Use Case 15: Find all the risks and their mitigations for unknown (null) component.
QueryResult

select
r.risk_id,
r.name as risk_name,
r.risk_exposure as exposure,
r.component_name as component,
rm.risk_mitigation_Id,
rm.description,
rm.review_date

from
SpiraTestEntities.R_Risks as r
join
SpiraTestEntities.R_RiskMitigations as rm
on rm.risk_id = r.risk_id and rm.is_deleted = false
where
r.project_id = ${ProjectId} and
r.is_deleted = false and
r.component_name is null"


UC 15 Results



Top of the Page
Product Auditability

This group represents a collection of entities that allow track baselines and history that are required for tracking changes for every artifacts as well as within every baseline. Since custom lists and custom properties further add definitions to the artifacts themselves, these definitions are also tracked in this section.


Overview Schema Tips & Tricks Example Queries

Auditability involves tracking changes made. This involves changes made within an artifact as well as changes made to all the artifacts within a release. Hisotry details tracks changes to an artifact but baselines tracks changes to all artifacts within specific snapshots identified by the change sets.



Spira provides 99 custom properties that can be added to most artifacts. This custom property can be one of the many standard properties (number, text, date, user, release, etc.) or a user defined custom list values. This section also brings this information.


Scheme RefPrimary KeySpiraDocs Reference for Additional Fiels
BaselinesBaseline_IdSpiraTestEntities.R_Baselines
HistoryChangeSetsChangeSet_IdSpiraTestEntities.R_HistoryChangeSets
HistoryDetailsSpiraTestEntities.R_HistoryDetails
CustomListsCustom_Property_List_IdSpiraTestEntities.R_CustomLists
CustomListValuesCustom_Property_Value_IdSpiraTestEntities.R_CustomListValues
CustomPropertyDefinitionsSpiraTestEntities.R_CustomPropertyDefinitions
Global_HistoryDetailsArtifact_History_IdSpiraTestEntities.R_Global_HistoryDetails
GlobalHistoryChangeSetsChangeSet_IdSpiraTestEntities.R_HistoryChangeSets
GlobalCustomPropertyDefinitionsCustom_Property_IdSpiraTestEntities.R_GlobalCustomPropertyDefinitions
GlobalCustomListValuesCustom_Property_Value_IdSpiraTestEntities.R_GlobalCustomListValues
GlobalCustomListsCustom_Property_List_IdSpiraTestEntities.R_GlobalCustomLists

Figure 6: Product Auditability Schema

Please click here for the DBNL reference file.


Baselines, History, and Custom Values

  • Baselines are enabled at the Product Level and accessible at the Release Level.
  • Baseline is not available in SpiraTest and captures changes made to all artifacts between two changesets.
  • Custom Properties are mapped to CUST_XX values within a specific artifact. SpiraDocs Reference for Additional Joins required to get the value of the custom list.
  • Join with Projects, Project Groups, Releases, and Components with appropriate primary keys for SpiraDocs Reference for Additional details.


Use Case 16: Find the history of all changes for a specific artifact type (e.g.: Test Case) in a project.
QueryResult

select
h.artifact_id,
h.field_Name,
h.old_value,
h.new_value,
h.changeset_id,
h.changer_name,
h.change_date

from
SpiraTestEntities.R_HistoryDetails as h
join
SpiraTestEntities.R_ArtifactTypes as at
on at.artifact_type_id = h.artifact_type_id and
at.name = "Test Case"
join
SpiraTestEntities.R_HistoryChangeSets as hc
on hc.changeset_id = h.changeset_id
where
hc.project_id = ${ProjectId}


UC 16 Results


Use Case 17: Find all the artifacts that has changed in a project by a specific user (administrator).
QueryResult

select
b.baseline_id,
b.name as baseline_name,
b.changeset_id,
b.release_id,
b.last_update_date,
b.artifact_type_name,
b.changeset_type_name,
h.artifact_id

from SpiraTestEntities.R_Baselines as b
join SpiraTestEntities.R_HistoryDetails as h on
b.changeset_id = h.changeset_id
where b.project_id = ${ProjectId} and
b.changeset_creator_login = "administrator" and
b.release_id = ${ReleaseId}


UC 17 Results


Use Case 18: Find all the custom values associated with a specific custom property (CUST_01) that is mapped to a custom list of an open atifact (Incident).
QueryResult

select
i.Incident_id,
i.name,
clv.custom_property_list_name as ListName,
clv.name as ListValue

from
SpiraTestEntities.R_Incidents as i
INNER JOIN SpiraTestEntities.R_CustomListValues as clv
on Contains(i.cust_01, Concat(Concat('0', cast(clv.custom_property_value_id as Edm.String)), ','))
or EndsWith(i.cust_01, Concat('0', cast(clv.custom_property_value_id as Edm.String)))
or StartsWith(i.cust_01, cast(clv.custom_property_value_id as Edm.String))
where
i.project_id = clv.project_id
clv.custom_property_list_id = 1
i.project_id = ${ProjectId}
i.incident_status_name = "Open"
clv.is_deleted = false
i.is_deleted = false
order by
i.name, clv.custom_property_list_name


UC 18 Results



Top of the Page
Program Functions

This group represents a collection of program level entities relating to Capabilities and Milestones that are mapped to individual product level requirements and releases.


Overview Schema Tips & Tricks Example Queries

The Program Management support builds on functionalities bigger than the product level needs. At the program level, the higher level capabilities (i.e., benefits) are strategically alinged with one or more product level requirements. Similarly, the strategic milestones at the program levels are connected with one or more product level release cadence.



This section also brings this information. The entities related to Projects, ProjectGroups, and Releases were described in Essential PPM section.


Scheme RefPrimary KeySpiraDocs Reference for Additional Fiels
ProjectGroupCapabilitiesCapability_IdSpiraTestEntities.R_Capabilities
ProjectGroupCapabilityProjectRequirementsCapability_Id, Requirement_IdSpiraTestEntities.R_ProjectGroup_Capability_Project_Requirements
ProjectGroupCapabilityPrioritiesPriority_IdSpiraTestEntities.R_ProjectGroup_Capability_Priorities
ProjectGroupCapabilityStausesStatus_IdSpiraTestEntities.R_ProjectGroup_Capability_Statuses
ProjectGroupCapabilityTypesType_IdSpiraTestEntities.R_ProjectGroup_Capability_Types
ProjectGroupMilestonesProject_Group_Milestone_IdSpiraTestEntities.R_R_ProjectGroup_Milestones
ProjectGroupMilestoneTypesType_IdSpiraTestEntities.R_R_ProjectGroup_Milestone_Types
ProjectGroupMilestoneStatusesStatus_IdSpiraTestEntities.R_ProjectGroup_Milestone_Statuses
ProjectGroupMilestoneProjectReleasesProject_Group_Milestone_IdSpiraTestEntities.R_ProjectGroup_Milestone_Project_Releases

Figure 7: Essential Program Capabilities Schema

Please click here for the DBNL reference file.


Program Capabilities and Milestones

  • Capabilities and Milestones are at the Program (Project Group) level.
  • Capabilites map to one or more product level requirements.
  • Milestones map to one or more product level releases.
  • Join with Projects, Project Groups, Releases and Portfolios with appropriate primary keys for SpiraDocs Reference for Additional details.


Use Case 19:Find all the products and the requirements associated with program capabilities.
QueryResult

select
pgc.project_group_id as program_id,
pgc.project_group_name as program_name,
c.capability_id,
c.capability_name,
r.project_name,
c.requirement_name

from
SpiraTestEntities.R_ProjectGroup_Capability_Project_Requirements as c
join
SpiraTestEntities.R_Requirements as r
on r.requirement_id = c.requirement_id
join
SpiraTestEntities.R_ProjectGroup_Capabilities as pgc
on pgc.capability_id = c.capability_id and
pgc.project_group_id = r.project_group_id
where
pgc.project_group_id = ${ProjectGroupId} and
pgc.is_deleted = false and
r.is_deleted = false


UC 19 Results


Use Case 20: Find the products and the status of their associated project releases for a program milestone.
QueryResult

select
c.project_group_id as program_id,
c.project_group_name as program_name,
c.project_group_milestone_id,
c.name as milestone_name,
c.status_name as status,
r.project_name,
r.name as release,
r.release_status_name as rel_status

from
SpiraTestEntities.R_ProjectGroup_Milestones as c
join
SpiraTestEntities.R_ProjectGroup_Milestone_Project_Releases as m
on m.project_group_milestone_id = c.project_group_milestone_id
join
SpiraTestEntities.R_Releases as r on r.release_id = m.release_id
where
c.project_group_id = ${ProjectGroupId} and
c.is_deleted = false and
r.is_deleted = false


UC 20 Results


Use Case 21: Find the status, type, and priority of the current program capabilities.
QueryResult

select
c.capability_id,
c.name,
c.status_id,
c.status_name,
c.type_id,
c.type_name,
c.priority_id,
c.priority_name

from
SpiraTestEntities.R_ProjectGroup_Capabilities as c
where
c.PROJECT_GROUP_ID = ${ProjectGroupId}
UC 21 Results