Calculate problem task duration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 05:45 AM
I am using below business rule script to calculate the problem task duration. It is working fine in my PDI but it is not working in Customer Instances.
Any suggestions would be very helpful.
Thanks in Advance.
//Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 07:02 AM
hi @chetanpanch ,
Just let me clarify 2 points.
1. Which line in your scripts, isn't it running?
2. Is your PDI's time zone setting same as your customer's instance?
And also, I hope this topic would help you to solve,,,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 06:06 AM
1. I added some logs in to script to check whether business rule is getting executed or not so it is getting executed but I am not getting any value in the duration field.
2.My PDI time zone is IST and customer's time zone is EST.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 06:44 AM
I tried matching the PDI and VDI time zone but still the issue is same its working in PDI but not in VDI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 06:58 AM
hi @chetanpanch , thanks for your reply.
So, time zone is not related to your problem,,,
Then, how about checking the community topic I wrote?
> And also, I hope this topic would help you to solve,,,
This topic says that 1st date param should be greater than the 2nd date parameter in order to get a correct result.
According to your code, 2nd param is always greater than the 1st date param, I guess.
If you try as below, what will happen,,,?
------ exchange 1st param and 2nd param -----
current.calendar_duration = gs.dateDiff(current.closed_at.getDisplayValue(),current.opened_at.getDisplayValue(),false);
-------------------------------------------------------
But,,, in your PDI, current code causes no error, you said,,, strange,,,