Jira Plugin - How to turn CustomFieldManager readonly programmatically ????

Victor Viana January 20, 2013

My problem is as follows:

I am wanting to create a display-only field that it will be kept a log of the history of a particular element.

Does anyone know how do I make a field readonly or print as text only, this programmatically?

2 answers

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 20, 2013

You can make a field read-only by simply removing it from all but the "view" screens in Jira (the other types of screen are "edit", "create" and "transition", all of which make it editable by the users)

A second option would be to use the built-in "read only field"

A third option would be to create your own field *type* which behaves as you want.

Now, that's just covered the dsiplay options - what you also need to think about is getting the data in there. For options 1 and 2, there's pretty much one answer - write some code that extracts the data you need and pushes it into the field to be displayed later. Option 3 gives you another possibility - writing a "derived" field - that would display (and allow search) information on the issue without having to duplicate it into a field.

1 vote
Renjith Pillai
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.
January 21, 2013

I would rather write a scripted field rather than writing a plugin that can show the data.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events