Service Desk Practitioners Forum

OVSD 4.5 - Rounding Dates

Go to solution
James Mohr

OVSD 4.5 - Rounding Dates

Hi All!

I was wondering if there was a function or whatever that would round dates. For example, we set a deadline of 13:09 and we want it to be set to 13:00. Understandably when you have an incident or service call related to SLAs, then you need to keep track of the actual minutes. However, in cases where you have a work order that is set to 13:09, my boss would like the deadline to be set at 13:00 as "proof" we "thought" about the deadline and did not just blindly take the default.

Any info is appreaciated.


Ruth Porter
Honored Contributor

Re: OVSD 4.5 - Rounding Dates

Hi jimmo,

You could try a custom text filed and 2 UI rules like:

Rule 1 when a value has changed
When Deadline is not empty
Update data: set custom text field to last 5 characters of Deadline (trim from left to remove the date and hours)

Rule 2 when a value has changed
When custom field does not start with 00:00
User notification message,

Hope this helps, Ruth
Vasily Kamenev
Honored Contributor

Re: OVSD 4.5 - Rounding Dates

Use Ruth's recomadations, but my vision need change the action "Notification message" on:
1. if you like doing correction "on fly" - use Update from external system. Need create web script where incoming data deadline correct to xx:00 and sending back.
2. if you like doing correction after save - use sd_event. Action exec, run the script bu correction of deadline.

James Mohr

Re: OVSD 4.5 - Rounding Dates

I was hoping to automate the process with the work orders as these never have deadlines like 13:09. I'm not a big fan of a popup to remind people to do something if it always needs to do it. However, it is something to think about.

I had been considering an external perl script to round the date. Obviously that would work, but I was hoping for a round() function or something similar.


//Add this to "OnDomLoad" event