I have the following script in place and running, however after it was created our processes changed a bit and I'm not sure how to account for those changes.
Currently the script looks at the "expense" field in all of the line item request issues and sums them up in a "Total Order Expense($)" field in the order request issue.
Now I need that "Total Order Expense($) field in the order request to include the "Total Order Expense($) in the change order request issue type.
I also need it to subtract the "Returned Amount" in the RMA issue type from the "Total Order Expense($) in the Order request issue.
I'm completely stumped and could really use some help.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
def csExpense = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Expense")
return issue.getSubTaskObjects().sum{it ->((Issue) it).getCustomFieldValue(csExpense)};
Hi Scott,
I might be able to help you out here. But first could you give me the list of all involved fields and their field types. Also I'd like to know, all these different issue types, how exacly are they related to each other (issue links or subtasks, etc).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.