Hi, I've got Jira and Zendesk integrated and have several custom fields mapped between the two systems. I've noticed that when I update a custom field on 'x' screen during a workflow transition that the value is not synchronized through to Zendesk (other non custom fields do sync). The custom field does however successfully synchronize when the update is made on the view screen or edit ticket screen.
Any ideas? Solutions?
My organisation had fallen a victim of the the same problem - Cloud Diagnostics logs indicate theat whenever there is any user input in the transition screen, the plugin tranmits old value of the custom field to Zendesk as opposed to the new one. New value is sent correctly when no data has been input in the transition screen.
While the plugin itself is supplied by CustomWare, it's Zendesk that actually supports it. I have reported this problem to Zendesk at the beginning of November but haven't heard back about any solution or workaround being available.
Expecting things to go that way (I imagine there are many layers such a request has to go through until it reaches developers actually working on the plugin - especially when they are from a separate company) I resorted to writing custom replacement for this bit of functionality: transitions' post-functions update custom field in Jira and generate custom events; custom event listener in Jira reacts to those events and updates Zendesk with custom field's value.
I hope this helps,
(comment part 2/2)
Therefore, in order to obtain the details of changes, plugin:
A) obtains id of current change group,
B) iterates through ALL changes in the history of current issue and picks out only those changes whose 'change group id' matches the one referenced by current issue event.
Change group id can be obtained from a map (object of type GenericValue) returned by methodIssueEvent.getChangeLog(); it's associated with the key "id".
Changes in the history of an issue can be retrieved by callingChangeHistoryManager.getAllChangeItems( issue ) method.
Note that updates to comments seem to be handled somewhat different so the above is unlikely to work for them.
I hope this helps.
(comment part 1/2)
Zendesk support came back to me a couple of weeks ago saying that the issue has (likely) been fixed in the latest version of the plugin. While I wasn't able to test it myself, you may want to check it out and see for yourself if the problem persists.
The key bit of my workaround is a custom event listener plugin which reacts to all issue events. Plugin holds a list of Jira fields that it monitors, mapped to corresponding Zendesk fields that need to be updated with values from Jira. When it receives an issue event (and it finds out that the issue is connected to a Zendesk ticket) it obtains from Jira a set of changes (change log) associated with the event and scans it for changes that affected any of the monitored fields. From all those matching changes it extracts the new values and, using Zendesk REST API, it updates mapped fields in Zendesk.
The most tricky part was to extract the right changes, i.e. objects of type ChangeHistoryItem which contain ids of affected fields and the fields' old and new values:
Changes associated with current issue event share the same 'change group id'. It appears that instead of referencing individual changes, event object only contains id of a 'change group', i.e. of a set of changes generated by/in association with given event (e.g. a user may update several fields in the transition window before 'committing' the transition; all updates to those fields would be aggregated in a single change group).
I guess you need to contact Zendesk for that. See, JIRA is not responsible for Zendesk's behavior, neither Atlassian knows how Zendesk built the plugin that integrates both applications.
Maybe there is a bug in JIRA's code, but Zendesk will have to investigate and report that.
The Zendesk plugin should monitor JIRA's behavior and push changes into Zendesk...if it's failing, it's the plugin's fault.
HI Elisa, I saw your comment and remembered I needed to update this post further. I figured out what was wrong and now have it working perfectly. I discovered that if you are only using a 'generic event' on your workflow transition then, any custom fields you have on that screen won't be synchronized with Zendesk. You need to use another event, like issue updated or issue assigned for example.
Let me know if you need any help, I've had to become an expert with the integration to get it all to work to meet our needs.
Hi Fabrizio, where are you trying to sync the status? from a workflow or other? The status in JIRA and Zendesk with the integration, by default just sync for the values open and solved, which is a pain because it means that JIRA will 'solve' Zendesk tickets when a JIRA ticket is resolved. We don't want this to happen in our workflow, so I've used a custom field in JIRA and mapped bidirectionally, the Zendesk status field to this so that we can control it correctly. I've implemented some other fields and triggers as well to get our desired behavior between the two systems.
I can help further if you like, let me know what you are trying to achieve.
Ah ok, i know that jira status is readonly, so i've another field status that i sync with ZD.
I was interested in trigger that u have implemented. How can this be done? When ZD add a comment or update a field he doesn't arise custom listener but only the standard commented and updated issue listener.
Hopefully you'll find these two posts to be of some use:
Since launching the Jira Software 8.0 and Jira Service Desk 4.0 platform releases in February, many of you have been asking when the next Enterprise release will be so you can take advantage of the m...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs