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

Issue with clearing of multi line field using behaviors Edited

Hi I am trying to clear a multi line field based on the changes based to another drop down field(nfeed).

Below is my script and it is not clearing the field value.

def CRDB = getFieldByName("Change Review Board Decision")
def CRBC = getFieldByName("CRB Comment")

def TSRfield = getFieldById(getFieldChanged())

CRDB.setFormValue(null)

CRBC.setFormValue(null)

 

CRDB field (select list) is being set to null, but CRBC ( multi line field) is not clearing the value.

 

When I check the logs, I can see that multi line field value is being set to null, but on the UI field value is not being cleared and it is showing the old value

 

Can someone help on what is wrong with the script?

1 answer

Hi,

I tested in my local instance, work well.

Settings in beh:

B.PNG

def f= getFieldById(getFieldChanged())

def tt = getFieldByName("testtext")
if (f.value.equals("test")){
tt.setFormValue(f.value)
}else{
tt.setFormValue("") // also work for tt.setFormValue(null)
}

B.R.

@Andrew 

In the log, value is being set to null/empty, but on UI it is displaying the old value. Any clue on why this is happening?

Suggest an answer

Log in or Sign up to answer
TAGS

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