Can JIRA metadata be accessed remotely?

Is there any chance that by adding metadata to JIRA using this plugin that I can then pull this data into another application for report generation?

Thanks,

Josh

1 answer

1 accepted

Hi Josh,

sorry - but no. My plugin exports the MetadataService as component for other plugins (within JIRA) but not via ReST. You have to create a Plugin which takes my Service via component-import, make it available via ReST and install it on your JIRA server.

The component-import for your atlassian-plugin.xml

<component-import key="metadataService" name="JIRA Metadata Service"
        interface="com.osoboo.jira.metadata.MetadataService">
        <description>to access the jira metadata service.</description>
 </component-import>

For more details about ReST Plugins see: https://developer.atlassian.com/display/DOCS/Incomplete+Plugin+Tutorial+-+Writing+REST+Services

Cheers
Andreas

Thanks, Andreas. I mostly need to present tables of the metadata now associated with each JIRA project and version. I found where the metadata is stored in the JIRA database, so I think I can probably just use SQL queries to present the results I need.

the good old sql integration ;). the Table should be AO_XXXXXX_Jira_METADATA:

the stored ENRICHED_OBJECT_KEY string will be gernerated by the following pattern:

[com.atlassian.jira.project.Project or com.atlassian.jira.project.version.Version]:[THE_OBJECT_IDENTIFIER]

e.g for a project called SampleProject (Key: SP ) the identifier will be com.atlassian.jira.project.Project:SP

Sample:

Table's create-SQL:

CREATE TABLE AO_CC6AEB_JIRA_METADATA(

ENRICHED_OBJECT_KEY VARCHAR(255),

HIDDEN BOOLEAN,

ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,

USER_KEY VARCHAR(255),

USER_VALUE VARCHAR(255))

The id of my table is the generated primary key.

INSERT INTO AO_CC6AEB_JIRA_METADATA VALUES(

'com.atlassian.jira.project.Project:SP',

FALSE,

3,

'Budget',

'15,000,000.00')

i'll hope this will help you

Andreas

Thanks, again, Andreas. Very helpful!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

159 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you