function post_addItem()
 {
     if ($this->fields['itemtype'] == 'Ticket') {
         $ticket = new Ticket();
         $ticket->update(array('id' => $this->fields['items_id'], 'date_mod' => $_SESSION["glpi_currenttime"], '_forcenotif' => true, '_donotadddocs' => true));
     }
     parent::post_addItem();
 }
 function post_addItem()
 {
     $t = new Ticket();
     $no_stat_computation = true;
     if ($this->input['type'] == Ticket::ASSIGN) {
         $no_stat_computation = false;
     }
     $t->updateDateMod($this->fields['tickets_id'], $no_stat_computation);
     parent::post_addItem();
 }
예제 #3
0
 function post_addItem()
 {
     if ($this->fields['itemtype'] == 'Ticket') {
         $ticket = new Ticket();
         $input = array('id' => $this->fields['items_id'], 'date_mod' => $_SESSION["glpi_currenttime"], '_donotadddocs' => true);
         if (!isset($this->input['_do_notif']) || $this->input['_do_notif']) {
             $input['_forcenotif'] = true;
         }
         $ticket->update($input);
     }
     parent::post_addItem();
 }
예제 #4
0
 /**
  * @since version 0.84
  **/
 function post_addItem()
 {
     global $CFG_GLPI;
     $donotif = $CFG_GLPI["use_mailing"];
     if (isset($this->input["_no_notif"]) && $this->input["_no_notif"]) {
         $donotif = false;
     }
     if ($donotif) {
         $problem = new Problem();
         if ($problem->getFromDB($this->input["problems_id"])) {
             $options = array();
             NotificationEvent::raiseEvent("new", $problem, $options);
         }
     }
     parent::post_addItem();
 }
예제 #5
0
 function post_addItem()
 {
     $item = new static::$itemtype_1();
     $no_stat_computation = true;
     if ($this->input['type'] == CommonITILActor::ASSIGN) {
         $no_stat_computation = false;
     }
     $item->updateDateMod($this->fields[static::getItilObjectForeignKey()], $no_stat_computation);
     // Check object status and update it if needed
     if (!isset($this->input['_from_object'])) {
         if ($item->getFromDB($this->fields[static::getItilObjectForeignKey()])) {
             if (in_array($item->fields["status"], $item->getNewStatusArray()) && in_array(CommonITILObject::ASSIGNED, array_keys($item->getAllStatusArray()))) {
                 $item->update(array('id' => $item->getID(), 'status' => CommonITILObject::ASSIGNED));
             }
         }
     }
     parent::post_addItem();
 }
 /**
  * @since version 0.85
  * @see CommonDBRelation::post_addItem()
  **/
 function post_addItem()
 {
     SoftwareLicense::updateValidityIndicator($this->fields['softwarelicenses_id']);
     parent::post_addItem();
 }
예제 #7
0
 function post_addItem()
 {
     global $CFG_GLPI;
     $t = new Ticket();
     $t->updateDateMod($this->fields['tickets_id_1']);
     $t->updateDateMod($this->fields['tickets_id_2']);
     parent::post_addItem();
     $donotif = $CFG_GLPI["use_mailing"];
     if ($donotif) {
         $t->getFromDB($this->fields['tickets_id_1']);
         NotificationEvent::raiseEvent("update", $t);
         $t->getFromDB($this->fields['tickets_id_2']);
         NotificationEvent::raiseEvent("update", $t);
     }
 }
 function post_addItem()
 {
     $t = new Ticket();
     $t->updateDateMod($this->fields['tickets_id_1']);
     $t->updateDateMod($this->fields['tickets_id_2']);
     parent::post_addItem();
 }