Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

ServiceNow JIRA integration Date time field issue in JIRA SPOKE

ankitsharma_487
Giga Guru

Hi,

 

I am working on SN-JIRA integration and facing issue while I am sending the date/time field value.

 

for example , I am sending planned start date and planned end date field value of a Change record which has time component also (field type - date/time)

in JIRA its only picking up Date part , time part is getting skipped 

 

what I am sending via variable is following 

var start=new GlideDate();
start.setValue(fd_data.trigger.current.start_date)
//start.getByFormat("MM-dd-yyyy HH:mm");
start.getByFormat("MM-dd-yyyy HH:mm.SSSZ");
return start.getValue();

 

kindly help.

 

1 ACCEPTED SOLUTION

ankitsharma_487
Giga Guru

Hi All,

 

I was able to resolve it using following code

 

 

var start= new GlideDate();
start.setValue(fd_data.trigger.current.start_date);
return start.getByFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");

 

I took help from below links

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1207255

https://www.servicenow.com/community/developer-forum/is-there-a-glidedatetime-variant-for-getbyforma...

 

 

 

View solution in original post

3 REPLIES 3

KevinBellardine
Kilo Sage

You're probably not sending the format over correctly, try looking here.

 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

@KevinBellardine 

 

Thanks for sparing time and responding on the thread. 

ankitsharma_487
Giga Guru

Hi All,

 

I was able to resolve it using following code

 

 

var start= new GlideDate();
start.setValue(fd_data.trigger.current.start_date);
return start.getByFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");

 

I took help from below links

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1207255

https://www.servicenow.com/community/developer-forum/is-there-a-glidedatetime-variant-for-getbyforma...