modify default call duration to 5 minutes (from 15)

I have added “05” to duration_intervals using Dropdown Editor.

How to change default value for a new call from 15 to 05?

I looked in Studio>Calls>Fields and default value for both duration_hours and duration_minutes are blank.

Where else might I look?

I’ve tested this but I don’t know if it is upgrade safe, let’s wait for some feedback from devs.

You need to copy /suitecrm_www/modules/Calls/Call.php to suitecrm_www/custom/modules/Calls/

Edit the copied Call.php and search this line

 var $minutes_values = array('0'=>'00','15'=>'15','30'=>'30','45'=>'45');

And change it to

 var $minutes_values = array('0'=>'00','5'=>'05','15'=>'15','30'=>'30','45'=>'45');

There you can add the intervals that you want, just make sure that those arrays that you add there matches the one in the dropdown editor, and don’t forget to make a repair & rebuild

I repeat, I don’t know if this is upgrade safe.

Best regards

3 Likes

Hello,

I know this subject is old but I already did all the changes in Datetimecombo.js & Time.js

 //A safety scan to make sure hrs and minutes are formatted correctly
	if (this.mins > 0 && this.mins < 5) {
		this.mins = 5;
	} else if (this.mins > 5 && this.mins < 10) {
		this.mins = 10;
	} else if (this.mins > 10 && this.mins < 15) {
		this.mins = 15;
	} else if (this.mins > 15 && this.mins < 20) {
		this.mins = 20;
	} else if (this.mins > 20 && this.mins < 25) {
		this.mins = 25;
	} else if (this.mins > 25 && this.mins < 30) {
		this.mins = 30;
	} else if (this.mins > 30 && this.mins < 35) {
		this.mins = 35;
	} else if (this.mins > 35 && this.mins < 40) {
		this.mins = 40;
	} else if (this.mins > 40 && this.mins < 45) {
		this.mins = 45;
	} else if (this.mins > 45 && this.mins < 50) {
		this.mins = 50;
	} else if (this.mins > 50 && this.mins < 55) {
		this.mins = 55;
	} else if (this.mins > 55) {
		this.hrs += 1;
		this.mins = 0;
and

if(this.allowEmptyHM){
		text += '\n<option></option>';
	}
	text += '\n<option value="00" ' + (this.mins == 00 ? "SELECTED" : "") + '>00</option>';
    text += '\n<option value="05" ' + (this.mins == 05 ? "SELECTED" : "") + '>05</option>';
    text += '\n<option value="10" ' + (this.mins == 10 ? "SELECTED" : "") + '>10</option>';
    text += '\n<option value="15" ' + (this.mins == 15 ? "SELECTED" : "") + '>15</option>';
    text += '\n<option value="20" ' + (this.mins == 20 ? "SELECTED" : "") + '>20</option>';
    text += '\n<option value="25" ' + (this.mins == 25 ? "SELECTED" : "") + '>25</option>';
    text += '\n<option value="30" ' + (this.mins == 30 ? "SELECTED" : "") + '>30</option>';
    text += '\n<option value="35" ' + (this.mins == 35 ? "SELECTED" : "") + '>35</option>';
    text += '\n<option value="40" ' + (this.mins == 40 ? "SELECTED" : "") + '>40</option>';
    text += '\n<option value="45" ' + (this.mins == 45 ? "SELECTED" : "") + '>45</option>';
    text += '\n<option value="50" ' + (this.mins == 50 ? "SELECTED" : "") + '>50</option>';
    text += '\n<option value="55" ' + (this.mins == 55 ? "SELECTED" : "") + '>55</option>';
    text += '\n</select>';

& Call.php

public $minutes_values = array('0'=>'00','05'=>'05','10'=>'10','15'=>'15','20'=>'20','25'=>'25','30'=>'30','35'=>'35','40'=>'40','45'=>'45','50'=>'50','55'=>'55');

and already repair js files & compress files but its not working :frowning:

my version is
Versión 7.10.11
Sugar Versión 6.5.25 (Preparado 344)

and
php 7.3 version

could someone help me to fix this minor problem?
thanks in advance

Never mind, It works because the only thing that is missed is that you need to clean up your cache and that is
the options appear