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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you added the style?
<script type="text/javascript”>
Above code
</script>
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.