This script retrieves the Requested Items of a Freshservice Request (catalog items and their field values) and automatically adds them to the Jira Cloud issue description. In this example I’ve used Jira Cloud, but you can sync the Requested items into a text field on all issue trackers
It’s useful for teams who use Freshservice catalog items and need those details to be visible directly inside Jira without manually checking Freshservice.
Supported platforms: Freshservice → Any
FreshService Requested items:
How requested items are displayed in Jira Cloud’s description:
Script Overview
Fetch Requested Items
The script calls the Freshservice API using Exalate’s built-in httpClient to retrieve all requested items for the ticket.
def requestedItemsResponse = httpClient.get("/api/v2/tickets/${ticketId}/requested_items")
Extract Custom Fields
It reads each catalog item’s custom_fields block (employee name, reason, details, etc).
Build a Text Block with StringBuilder
All relevant values are appended into a Markdown-formatted block for readability inside Jira.
sb.append("• *Employee Name:* ${cf.employee_name_s}")
Important note: You will need to replace the catalog item field names in the StringBuilder with the ones from your own Freshservice instance.
To discover the exact field names for your catalog items, call the following URL in your browser or via API tools:
freshserviceURL/api/v2/tickets/{your ticket ID}/requested_items
This will show you the exact custom_fields keys you can include in the replica to add into the Jira Cloud description.
Final Solution
Freshservice Outgoing sync
def requestedItemsResponse = httpClient.get("/api/v2/tickets/${entity.key}/requested_items")
if (requestedItemsResponse.requested_items && requestedItemsResponse.requested_items.size() > 0) {
def sb = new StringBuilder()
requestedItemsResponse.requested_items.each { item ->
def cf = item.custom_fields
sb.append(" *Requested Item:* ${item.service_item_name}\n")
sb.append("- *Employee name(s):* ${cf.employee_name_s ?: 'N/A'}\n")
sb.append("- *Reason for placing a Legal Hold:* ${cf.reason_for_placing_a_legal_hold ?: 'N/A'}\n")
sb.append("- *Content on which Legal Hold is to be placed:* ${cf.content_on_which_legal_hold_is_to_be_placed ?: 'N/A'}\n")
sb.append("- *Hold to Date:* ${cf.hold_to_date ?: 'N/A'}\n")
sb.append("- *Any additional details:* ${cf.any_additional_details ?: 'N/A'}\n\n")
}
replica.description = """
${replica.description ?: ''}
---
${sb.toString().trim()}
""".stripIndent()
}
Jira Cloud Incoming sync
issue.description = replica.description
Version
This script is currently working on version 5.29

