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

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 Leaders.
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!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira product discovery, jpd premium, product management, idea management, product discovery, jira premium, product planning, atlassian community, product development, roadmap planning, product prioritization, feature management

Introducing Jira Product Discovery Premium ✨

Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.

Learn more
AUG Leaders

Atlassian Community Events