Via Scriptrunner for all projects:
import com.atlassian.core.ofbiz.util.OFBizPropertyUtils
import com.atlassian.jira.component.ComponentAccessor
def newAddress = "newEmail@example.com"
ComponentAccessor.projectManager.projects.each {
def email = OFBizPropertyUtils.getPropertySet(it.getGenericValue())
email.setString("jira.project.email.sender", newAddress)
} |
Via scriptrunner for a single project
import com.atlassian.core.ofbiz.util.OFBizPropertyUtils
import com.atlassian.jira.component.ComponentAccessor
def newAddress = "newEmail@example.com"
def project = ComponentAccessor.projectManager.getProjectByCurrentKey("ATG")
def email = OFBizPropertyUtils.getPropertySet(project.getGenericValue())
email.setString("jira.project.email.sender", newAddress) |