Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

synchronize a Jira timestamp field to servicenow.

 
1
0
-1

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 

    CommentAdd your comment...