function plugin_timelineticket_ticket_add(Ticket $item) { // Instantiation of the object from the class PluginTimelineticketStates $followups = new PluginTimelineticketState(); $followups->createFollowup($item, $item->input['date'], '', Ticket::INCOMING); if ($item->input['status'] != Ticket::INCOMING) { $followups->createFollowup($item, $item->input['date'], Ticket::INCOMING, $item->input['status']); } }