SQL query to get issue by Oranizations

Quentin_Escanciano November 2, 2017

Dear Team,

I need to do a query to get issue by Oragnizations but I don't find the link between the table "jiraissue" and "AO_54307E_ORGANIZATION".

Its for a view on a grafana server.

Can you help me please ?

Thanks,

Quentin

1 answer

0 votes
BRAgnar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 10, 2017

Hi, Qentin.
Note that organizations do not contain issues, they contain customers. As so you will have to look for the relationship between the tables to check what members are part of an organization and then find the issues created by these customers. It would be something like this (Postgres syntax):

 

select o."NAME", concat(pro.pkey,'-',ji.issuenum) from "AO_54307E_ORGANIZATION" o
join "AO_54307E_ORGANIZATION_MEMBER" om on om."ORGANIZATION_ID" = o."ID"
join jiraissue ji on ji.reporter = om."USER_KEY"
join project pro on pro.id = ji.project
where o."NAME" = 'Organization name';

Suggest an answer

Log in or Sign up to answer