The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Behavior plugin: How do i make a field read only based on status or on transition?

SachinP
April 3, 2013

Am trying to change the behavior of a date field to read only once the issue type has gone passed a certain status or on transition. Doesn't look like its possible using UI - when i add condition true for workflow step= "Open" then the field is read only on issue create as well as when editing.

Maybe usig script? and if so, any examples you can provide?

Thanks!

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Chaithra N
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 3, 2013

You can make a field readonly using a Java script.

Example:

var FieldToBeMadeReadonly = document.getElementById('customfield_xxxxx');

FieldToBeMadeReadonly.disabled = true;

FieldToBeMadeReadonly.readonly = true;

Note: Make sure that you set the field parameter to false just before you submit the forms, else the field's value will be cleared. (You can refer the below script for the same)

var currentForm = document.getElementById('issue-workflow-transition');
currentForm.onsubmit = function()
{
FieldToBeMadeReadonly.disabled = false;
FieldToBeMadeReadonly.disabled =false;
}

SachinP
April 9, 2013

We've disabled the plugin to work on other developments but can't wait to test this - Thank you!

TAGS
AUG Leaders

Atlassian Community Events