Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL query for Project name, category and workflow

Ron Jacob
Contributor
April 16, 2018

Hi 

Can you tell me SQL query to get Project name, category and workflow name ?

 

 

2 answers

1 vote
M Amine
Community Champion
April 16, 2018

Hi Ron,

Try looking to this answer : here

  • Mapping project with ProjectCategory
select * from project where ID in (select SOURCE_NODE_ID from nodeassociation    
where ASSOCIATION_TYPE = 'ProjectCategory' and SINK_NODE_ID=10100);

where 10100 is the id of 'ProjectCategory'. 

and this answer : here

  • Mapping project with workflow
SELECT *

FROM PROJECT, NODEASSOCIATION, WORKFLOWSCHEME

WHERE PROJECT.ID = NODEASSOCIATION.SOURCE_NODE_ID

AND NODEASSOCIATION.SINK_NODE_ID = WORKFLOWSCHEME.ID

AND PROJECT.ID = '11630'

where 11630 is the id of the project.

cheers 

0 votes
Fabio Racobaldo _Herzum_
Community Champion
September 15, 2022

Hi @Ron Jacob ,

here your SQL :

select ji.* 
from nodeassociation na
inner join project p on (p.ID = na.SOURCE_NODE_ID)
inner join projectcategory pc on (pc.ID = na.SINK_NODE_ID)
inner join jiraissue ji on (ji.PROJECT = p.ID)
where na.ASSOCIATION_TYPE='ProjectCategory' and na.SOURCE_NODE_ENTITY='Project'
and pc.cname='YOUR PROJECT CATEGORY NAME HERE';

Hope this helps,

Fabio

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events