Hello,
I am a newbie to Jira. I have implemented a java script to make a field X readOnly in jira create screen and it works! I use the same script to make another custom field readOnly on a transition screen but it does not work! I have used a Velocity processed Message Custom Field (for edit) default value [to add the script] on transition screen to get the custom field set as readOnly on the transition screen. I can confirm the custom field ID is right. I am not sure where I am doing wrong here.
<script type="text/javascript">
window.onload=setFields;
function setFields()
{
var Fieldtoreadonly = document.getElementById("customfield_10103");
Fieldtoreadonly.readOnly=true;
}
</script>
By the way, The custom field I am trying to disable is a field that is capturing input from user on create screen and the tranisition exists on the view issue screen [Open To Closed]. Any help is grately appreciated.
Sunil
I don't think you should be using JavaScript to make the field read only, but should rather be using Field Configurations:
http://confluence.atlassian.com/display/JIRA/Specifying+Field+Behaviour
Thanks Brussels but I wish I could set a field as readonly through field behaviour. Unfortunately, it is not the case as readOnly option is unavailable on Feild behaviour specifiyer so the need to use Java script.
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.