Can I set the size of custom field "Text Field (< 255 characters)" to 50 Chars from javascript in jira?
In the field description, add this
<script type="text/javascript">
document.getElementById("customfield_xxxxxx").maxLength=50;
</script>
where customfield_xxxxxx is the id of your Text Field
Or simply add a validator using Script Runner, rather than doing it in javascript (which can break anytime, and it is just a client side validation)
Thanks!
But, how can i achieve that? I need complete guide to that.
Read https://studio.plugins.atlassian.com/wiki/display/GRV/Script+Runner
Hi,
I have a similar requirement that, i have to set the width of the customefield(Number field). But, using the above javascript in the field description does not serve the purpose.
Please help with the same
Regards,
Akshatha
That's work fine for me in v5.1 jira.
When I try the code above nothing happens. Only difference is I'm checking a field length of 5.
I guess I'll try a Script Runner transition, but why doesn't the javascript fire?
If I put an alert in the javascript, an alert pops up on the screen right when I hit save. Why would that happen, I haven't entered and data yet!
This didnt work me , i am using Jira cloud , How will it work there?
I came across this and follow the following instruction for JIRA Server :
https://confluence.atlassian.com/jirakb/how-to-change-text-box-length-on-a-screen-ui-in-jira-732399321.html
I used the following css for the field Environment for ex:
#environment-val /* The "id" of the "Environment" text box */{ margin: -2px 0 0 -5px; width: 100%; }
It looks like you're new here. Sign in or register to get started.