No Error No Status Sync

Hi everyone,

I’ve configured the outgoing sync script and incoming sync scrip on both Jira and Zendesk to ensure one-way synchronization. Specifically, the sync is designed so that any status updates made in Jira should reflect in Zendesk, but status updates made in Zendesk should not affect Jira.

Could someone from the community or support team help review the setup?

Out going Sync in Zendesk
// replica.status = issue.status

//replica.statusName = httpClient.get(“/api/v2/tickets/${issue.key}”)?.ticket?.status

Incoming sync of Zendesk

// STATUS MAPPING - Jira to Zendesk (one-way sync)
def statusMap = [
“OPEN”: “Escalated to L2”,
“TRIAGING IN PROGRESS”: “Escalated to L2”,
“FIX IN PROGRESS”: “Escalated to L2”,
“ADDITIONAL INFO REQUESTED FROM L1/USER”: “Pending”,
“ADDITIONAL INFO REQUESTED FROM VENDOR”: “Escalated to L2”,
“CONVERT TO PRODUCTION DEFECT”: “Escalated to L2”,
“CONVERTED TO ENHANCEMENT”: “Pending”,
“RESOLVED”: “Pending”
]

def remoteStatusName = replica.statusName ?: “Open”
log.info("Incoming status from Jira: " + remoteStatusName)

Outgoing sync in jira
// Send Jira status name to Zendesk

replica.statusName = issue.status.name

Incoming sync of Jira

// STATUS MAPPING - Zendesk to Jira

// Leave empty or do not use

def statusMap = [:]

def remoteStatusName = replica.statusName

issue.setStatus(statusMap[remoteStatusName] ?: “Open”)

Thanks in advance

Hi @Vineela,

Welcome to the Exalate community!

I’ve reviewed your script and noticed a couple of things:

  • In your Zendesk Incoming sync, the mapped status isn’t being set. You’re missing the issue.setStatus() method.

issue.setStatus(statusMap[remoteStatusName] ?: "Open")

  • You don’t need to handle status synchronization in the Jira Incoming sync, since the status is only being synced from Jira to Zendesk.

Here’s how your Incoming sync script in Zendesk should look:

def statusMap = [
  "OPEN": "Escalated to L2",
  "TRIAGING IN PROGRESS": "Escalated to L2",
  "FIX IN PROGRESS": "Escalated to L2",
  "ADDITIONAL INFO REQUESTED FROM L1/USER": "Pending",
  "ADDITIONAL INFO REQUESTED FROM VENDOR": "Escalated to L2",
  "CONVERT TO PRODUCTION DEFECT": "Escalated to L2",
  "CONVERTED TO ENHANCEMENT": "Pending",
  "RESOLVED": "Pending"
]

def remoteStatusName = replica.statusName
log.info("Incoming status from Jira: " + remoteStatusName)
issue.setStatus(statusMap[remoteStatusName] ?: "Open")

Let me know if applying these changes resolves the issue!

hey Javier,
Hope your doing good. I really appreciate your help and time
I did try the solution you have provided me
Here below I’m Going to provide to the error

