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

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

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.

Did you find an answer to this in the end?

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
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

871 views 23 12
Join discussion

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