Azure DevOps integration: Dates not mapping properly

tahnalos
Kilo Sage

I have created mappings for the following ADO objects into Servicenow: User Stories, Features, Epics, Change Request (to Enhancements), and Bugs (to Defects).

 

All mappings are working except for date fields.  I assume that there needs to be a script to calculate the date field into a format that can be accepted by ServiceNow.  Can someone tell me what the format of the date field is in ADO if I need to adjust the mapping by script?  Or is there a step that I'm missing to map dates?

2 REPLIES 2

Tanushree Maiti
Kilo Patron

Hi @tahnalos 

 

  • If the ServiceNow field is a Date type:
    var azureDateString = '2025-03-17'; // Replace with your Azure DevOps date string
    var glideDate = new GlideDate();
    glideDate.setValue(azureDateString); gs.info(glideDate.getByFormat("yyyy-MM-dd")); // Optional: log or get the value in a specific format
    
  • If the ServiceNow field is a DateTime type .Note: For integrations- Azure DevOps often uses UTC dates and times in the format yyyy-MM-ddTHH:mm:ss 
    var azureDateTimeString = '2025-03-17T10:00:00Z'; // Replace Azure DevOps DateTime string field value
    var glideDateTime = new GlideDateTime(azureDateTimeString);gs.info(glideDateTime.getByFormat("yyyy-MM-dd HH:mm:ss"));
Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

I just discovered that the Azure DevOps field maps do not have a scripting option, is there any other way to enable scripting for ADO field maps?