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="text/javascript"> alert("Value should be 1-14"); </script>You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have just added it to the description of the field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
field description on field configuration right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The above code is not working.
can anyone suggest the right code??
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.