You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2019-11-20 15:49:41

ecollet
Member
Registered: 2019-07-29
Posts: 34

Ticket with Item, and notification

My situation :
I'm creating ticket with api in a php script
Just after i add a relation between an item and the ticket
That works fine, but...

My problem:
I need to use email notification
Now, with this method, the notification is send as soon as the ticket is creat, not after i link it with the item

The problem :
In the mail notification, the item linked is not present

##FOREACHitems## has no item

.. I have the same problem with Document linked


Some Help ?
My idea : stop the notification during my process of creating full ticket with item, and send notfication after
Or : Creat ticket directly with item and document ...

Thanks,


my php code
--
// first, the ticket
$options = array('input'=>array(
                        'name'=>$lot,
                        'requesttypes_id'=>'7',
                        'content'=>$message,
                        'type'=>'1',
            'itilcategories_id'=>'1',
            'urgency'=>$importance,
                        ));
$ticket=myAction('Ticket', $options, 'POST', $sess_token);

// then the item (a generic object)
// $item_id = the ID of my item 'PluginGenericobjectBungalow'
$options = array('input'=>array(
                        'items_id'=>$item_ID,
                        'itemtype'=>'PluginGenericobjectBungalow',
            'tickets_id'=>$ticket['id'],
                        ));
$TicketItem=myAction('Ticket/'.$ticket['id'].'/Item_Ticket', $options, 'POST', $sess_token);
   
--

Offline

Board footer

Powered by FluxBB