2 answers
- 10-1
Hi,
so the steps to set it up is:
- Add this to the incomming sync on JIRA side:
if (firstSync) { syncHelper.syncBackAfterProcessing() }
2. Add the custom field Sync Date of type Date
3. Add the follwoing to our incomming sync ?if (issue.customFields."Sync Date" == null) { issue.customFields."Sync Date".value = new Date() }
Step 3, would that not just update first sync date ?
Regards
Mikael B
- Francis Martens (Exalate)
How do you mean
> Step 3, would that not just update first sync date ?
What will happen.- A ticket gets exalated towards Jira.
- Jira returns the confirmation with the syncBack
- The zendesk updates the local custom field with the current date
The custom field will contain the date that the sync has been confirmed
Add your comment... - Add this to the incomming sync on JIRA side:
- 10-1
- Is this a sync zendesk to jira, and in what direction does the comment needs to flow
- Does the comment body needs to be annotated on the outgoing side or the incoming side
- What date/time are you alluding to
Francis
- Mikael Bohlin
Hi,
outgoing sync from Zendesk to JIRA. We would like it to be added as an internal comment in Zendesk only.
- Mikael Bohlin
Hi,
date and time should be the date and time when the outgoing sync is started.
Regards
Mikael B
- Francis Martens (Exalate)
> outgoing sync from Zendesk to JIRA. We would like it to be added as an internal comment in Zendesk only.
So - JIra comments need to be added as internal comment to zendesk
> date and time should be the date and time when the outgoing sync is started.
Would the date and time of when the comment was added to the Jira be ok? - Mikael Bohlin
Hi,
if the comment and date is the date when it was synced with JIRA. This is for getting a timestamp in Zendesk to be able to track when the sync is initiated.
- Francis Martens (Exalate)
Regarding the time when the sync is initiated ...
Add following to the replicaOutgoingreplica.customKeys."Sync date" = new Date()
This then can be used in the incoming to update a date (or add to the comment)Incoming// add a custom field of type date issue.customFields."Sync Date".value = replica.customKeys."Sync date"
- Mikael Bohlin
Hi,
i just want to add an internal comment in (In Zendesk) to the ticket that is synced . The comment should contain:
Ticket sync initiatet: "Date and Time"
OK?
Regards
Mikael
- Mikael Bohlin
Hi,
can i write something like this in the outgoing syncrule:
issue.addedComments = replica.addedComments.collect{ c →
def Syncdate = newDate()
c.body = "Synk started:"+Syncdate
c
}
issue.comments = commentHelper.mergeComments(issue, replica, {it.internal = true}) - Mikael Bohlin
Hi,
can i do like this ?: Will this work ?
1) Create a custom field in Zendesk "Sync Date"
2) Add the following to the outgoing sync script:
issue.customFields."Sync Date".value= newDate()
- Francis Martens (Exalate)
Hi Mikael Bohlin
You can't set the issue/ticket on the outgoing sync because this could create loops.
What you can do is to add a syncBackAfterprocessing in the incoming sync on Jira.
SoIncoming Sync - Jiraif (firstSync) { syncHelper.syncBackAfterProcessing() }
on Zendesk, incoming sync, assume there is a custom field - Sync Date
Incoming Sync - Zendesk - Untestedif (issue.customFields."Sync Date" == null) { issue.customFields."Sync Date".value = new Date() }
Hope this helps - Mikael Bohlin
Will this work for multiple updates ? That is if a ticket is synced serveral times ?
- Francis Martens (Exalate)
Yes, that is why there is the if statement.
Once that it has been updated, it will remain.
If you would like to have the sync date updated each time that the sync happened, just remove the if statement - Mikael Bohlin
Ok,
but we want to use this for monitoring the last sync date. I guess we can remove the "first sync condition ?
- Francis Martens (Exalate)
Yes - I assumed the requirement was 'first sync'
Add your comment...
Hi,
whats the easist way to add an internal comment on outgoing sync with date and time ?