The below error was trigger after the change in code

  • Impact: ISSUE
  • Local entity: 97704
  • Remote entity: TEFGS-5
  • Connection: test zendesk_to_Jira
  • Error type: Issue Tracker Error
  • Error Creation Time: Jun 10, 2025 14:31:17
  • Error Detail Message: Custom status is invalid
  • Error Stack Trace: zendesknode.services.exception.TicketErrorCollectionException: Custom status is invalid at zendesknode.services.node.client.ZendeskClient.filterResponse(ZendeskClient.scala:1266) at zendesknode.services.node.client.ZendeskClient.$anonfun$updateIssue$5(ZendeskClient.scala:1217) at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:470) at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:63) at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:100) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18) at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94) at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:100) at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:49) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48) at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
  • Incoming sync data:
    Summary: test 5
    1.Entity Key:* TEFGS-5(id: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EwMDUwIiwidHlwZSI6Ik9QVElPTiIsInZhbHVlIjp7ImlkIjoiMTAwODIiLCJ2YWx1ZSI6IlBhY2thZ2UifX0sIlRyYW5zYWN0aW9uIFR5cGUiOnsiaWQiOjEwMTA5LCJuYW1lIjoiVHJhbnNhY3Rpb24gVHlwZSIsInVpZCI6IjEwMTA5IiwidHlwZSI6Ik9QVElPTiIsInZhbHVlIjp7ImlkIjoiMTAzNDAiLCJ2YWx1ZSI6IkJDIFRyYW5zYWN0aW9ucyJ9fSwiU3lzdGVtIEVycm9yIE1lc3NhZ2UiOnsiaWQiOjEwMTA0LCJuYW1lIjoiU3lzdGVtIEVycm9yIE1lc3NhZ2UiLCJ1aWQiOiIxMDEwNCIsInR5cGUiOiJURVhUIn0sIlNlcnZpY2UgV29yayBBcmVhIjp7ImlkIjoxMDEwOCwibmFtZSI6IlNlcnZpY2UgV29yayBBcmVhIiwidWlkIjoiMTAxMDgiLCJ0eXBlIjoiT1BUSU9OIiwidmFsdWUiOnsiaWQiOiIxMDMxNyIsInZhbHVlIjoiQmlsbGluZyBDZW50ZXIifX19LCJldmVudFRyaWdnZXJDb250ZXh0Ijp7fSwiZGVzY3JpcHRpb24iOiJuZXcgdGVzdCBvbiBzeW5jIHN0YXR1cyIsIndhdGNoZXJzIjpbXSwia2V5IjoiVEVGR1MtNSIsInN1bW1hcnkiOiJ0ZXN0IDUiLCJjb21tZW50cyI6W10sIndvcmtMb2dzIjpbXSwiYWZmZWN0ZWRWZXJzaW9ucyI6W119LCJpc3N1ZVVybCI6Imh0dHBzOi8vZ255amlyYS5hdGxhc3NpYW4ubmV0L2Jyb3dzZS9URUZHUy01In0

also I’m providing you the local replica and remote replica

Local Replica:
{
“version”: {
“major”: 1,
“minor”: 14,
“patch”: 0
},
“hubIssue”: {
“statusName”: {
“id”: “open”,
“name”: “open”
},
“voters”: ,
“fixVersions”: ,
“internalMap”: {
“statusName”: {
“id”: “open”,
“name”: “open”
}
},
“priority”: {
“id”: “low”,
“name”: “low”
},
“labels”: ,
“customKeys”: {},
“issueType”: {
“id”: “incident”,
“name”: “incident”
},
“entityProperties”: {},
“components”: ,
“attachments”: ,
“customFields”: {
“GW Category”: {
“id”: 27911742802071,
“name”: “GW Category”,
“uid”: “27911742802071”,
“type”: “OPTION”,
“value”: {
“id”: “27911742802071”,
“value”: “anomaly”
}
},
“Branch/Dept.”: {
“id”: 1500009729141,
“name”: “Branch/Dept.”,
“uid”: “1500009729141”,
“type”: “OPTION”,
“value”: {
“id”: “1500009729141”,
“value”: “branch_actuarial-data_science”
}
},
“Guidewire Number”: {
“id”: 27907735181207,
“name”: “Guidewire Number”,
“uid”: “27907735181207”,
“type”: “STRING”,
“value”: “01236”
},
“Jira Assignee”: {
“id”: 27913186415895,
“name”: “Jira Assignee”,
“uid”: “27913186415895”,
“type”: “STRING”
},
“Line of Business”: {
“id”: 27580743394455,
“name”: “Line of Business”,
“uid”: “27580743394455”,
“type”: “OPTION”,
“value”: {
“id”: “27580743394455”,
“value”: “line_of_business_package”
}
},
“Transaction Type”: {
“id”: 27908768496407,
“name”: “Transaction Type”,
“uid”: “27908768496407”,
“type”: “OPTION”,
“value”: {
“id”: “27908768496407”,
“value”: “bc_transactions”
}
},
“System Error Message”: {
“id”: 27909663503511,
“name”: “System Error Message”,
“uid”: “27909663503511”,
“type”: “TEXT”
},
“Service Work Area”: {
“id”: 27769226286231,
“name”: “Service Work Area”,
“uid”: “27769226286231”,
“type”: “OPTION”,
“value”: {
“id”: “27769226286231”,
“value”: “work_area_billing_center”
}
}
},
“eventTriggerContext”: {},
“description”: “new test on sync status”,
“watchers”: ,
“key”: “97704”,
“summary”: “test 5”,
“comments”: ,
“workLogs”: ,
“affectedVersions”:
},
“issueUrl”: “https://gny.zendesk.com/agent/tickets/97704
}

Remote Replica:

{
“version”: {
“major”: 1,
“minor”: 14,
“patch”: 0
},
“hubIssue”: {
“statusName”: “Fix in Progress”,
“voters”: ,
“fixVersions”: ,
“internalMap”: {
“statusName”: “Fix in Progress”
},
“priority”: {
“id”: “4”,
“name”: “Low”
},
“labels”: ,
“customKeys”: {},
“issueType”: {
“id”: “10059”,
“name”: “Incident”
},
“entityProperties”: {},
“components”: ,
“attachments”: ,
“customFields”: {
“GW Category”: {
“id”: 10105,
“name”: “GW Category”,
“uid”: “10105”,
“type”: “OPTION”,
“value”: {
“id”: “10347”,
“value”: “Anomaly”
}
},
“Branch or Department”: {
“id”: 10111,
“name”: “Branch or Department”,
“uid”: “10111”,
“type”: “OPTION”,
“value”: {
“id”: “10354”,
“value”: “Actuarial-Data Science”
}
},
“Guidewire Number”: {
“id”: 10106,
“name”: “Guidewire Number”,
“uid”: “10106”,
“type”: “STRING”,
“value”: “01236”
},
“Line of Business”: {
“id”: 10050,
“name”: “Line of Business”,
“uid”: “10050”,
“type”: “OPTION”,
“value”: {
“id”: “10082”,
“value”: “Package”
}
},
“Transaction Type”: {
“id”: 10109,
“name”: “Transaction Type”,
“uid”: “10109”,
“type”: “OPTION”,
“value”: {
“id”: “10340”,
“value”: “BC Transactions”
}
},
“System Error Message”: {
“id”: 10104,
“name”: “System Error Message”,
“uid”: “10104”,
“type”: “TEXT”
},
“Service Work Area”: {
“id”: 10108,
“name”: “Service Work Area”,
“uid”: “10108”,
“type”: “OPTION”,
“value”: {
“id”: “10317”,
“value”: “Billing Center”
}
}
},
“eventTriggerContext”: {},
“description”: “new test on sync status”,
“watchers”: ,
“key”: “TEFGS-5”,
“summary”: “test 5”,
“comments”: ,
“workLogs”: ,
“affectedVersions”:
},
“issueUrl”: “Jira
}

It shows that the custom status is invalid,
But i have provided the exact values of status on Zendesk and Jira
On zendesk I was only using these 2 field values

Sorry i have missed my jira work flow

the field values are typed in exaclty same idk why does it even says custom status INVALID

Do you exalate cannot sync the custom field values? or am i missing out something

Hi @Vineela,

Thanks for the update!

Just a quick clarification regarding the status mapping in the Incoming Sync for Zendesk. I noticed that the statuses you used match the ones from your workflow, but not the actual values returned by the Jira API.

You can view the correct status values from your instance using this endpoint:
{Jira base URL}/rest/api/2/status

For example, instead of "OPEN", the API would return "name": "Open". Similarly, in the Jira Cloud replica you shared, the status appears as "statusName": "Fix in Progress"—not "FIX IN PROGRESS".

To ensure proper mapping, you’ll need to update the statuses in your Zendesk Incoming sync to reflect the actual API values. Based on what I’ve seen, the mappings should likely look something like this:

def statusMap = [
"To Do": "Escalated to L2",
"Triage in Progress": "Escalated to L2",
"Fix in Progress": "Escalated to L2",
// Add the rest of the mappings as needed...
]

Let me know if you have any questions or if you’d like help validating the correct values.

Hi Javier,

I have pasted below the Zendesk Api Values for the statues,
{
“custom_statuses”: [{
“url”: api/v2/custom_statuses/1500010993542.json",
“id”: 1500010993542,
“status_category”: “new”,
“agent_label”: “New”,
“raw_agent_label”: “{{zd.status_new}}”,
“end_user_label”: “Open”,
“raw_end_user_label”: “{{zd.status_end_user_new}}”,
“description”: “Ticket is awaiting assignment to an agent”,
“raw_description”: “{{zd.status_new_description}}”,
“end_user_description”: “We are working on a response for you”,
“raw_end_user_description”: “{{zd.status_end_user_new_description}}”,
“active”: true,
“default”: true,
“created_at”: “2021-10-19T21:05:29Z”,
“updated_at”: “2021-10-19T21:05:29Z”
}, {
“url”: “api/v2/custom_statuses/1500010993582.json”,
“id”: 1500010993582,
“status_category”: “open”,
“agent_label”: “Open”,
“raw_agent_label”: “{{zd.status_open}}”,
“end_user_label”: “Open”,
“raw_end_user_label”: “{{zd.status_end_user_open}}”,
“description”: “Staff is working on the ticket”,
“raw_description”: “{{zd.status_open_description}}”,
“end_user_description”: “We are working on a response for you”,
“raw_end_user_description”: “{{zd.status_end_user_open_description}}”,
“active”: true,
“default”: true,
“created_at”: “2021-10-19T21:05:29Z”,
“updated_at”: “2021-10-19T21:05:29Z”
}, {
“url”: “api/v2/custom_statuses/30354284946199.json”,
“id”: 30354284946199,
“status_category”: “open”,
“agent_label”: “Returned from L2”,
“raw_agent_label”: “Returned from L2”,
“end_user_label”: “Escalated”,
“raw_end_user_label”: “Escalated”,
“description”: “Returned from L2”,
“raw_description”: “Returned from L2”,
“end_user_description”: “Escalated”,
“raw_end_user_description”: “Escalated”,
“active”: false,
“default”: false,
“created_at”: “2025-03-02T21:29:50Z”,
“updated_at”: “2025-04-23T21:21:59Z”
}, {
“url”: “api/v2/custom_statuses/1500010993602.json”,
“id”: 1500010993602,
“status_category”: “pending”,
“agent_label”: “Pending”,
“raw_agent_label”: “{{zd.status_pending}}”,
“end_user_label”: “Awaiting your reply”,
“raw_end_user_label”: “{{zd.status_end_user_pending}}”,
“description”: “Staff is waiting for the requester to reply”,
“raw_description”: “{{zd.status_pending_description}}”,
“end_user_description”: “We are waiting for you to respond”,
“raw_end_user_description”: “{{zd.status_end_user_pending_description}}”,
“active”: true,
“default”: true,
“created_at”: “2021-10-19T21:05:29Z”,
“updated_at”: “2021-10-19T21:05:29Z”
}, {
“url”: “api/v2/custom_statuses/1500010993642.json”,
“id”: 1500010993642,
“status_category”: “hold”,
“agent_label”: “On-hold”,
“raw_agent_label”: “{{zd.status_hold}}”,
“end_user_label”: “Open”,
“raw_end_user_label”: “{{zd.status_end_user_hold}}”,
“description”: “Staff is waiting for a third party”,
“raw_description”: “{{zd.status_hold_description}}”,
“end_user_description”: “We are working on a response for you”,
“raw_end_user_description”: “{{zd.status_end_user_hold_description}}”,
“active”: true,
“default”: true,
“created_at”: “2021-10-19T21:05:29Z”,
“updated_at”: “2021-10-19T21:05:29Z”
}, {
“url”: api/v2/custom_statuses/30324244463255.json",
“id”: 30324244463255,
“status_category”: “hold”,
“agent_label”: “Escalated to L2”,
“raw_agent_label”: “Escalated to L2”,
“end_user_label”: “Escalated”,
“raw_end_user_label”: “Escalated”,
“description”: “Escalated to L2”,
“raw_description”: “Escalated to L2”,
“end_user_description”: “Escalated”,
“raw_end_user_description”: “Escalated”,
“active”: true,
“default”: false,
“created_at”: “2025-02-28T21:49:39Z”,
“updated_at”: “2025-03-02T21:31:47Z”
}, {
“url”: “api/v2/custom_statuses/30685556474775.json”,
“id”: 30685556474775,
“status_category”: “hold”,
“agent_label”: “Escalated to Dev”,
“raw_agent_label”: “Escalated to Dev”,
“end_user_label”: “Development Item”,
“raw_end_user_label”: “Development Item”,
“description”: “Escalated to Dev”,
“raw_description”: “Escalated to Dev”,
“end_user_description”: “Development Item”,
“raw_end_user_description”: “Development Item”,
“active”: false,
“default”: false,
“created_at”: “2025-03-16T15:59:20Z”,
“updated_at”: “2025-04-23T21:21:53Z”
}, {
“url”: “api/v2/custom_statuses/1500010993702.json”,
“id”: 1500010993702,
“status_category”: “solved”,
“agent_label”: “Solved”,
“raw_agent_label”: “{{zd.status_solved}}”,
“end_user_label”: “Solved”,
“raw_end_user_label”: “{{zd.status_end_user_solved}}”,
“description”: “The ticket has been solved”,
“raw_description”: “{{zd.status_solved_description}}”,
“end_user_description”: “This request has been solved”,
“raw_end_user_description”: “{{zd.status_end_user_solved_description}}”,
“active”: true,
“default”: true,
“created_at”: “2021-10-19T21:05:29Z”,
“updated_at”: “2021-10-19T21:05:29Z”
}
],
“next_page”: null,
“previous_page”: null,
“count”: 8
}

I was not sure which name to use for the zendesk field names

i am also providing the outgoing script of zendesk outgoing sync

replica.key = issue.key
replica.type = issue.type

replica.summary = issue.summary
replica.description = issue.description
replica.comments = issue.comments
replica.attachments = issue.attachments
// replica.assignee = issue.assignee

replica.customFields.“Jira Assignee” = issue.customFields.“Jira Assignee”

// replica.customFields.“Jira Assignee”=issue.customFields.“Jira Assignee”
// replica.customFields.“Assigned Zendesk Agent” = issue.assignee

// replica.status = issue.status
// replica.statusName = httpClient.get(“/api/v2/tickets/${issue.key}”)?.ticket?.status

// Send Zendesk status to Jira as a string
// replica.statusName = issue.status

replica.priority = issue.priority

replica.customFields.“Branch/Dept.” = issue.customFields.“Branch/Dept.”

replica.customFields.“Guidewire Number” = issue.customFields.“Guidewire Number”

replica.customFields.“Line of Business” = issue.customFields.“Line of Business”

replica.customFields.“Transaction Type” = issue.customFields.“Transaction Type”

replica.customFields.“Service Work Area” = issue.customFields.“Service Work Area”

replica.customFields.“System Error Message” = issue.customFields.“System Error Message”

// replica.customFields.“GW Resolution” = issue.customFields.“GW Resolution”
replica.customFields.“GW Category” = issue.customFields.“GW Category”

I’m sorry I have missed some clarity, forgot to past what I have tried and what the error was :

  • Impact: ISSUE
  • Local entity: 97936
  • Remote entity: TEFGS-7
  • Connection: test zendesk_to_Jira
  • Error type: Issue Tracker Error
  • Error Creation Time: Jun 15, 2025 17:37:40
  • Error Detail Message: Custom status is invalid
  • Error Stack Trace: zendesknode.services.exception.TicketErrorCollectionException: Custom status is invalid at zendesknode.services.node.client.ZendeskClient.filterResponse(ZendeskClient.scala:1266) at zendesknode.services.node.client.ZendeskClient.$anonfun$updateIssue$5(ZendeskClient.scala:1217) at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:470) at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:63) at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:100) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18) at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94) at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:100) at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:49) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48) at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
  • Incoming sync data:
    Summary: test 7
    1.Entity Key:* TEFGS-7(id: 1103930)
    2.Encoded payload:* eyJ2ZXJzaW9uIjp7Im1ham9yIjoxLCJtaW5vciI6MTQsInBhdGNoIjowfSwiaHViSXNzdWUiOnsic3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In19LCJUcmFuc2FjdGlvbiBUeXBlIjp7ImlkIjoxMDEwOSwibmFtZSI6IlRyYW5zYWN0aW9uIFR5cGUiLCJ1aWQiOiIxMDEwOSIsInR5cGUiOiJPUFRJT04iLCJ2YWx1ZSI6eyJpZCI6IjEwMzQwIiwidmFsdWUiOiJCQyBUcmFuc2FjdGlvbnMifX0sIlN5c3RlbSBFcnJvciBNZXNzYWdlIjp7ImlkIjoxMDEwNCwibmFtZSI6IlN5c3RlbSBFcnJvciBNZXNzYWdlIiwidWlkIjoiMTAxMDQiLCJ0eXBlIjoiVEVYVCJ9LCJTZXJ2aWNlIFdvcmsgQXJlYSI6eyJpZCI6MTAxMDgsIm5hbWUiOiJTZXJ2aWNlIFdvcmsgQXJlYSIsInVpZCI6IjEwMTA4IiwidHlwZSI6Ik9QVElPTiIsInZhbHVlIjp7ImlkIjoiMTAzMTciLCJ2YWx1ZSI6IkJpbGxpbmcgQ2VudGVyIn19fSwiZXZlbnRUcmlnZ2VyQ29udGV4dCI6e30sImRlc2NyaXB0aW9uIjoidGVzdCBsb2wgNyIsIndhdGNoZXJzIjpbXSwia2V5IjoiVEVGR1MtNyIsInN1bW1hcnkiOiJ0ZXN0IDciLCJjb21tZW50cyI6W10sIndvcmtMb2dzIjpbXSwiYWZmZWN0ZWRWZXJzaW9ucyI6W119LCJpc3N1ZVVybCI6Imh0dHBzOi8vZ255amlyYS5hdGxhc3NpYW4ubmV0L2Jyb3dzZS9URUZHUy03In0

