Documente Academic
Documente Profesional
Documente Cultură
Schema Overview
The most commonly used tables in the schema are shown graphically in Illustration 1. The primary table is the jiraissue table, which contains one record for every issue in JIRA. Jiraissue is keyed into several of the other tables, although the JIRA database does not enforce foreign keys and does not actually use the same data type for foreign keys in all cases. The primary key for most tables is a unique number that is not seen or used by the users.
Jiraissue table
This table contains most of the system fields pertaining to a single issue. Table 1 lists the fields and their association to other tables in the schema. Table 1: jiraissue columns Column
Id Pkey Project Reporter Assignee Issuetype Summary Description Environment Priority Resolution issuestatus Created Updated Duedate Votes Timeoriginalestimate Timeestimate Timespent workflow_id Security Fixfor
Description Primary key, internal only Issue key known to user Project the issue belongs to Issue reporter Issue assignee Issue type
Foreign Key To
Project.id
Issuetype.id
os_wfentry.id SchemeIssueSecurityLevels.i d
Description deprecated
Foreign Key To
This query selects all changes made to the field called channels.
select ji.pkey, cg.author, cg.created, ci.oldstring, ci.newstring, ci.field from jiraissue ji, changegroup cg, changeitem ci where ci.groupid = cg.id and cg.issueid = ji.id and ci.field = 'channels' order by ji.pkey
Work Log
The table worklog tracks any time logged on issues. The relationship to jiraissue is through worklog.issueid.
Sample query
Issue entities
The tables resolution, issuestatus, issuetype, and priority provide the common name and other metadata about resolutions, statuses, issue types, and priorities.
is an unnormalized table which contains the links between projects and categories.
Sample query
This query selects any projects that has a category, along with its category.
select p.pkey, p.pname, pc.cname from project p, projectcategory pc, nodeassociation na where na.source_node_entity = 'Project' and na.sink_node_entity = 'ProjectCategory' and na.source_node_id = p.id and pc.id = na.sink_node_id
Versions
The projectversion table defines versions. The table nodeassociation is an unnormalized table which contains the links between versions and issues.
Sample query
These queries select any issues that have affects or fix versions.
select ji.pkey, pv.vname from jiraissue ji, projectversion pv, nodeassociation na where na.source_node_entity = 'Issue' and na.sink_node_entity = 'Version' and na.source_node_id = ji.id and na.association_type = 'IssueVersion' and pv.id = na.sink_node_id select ji.pkey, pv.vname from jiraissue ji, projectversion pv, nodeassociation na where na.source_node_entity = 'Issue' and na.sink_node_entity = 'Version' and na.source_node_id = ji.id and na.association_type = 'IssueFixVersion' and pv.id = na.sink_node_id
Components
The component table defines component. The table nodeassociation is an unnormalized table which contains the links between components and issues. Copyright 2008 The Go To Group Page 3 of 6
Group membership
The table membershipbase defines the members of each group in JIRA.
Sample query
Issue links
The tables issuelink and issuelinktype describe the links between issues in JIRA, and the link metadata.
Sample query
This query selects all incoming and outgoing links for issues.
select ji.pkey, ilt.linkname from jiraissue ji, issuelink il, issuelinktype ilt where (il.source = ji.id or il.destination = ji.id) and ilt.id = il.linktype
Custom fields
The table customfield describes each custom field in the system, while customfieldvalue holds any custom field values for issues.
Sample query
This query selects all text custom field values for any issue. Copyright 2008 The Go To Group Page 4 of 6
Page 5 of 6
Page 6 of 6