Hey @Tarun Sapra here it is. This has been a very illusive request. The scenario is that I need to script a rolling budget field.
I have an issue type "Project Budget". This issue type has a "Budget" number field and a scripted "Remaining Budget" field.
There is another issue type called "Order Request" which contains a scripted "Expense" field.
These to issue types are linked using the "Related" link type.
I need to have the "Expense" from all of the order request issues that are linked to the project budget issue subtracted from the "Budget" field and return the "Remaining Budget" in the project budget issue.