Hey Does anyone know how to limit a number field (Custom field), to a certain range. So it can only be 1-14 ex.
try something like this with Javascript
<script type="text/javascript"> jQuery(document).ready(function($) { JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) { limitSize(); }); limitSize(); function limitSize(){ $('#customfield_13820').keyup(function(e){ var decimalValue = $("#customfield_13820").val(); if(decimalValue < 1 || decimalValue > 14){ alert("Value should be 1-14"); return false; } }); } }); </script>
This dosen't work. What JIRA version are you on. Im on 5.2.9.I can get the alert message to show if I delete everything else:
<script type=
<span>"text/javascript"</span>
>
alert(
<span>"Value should be 1-14"</span>
);
</script>
we are using jira 5.2.5,
where you have added javascript?
i suggest to add as it by changing custom field id on footer.jsp or load it add webresource in any plugin
I have just added it to the description of the field.
It looks like you're new here. Sign in or register to get started.