Details
-
Bug
-
Resolution: Tracked Elsewhere
-
Low
-
5.9.11, 6.9.0, 6.9.3, 6.13.5
-
16
-
Severity 3 - Minor
-
3
-
Description
Closing this issue for Confluence Server and Data Center as the root cause has been resolved in Jira. JRASERVER-31977 has a workaround for Jira 7.13.x and 7.12.0 and has been fixed from Jira 8.0+. Thank you.
As for several built-in customfield-types, Confluence seems to have trouble displaying the name of a version instead of just its ID when adding a custom version-field from JIRA as column in the JIRA macro on a Confluence-page. Please see jira_macro_version_customfield_only_displays_id.png
While I can comprehend, that this is due to the fact that the JIRA Macro in Confuence pulls the data from JIRA using XML and there, only the ID is contained, it should behave exactly like the default fields for version (fixed Version, affected Version) where the names are rendered properly in the JIRA Macro on Confluence.
This renders the option of a custom version-field somewhat useless when a team relies on displaying such information on Confluence.
Tested this on Confluence 5.9.11 with JIRA 7.1.7.
Confluence JIRA Plugin version 5.7.2
JIRA Integration::Plugin version 3.0.2
Confluence and JIRA Content Connector version 1.9.0
Please let me know whether you need any additional issues.
Update and potential Workaround:
We have digged through the Velocity-templates that are used for the XML-Export of the issues and could find, that the xml-version.vm-Template handles the value differently than, for instance, the xml-multiselect.vm:
xml-version.vm
#disable_html_escaping()
#if ($value)
#foreach ($singleValue in $value)
<customfieldvalue>$!singleValue.id</customfieldvalue>
#end
#end
xml-multiselect.vm
#disable_html_escaping() #if ($value) #foreach ($singleValue in $value) <customfieldvalue key="$singleValue.optionId"><![CDATA[$xmlutils.escapeForCdata($!singleValue.toString())]]></customfieldvalue> #end #end
Adjusting the value of the customfieldvalue-Tag in the xml-version.vm accordingly, will fix the issue and render the version-name in Confluence instead of the version-ID, making the field useful within Confluence again. Please see jira_macro_version_customfield_after_vm_fix.png
The xml-version.vm looks like this now (on a JIRA 7.1.7):
#disable_html_escaping() #if ($value) #foreach ($singleValue in $value) <customfieldvalue key="$singleValue.id"><![CDATA[$xmlutils.escapeForCdata($!singleValue.toString())]]></customfieldvalue> #end #end
It would certainly be much appreciated to have your feedback whether this is a safe workaround or expected to break things somewhere else. However as it's a customfield that's merely for personal documentation, I doubt it could have any negative impact other than maybe not being imported properly when doing an xml export and import.
Thank you for your consideration.
Regards,
Philipp Sendek [Adaptavist]
Attachments
Issue Links
- duplicates
-
CONFSERVER-32610 JIRA Issue Macro shows the ID instead of the value
- Closed
- is caused by
-
JRASERVER-31977 xml view of custom field of multiversion picker type display version ID instead of version text
- Closed
-
JRASERVER-28365 The xml for version picker customfield provides the version id instead of the version name
- Closed
- is related to
-
CONFSERVER-43833 JIRA Chart macro displays JIRA project ID instead of project name for Project Picker field
- Gathering Impact