I am developing an extended multiselect field. If i use same velocity template (view-multiselect.vm) for view and edit screen, why the output is different on view and edit screen?
View screen displays option values and edit screen displays option id.
<resource type="velocity" name="view" location="templates/plugins/fields/view/view-multiselect.vm"/>
<resource type="velocity" name="edit" location="templates/plugins/fields/view/view-multiselect.vm"/>
I want to get values on edit issue screen.
Community moderators have prevented the ability to post new answers.
Why would you use the same vm file?
Use the edit one (different vm ) for the Edit and the View one which you have for view.
I think you will need to modify your edit-vm file .
below is an example of edit view customfield
<select name="$customField.id" id="$customField.id" multiple size="5"> <option value="-1">None</option> #foreach ($option in $options) <option value="$option.id">$option.name</option> #end </select>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Mizan.
I want to display selected multiselect values for an Issue on edit screen.
As i mentioned, i used same template (templates/plugins/fields/view/view-multiselect.vm) for edit and view. $value contains different value on edit and view template.
On create it contains list of option values from Issue and on edit it contains list of option ids from Issue. I am not overriding getValueFromIssue method. Any idea how can i get selected option values in place of ID on edit screen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you provide the edit vm file ? may be you are displaying the ids instead of values ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.