How to get the current actual change value in the form field

Dear all,

During using the JIRA Behaviours Plugin, I found that in the validation script panel of relevant field, we set 'getFieldById(getFieldChanged()).getValue()', it can get the latest actual changed value of related field. (e.g., in the 'AField' related validation script panel, I set this mentioned code, when I change this field's value, it can get its latest real time changed value), but I don't know that, at the same panel, how to get another field real time changed value, e.g. 'BField', if uses 'getFieldByName("BField").getValue()', it seems just can get the initial value of the jira form loading, and can't real time get the lastest changed value. So that cause one case, when I set a validation case as "if 'AField' is input 'AA', 'BField' is mandatory, it will occur the unexpected case as:

if I real time change 'AField' value from 'AA' to 'BB' , when move the cursor to focus on 'BField', it still show '*' to indicate it as required input.

Could everyone know how to handle it or how to get the real time update value of the field that does not map to current seeting code panel? Thanks in advanced.

1 answer

0 votes

getFieldByName("BField").getValue()'

This will work fine, but if this is in the server-side code for the AField, it will give you the BField value at the time that the AField changes (not the initial value).

If you want to get the BField value when the BFIeld changes you have to add a script for the BField.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,003 views 12 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot