Issue in sending Change start date and end date through Jason

Prashant_13S
Tera Contributor

Hi Team,

 

Below is the issue.

 

Change management – The payload below from a recent change: That change was updated at Yesterday 16:00 by API and they sent over the payload Inbound Change Update - Payload:

{"start_date":"2024-05-23 15:00:00","end_date":"2024-05-27 15:50:00"}

 

So this would have changed it – API sent this at a 16:00 start time and the  Payload amended it.

 

 

In our system we are using below - 

 

 

 

if (current.start_date.changes()) {
            jsonBody.start_date = current.getValue('start_date');   
        }
        if (current.end_date.changes()) {
            jsonBody.end_date = current.getValue('end_date');    
   }

 

2 REPLIES 2

SanjivMeher
Kilo Patron
Kilo Patron

So the time should have been 16:00:00 in the payload?

In that case , they should have sent the display value of the dates.


Please mark this response as correct or helpful if it assisted you with your question.

Prashant_13S
Tera Contributor

Hi Sanjiv,

 

Let me rephrase the issue.

 

We have a bidirectional rest api integration.

In which third party can create change request and when we are updating the planned start date and end date, then same should get updated in change record of target instance but the issue is when we are updating planned start date and end date in source instance same is getting updated but with the difference of 1 hour.

for example if we are updating 16:00:00 in our change request (Source instance) then it is sending from here 15:00:00 hrs to third party(target instance).

 

  • Scheduled End(date & time) - 27/05/2024 16:50:00
  • Scheduled Start(date & time) - 27/05/2024 16:00:00

{"start_date":"2024-05-27 15:00:00","end_date":"2024-05-27 15:50:00","i

 

Below is the code using to capture the update -

            if (current.start_date.changes()) {
            jsonBody.start_date = current.getValue('start_date');   
              }
            if (current.end_date.changes()) {
            jsonBody.end_date = current.getValue('end_date');    
             }