Problems using JIRA issues plugin in confluence 4 templates


In a template, we are using the JIRA issues macro. Since templates can only take wiki markup, we have to use wiki markup for the plugin (we can't use the macro browser).

We were trying to use something like this:

{jira: labels=show_on_wiki|columns=client,summary,labels,assignee,due date,status,key|renderMode=static|title=Program Setup}

I get the error:

Error rendering macro 'jira' : JIRA project does not exist or you do not have permission to view it.

If I drop all the parameters like so:

{jira: labels=show_on_wiki}

It works fine!

Basically, if I add any parameter to it, it completely breaks. It doesn't matter which parameter. Is this just because the JIRA plugin has changed for Conf 4? Is there any workaround, so I can get the wikimarkup right in the template?

2 answers

0 votes

I think that the problem is because there are actually 2 different JIRA Issues macros available.

{jira} is the one which is inserted by the "Insert JIRA Issues" dialog in Confluence 4.

{jiraissues} is the one which was available in wiki markup which allows additional parameters.

So on your template, using the following should work fine:

{jiraissues:labels=show_on_wiki|columns=client,summary,labels,assignee,due date,status,key|renderMode=static|title=Program Setup}

Thanks for the suggestion, but unfortunately I get the same problem if I change it to jiraissues.

0 votes

Ok, instead of guessing, I have looked into this some more.

The problem is because of the 2 different macros - you can use {jira} or {jiraissues} interchangeably, but the parameters you give have to be consistent.

That is, you can either:

  • Use {jira:<some_jql_statement>}
  • Use {jira:url=xxx,columns=yyy,title=zzz}

In the first of these you can use any jql you like, but there are no other parameters or config options available.

In the second, you have access to all of the standard parameters, but it does not take JQL, you need to use the compulsory 'url' parameter which takes the XML link of the search you want to use.

I hope that makes sense. The workaround to use, then, is:

  1. Go to your JIRA instance, and do a search for "labels=show_on_wiki"
  2. Open the 'Views' menu and copy the link for the 'XML' item
  3. In Confluence, create a template and use the markup:

{jira:url=<COPIED_LINK>|columns=client,summary,labels,assignee,duedate,status,key|renderMode=static|title=Program Setup}

This is described in more detail here.

That's really helpful. So, unfortunately, there's another layer of complication on top of it. If you figure this out, you'll be my hero!

We were using the reporting plugin to inject a variable into the jql statement. For example:

{jira: labels=show_on_wiki and client=%data:client%|columns=client,summary,labels,assignee,due date,status,key|renderMode=static|title=Program Setup}

This used to work great until we went to Conf. 4, but you figured out we now need to go using the URL. So, if I try to inject the same thing in the URL where the client code would be it doesn't work:

{jira:url=,summary,labels,assignee,due date,status,key|renderMode=static|title=Program Setup}

I would guess this is because the URL field can't accept a variable like the labels field could. ??? Any ideas?

Thanks so much for helping us track this down!


Regarding your use of the jira macro and injecting a variable value into the jql, I think your error is likely to be due to the occurrences of %3D in the query. This is confusing the injection, which uses % as delimiters. You should find that if you double up the % characters in the cases where they don't represent injection delimiters, it should work successfully. I.e. %%3D. Fingers crossed!

That was it! AWESOME.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

792 views 33 5
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