Hi dear Atlassian community, been a long time JIRA admin, but we recently acquired ScriptRunner for jira for a new project we're working on.
On a that project, we'll have a few scripted field which are based on standard custom field.
In one of those scenarios, we have a the following setup:
- Task A
-- Scripted Field A : Value should be value of Scripted Field B
- SubTask B (Under TaskA)
-- Scripted Field B : Sum of CustomField1 and CustomField2
I basically want to show the value of scripted field of a sub-task on the parent task.
I could done the same logic on Scripted Field A, but that would duplicate my code if ever i need to do modification to the logic of Scripted Field B, i'd have 2 fields to modify, which i'm trying to avoid.
So in theory, it seems ScriptRunner supports that, but when i'm trying this, it seems like the first time i hit Preview, it doesn't work, but the second time it works.
By working here, i mean i'm able to retrieve the value of Scripted Field B from Task A.
This works in debug mode, since i can hit preview multiples times and see the result, but in the real life scenario, when i refresh Task A, the value is empty since it tries only once.
So i'm guessing this is enough context, but i'm wondering if there's something specific that i need to do in order to do that type of flow using ScriptRunner Scripted Fields.
PS.: Also tried to turn off caching like specified in the Scripted Field documentation.