Forums

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

Clear user picker value, in Post functions, Groovy

kumar jira June 27, 2019

Can someone help me to clear the field value (User Picker) in post functions.

I used the following script but it failed.

def developercf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Developer")

issue.setCustomFieldValue(developercf, null)

1 answer

0 votes
Taranjeet Singh
Community Champion
June 27, 2019

@kumar jira Is it required to clear field value using a groovy script? What add-ons do you have installed in your JIRA instance, that provide custom Validators, Conditions, and Post-functions? 

I am asking because clearing a field value on a post-function can be a much easier task that can be done without custom script based Post-Functions, if you have some other relevant Add-ons available.

kumar jira June 27, 2019

@Taranjeet Singh 

Am using Script runner (script post-function (inline script)) for this. 

Am having a condition ( If case) on top, I would like to clear the value only if the condition satisfies. 

Thank you. 

Taranjeet Singh
Community Champion
June 27, 2019
Taranjeet Singh
Community Champion
July 11, 2019

@kumar jira Did your issue get resolved based on the suggestions in the Community post I shared before?

Taranjeet Singh
Community Champion
July 15, 2019

@kumar jira Did your issue get resolved based on the suggestions in the Community post I shared before?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events