Deepser Deepser
  • Documentation
  • Start Free Trial
Start Free Trial
Deepser Deepser
Start Free Trial
Deepser
  • Documentation
  • Start Free Trial
loading
  1. Home
  2. Documentation
  3. Calendar
  4. Calendar Configuration Example
Updated on June 25, 2025

Documentation

  • Access and Visibility
    • Resources
    • Roles
    • Creating and Managing Roles in Deepser
    • Creating a new user
    • Password Reset
    • New User Registration
    • LDAP Configuration
    • SSO Deepser Configuration
    • SSO Login/Provisioning Configuration – Azure
    • Multi Factor
    • Groups
    • Groups Creation
    • Manage Users in Groups
    • Company
    • Companies in Deepser
    • Company Creation
    • Parent Companies
    • Email Domains
    • Sync Account CRM Companies
    • Advanced Sync
    • Visibility management in Deepser
    • Permission and Visibility Handling
    • Groups and Rules Definition
    • End Users Visibility Overview
    • Entities Portal Visibility
    • Empowered End User (EEU)
    • Company Supervisors
    • Additional Companies
    • Access Groups
    • Access Users
  • Activity, Worklogs & Comments
    • DeepActivity Comments
    • Placing a comment
    • Comments System Configuration
    • DeepActivity Worklog
    • Entering a Worklog
    • Enabling Worklogs in the User Portal
    • Worklog Global Grid
    • Worklog Global Grid Configuration
    • Activity Global Grid Advanced Configuration
  • Board
    • Enable groups to create boards
    • Creating a FreeForm Board
    • Creating and customizing a Lane
    • Entry Creation
    • Board Live
    • Live Board Creation
    • Advanced Live Board Configuration
    • Creating and customizing a Lane
    • Creation and Advanced Configuration of a Lane and Drop Code
  • Categories
    • Category Overview
    • Category Configuration
    • Category Usage
  • Chat
    • Using the Chat
    • Enabling the Chat on Portals
    • Chat Rooms and Moderators
    • Public Chat
    • Configure a Public Chat Widget
    • Chatbot
    • Chatbot Flow – Example
  • CMDB
    • Deepser CMDB
    • Enable CMDB in the User Portal
    • User Portal CMDB Grid Configuration
    • Advanced Configuration of CMDB Grids
    • Class, Type and Subtype
    • Configuring a CI
  • CRM
    • Deep CRM
    • Creating an account in the CRM
    • Creating a contact in the CRM
    • Creating an opportunity in the CRM
    • Contact Types in CRM
    • Opportunity Types in CRM
    • CRM Lists
    • Sync Contacts and Accounts
    • Address Functioning
    • Sales
    • Mailchimp Integration
  • Deepser API
    • API Notions
    • API Endpoint and URL
    • API Verbs and Format
    • API Authentication
    • API Main Methods
    • Retrieve
    • Multiple Retrieve
    • Create
    • Update
    • Delete
    • API Entities
    • API Company
    • User API
    • Group API
    • Service Operation API
    • Service Type API
    • Activity API
    • CMDB CI API
  • Deepser Fundamentals
    • Deepser Backend
    • Deepser User Menu
    • Deepser Navigation Menu
    • Global Search Usage
    • Deepser Home Page
    • Grids
    • Filters and Order
    • Export Data
    • Mass Action
    • Mass Action Configuration
    • Grid Creation and Cloning
    • Configuring Grids
    • Advanced Collection Configuration
    • Grids Render and Options Configuration
    • Grids Custom Options Configurations
    • Grids Renderer Tooltip Example
    • Grids Renderer Link Example
    • Grids System Configuration
    • Form Template Theory
    • FormTemplates
    • FormTemplates Structure and Buttons
    • Form Template Selection and Creation
    • Form Template Configuration
    • Form Template Structure Configuration
    • Formtemplates Fieldset Configuration
    • Formtemplates Buttons Configuration
    • Formtemplates Field Configuration
    • Advanced Form Template Rules
    • Custom Button Configuration
    • Buttons Conditional Hiding
    • User Portal
    • Browsing the user portal
    • Managing Tickets in The User Portal
    • User Portal Additional Features
    • Configuring Portal Groups
    • Configuring Portal Requests
    • Configuring Service Operations in the User Portal
    • Enabling Other Modules in the User Portal
    • Enabling Other Modules in the User Portal Grid
    • Guest Portal
    • Enabling the Guest Portal
    • Guest Portal Visibility Configuration Overview
    • Enabling Service Types on the Guest Portal
    • Adding a Portal Group in the Guest Portal
    • Adding a Portal Request in the Guest Portal
    • Editing Form Templates in the Guest Portal
    • Enabling Categories in the Guest Portal
    • Enabling Notifications for Guest Users
    • Knowledge Base in the Guest Portal
    • CMS in the Guest Portal
    • Cache Management
    • Quick Reply
    • Mentions
    • Module Creator – Creating a custom module
  • Email Integration
    • Email Integration in Service Management
    • Enable Embedded Images on Message Body
    • Mailbox
    • Configuring an Outgoing Mailbox
    • Configuring an Incoming Mailbox
    • OAuth Client for Email Integration
    • Email Loop Management Tool
    • Office 365 Mailbox Configuration
    • Azure Oauth Client (Legacy Protocol)
    • Google Oauth Configuration
    • Email Rules
    • Email Rule Configuration
    • Advanced Email Rule Configuration
    • Avoid Duplicate Tickets By Email
    • Managing additional Email recipients
    • Email Events
    • Enabling / Disabling an Email Event
    • Custom Email Events Creation
    • Custom Email Events Configuration
    • Attach Report to Email Notification
    • Email Templates
    • Email Template Configuration
    • New operation notification template for Requester User
    • New or Updated comment notification template for Requester
    • Email Webclient
  • Escalation
    • Escalation rule levels
    • Configuring Escalation Rules
    • Configure an escalation rule that modifies entity.
    • Escalation rule that sends an email notification
    • Create an escalation rule that is based on a metric
    • Configure an escalation rule that generates other entities
  • Importing Data
    • Import Foundamentals
    • Import Creation
    • Import Basic Data Binding
    • Import Before Run
    • Import Before Run Tutorial
    • Import Before Row
    • Import Before Row Tutorial
    • Import After Row
    • Import Binding The Unique Field “Code”
    • Import Binding the Type Value
    • Import Binding the Dates Values
    • Import Binding a Company, creating the record if it doesn’t exist
    • Global Import
  • IT Asset Management
    • IT Asset Models
    • ITAM Automatic Scan Configuration and Usage
    • ITAM Configuration
    • AnyDesk
    • Supremo
  • Knowledge Base
    • Reading the Knowledge Base
    • Knowledge Base in Service Operations
    • Article Configuration in Knowledge Base
    • Knowledge Base Configuration
    • Knowledge Base Standard Filters
    • Knowledge Base Advanced Filters
  • List
    • Introduction to lists
    • Creating a new list
    • List Values and Model Visibility
    • Use a list as the basis of a custom field
  • Password Management
    • Configuring a Password
    • Using a Password
    • Private Password
    • Password System Configuration
    • Enabling Password Manager Portal
    • Custom Deeppassword fields
    • Password Audit
  • Relations
    • Using a Relation Grid field
    • Configuring a Relation
    • Modifying relation using a custom event.
    • Opposite relation
    • Column Configuration
    • Relation Graph View
  • Service Management
    • Introduction to Services in Deepser
    • Service Operations
    • Creating a Service Operation
    • Adding Comments, Activities, Attachments and Tasks to Operations
    • Service Operation Main Fields
    • Service Operation Additional Fields
    • Service Operation Activities, Relations, Email and SLAs
    • Service Types
    • Routing rules
    • Configuring Routing Rules
    • Advanced Routing Configuration
  • SLA
    • Calendar
    • Metrics
    • Goal
  • Task
    • Creation of task type
    • Form configuration of task types
    • Task Global Grid
    • Task Global Grid Configuration
    • Task Global Grid Advanced Configuration
  • Workflow
    • Workflow Overview
    • Flow Designer
    • Flow Trigger
    • Workflow – Stage Set
    • Workflow – Executions
    • Approval workflows
    • Portal Approval Structure
    • Backend Approval Structure
    • Workflow Actions
    • Workflow Logic
    • Workflow Samples
    • Multi Stage Flow
    • SubFlow
  • Inventory
    • Inventory Overview
    • Inventory Configuration
    • Warehouse
    • Item
    • Movement
  • Custom Fields
    • Custom Field Overview
    • Custom Field – Creation
    • Custom Field – Element Type Simple
    • Custom Field – Element Type Advanced
  • Folder icon closed Folder open iconCustom Event
    • Custom Event Overview
    • Custom Event – Creation
    • Custom Event – Type
  • Dashboard
    • Dashboard Overview
    • Panel Configuration
    • Chart Configuration
  • Project
    • Project Module
    • Gantt
    • Project Task
    • Resource Grid
  • Calendar
    • Calendar Configurations
    • Internal Calendar Configuration
    • Calendar Configuration Example
    • External Calendar Configuration
    • External Calendar – Google Calendar Configuration Example
    • External Calendar – Outlook Calendar Configuration Example
    • Calendar Usage
  • Survey
    • Survey Overview
    • Designer
    • Survey
    • Dashboard
  • Contract and Contract Line
    • Contracts and Contract Lines – General Overview
    • Contracts
    • Contract Lines
    • Contract Creation
    • Line Creation
    • Associate a Contract / Line with other entities
    • Contract Type
    • Line Type
    • Contracts and Escalation Rules
  • Report Documentation
    • Report Configuration
    • Report Usage
  • Sales
    • Catalog and Price List Overview
    • Catalog Configurations
    • Product
    • Price List
    • Billing Overview
    • Order Billing
    • Lines Billing
    • Worklogs Billing
    • Movements Billing
    • Operation Billing
  • Folder icon closed Folder open iconIntegrations
    • Teams Integration
    • NinjaOne RMM Integration
    • Datto RMM Integration

