Please let us know, Without plugins, How to hide fields based on another field value selection
Interesting, You've to add the javascript in the announcement banner wherein you read value and do the hiding to another field.
You may have to do some r&d on the below:
Example: Hide or Shown and custom field based on priority.
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) { hideOrShowPriority();});AJS.$(document).ready(function () { hideOrShowPriority();});AJS.$('#priority').change(function () { hideOrShowPriority();});function hideOrShowPriority(){ var priorityVal = AJS.$('#priority').val(); if (priorityVal == '2'){ AJS.$("#customfield_10806").closest('div.field-group').show(); } else { AJS.$("#customfield_10806").closest('div.field-group').hide(); }}
Thanks for suggestion, I've tried this script added into announcement banner according to the fields, but no luck, the added script is showing like banner on every screen. Do you have any existed working script from your environment ?
Did you added the style?
<span><</span>script type<span>=</span><span>"text/javascript”><br>Above code<br></script></span>
It looks like you're new here. Sign in or register to get started.