The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to access JIRA issue data from Confluence via User Macro velocity script?

Chris Rocco
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 17, 2013

I have recently started wrting user macros. They are cool and powerful. I am really looking forward to further customizing my confluence site. Here is what I am trying to do and am looking for some help:

I want to write a marco to very similar to the JIRA issue macro, but with a twist. I want to:

  1. Allow a user to drop the macro on a page
  2. Click edit macro
  3. enter a JIRA URL for a list of issues (e.g. XML)
  4. I want my new macro to:
    1. Have access to the jira issues
    2. And be able to act on them in my velocity script - e.g. count the number of issues, access the values in certain fields, etc.

I am not sure how to do everything in 4 above. Can I read the XML into an array? Can I loop through the data in the XML and parse it?

Can I view the source code on the JIRA issue macro and start from there?

Any help would be much appreciated.

Thanks!

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
StephenG
March 22, 2017

Did you find an answer to this in the end?

0 votes
francis
Atlassian Partner
June 12, 2013

Did you consider the SQL plugin for confluence. It allows you to query the jira db directly, not really the jira issues macro but a valid alternative imo.

TAGS
AUG Leaders

Atlassian Community Events