Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
themeEmacs
titleExample 1
 SELECT 
   P.NAME AS "PROJECT", 
   PC.NAME AS "COMPONENT", 
   I.KEYKEY(JQL.ISSUE) AS "ISSUE"
 FROM 
   ISSUES IJQL
     INNER JOIN
    ISSUECOMPONENTS C ON C.ISSUEID =I JQL.IDISSUEID 
     INNER JOIN
    PROJECTS P ON P.ID = I.PROJECTID
     INNER JOIN 
    PROJECTCOMPONENTS PC ON C.ID = C.PROJECTCOMPONENTID
 WHERE 
   IJQL.JQLQUERY = ' COMPONENT = "COMPONENT 1" ' 

Please notice that the JQL condition in the query above. It fetches the issues belonging to the Component 1. The rest of the joined tables are necessaries in order to get the issue key, project name and component name.