Forums

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

How do I change field’s rendering method via script?

Tom
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 14, 2023

Hello, How do I change field’s rendering method via script? I tried everything, and there is not much examples for this. I have a field that is used in multiple field configurations. I’d like to change its rendering method in all field configurations. My JIRA DC version is 8.20.15. Thank you.

1 answer

0 votes
Nic Brough -Adaptavist-
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.
December 14, 2023

Welcome to the Atlassian Community!

Your script will need to iterate through all the field configurations to find where any field has been used, but I think you knew that.

I think your problem is not knowing what methods to use to read and/or change the renderer setting.

You'll need

  • FieldLayoutManager to get each field layout
  • Then use EditableFieldLayout.setRendererType to set the new one
  • Then you may have to explicitly store the field layout (this is a memory from a long time ago, I'm not sure you need to do that any more, the setRendererType call may do it automatically now)

Suggest an answer

Log in or Sign up to answer