Set the default duration for Calls and Meetings?

With calls and meetings now upgraded to Sidecar, the duration fields no longer appear in the Studio.  How can we change the default duration from 30 minutes to 1 hour?  I created a custom create.js and followed the whole creation process in debugger, but did not find anything useful.

Any ideas?

  • Hello Jastin,

    I have done this kind of customization for meeting module. I have to guide you follow the steps.

    1. Copy the clients/base/fields/duration/duration put it in custom/modules/<module_name>/clients/base/fields/duration/duration.

    2. Open duration.js file and change below two functions.

    setDefaultStartDateTime: function(currentDateTime) {
            var defaultDateTime = currentDateTime || app.date().seconds(0);
            if (defaultDateTime.minutes() > 30) {
                defaultDateTime.add('h', 1).minutes(0);
            } else if (defaultDateTime.minutes() > 0) {
                defaultDateTime.minutes(60);
            }
            this.model.set('date_start', defaultDateTime.formatServer());
        },
    

    I have change defaultDateTime.minutes(30) to defaultDateTime.minutes(60).

    modifyEndDateToRetainDuration: function() {
            var startDateString = this.model.get('date_start'),
                originalStartDateString = this.model.previous('date_start'),
                originalStartDate, endDateString = this.model.get('date_end'),
                endDate, duration, changedAttributes = this.model.changedAttributes();
            if (!startDateString || (changedAttributes.date_start && changedAttributes.date_end)) {
                return;
            }
            if (endDateString && originalStartDateString) {
                originalStartDate = app.date(originalStartDateString);
                duration = app.date(endDateString).diff(originalStartDate);
                if (duration >= 0) {
                    endDate = app.date(startDateString).add('m', 60).formatServer();
                    this.model.set('date_end', endDate);
                }
            } else {
                endDate = app.date(startDateString).add('m', 60).formatServer();
                this.model.set('date_end', endDate);
            }
        },
    

    Same way here also change app.date(startDateString).add('m', 30).formatServer(); to app.date(startDateString).add('m', 60).formatServer();

    Hope it will help.

    Let me know for more help.

    -BPATEL