Note
We've packed up and moved from Confluence to Discourse to bring you a better, more interactive space. Out of courtesy we didn't migrate your user account so - you will have to signup again
The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe
We try to synchronize a Jira timestamp field to servicenow.
Several time ago we did the same for the problem module with success.
Now we try to do the same for Request Items in servicenow
The Jira field is event timestamp custom field and we use the following code :
if(replica.customFields.eventTimestamp && replica.customFields.eventTimestamp.value){
// Define timestamps
def timestamps = replica.customFields.'eventTimestamp'.value
// Set a date using the timestamp
def date = new Date(timestamps.time)
// Create a date format as desired
SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("yyyy-mm-dd hh:mm:ss")
requestItem.u_event_timestamp = dateFormat.format(date)
When we do a sync we didn’t get an error but the field is not updated.
Thanks for your help.
Regards
Serge