Skip to content

Commit

Permalink
Fix #50 : Le valideur n'est plus demandeur.
Browse files Browse the repository at this point in the history
  • Loading branch information
neeftarah committed Jan 19, 2015
1 parent 22b8d44 commit 9b0b106
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,18 @@ public function save(PluginFormcreatorFormanswer $formanswer)
$datas = array_merge($datas, $predefined_fields);

// Parse datas and tags
$datas['name'] = $this->parseTags($this->fields['name'], $formanswer);
$datas['content'] = $this->parseTags($this->fields['comment'], $formanswer);
$datas['entities_id'] = (isset($_SESSION['glpiactive_entity']))
? $_SESSION['glpiactive_entity']
: $form->fields['entities_id'];
$datas['name'] = $this->parseTags($this->fields['name'], $formanswer);
$datas['content'] = $this->parseTags($this->fields['comment'], $formanswer);
$datas['entities_id'] = (isset($_SESSION['glpiactive_entity']))
? $_SESSION['glpiactive_entity']
: $form->fields['entities_id'];
$datas['_users_id_requester'] = $formanswer->fields['requester_id'];
$datas['_users_id_recipient'] = $formanswer->fields['requester_id'];
$datas['_users_id_lastupdater'] = Session::getLoginUserID();

// Create the target ticket
$ticketID = $ticket->add($datas);


$founded = $docItem->find('itemtype = "PluginFormcreatorFormanswer" AND items_id = ' . $formanswer->getID());
$founded = $docItem->find('itemtype = "PluginFormcreatorFormanswer" AND items_id = ' . $formanswer->getID());

// Attach documents to ticket
if(count($founded) > 0) {
Expand Down

0 comments on commit 9b0b106

Please sign in to comment.