Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Admiral
Admiral
904 views

Duration time don't show while doing search on IM URGENT!!!!

Jump to solution

Hello Team,

We have customize duration time field on IM module, Which calcuates duration time of IM ticket's between closed-open time.. We are using this function from

process name:

im.close

 if (problem.status in $L.file="Closed") then (duration.time in $L.file=close.time in $L.file - open.time in $L.file)

While we do search functionality the duration time field shows empty... 

Duration time.JPG

If we hit the save button duration time we get the value "duration time"..

Best Regards,
Tom
0 Likes
1 Solution

Accepted Solutions
Fleet Admiral
Fleet Admiral

Format Control for "probsummary" (or "IM.update.Incident")

In Calculations tab:

Update: not same(problem.status in $file, problem.status in $file0) and problem.status in $file="Closed"
Calculation: duration.time in $file=nullsub(close.time in $file, tod()) - open.time in $file

or as close.time=current time when start this FC then 

for Calculation: duration.time in $file=tod() - open.time in $file

 

But this duration also gets off hours

View solution in original post

12 Replies
Fleet Admiral Fleet Admiral
Fleet Admiral

You don't state your version, but I'm going to assume it's less than 9.4x.

Since it's custom code, it's hard to pinpoint exactly where your problem might be.  But, if it's not triggering when you close the ticket, then my guess is it's either too late, too early, or a bad condition.

In the im.close Process, the RAD that actually closes the IM is the second one - the 'im.close' RAD application.  It's that RAD that sets the problem.status value to 'Closed', and that saves the record.

So, if you have your condition BEFORE that RAD, then the problem.status in $L.file <> "Closed" until AFTER that RAD application is triggered.  However, if you put your condition AFTER the RAD, the value of problem.status in $L.file="Closed", but nothing saves the record after that RAD runs, so while the calculation happens, the value doesn't get stored.

So, I'd recommend either changing your condition and putting it before the im.close RAD, or taking it off the Process record altogether and putting it in the probsummary formatctrl calculations instead.

 And a reminder - the forum is great for asking questions, but 'Urgent' issues are not really what the forum is for.  

0 Likes
Admiral
Admiral

@Jacob:

Thanks for your reply... Yes we are using SM 9.3.. When I am trying use this condition on format control.. I m getting below error message. I can't close the ticket.

sdsJPG.JPGfc.JPG

Best Regards,
Tom
0 Likes
Vice Admiral
Vice Admiral

Dear Tomkool,

In format control you should use $file & not $L.file

You could do the following: 

Update: problem.status in $file="Closed"
Calculation: duration.time in $file=close.time in $file - open.time in $file

Best regards,

 

0 Likes
Admiral
Admiral

Thnxs for your suggestion!

But we need save twice to reflect the duration time, Is that any other way we can find the fix for this requirement.

Best Regards,
Tom
0 Likes
Vice Admiral
Vice Admiral

remove the condition on the update

do the following:

Delete: true
Calculation: duration.time in $file=close.time in $file - open.time in $file

0 Likes
Admiral
Admiral

After using delete condition true. Duration time is null now :(!!

Best Regards,
Tom
0 Likes
Vice Admiral
Vice Admiral

hi Tomkool,

When you put true on the delete, you have to close the interaction by clicking the Close Interaction button & not update the status to Close. It's different. 

0 Likes
Vice Admiral
Vice Admiral

Oh Sorry... you are in the probsummary table. 
I have a different environment, can you let me know how do you close the incident?
you click on Resolve? or do you have a close button? or when you close the interaction, the incident is automatically closed?

Please let me know so I can help.

Thanks

0 Likes
Admiral
Admiral

Sorry for the delay reply.. We have close button on probsummary table.

Best Regards,
Tom
0 Likes
Fleet Admiral
Fleet Admiral

Format Control for "probsummary" (or "IM.update.Incident")

In Calculations tab:

Update: not same(problem.status in $file, problem.status in $file0) and problem.status in $file="Closed"
Calculation: duration.time in $file=nullsub(close.time in $file, tod()) - open.time in $file

or as close.time=current time when start this FC then 

for Calculation: duration.time in $file=tod() - open.time in $file

 

But this duration also gets off hours

View solution in original post

Absent Member.
Absent Member.

Hello tomkool007,

 

I think that your problem is that this IM ticket don't have the closed.time informed or that when the user closed the ticket sometimes the formatcontrol try to perform your calculation before that the close.time will be informed.

I suggest to you that use triggers instead of formatcontrol for do this calculation.

Like everything in this life can fail. I suggest to you that create in addition a schedule that inicialice every 15 min (for example) for check every IM ticket that don't have the duration time inform and for every ticket that have not duration time, you calculate the time with Javascript inside the scheduler.

 

Best Regards and luck.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.