Forums

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

Can I call one of items of the script fields in listener and how to do it?

invi8 July 16, 2018

Hello! Does anyone know how to set the value of the scripted field outside the script fields item? setCustomFieldValue in post-function and updateValue in listener didn't work? Can I call item of the script fields in listener or anywhere else and how to do it? 

Value of script field is determined by the query in database tables "N". The entries in the table "N" are added/ deleted by script listener. The problem is that after the changes by listener the new value of script field is not displayed on the issue until I update the web-page 1-2 times.

1 answer

1 vote
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 16, 2018

Hello,

Scripted fields do not contain values. They always provide values, which are returned by the script in the scripted field. That is why you can not set a value.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 16, 2018

Just to expand on that - there's no need to set the value of a scripted field.  The script does it all.  The values are calculated by the script whenever the issue is re-indexed  (that's not strictly the way it works technically, but it is the easiest way to think of them working)

Suggest an answer

Log in or Sign up to answer