Hi All,
How can I resolve the issue in ScriptRunner behaviour where null values in the payload lead to errors when using functions like getValue, formvalue?
What steps should be taken to ensure proper initialization and population of payload data in the initializer script to prevent empty or null issue objects?
Please find attached a screenshot from the ScriptRunner behavior screen. This screenshot illustrates an issue where null values in the payload are causing errors when using functions like getValuegetValue,
*UI Create form('Test plan'-->customfield_10627--> multi issue picker)
*Scriptrunner behaviour initiliser script payload
Initiliser script:-
Additionally, it's worth noting that the current ScriptRunner version being used is 8.3.0, which may not be up to date. Kindly inform me if any similar bugs have been reported for this version.
I am also having the same issue I will be watching and let you know if I find a solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Atul wable
In your description, you mentioned:-
How can I resolve the issue in ScriptRunner behaviour where null values in the payload lead to errors when using functions like getValue, formvalue?
What steps should be taken to ensure proper initialization and population of payload data in the initializer script to prevent empty or null issue objects?
Please find attached a screenshot from the ScriptRunner behavior screen. This screenshot illustrates an issue where null values in the payload are causing errors when using functions like getValuegetValue,
Could you please specify which field(s) you intend to use to verify if there is any null value?
The ScriptRunner Behaviour Initialiser is used mainly to set a default value when the Create / Edit or Transition screen first loads.
However, if you intend the Behaviour to take effect only after a field value is set, you must use the Server-Side Behaviour.
Please clarify exactly what your requirement is.
For more information, I suggest reading through the ScriptRunner Documentation.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ram Kumar Aravindakshan _Adaptavist_ ,
Thank you for your reply.
I am looking to set default values for a database picker field within the test execution creation form.
In my scenario, I create test executions from a test plan issue. When a user clicks on the 'Create Test Execution' button, it opens a form where the database picker field is present.
I want this field to inherit default values from the corresponding field in the test plan issue type, which is essentially the underlying issue of this create form."
When trying to achieve this requirement in ScriptRunner Behaviour, I encounter the following issues: I am unable to obtain the underlying issue ID. Therefore, I pursued an alternative approach: within the creation form, there is a field labeled 'Test Plan'. The ID of the underlying issue is automatically populated there. However, I am still unable to retrieve that issue ID from the creation form.
"When trying to achieve this requirement in ScriptRunner Behaviour, I encounter the following issues: Neither retrieving the underlying issue ID nor fetching values from custom fields is working as expected. All attempts result in obtaining 'Null' values."
I hope I explain my requirement pretty well here
please fill free to ask more questions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.