Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to list out project category and its projects linked to the project category?

Mani Chellamuthu March 4, 2012

I am developing a gadget with REST API to list our all project categories with their linked projects. In schema, there is no association between Project and ProjectCategory. How do I get list project categories and their projects?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Mani Chellamuthu March 5, 2012
I found a way to retrieve the desired results. We have to use nodeassociation table where associations are stored. 
The relation between Project and ProjectCategory is defined in nodeassociation.

The SQL below,

select pc.id,pc.cname, p.id, p.pname from nodeassociation na, projectcategory pc, project p where na.sink_node_id=pc.id and na.source_node_id=p.id and na.sink_node_entity='ProjectCategory' and na.association_type='ProjectCategory' order by pc.cname;

c
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 10, 2013

Is it possible to run that query through the REST API?

0 votes
c
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 10, 2013

With JIRA 5.2, it is not possible to fetch the project category via the REST API:

JRA-30001: REST method to retrieve the project category

TAGS
AUG Leaders

Atlassian Community Events