Vantiq / Blueprints

Example projects that can be imported by VANTIQ users to jumpstart development
MIT License
1 stars 1 forks source link

Field Service Management: collab.scheduleLocationTracking returns wrong time #6

Closed MarcelRParcs closed 5 years ago

MarcelRParcs commented 5 years ago

Hello everyone,

It looks like the procedure collab.scheduleLocationTracking returns the time until the scheduled arrival date and not the time until the scheduled arrival date minus the hour that is passed to the procedure as a parameter.

This should return the scheduled time minus the given buffer time so it starts tracking before the scheduled arrival time.

Best regards Marcel

pburma commented 5 years ago

I made a change to subtract out the buffer time that is set in the collaboration and passed into the procedure.

trackInSeconds = (date(scheduledArrivalDate, "date", "epochSeconds") - date(now(), "date", "epochSeconds")) - (buffer/1000)

I made a couple other changes to check fsm_06 branch for the complete update.