Calendar Configuration Example

Estimated reading: 5 minutes

Calendar Module can be helpful to track all the worklogs and also be able to directly modify their duration or start date. First of all, create a calendar entity called “Worklog Calendar” and then configure the main part, which is the source.

This calendar will be based on the ‘started_at’ field of the activity model.

  • collection_code
				
					// Retrieve the activity collection and filter it by type of worklog.
$collection = Deep::getResourceModel('deep_activity/activity_collection') ->addFieldToFilter('model_alias','deep_service/operation')->addFieldToFilter('type',2);
// A time range is set on the started_at field, by using $start and $end variables , which correspond to ‘start_date_field’ and ‘end_date_field’.

$collection->addFieldToFilter('started_at', ['gteq'  => $start]);
$collection->addFieldToFilter('started_at', ['lteq'  => $end]);

				
			
				
					// A join operation is performed on the activity collection, in order to access service operation fields and display them on the calendar
$collection->getSelect()->join(
    array('operation_table'=>'deep_service_operation'),
    'main_table.model_id = operation_table.entity_id',
    ['assigned_username'=>'operation_table.assigned_username','ticket_title'=>'operation_table.title'  ,'assigned_group_id'=>'operation_table.assigned_group_id',
'ticket_status'=>'operation_table.status','operation_type'=>'operation_table.type_id']);
// it applies the filters selected on the calendar
 $this->applyFilters($collection);

				
			
				
					//Loop through each worklog
