Support Article
OOTB CPM timer's goal format needed in HH:MM:SS
Summary
There is a requirement to design OOTB CPM timer format to appear as HH:MM:SS. Currently the goal shows only MM:SS.
Error Messages
Not Applicable
Steps to Reproduce
1. Log in to the application.
2. Create a manual case (interaction).
3. Observe the timer clock on top left hand side.
Root Cause
This is an expected behaviour of the OOTB shipped product.
Resolution
This issue is resolved through the following local-change:
1. Set the timer value in the desired format in the map rule "SetSLATimeValues".
For example: 10:15:25 (HH:MM:SS)
2. Apply the below code changes in “CPMCallTimer” JS file
String sGoal="0", sDeadline="0", gHour="0",dHour="0", gMin="0", gSec="0", dMin="0", dSec="0"; // add the new variable gHour
sDeadline = aPage.getString("SLADeadlineTime"); // read the split result of ":" and populate the hour variable. In this case, the 0th index holds the Hour.
temp = sGoal.split(":");
gHour = temp[0];
gMin = temp[1];
gSec = temp[2];
tools.putSaveValue("CTITimerGoalString_hour",gHour); // set the value in the clipboard
<span id="goalTime"><p:r n="$save(CTITimerGoalString_hour)" m="normal"/>:<p:r n="$save(CTITimerGoalString_min)" m="normal"/>:<p:r n="$save(CTITimerGoalString_sec)" m="normal"/></span> // split the result into 3 separate entities and show as HH:MM:SS
Published July 31, 2015 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.