// Check if the issue is in the source project
if (issue.fields.project.key == sourceProjectKey) {
def summary = issue.fields.summary
def description = issue.fields.description
def reporter = issue.fields.reporter?.accountId
def requestType = issue.fields.customfield_10848.requestType?.name
def sharingPersonaldata = issue.fields.customfield_11931?.value
def apiIntegration = issue.fields.customfield_11935?.value
// Check if the request type is "Live or suspected security incident" and incident is "Yes"
if (["PCS New Advisory Partner Contract", "PCS New Acquisition Partner Contract", "PCS New Lender Contract"].contains(requestType) && (sharingPersonaldata == "Yes" || apiIntegration == "Yes")) {
def targetIssueTypeId = 10288
} else {
println "Issue ${issueKey} does not meet the criteria for request type and incident."
}
} else {
println "Issue ${issueKey} is not in the source project ${sourceProjectKey}."
}
import groovy.json.JsonSlurper
def sourceProjectKey = "LSD" def targetProjectKey = "ISSD" def issueKey = issue.key
// Check if the issue is in the source project if (issue.fields.project.key == sourceProjectKey) { def summary = issue.fields.summary def description = issue.fields.description def reporter = issue.fields.reporter?.accountId def requestType = issue.fields.customfield_10848.requestType?.name def sharingPersonaldata = issue.fields.customfield_11931?.value def apiIntegration = issue.fields.customfield_11935?.value
// Check if the request type is "Live or suspected security incident" and incident is "Yes" if (["PCS New Advisory Partner Contract", "PCS New Acquisition Partner Contract", "PCS New Lender Contract"].contains(requestType) && (sharingPersonaldata == "Yes" || apiIntegration == "Yes")) { def targetIssueTypeId = 10288
} else { println "Issue ${issueKey} does not meet the criteria for request type and incident." } } else { println "Issue ${issueKey} is not in the source project ${sourceProjectKey}." }