foreach ($collection as $worklog)
{
// set the accurate timezone for the start date that comes from database
    $startEvent = $this->convertToTimezone($worklog->getStartedAt());
// calculate the end of the worklog by  using duration field
    $endDate = date_create_from_format('Y-m-d H:i:s',$startEvent);
    $duration = $worklog->getDuration();
    $endDate->modify("+ $duration second");
    $endDate = $endDate->format('Y-m-d H:i:s');
// convert end date to an accurate timezone
    $endEvent = $this->convertToTimezone($endDate);
// Retrieve the url of the ticket
    $modelUrl = Deep::getUrl('*/service_operation/edit',['id'=>$worklog->getModelId()]);
// Retrieve the User who create the worklog
    $createdByUser = Deep::getModel('deep_admin/user')->loadByUsername($worklog->getCreatedBy())->getDisplayUsername();
// worklog data is loaded and then converted to an array
    $worklog->loadTypeData();
    $worklog->toArray();
// set the ticket Url  as an array element
    $worklog['model_url'] = $modelUrl;
// check if start date  and end date are populated  correctly, then add the current worklog as an event in the calendar.
    if($worklog->getStartedAt() !='' && $start !='' && $end !='')
    {
        $this->addEvent($startEvent,$endEvent,$worklog);
    }
}

				
			
  • Event_name
				
					/* event variable is a javascript object that is populated with all worklog’s fields. The syntax to access a field is event.” Field name”, in this case ticket_title field is used.
On this section an html text element should be returned, such as <p>, <span> <h1> etc.
*/
const eventTitle = "<span style='color:black'>"+event.item.ticket_title+"</span>";
    return eventTitle;

				
			
  • drop_code
				
					// load worklog by using the $item variable, which is an array with all worklog’s fields.
