How Can I Join Issues to Components?
Question
Using the legacy Jira schema, I could join issues to components using the ISSUE_COMPONENTS
table, which connected directly to the ISSUE
and COMPONENT
tables. However, that join table isn't in the current schema. The COMPONENT
table still exists, but it links to the PROJECT
table rather than the ISSUE
table. How can I find out which components are assigned to which issues?
Environment
Connector: Jira
Answer
The new Jira ERD captures issue field values differently. Instead of dedicated join tables like ISSUE_COMPONENTS
, we store issue field data in two central history tables:
ISSUE_FIELD_HISTORY
for single-value fieldsISSUE_MULTISELECT_HISTORY
for multi-value fields
The COMPONENT
table still contains metadata, but is no longer directly related to issues. To retrieve component values assigned to issues, do the following:
- Use the
FIELD
table to find the ID for thecomponent
field. - Join the
FIELD
table with eitherISSUE_FIELD_HISTORY
orISSUE_MULTISELECT_HISTORY
to locate component values. - Use the
is_active
flag in the history tables to filter for the most recent (active) values. - Use the IDs in the
value
column to join to theCOMPONENT
table and retrieve component names or other metadata.