Hi,
I’ve a select list field that I want to change to read only after the issue was created. I still want to show it in all screens, but to prevent the users from changing the value.
How can this be done ?
Thanks,
Alon
You can use script for making any field readonly.
var fieldname= document.getElementById('customfield_xxxx');
fieldname.disabled=true;
This doesn't work for a select list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It will work for all custom fields, we are using it. It works properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We ended up using this is the base for our script.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't need any plugins.
Look at your "screen scheme", in there, you'll find you can tell Jira to use different "screens" for Create, Edit and View. A screen is a list of fields to present to the user. Generally, most schemes use the same screen for everything, to keep it simple, but you can change this.
For your case, I would have two screens:
Screen 1: Has your select list on it somewhere. Use this for View and Create
Screen 2: Does NOT have your select list on it. Use this for Edit
You'll be able to populate a value when creating the issue, and then not change it later. One other thing to consider - workflows may have "transition screens" - you'll want to check if those screens have your field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, I'm aware of this option.
However I want the users to see the value in the field in all screens. so removing it from other screens is not an option in this case. and this field also appears in transition screens.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@prathighantam can you please eloborate in detail? Where to put the javascript code and how ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can put the java script on any field of your screen . In the field config of your project/issue type you add this script.
<script>
var editSubmit=document.getElementById('edit-issue-submit');
var fieldname= document.getElementById('customfield_xxxx');
fieldname.disabled=true;
if(null!=editSubmit)
{
editSubmit.onclick=function()
{
fieldname.disabled=false;
}
}
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nope, not working ... I am using JIRA 5.2.2.
<script> var editSubmit=document.getElementById('edit-issue-submit'); var cfc_10404= document.getElementById('customfield_10404'); cfc_10404.disabled=true; if(null!=editSubmit) { editSubmit.onclick=function() { cfc_10404.disabled=false; } } </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the below snippet to enable the custom field, before the issue is created. This is using the native AJS.
<script type="text/javascript"> AJS.$( document ).ready(function() { AJS.$("#issue-create-submit").click(function(){ AJS.$("#customfield_XXXXX").attr("disabled",false); }); }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use https://marketplace.atlassian.com/plugins/ru.mail.jira.plugins.groupeditfiedls and configure editable for reporter only.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, but this is only for version 5.2, we are using 5.0.7.
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.
Thanks, I didn’t see this.
Looks like a useful plugin.
However I failed to mention that the field I'm talking about is the version list, so I don’t see how I can use this plugin in this case.
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.
Next version of plugin I will implement all system fields
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.