Hi all,
I’m trying to get to the bottom of status mapping and I don’t seem to have any luck.
I have a two way sync between 2 Jira projects within the same instance, see below the current status mapping for issue type Story in this case:
Project A Project B
Backlog Backlog
Shovel-Ready Shovel-Ready
Discovery Discovery
In progress Development
Code Review Development
Preview Testing Development
Ready for Deployment Development
Ready for Testing Development
Verification Development
Pending STG Deployment Pending STG Deployment
Done Done
Blocked Blocked
Here what I have currently in Exalate incoming sync:
String returnMappedStatus(String remoteStatusName, String issueTypeName){
Map statusMapStory = \[
“Blocked” : “Blocked”,
“Backlog” : “Backlog”,
“Discovery”: “Discovery”,
“Shovel-Ready”: “Shovel-Ready”,
“In Progress”: “Development”,
“Code Review”: “Development”,
“Preview Testing”: “Development”,
“Ready for Deployment”: “Development”,
“Ready for Testing”: “Development”,
“Verification”: “Development”,
“Pending STG Deployment”: “Pending STG Deployment”,
“Done”: “Done”
\]
Map statusMapEpic = \[
“Backlog” : “Backlog”,
“Discovery”: “Discovery”,
“AX Acceptance”: “AX Acceptance”,
“Development”: “Development”,
“Ready for PQA”: “Pending PQA”,
“Pending PQA”: “Ready for PQA”,
“Done”: “Done”,
“Pending STG Deployment”: “Pending STG Deployment”,
“Blocked”: “Blocked”
\]
Map statusMapSpike = \[
“Backlog” : “Backlog”,
“In Progress”: “Development”,
“Development” : “In Progress”,
“Done”: “Done”,
“Blocked”: “Blocked”
\]
Map statusMapBug = \[
“Backlog” : “Backlog”,
“Open”: “Open”,
“Triage”: “Triage”,
“Unclear”: “Unclear”,
“Shovel-Ready”: “Shovel-Ready”,
“In Progress”: “Development”,
“Code Review”: “Development”,
“Preview Testing”: “Development”,
“Ready for Deployment”: “Development”,
“Ready for Testing”: “Development”,
“Verification”: “Development”,
“Pending STG Deployment”: “Pending STG Deployment”,
“Ready for PQA”: “Ready for PQA”,
“SIT”: “SIT”,
“Done”: “Done”
\]
if(issueTypeName == “Story”) return statusMapStory[remoteStatusName]
if(issueTypeName == “Epic”) return statusMapEpic[remoteStatusName]
if(issueTypeName == “Spike”) return statusMapSpike[remoteStatusName]
if(issueTypeName == “Bug”) return statusMapBug[remoteStatusName]
if(issueTypeName == “PQA Task”) return “To Do”
debug.error(“No mapping found for issue type ${issueTypeName}, please add the right mapping for this type in ‘returnMappedStatus(String remoteStatusName, String issueTypeName)’”)
}
String remoteStatusName = replica.status.name
String mappedStatus = returnMappedStatus(remoteStatusName, issue.typeName)
issue.setStatus(mappedStatus)
=================================================
This setup doesn’t seem to work. Anyone can help get this setup correctly?
Thanks