I have a select list and the default value is "Please Select a value from the list" . When the user has choosen default value. I want to display as Not Applicable instead of Please Select a value from the list.
How do we write condition display in edit.vm velocity file. I tried few options but it is not working. How do we write condition display in Jira velocity file?
Community moderators have prevented the ability to post new answers.
Trial 3 ---------- #customControlHeader ($action $customField.id $customField.name $fieldLayoutItem.required $displayParameters $auiparams) <select class="select" name="$customField.id" id="$customField.id" style="width:auto"> #foreach ($option in $configs.options) #if(!$option.disabled || $option.disabled == false || ($value && $value == $option.optionId.toString())) #if ($value && $value.equals($option.optionId.toString())) #set ($selected = ' selected="selected"') #else #set ($selected = '') #end #if ( $selected == $option.optionId.toString() ) <option selected="selected" #if($value="Please a value from the list") #set($value ="Not Applicable") #end>$textutils.htmlEncode($!value)</option> #end #else <option value=$option.optionId.toString()>$option.toString()</option> #end #end #end </select> #customControlFooter ($action $customField.id $fieldLayoutItem.fieldDescription $displayParameters $auiparams)
The options i tried are
Trial 1 ---------- #customControlHeader ($action $customField.id $customField.name $fieldLayoutItem.required $displayParameters $auiparams) #if($value = "Please a value from the list") #set($value ="Not Applicable") #end <select class="select" name="$customField.id" id="$customField.id" style="width:auto"> #foreach ($option in $configs.options) #if(!$option.disabled || $option.disabled == false || ($value && $value == $option.optionId.toString())) #if ($value && $value.equals($option.optionId.toString())) #set ($selected = ' selected="selected"') #else #set ($selected = '') #end #if ( $selected == $option.optionId.toString() ) <option selected="selected" value="$textutils.htmlEncode($!value)">$textutils.htmlEncode($!value) </option> #end #else <option value=$option.optionId.toString()>$option.toString()</option> #end #end #end </select> #customControlFooter ($action $customField.id $fieldLayoutItem.fieldDescription $displayParameters $auiparams)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Trial 2 ---------- #customControlHeader ($action $customField.id $customField.name $fieldLayoutItem.required $displayParameters $auiparams) <select class="select" name="$customField.id" id="$customField.id" style="width:auto"> #foreach ($option in $configs.options) #if(!$option.disabled || $option.disabled == false || ($value && $value == $option.optionId.toString())) #if ($value && $value.equals($option.optionId.toString())) #set ($selected = ' selected="selected"') #else #set ($selected = '') #end #if ( $selected == $option.optionId.toString() ) <option selected="selected" value="$textutils.htmlEncode($!value)"> #if($textutils.htmlEncode($!value) = "Please a value from the list") #set($value ="Not Applicable") #end</option> #end #else <option value=$option.optionId.toString()>$option.toString()</option> #end #end #end </select> #customControlFooter ($action $customField.id $fieldLayoutItem.fieldDescription $displayParameters $auiparams)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to tell us what you've tried really.
Personally, I'd take a different approach and edit the actual text that's coming through - https://developer.atlassian.com/display/JIRADEV/Customizing+Text
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Nic Brough -Adaptavist- I'm trying to use Jira editor in my plugin. But doesn't render properly and don't show the toolbar above the edit area. Can you help me?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Apply agile practices
Transform how you manage your work with agile practices, including kanban and scrum frameworks.
Learning Path
Configure agile boards for Jira projects
Learn how to create and configure agile Jira boards so you can plan, prioritize, and estimate upcoming work.
Jira Essentials with Agile Mindset
Suitable for beginners, this live instructor-led full-day course will set up your whole team to understand how to use Jira with an agile methodology.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.