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

SQL code to get a list of Structure-enabled projects?

Andrei [errno]
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.
December 2, 2014

does anyone ( ALMWorks folks? smile ) have a SQL code to return a list of structure-enabled JIRA projects?
thanks in advance.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Robert Leitch [ALM Works]
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.
December 2, 2014

Hi Andrei,

SQL won't help there, you'll need to use the getCurentlyEnabledProjects() function in the Structure API.

And the documentation for accessing the Structure API from other plugins.


Edit: you can use Groovy Script Runner to access the Structure API:

import com.atlassian.jira.component.ComponentAccessor
def plugin = ComponentAccessor.getPluginAccessor().getPlugin('com.almworks.jira.structure')
def structureConfig = plugin.getModuleDescriptor(‘structure-configuration’)

 
structureConfig.getCurrentlyEnabledProjects()

 

Hope that helps!

Robert

Pavel Zvyagin [ALM Works] December 2, 2014

You'll need .getModule() at the end of line 3: def structureConfig = plugin.getModuleDescriptor('structure-configuration').getModule()

TAGS
AUG Leaders

Atlassian Community Events