Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.4
-
JIRA 4.4 Fresh Installation
-
4.04
-
Description
Steps to reproduce:
- Create custom field with multiuser picker type
- Create an issue and add some values to multiuser picker custom field
- In the issue screen, click Views > XML
The following stack trace will generate in the logs after changing the views to XML:
2011-08-17 15:48:42,689 http-8081-5 WARN admin 948x530x1 6he115 127.0.0.1 /si/jira.issueviews:issue-xml/TSTA-3/TSTA-3.xml [velocity] org.apache.velocity.runtime.exception.ReferenceException: reference : template = templates/plugins/fields/xml/xml-multiselect.vm [line 3,column 24] : $singleValue.optionId is not a valid reference. at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:277) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:166) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.Template.merge(Template.java:256) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:422) at com.atlassian.velocity.DefaultVelocityManager.getEncodedBody(DefaultVelocityManager.java:77) at com.atlassian.velocity.DefaultVelocityManager.getEncodedBody(DefaultVelocityManager.java:61) at com.atlassian.velocity.DefaultVelocityManager.getEncodedBody(DefaultVelocityManager.java:56)
And the xml value will contain "key="$singleValue.optionId""
<customfields> <customfield id="customfield_10005" key="com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker"> <customfieldname>multi user picker 2</customfieldname> <customfieldvalues> <customfieldvalue key="$singleValue.optionId"> <![CDATA[ user1 ]]> </customfieldvalue> <customfieldvalue key="$singleValue.optionId"> <![CDATA[ user2 ]]> </customfieldvalue> <customfieldvalue key="$singleValue.optionId"> <![CDATA[ user3 ]]> </customfieldvalue> </customfieldvalues> </customfield> </customfields>