1 answer
- 10-1
It is easy to get the last comment from the comment array using following snippet in the outgoing sync on the zendesk side
def lastComment = issue.comments?.getAt(-1) replica.description = lastComment // use next to check the result of the statement - this generates an error.debug.error("Replica description = ${replica.description}")
- Francis Martens (Exalate)
You might also be interested in only send the comment set from the moment of the exalate
It is an advanced configuration with a message dance to store a local value.
- ben friedman
thanks Francis,
i've added that and now getting an error on the Jira side -
Internal comments cannot be processed. The reason is: Request Type custom field is required, but not set..
ive tried to set the following, but to no success -
on["""avo"""].issue.customFields."Customer Request Type".value = "Customer Support request"
- Francis Martens (Exalate)
This is a separate topic.
Check Setting the request type using the visual editor - ben friedman
Hi Francis, i've followed the guide, and now have the below, but it still produces an error:
if (firstSync) {
on["""avo"""].issue.customFields."Request Type".value = "Customer Support request"
}def lastComment = issue.comments?.getAt(-1)
on["""avo"""].description = lastComment
// use next to check the result of the statement - this generates an error.
debug.error("Replica description = ${replica.description}") - Francis Martens (Exalate)
What is the error?
- Ariel Aguilar
Hi there,
Let me help here, I checked on the logs and found the error:
"Caused by: com.exalate.api.exception.script.IssueTrackerScriptException: Replica description = סתם מידע"
So, you need to do the following to make it work:
if (firstSync) { on["""avo"""].issue.customFields."Request Type".value = "Customer Support request" } def lastComment = issue.comments?.getAt(-1) on["""avo"""].issue.description = lastComment
The word "issue" on the last line was missed before. Try out and let me know.
Kind regards,
Ariel
Add your comment...
Hi,
i have a zd<>Jira connection.
i need the jira's description to take on the last comment from ZD, at the time of first sync only.
can you advise a script?