Jira Cloud/Zendesk - Inline Images

Originally asked by Andrew Hogan on 05 February 2021 (original question)


Howdy,

We have users logging tickets in Zendesk which come through to our Jira board. Sometimes in the comments, there’s some back and forth and images are shared.

When a user adds comments into Zendesk with an image, in Jira we get it like this;

Hi USER,

![](https://ZENDESK/attachments/token/ZXXXXXXX6/?name=image001.png)

I am trying to click on login but its not working.

Thanks,

The user in Jira then needs to look through all the attachments and find the one with the right file name.

Additionally, when we post a comment from Jira to Zendesk which includes an image, we are getting 2 comments which are added to the ticket.

The first is posted by the commenter in JIRA

USER commented:

Hi, Jasmine:

Thanks for confirmation.

The change is done now 

!image-20210204-221752.png|width=1036,height=506!

and a second post by the proxy user which is only the image.

anyway to resolve these issues?

thanks


Answer by Fran Sánchez on 01 May 2022

Hi!

Any solution with this issue?

Regards


Comments:

Andrew Hogan commented on 09 May 2022

No, I haven’t got a solution to this yet

Fran Sánchez commented on 09 May 2022

ok, thanks Andrew for reply

Answer by Ariel Aguilar on 10 February 2021

Hi Andrew,

Could you please share what you have on the Zendesk incoming script?

Ariel


Comments:

Andrew Hogan commented on 11 February 2021

Hi Ariel, here’s what is in the sync

//Do nothing if the ZD ticket is already closed
if (issue.status.name == "closed") {
   return
}

//Set the Default User and set the assignee coming from JIRA
def defaultUser = nodeHelper.getUserByEmail("CRM")
issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser

//Tag comments with the JIRA Card ID and who added the comment in JIRA
replica.addedComments.each {
	it.executor = nodeHelper.getUser("3xxx3")
	}
issue.comments = commentHelper.mergeComments(issue, replica,                      
	{
		comment ->
		comment.body =
		comment.author.displayName +" commented on ${replica.key}: \n \n" +
		comment.body
	}
	
	
)

//Make attachments show as coming from the exalate user - so proxy user isn't seen as loading the attachment posts
replica.addedAttachments.each { it.executor = nodeHelper.getUser("37xx513") } // replace "37xx513" with the Zendesk user id
//issue.attachments     += replica.addedAttachments
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)

//set labels on the ZD tickets
issue.labels += nodeHelper.getLabel("hm_sx_categories_other")
issue.labels += nodeHelper.getLabel("hm_ax_troubleshooting_new")
issue.labels += nodeHelper.getLabel("px_exalated")
issue.type = nodeHelper.getIssueType("question")


//update the ZD ticket to solved when resovlved in Jira

def statusMapping = [
	"Cancelled" : "solved",
	"Done" : "solved"
	]
def defaultStatus = "hold"
def statusName    = statusMapping[replica.status?.name] ?: defaultStatus
issue.status = nodeHelper.getStatus(statusName)
if (statusName == "solved") {
    issue.labels += nodeHelper.getLabel("Platforms_Resolved_In_JIRA")
    issue.summary = issue.summary + "(Platforms Ticket Closed)"
 //   syncHelper.unExalateAfterProcessing()
}