The project key is (xxx) based on the key will get SUM of custom field value in looping how to execute this.
This code below:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
def total = issue.get("Effort Remotely (h)")
double totalSum = 0;
if(issue.getRawValue("customfield_14537")?.value == "AAA")
{
if (issue.get("project")?.key == "XXX"){
totalSum += total.toDouble()
}
}
return totalSum
You will need to add code to that to search for a list of issues (ideally based on "project = XXX", to minimise the size of the search) and iterate over them, reading the custom field value for each one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.