diff --git a/lhc_web/design/defaulttheme/tpl/lhdepartment/departments.tpl.php b/lhc_web/design/defaulttheme/tpl/lhdepartment/departments.tpl.php index f14945c4f..8a603a82d 100644 --- a/lhc_web/design/defaulttheme/tpl/lhdepartment/departments.tpl.php +++ b/lhc_web/design/defaulttheme/tpl/lhdepartment/departments.tpl.php @@ -12,6 +12,7 @@ getTranslation('department/departments','Disabled');?> getTranslation('department/departments','Visible only if online');?> getTranslation('department/departments','Overloaded');?> + getTranslation('department/departments','Offline');?> getTranslation('department/departments','Archived');?>     @@ -32,6 +33,7 @@ disabled == 1) : ?>blockgetTranslation('department/departments','Yes');?>getTranslation('department/departments','No');?> visible_if_online == 1) : ?>getTranslation('department/departments','Yes');?>getTranslation('department/departments','No');?> is_overloaded == true) : ?>getTranslation('department/departments','Yes');?>getTranslation('department/departments','No');?> + dep_offline == 1) : ?>flash_offflash_on archive == 1) : ?>archivegetTranslation('department/departments','Yes');?>getTranslation('department/departments','No');?> getTranslation('department/departments','Assigned operators');?> diff --git a/lhc_web/design/defaulttheme/tpl/lhdepartment/form.tpl.php b/lhc_web/design/defaulttheme/tpl/lhdepartment/form.tpl.php index 308d12ff5..4100f046d 100644 --- a/lhc_web/design/defaulttheme/tpl/lhdepartment/form.tpl.php +++ b/lhc_web/design/defaulttheme/tpl/lhdepartment/form.tpl.php @@ -27,6 +27,9 @@
+
+ +
diff --git a/lhc_web/doc/CHANGELOG.txt b/lhc_web/doc/CHANGELOG.txt index 4c38ac4f6..e9bf23b77 100644 --- a/lhc_web/doc/CHANGELOG.txt +++ b/lhc_web/doc/CHANGELOG.txt @@ -1,3 +1,9 @@ +4.49v + +1. You can set custom department strictly offline. + +execute doc/update_db/update_319.sql for update + 4.48v 1. Mobile notifications will work now for Mobile App. Although correct windows may not open. diff --git a/lhc_web/doc/update_db/structure.json b/lhc_web/doc/update_db/structure.json index 964c655d1..be5c4dba0 100644 --- a/lhc_web/doc/update_db/structure.json +++ b/lhc_web/doc/update_db/structure.json @@ -6691,6 +6691,14 @@ "default": null, "extra": "" }, + { + "field": "dep_offline", + "type": "tinyint(1)", + "null": "NO", + "key": "", + "default": "0", + "extra": "" + }, { "field": "archive", "type": "tinyint(1)", @@ -11743,7 +11751,8 @@ "bot_chats_counter" : "ALTER TABLE `lh_departament` ADD INDEX `bot_chats_counter` (`bot_chats_counter`);", "archive" : "ALTER TABLE `lh_departament` ADD INDEX `archive` (`archive`);", "identifier_2" : "ALTER TABLE `lh_departament` ADD INDEX `identifier_2` (`identifier`(191));", - "ignore_op_status" : "ALTER TABLE `lh_departament` ADD INDEX `ignore_op_status` (`ignore_op_status`);" + "ignore_op_status" : "ALTER TABLE `lh_departament` ADD INDEX `ignore_op_status` (`ignore_op_status`);", + "dep_offline" : "ALTER TABLE `lh_departament` ADD INDEX `dep_offline` (`dep_offline`);" }, "old" : ["oha_sh_eh","identifier"] }, diff --git a/lhc_web/doc/update_db/update_319.sql b/lhc_web/doc/update_db/update_319.sql new file mode 100644 index 000000000..757b963eb --- /dev/null +++ b/lhc_web/doc/update_db/update_319.sql @@ -0,0 +1,2 @@ +ALTER TABLE `lh_departament` CHANGE `dep_offline` `dep_offline` tinyint(1) NOT NULL DEFAULT '0'; +ALTER TABLE `lh_departament` ADD INDEX `dep_offline` (`dep_offline`); \ No newline at end of file diff --git a/lhc_web/lib/core/lhchat/lhchat.php b/lhc_web/lib/core/lhchat/lhchat.php index e02d21f31..30bae5ec0 100644 --- a/lhc_web/lib/core/lhchat/lhchat.php +++ b/lhc_web/lib/core/lhchat/lhchat.php @@ -1017,7 +1017,7 @@ public static function isOnline($dep_id = false, $exclipic = false, $params = ar if ($ignoreUserStatus === false) { if (is_numeric($dep_id)) { - $stmt = $db->prepare("SELECT COUNT(lh_userdep.id) AS found FROM lh_userdep INNER JOIN lh_departament ON lh_departament.id = :dep_id_dest WHERE `lh_departament`.`ignore_op_status` = 0 AND (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND ((last_activity > :last_activity OR `lh_userdep`.`always_on` = 1) AND hide_online = 0 AND ro = 0) AND (dep_id = :dep_id {$exclipicFilter}) {$userFilter}"); + $stmt = $db->prepare("SELECT COUNT(lh_userdep.id) AS found FROM lh_userdep INNER JOIN lh_departament ON lh_departament.id = :dep_id_dest WHERE `lh_departament`.`dep_offline` = 0 AND `lh_departament`.`ignore_op_status` = 0 AND (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND ((last_activity > :last_activity OR `lh_userdep`.`always_on` = 1) AND hide_online = 0 AND ro = 0) AND (dep_id = :dep_id {$exclipicFilter}) {$userFilter}"); $stmt->bindValue(':dep_id',$dep_id,PDO::PARAM_INT); $stmt->bindValue(':dep_id_dest',$dep_id,PDO::PARAM_INT); $stmt->bindValue(':last_activity',(time()-$isOnlineUser),PDO::PARAM_INT); @@ -1028,7 +1028,7 @@ public static function isOnline($dep_id = false, $exclipic = false, $params = ar $dep_id_filter = array(-1); $sqlDepartment = ''; } - $stmt = $db->prepare('SELECT COUNT(lh_userdep.id) AS found FROM lh_userdep, lh_departament WHERE ' . $sqlDepartment . ' `lh_departament`.`ignore_op_status` = 0 AND (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND ((last_activity > :last_activity OR `lh_userdep`.`always_on` = 1) AND hide_online = 0 AND ro = 0) AND (dep_id IN ('. implode(',', $dep_id_filter) .") {$exclipicFilter}) {$userFilter}"); + $stmt = $db->prepare('SELECT COUNT(lh_userdep.id) AS found FROM lh_userdep, lh_departament WHERE ' . $sqlDepartment . ' `lh_departament`.`ignore_op_status` = 0 AND `lh_departament`.`dep_offline` = 0 AND (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND ((last_activity > :last_activity OR `lh_userdep`.`always_on` = 1) AND hide_online = 0 AND ro = 0) AND (dep_id IN ('. implode(',', $dep_id_filter) .") {$exclipicFilter}) {$userFilter}"); $stmt->bindValue(':last_activity',(time()-$isOnlineUser),PDO::PARAM_INT); } $stmt->execute(); @@ -1037,14 +1037,14 @@ public static function isOnline($dep_id = false, $exclipic = false, $params = ar if ($rowsNumber == 0 && (!isset($params['exclude_online_hours']) || $params['exclude_online_hours'] == false)) { // Perhaps auto active is turned on for some of departments if (is_numeric($dep_id)) { - $stmt = $db->prepare("SELECT lh_departament_custom_work_hours.start_hour, lh_departament_custom_work_hours.end_hour FROM lh_departament_custom_work_hours INNER JOIN lh_departament ON lh_departament.id = lh_departament_custom_work_hours.dep_id WHERE (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND date_from <= :date_from AND date_to >= :date_to AND dep_id = :dep_id"); + $stmt = $db->prepare("SELECT lh_departament_custom_work_hours.start_hour, lh_departament_custom_work_hours.end_hour FROM lh_departament_custom_work_hours INNER JOIN lh_departament ON lh_departament.id = lh_departament_custom_work_hours.dep_id WHERE `lh_departament`.`dep_offline` = 0 AND (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND date_from <= :date_from AND date_to >= :date_to AND dep_id = :dep_id"); $stmt->bindValue(':dep_id',$dep_id); } elseif (is_array($dep_id)) { $sqlDepartment = ''; if (!empty($dep_id)) { $sqlDepartment = "AND dep_id IN (". implode(',', $dep_id) .")"; } - $stmt = $db->prepare("SELECT lh_departament_custom_work_hours.start_hour, lh_departament_custom_work_hours.end_hour FROM lh_departament_custom_work_hours INNER JOIN lh_departament ON lh_departament.id = lh_departament_custom_work_hours.dep_id WHERE (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND date_from <= :date_from AND date_to >= :date_to {$sqlDepartment}"); + $stmt = $db->prepare("SELECT lh_departament_custom_work_hours.start_hour, lh_departament_custom_work_hours.end_hour FROM lh_departament_custom_work_hours INNER JOIN lh_departament ON lh_departament.id = lh_departament_custom_work_hours.dep_id WHERE `lh_departament`.`dep_offline` = 0 AND (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND date_from <= :date_from AND date_to >= :date_to {$sqlDepartment}"); } $stmt->bindValue(':date_from',strtotime(date('Y-m-d')),PDO::PARAM_INT); @@ -1064,14 +1064,14 @@ public static function isOnline($dep_id = false, $exclipic = false, $params = ar $endHoursColumnName = $daysColumns[$column].'_end_hour'; if (is_numeric($dep_id)) { - $stmt = $db->prepare("SELECT COUNT(id) AS found FROM lh_departament WHERE (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND online_hours_active = 1 AND {$startHoursColumnName} <= :start_hour AND {$endHoursColumnName} > :end_hour AND {$startHoursColumnName} != -1 AND {$endHoursColumnName} != -1 AND id = :dep_id"); + $stmt = $db->prepare("SELECT COUNT(id) AS found FROM lh_departament WHERE `lh_departament`.`dep_offline` = 0 AND (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND online_hours_active = 1 AND {$startHoursColumnName} <= :start_hour AND {$endHoursColumnName} > :end_hour AND {$startHoursColumnName} != -1 AND {$endHoursColumnName} != -1 AND id = :dep_id"); $stmt->bindValue(':dep_id', $dep_id); } elseif (is_array($dep_id)) { $sqlDepartment = ''; if (!empty($dep_id)) { $sqlDepartment = "AND id IN (". implode(',', $dep_id) .")"; } - $stmt = $db->prepare("SELECT COUNT(id) AS found FROM lh_departament WHERE (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND online_hours_active = 1 AND {$startHoursColumnName} <= :start_hour AND {$endHoursColumnName} > :end_hour AND {$startHoursColumnName} != -1 AND {$endHoursColumnName} != -1 {$sqlDepartment}"); + $stmt = $db->prepare("SELECT COUNT(id) AS found FROM lh_departament WHERE `lh_departament`.`dep_offline` = 0 AND (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND online_hours_active = 1 AND {$startHoursColumnName} <= :start_hour AND {$endHoursColumnName} > :end_hour AND {$startHoursColumnName} != -1 AND {$endHoursColumnName} != -1 {$sqlDepartment}"); } $stmt->bindValue(':start_hour', date('G') . date('i'), PDO::PARAM_INT); @@ -1084,14 +1084,14 @@ public static function isOnline($dep_id = false, $exclipic = false, $params = ar // Check is bot enabled for department if ($rowsNumber == 0 && (!isset($params['exclude_bot']) || $params['exclude_bot'] == false)) { if (is_numeric($dep_id)) { - $stmt = $db->prepare("SELECT bot_configuration FROM lh_departament WHERE id = :dep_id"); + $stmt = $db->prepare("SELECT bot_configuration FROM `lh_departament` WHERE id = :dep_id AND `lh_departament`.`dep_offline` = 0"); $stmt->bindValue(':dep_id', $dep_id); $stmt->execute(); $resultItems = $stmt->fetchAll(PDO::FETCH_ASSOC); } elseif (is_array($dep_id)) { $sqlDepartment = ''; if (!empty($dep_id)) { - $sqlDepartment = "WHERE id IN (". implode(',', $dep_id) .")"; + $sqlDepartment = "WHERE id IN (". implode(',', $dep_id) .") AND `lh_departament`.`dep_offline` = 0"; } $stmt = $db->prepare("SELECT bot_configuration FROM lh_departament {$sqlDepartment}"); $stmt->execute(); @@ -1113,7 +1113,7 @@ public static function isOnline($dep_id = false, $exclipic = false, $params = ar } else { if ($ignoreUserStatus === false) { - $stmt = $db->prepare('SELECT COUNT(lh_userdep.id) AS found FROM lh_userdep LEFT JOIN lh_departament ON lh_departament.id = lh_userdep.dep_id WHERE (lh_departament.pending_group_max IS NULL || lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max IS NULL || lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND (lh_departament.hidden IS NULL || lh_departament.hidden = 0) AND (last_activity > :last_activity OR `lh_userdep`.`always_on` = 1) AND ro = 0 AND hide_online = 0 AND (lh_departament.disabled IS NULL || lh_departament.disabled = 0) '.$userFilter); + $stmt = $db->prepare('SELECT COUNT(lh_userdep.id) AS found FROM lh_userdep LEFT JOIN lh_departament ON lh_departament.id = lh_userdep.dep_id WHERE `lh_departament`.`dep_offline` = 0 AND (lh_departament.pending_group_max IS NULL || lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max IS NULL || lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND (lh_departament.hidden IS NULL || lh_departament.hidden = 0) AND (last_activity > :last_activity OR `lh_userdep`.`always_on` = 1) AND ro = 0 AND hide_online = 0 AND (lh_departament.disabled IS NULL || lh_departament.disabled = 0) '.$userFilter); $stmt->bindValue(':last_activity',(time()-$isOnlineUser),PDO::PARAM_INT); $stmt->execute(); $rowsNumber = $stmt->fetchColumn(); @@ -1121,7 +1121,7 @@ public static function isOnline($dep_id = false, $exclipic = false, $params = ar if ($rowsNumber == 0){ // Perhaps auto active is turned on for some of departments - $stmt = $db->prepare("SELECT lh_departament_custom_work_hours.start_hour, lh_departament_custom_work_hours.end_hour FROM lh_departament_custom_work_hours INNER JOIN lh_departament ON lh_departament.id = lh_departament_custom_work_hours.dep_id WHERE (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND lh_departament.hidden = 0 AND lh_departament.disabled = 0 AND date_from <= :date_from AND date_to >= :date_to"); + $stmt = $db->prepare("SELECT lh_departament_custom_work_hours.start_hour, lh_departament_custom_work_hours.end_hour FROM lh_departament_custom_work_hours INNER JOIN lh_departament ON lh_departament.id = lh_departament_custom_work_hours.dep_id WHERE `lh_departament`.`dep_offline` = 0 AND (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND lh_departament.hidden = 0 AND lh_departament.disabled = 0 AND date_from <= :date_from AND date_to >= :date_to"); $stmt->bindValue(':date_from',strtotime(date('Y-m-d')),PDO::PARAM_INT); $stmt->bindValue(':date_to',strtotime(date('Y-m-d')),PDO::PARAM_INT); $stmt->execute(); @@ -1138,7 +1138,7 @@ public static function isOnline($dep_id = false, $exclipic = false, $params = ar $startHoursColumnName = $daysColumns[$column].'_start_hour'; $endHoursColumnName = $daysColumns[$column].'_end_hour'; - $stmt = $db->prepare("SELECT COUNT(id) AS found FROM lh_departament WHERE (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND online_hours_active = 1 AND {$startHoursColumnName} <= :start_hour AND {$endHoursColumnName} > :end_hour AND {$startHoursColumnName} != -1 AND {$endHoursColumnName} != -1"); + $stmt = $db->prepare("SELECT COUNT(id) AS found FROM lh_departament WHERE `lh_departament`.`dep_offline` = 0 AND (lh_departament.pending_group_max = 0 || lh_departament.pending_group_max > lh_departament.pending_chats_counter) AND (lh_departament.pending_max = 0 || lh_departament.pending_max > lh_departament.pending_chats_counter) AND online_hours_active = 1 AND {$startHoursColumnName} <= :start_hour AND {$endHoursColumnName} > :end_hour AND {$startHoursColumnName} != -1 AND {$endHoursColumnName} != -1"); $stmt->bindValue(':start_hour', date('G') . date('i'), PDO::PARAM_INT); $stmt->bindValue(':end_hour', date('G') . date('i'), PDO::PARAM_INT); $stmt->execute(); diff --git a/lhc_web/lib/core/lhcore/lhupdate.php b/lhc_web/lib/core/lhcore/lhupdate.php index 16bf17b6e..ac175d245 100644 --- a/lhc_web/lib/core/lhcore/lhupdate.php +++ b/lhc_web/lib/core/lhcore/lhupdate.php @@ -3,8 +3,8 @@ class erLhcoreClassUpdate { - const DB_VERSION = 318; - const LHC_RELEASE = 448; + const DB_VERSION = 319; + const LHC_RELEASE = 449; public static function doTablesUpdate($definition){ $updateInformation = self::getTablesStatus($definition); diff --git a/lhc_web/lib/core/lhdepartament/lhdepartament.php b/lhc_web/lib/core/lhdepartament/lhdepartament.php index 5dc0d541d..1c9da475d 100644 --- a/lhc_web/lib/core/lhdepartament/lhdepartament.php +++ b/lhc_web/lib/core/lhdepartament/lhdepartament.php @@ -179,6 +179,9 @@ public static function validateDepartment(erLhcoreClassModelDepartament & $depar 'hide_send_email' => new ezcInputFormDefinitionElement( ezcInputFormDefinitionElement::OPTIONAL, 'boolean' ), + 'dep_offline' => new ezcInputFormDefinitionElement( + ezcInputFormDefinitionElement::OPTIONAL, 'boolean' + ), // Bot attributes 'bot_id' => new ezcInputFormDefinitionElement( ezcInputFormDefinitionElement::OPTIONAL, 'int', array('min_range' => 1) @@ -475,7 +478,13 @@ public static function validateDepartment(erLhcoreClassModelDepartament & $depar } else { $department->delay_lm = 0; } - + + if ( $form->hasValidData( 'dep_offline' ) ) { + $department->dep_offline = 1; + } else { + $department->dep_offline = 0; + } + if ( $form->hasValidData( 'pending_max' ) ) { $department->pending_max = $form->pending_max; diff --git a/lhc_web/lib/models/lhdepartament/erlhcoreclassmodeldepartament.php b/lhc_web/lib/models/lhdepartament/erlhcoreclassmodeldepartament.php index c0a53828c..b947769d4 100644 --- a/lhc_web/lib/models/lhdepartament/erlhcoreclassmodeldepartament.php +++ b/lhc_web/lib/models/lhdepartament/erlhcoreclassmodeldepartament.php @@ -82,7 +82,8 @@ public function getState() 'max_ac_dep_mails' => $this->max_ac_dep_mails, 'max_timeout_seconds_mail' => $this->max_timeout_seconds_mail, 'delay_before_assign_mail' => $this->delay_before_assign_mail, - 'ignore_op_status' => $this->ignore_op_status + 'ignore_op_status' => $this->ignore_op_status, + 'dep_offline' => $this->dep_offline ); } @@ -329,6 +330,7 @@ public function __get($var) { public $bot_configuration = ''; public $alias = ''; public $ignore_op_status = 0; + public $dep_offline = 0; // 0 - disabled diff --git a/lhc_web/modules/lhinstall/install.php b/lhc_web/modules/lhinstall/install.php index c0643cc7c..fb94fcc0d 100644 --- a/lhc_web/modules/lhinstall/install.php +++ b/lhc_web/modules/lhinstall/install.php @@ -1829,6 +1829,7 @@ `product_configuration` longtext NOT NULL, `bot_configuration` text NOT NULL, `ignore_op_status` tinyint(1) unsigned NOT NULL DEFAULT 0, + `dep_offline` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `identifier_2` (`identifier`(191)), KEY `archive` (`archive`), @@ -1840,6 +1841,7 @@ KEY `pending_chats_counter` (`pending_chats_counter`), KEY `bot_chats_counter` (`bot_chats_counter`), KEY `disabled_hidden` (`disabled`, `hidden`), + KEY `dep_offline` (`dep_offline`), KEY `sort_priority_name` (`sort_priority`, `name`), KEY `active_mod` (`online_hours_active`,`mod_start_hour`,`mod_end_hour`), KEY `active_tud` (`online_hours_active`,`tud_start_hour`,`tud_end_hour`), diff --git a/lhc_web/pos/lhdepartament/erlhcoreclassmodeldepartament.php b/lhc_web/pos/lhdepartament/erlhcoreclassmodeldepartament.php index 80e4a1ecb..ba83e0918 100644 --- a/lhc_web/pos/lhdepartament/erlhcoreclassmodeldepartament.php +++ b/lhc_web/pos/lhdepartament/erlhcoreclassmodeldepartament.php @@ -19,7 +19,7 @@ foreach (['max_ac_dep_mails','max_timeout_seconds_mail','delay_before_assign_mail','priority','archive','active_mail_balancing','department_transfer_id','transfer_timeout','online_hours_active','inform_delay','inform_close','inform_unread','inform_unread_delay','disabled', 'visible_if_online','hidden','active_chats_counter','pending_chats_counter','max_load','max_load_h','nc_cb_execute','na_cb_execute','delay_lm','active_balancing','max_active_mails','max_active_chats','max_ac_dep_chats', 'exclude_inactive_chats','delay_before_assign','max_timeout_seconds','attr_int_1','attr_int_2','attr_int_3','sort_priority','inform_close_all','pending_max','pending_group_max','bot_chats_counter','inactive_chats_cnt','inop_chats_cnt', - 'acop_chats_cnt','assign_same_language','ignore_op_status'] as $posAttr) { + 'acop_chats_cnt','assign_same_language','ignore_op_status','dep_offline'] as $posAttr) { $def->properties[$posAttr] = new ezcPersistentObjectProperty(); $def->properties[$posAttr]->columnName = $posAttr; $def->properties[$posAttr]->propertyName = $posAttr;