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: 

Trying to remove customField

Jaspreet Kaur
Contributor
August 19, 2020

Hello Team,

I want to remove customField which is type of scripted field.

I use below lines 

def dor = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("fieldor")

CustomFieldManager.removeCustomField(dor)

Above lines giving me below error

groovy.lang.MissingMethodException: No signature of method: static com.atlassian.jira.issue.CustomFieldManager.removeCustomField() is applicable for argument types: (com.atlassian.jira.issue.fields.ImmutableCustomField) values:

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
August 19, 2020

hi @Jaspreet Kaur , itshould be

def customfieldmanager = ComponentAccessor.getCustomFieldManager()

def dor = customfieldmanager.getCustomFieldObjectByName("fieldor")

customfieldmanager.removeCustomField(dor)

it will work on server version of Jira,but your question is marked as Cloud, so I'm not sure if your topic is created correctly. 

Jaspreet Kaur
Contributor
August 19, 2020
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
August 19, 2020

hi @Jaspreet Kaur , did it work? can you accept the answer eventually, pls?

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events