I still have the same error after fixing the values names of zendesk and jira

def statusMap = [
“Open”: “30324244463255”,
“Triaging in Progress”: “30324244463255”,
“Fix in Progress”: “30324244463255”,
“Additional Info requested from L1/User”: “1500010993602”,
“Additional info Requested From Vendor”: “30324244463255”,
“Convert to Production defect”: “30324244463255”,
“Converted to Enhancement”: “1500010993602”,
“Resolved”: “1500010993602”
]

def remoteStatusName = replica.statusName
log.info("Incoming status from Jira: " + remoteStatusName)
// issue.setStatus(statusMap[remoteStatusName] ?: “Open”)

if i use this line this throws me an error - issue.setStatus(statusMap[remoteStatusName] ?: “Open”)
If not status not getting updated

Hi @Vineela

Can you try to provide this script in incoming sync script?

def statusMap = [
“Open”: “30324244463255”,
“Triaging in Progress”: “30324244463255”,
“Fix in Progress”: “30324244463255”,
“Additional Info requested from L1/User”: “1500010993602”,
“Additional info Requested From Vendor”: “30324244463255”,
“Convert to Production defect”: “30324244463255”,
“Converted to Enhancement”: “1500010993602”,
“Resolved”: “1500010993602”
]
def remoteStatusName = replica.statusName
if (remoteStatusName == "Open"){
  httpClient.put("/api/v2/tickets/${issue.key}.json", """{"ticket": {"custom_status_id": 30324244463255}}""")
  issue.setStatus("hold")
}
else if (remoteStatusName == "Triaging in Progress"){
  httpClient.put("/api/v2/tickets/${issue.key}.json", """{"ticket": {"custom_status_id": 30324244463255}}""")
  issue.setStatus("hold")
}
else if (remoteStatusName == "Fix in Progress"){
httpClient.put("/api/v2/tickets/${issue.key}.json", """{"ticket": {"custom_status_id": 30324244463255}}""")
  issue.setStatus("hold")
}
else if (remoteStatusName == "Additional Info requested from L1/User"){
  httpClient.put("/api/v2/tickets/${issue.key}.json", """{"ticket": {"custom_status_id": 1500010993602}}""")
  issue.setStatus("pending")
}
else if (remoteStatusName == "Additional info Requested From Vendor"){
  httpClient.put("/api/v2/tickets/${issue.key}.json", """{"ticket": {"custom_status_id": 30324244463255}}""")
  issue.setStatus("hold")
}
else if (remoteStatusName == "Convert to Production defect"){
  httpClient.put("/api/v2/tickets/${issue.key}.json", """{"ticket": {"custom_status_id": 30324244463255}}""")
  issue.setStatus("hold")
}
else if (remoteStatusName == "Converted to Enhancement"){
  httpClient.put("/api/v2/tickets/${issue.key}.json", """{"ticket": {"custom_status_id": 1500010993602}}""")
  issue.setStatus("pending")
}
else if (remoteStatusName == "Resolved"){
  httpClient.put("/api/v2/tickets/${issue.key}.json", """{"ticket": {"custom_status_id": 1500010993602}}""")
  issue.setStatus("pending")
}

log.info("Incoming status from Jira: " + remoteStatusName)

Let me know in case you face any further issues.

Thanks,
Sonal

1 Like

Hi Sonal,

Thankyou so much for your help.

Best,
Vineela.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.