Business Rule to set Actual Start Time when the Assigned to is set

JP Marshall
Tera Contributor

I am looking for assistance on how to create a business rule that will populate the "Actual Start (work_start)" time with the current time when the "Assigned to (assigned_to)"  field is populated for both a RITM and an INC. I would ideally like the work_start time to update if/when there is a change to the assigned_to field. I intend on using this to help me identify stale tasks that have not been updated since the actual work_start time. Please help if you have ideas or can assist with the process. 

I will also need a fix-script to update all the records that have already been created. 

Thank you in advance!!!

9 REPLIES 9

Hi @OlaN 

 

Thanks for your advice, sir.

I always learn something new from you.

 

Regards

Shaqeel


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel

JP Marshall
Tera Contributor

I was able to get this to work using a business rule. What would be an example of the fix script I could run to update RITMs and INCs with this same logic?

@JP Marshall 

You can use this script on before business rule with assigned to changes condition. But for existing record how will you determine when the assigned to changed or filled, which date and time would you like to fill it over? there?

Best,
Rampriya S

Rampriya-S
Tera Guru
Tera Guru

rampriya_S_0-1717790053012.png

It is not that accurate, but you may fill SLA stat time to your Incidents and RITMs Actual start for your existing records via fix script.

Best,
Rampriya S

OlaN
Giga Sage
Giga Sage

Hi,

This requirement does not need to be run by a business rule, you could do the same with a Flow, no coding required.

I'll provide a simple example below.

One thing to consider in my example, and in the answer given by @Shaqeel 
What should happen to the work_start field if the assigned to is set, then emptied, and then set again?
Perhaps you would want to add some condition to prevent the work_start to be overwritten with a new value, if already set (by the first assignment) ?

 

flow-set-actual-work.png

 

And yes, this can be reused as a Flow to set all the historic values also, some minor changes and you are good to go.

(depending on how many historic records you want to change a Flow might not be the best solution, if many thousands of records need to be updated, a fix script is a better option).

 

flow-set-actual-work-on-historic-records.png