1
0
-1
1 answer
- 10-1
Hi Svein,
Sorry if I took some time, it seems we were conflicting with one of the limitations when using Visual Connections and actually if you are going to have this kind of configurations it is recommended to go to Script based connection, however I found a workaround for the original topic:
if (executionInstanceName == "Payments") { def includeComments = commentHelper.mergeComments(issue, replica).collect{it} issue.comments = nodeHelper.toMarkDownComments(includeComments) } if (executionInstanceName == "CS") { replica.getClass().fields def locked = replica.getClass().declaredFields.find{it.name == "_locked"} locked.setAccessible(true) locked.set(replica, false) replica.addedComments = replica.addedComments.findAll{!it.internal} issue.comments = commentHelper.mergeComments(issue, replica, { comment -> comment.internal = true comment.body = comment.author.displayName + " commented: \n" + comment.body + "\n" } ) }
Let me know if this works now.
Kind regards,
Ariel
- Svein Tvedt
This worked perfectly, thanks so much, we will check out script based connections in the futureBR,
Svein Tvedt
Add your comment...
Hi again
I am not able to figure this one out and I hope you can help me out.
I am trying to update my Visual connection between Zendesk and Jira and the script that I created below based on the answer that you gave me in the last post I submitted.
What I am trying to accomplish now is that I only want public reply comments from Jira to be synchronized with Zendesk. Jira (Payments) to Zendesk (CS).
I have tried looking up the documentation, but it seemed to be geared towards Scripting connections as I am not getting that code to work. I tried what was posted here, but that's not working for me: Only sync internal comments (doing it like this:
replica.comments = issue.comments.
findAll
{!it.internal}
which can be found here https://docs.idalko.com/exalate/display/ED/How+to+synchronize+comments)Would you be able to take a look at this and help me out?
Thanks in advance!
Hi Svein,
For this case, this should work:
Let me know how it goes!
Kind regards,
Ariel
Hi Ariel Aguilar ,
Please note that I am following up as Svein is on leave.
I have implemented the following code.
However I am still receiving an internal comment on Zendesk when an internal comment is left by an agent on Jira.
For clarity, Payments is Jira and Zendesk is CS.
Please let me know if you see anything wrong.
Thanks,
Hi there,
If you try this:
Let me know if only public comments are sent now.
Kind regards,
Ariel
Hi Ariel,
Thanks for the help.
I have implemented the recent script, clicked on the save button and published changes.
I then made a public and internal comment on Jira as per the screenshot below.
When checking Zendesk it still receiving the internal comment from Jira and sending it as an internal comment on Zendesk.
Can you see anything wrong with here or have any suggestions on the scripting I can try out next.
Appreciate your help on this.
Thanks
Hi Ariel Aguilar
Just bumping the thread, thanks