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.ComponentAccessorimport com.atlassian.jira.issue.Issuedef 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.
It looks like you're new here. Sign in or register to get started.