$worklog = Deep::getModel('deep_activity/activity')->load($item['entity_id']);
// check if $start is set after the event is dropped
 if ($start)
 {
  // Set started_at field to the new start date and save the model
     $worklog->setData('started_at',$this->convertToSystemTimezone($start));
     $worklog->save();
 }

				
			
  • Tooltip_code
				
					// create a main div element to wrap the tooltip
var html = jQuery('<div>');
   // create an element to contain the start_date field
   var startDateContainer = jQuery('<div>');
   var startedAt = new Date(event.item.started_at+'+00:00');
// Set  start date to the right timezone and date format
    startedAt = startedAt.toLocaleString('it-IT',{timeZone:'Europe/Rome', day:"2-digit",month:"2-digit",year:"numeric",hour: '2-digit', minute:'2-digit'});
// modify the text of the start_at element by adding its value
    startDateContainer.text("Started At: "+startedAt);
// add styles to its text
    startDateContainer.css('padding', '5px 0');
    startDateContainer.css('font-weight', 'bold');
// append the started_at element to the main div 
    html.append(startDateContainer);

// create a paragraph element that will contain the ‘created by user 
    var createdByContainer = jQuery('<p>');
    createdByContainer.text('Technician: ' + event.item.technician);
    createdByContainer.css('padding', '5px 0');
    createdByContainer.css('font-weight', 'bold');
    html.append(createdByContainer);
 // select the element which is an event on the calendar, and initialize tooltip with specific configurations.
    jQuery(element).tooltipster({
        theme: "tooltipster-shadow", // specify the tooltip theme
        interactive: true, // Makes the tooltip content interactive
        side: "right", // positions the tooltip on the right side of the target element
        content: html  // append the above created tooltip to the  content
    });
// adds an onclick event listener the element, which opens the ticket where the worklog is added
    jQuery(element).on('click', function(){
        window.open(event.item.model_url, '_blank');
    });

				
			
  • drop_js_code
				
					//    create a confirm box to warn the user about dropping the event
 if (confirm('Are you sure?'))
        return true; // if confirmed event is dropped
    else
        return false;

				
			

Filters

Worklogs will be filtered by : Ticket Status, Ticket Type, Assigned Group and Assigned user.

  • html_element
				
					$statusList = Deep::helper('deep_list')->loadListValues('service_operation_status')->toOptionHash(); // Retrieve operation status values
// retrieve operation types
$operationTypes = Deep::getResourceModel('deep_service/type_collection')->toOptionHash();
// retrieve groups values
$groups = Deep::getResourceModel('deep_group/group_collection')->toOptionHash();
$users =[];
// Every filter is added by using $this->addField()
$this->addField(
    'operation_table.status', // filter name which should be unique
    'select', // filter field type
    array(
        'label' => ' Ticket Status', // filter label 
        'name'  => ''operation_table.status', // filter name
        'multiple' => 'multiple', // sets this filter as multiselect
        'values' => $statusList // set the values from which the select will filter
    )
);
$this->addField(
    'operation_table.type_id',
    'select',
    array(
        'label' => 'Service Type',
        'name'  => 'type_id',
        'multiple' => 'multiple',
        'values' => $operationTypes
    ));
' Assigned Group',
        'name'  => 'operation_table.assigned_group_id',
        'multiple' => 'multiple',
       'values' => $groups
    ));

				
			
  • collection_code
				
					// loop through all the filters and filter the collection based the column name. 
// In this case it is required that filter and collection field have the same name
foreach (  $this->getRequestFilter() as $k => $v){
    if ($v)
    {
        $collection->addFieldToFilter($k, ['in' => $v]);
    }
}

				
			

Was this guide helpful? Yes No

Share this Doc

Calendar Configuration Example

Or copy link

Clipboard Icon
CONTENTS
Leaf Illustration

Deepser srl
Via Luigi Dalla Via 3/B,Torre A, piano 7, int. 12
36015 Schio (VI), Italy

© Deepser. All right reserved.

Privacy Policy
Terms of Service