Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do do you clear a value from a custom field using scriptrunner in a post function?

I am having trouble finding a script example to clear a custom field during a post function in transition. 

Basically, I have a cfValue that will have a value in one step, but during a specific transition, I want that value to now be null. 

Any help is appreciated. 



2 answers

Misc Workflow Extensions has a post-function that can do this.

Thanks - I'm needing to do this without a plugin. 

0 votes

To clear a custom field in a script, set the value to be empty.  My notes say

customFieldX.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(customFieldX), ""),changeHolder)

Hi @Nic Brough _Adaptavist_ ,

I am getting the following errors 

unable to resolve class ModifiedValue 
 @ line 1, column 39.
   customFieldX.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(customFieldX), ""),changeHolder)

 @Melissa McConnell , were you able to resolve this as Nic said?

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you