I am evaluating confluence and jira integration. I am unable to get the jira issue macro display the custom fields! I have one field "I Promised I Will FLT On" which is on free text type and another one "Project Name" of text type 9255 charcters) which are available on issues which I want to get on the issue macro. I can see from the filter xml that the fields do exists on the filter URL used by issue macro but I just can't understand where I am doing somethig wrong!
Screen prints attached for your review. Appeciate your quick help. Thanks!
<customfield id="customfield_10610" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
<customfieldname>I Promised I Will FLT On (4)</customfieldname>
<customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
Don't have a direct answer to display the custom field in jiraissues macro. But you can add the "Filter Results" portlet of Jira directly to Confluence (refer http://confluence.atlassian.com/display/DOC/External+Gadgets), and there you can select whatever you want to display (the same way you would have done on a Jira Dashboard).
Does this help?
Its been a while since this question has been asked but I was myself confronted with the same problem very recently. Custom field data just did not appear for the JIRA issue macro in Confluence.
After a lot of experiments and RTM, I found the solution. The custom fields needs to have a xml velocity template included in the field definition.
<resource type="velocity" name="xml" location="/templates/heat-map-riskstatus-cfield/xml-color.vm"/>
The sample for this velocity template is
#disable_html_escaping() #if($renderedValue) <customfieldvalue>$xmlutils.escape($renderedValue)</customfieldvalue> #elseif ($value) <customfieldvalue>$value</customfieldvalue> #end
As Confluence apparently uses the XML output of JIRA to display issue tables in its macros, you need to be able to show your custom field in XML. You can view what the issue's XML is by opening the issue, hitting the Export button on the top right and selecting XML from there (or just navitating to the XML url: YOUR_JIRA_URL/si/jira.issueviews:issue-xml/ABC-123/ABC-123.xml).
The end goal is for your custom field to show up in this XML.
The way to achieve it is, as Gaurav described, to add a Velocity template corresponding to the XML output to your atlassian-plugin.xml file:
<customfield-type name="Your Field" class="com.class.path.to.YourField" ...>
<resource name="view" location="/templates/customfields/your-field/view.vm" type="velocity" />
<resource name="xml" location="/templates/customfields/your-field/xml.vm" type="velocity" />
Where xml.vm looks very similar to your view.vm and can be as simple as:
The latter can vary depending on how your HTML template ("view" resource) looks like. The XML tempalte has to output valid XML (duh) :)
I am assuming that we need to do this in Jira and restart Jira right?
I am having same issue. But the caveat is that, the custom field values used to show fine before our last weekend upgrade of Confluence from 6.12.1 to 7.4., but after the upgrade they dont show. Even now the custom field values show fine in Issue Navigator in Jira and XML export in Jira, but not in Conf page Jira issues macro. Just that some (not all) custom fields are not showing value in Confluence page. One more confusion is that, which value show up differ between different confluence instances, even though they both are same version 7.4.1. Basically, since my prod instance of confluence was having issue showing some field values, I had connected my dev confluence as well to the same instance of Jira to test. In dev instance of confluence, it shows the value for some cf's, lets say CF1 & CF2, but not CF3 and the prod instance of confluence shows the value for CF3, but not CF1 & CF2.
Not sure what is going on. Any help is appreciated.
have you found a solution? I am having the same problem. The custom fields used to show prior to our upgrade to Confluence Version 7.4.1.
Very annoying. Anybody here who can help? I definitely do not want to mess with velocity templates, since it used to work just fine.
Not sure if you can help me here or direct to another issue, but I need to be able to assign a JIRA issue that i'm creating from the Confluence page.
Right now there is no option to assign an issue to anybody, it is automatically assigned to project lead, this means I have to go to JIRA afterwards and manually assign to the correct person in JIRA. Just seems very inconvenient.
- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events