I have written below script which is working partially. I am able to hide the field but When I select Investment Stale, customfield is not becoming mandatory.
<script type="text/javascript">
jQuery(document).ready(function($) {
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {
callChangeFunction();
});
callChangeFunction();
function callChangeFunction(){
showHidField();
$("#customfield_10019").change(function() {
showHidField();
});
}
function showHidField(){
var dropDownFieldval =
$.trim($("#customfield_10019 :selected").text());
$("#customfield_10016").closest('div.field-group').hide();
if(dropDownFieldval == 'Investment Slate'){
$("#customfield_10016").closest('div.field-group').show();
$("#customfield_10016").closest('div.field-group').setRequired(true);
}
}
});
</script>
use the validator function in the work flow - where you can set a field mandatory based on the another select list field value
Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Now’s the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.