To configure mapping to sync statuses in Freshservice, use the following rules:
From Freshservice to Jira
Freshservice Outgoing Sync Rules:
replica.status = entity.status
Jira Incoming Sync Rules:
// Map Freshservice status ids to Jira status namesdef statusMap = ["Open" : "Open","Pending" : "Pending","Work in progress" : "Resolved","Done" : "Closed"]entity.status = nodeHelper.getStatus(statusMapping[replica.status?.name] ?: "Open")
In case the Freshservice ticket status is not provided in the map, the status in Jira will default to the fallback value specified (e.g., "Open" in the code example above).
From Jira to Freshservice
Jira Outgoing Sync Rules:
replica.status = issue.status
Freshservice Incoming Sync Rules:
// Map Jira status names to Freshservice status namesdef statusMap = ["Backlog" : "Open","In progress" : "Open","Done" : "Resolved"]entity.status = nodeHelper.getStatus(statusMapping[replica.status?.name] ?: "Open")
In case the Jira issue status is not provided in the map, the status in Freshservice will default to the fallback value specified (e.g., "Open" in the code example above).