You are not logged in.
I'm using GLPI 0.84.3 in Ubuntu server 14.04 and during test I found, that no actual tickets will be created from recurrent tickets.
The following bugfix should repair this issue.
edit /usr/share/glpi/inc/ticketrecurrent.class.php
static function cronTicketRecurrent($task)
...
SELECT *
FROM `glpi_ticketrecurrents`
WHERE
(`glpi_ticketrecurrents`.`next_creation_date` < NOW()
OR `glpi_ticketrecurrents`.`next_creation_date` IS NULL)
AND `glpi_ticketrecurrents`.`is_active` = 1
AND
(`glpi_ticketrecurrents`.`end_date` IS NULL
OR `glpi_ticketrecurrents`.`end_date` > NOW())
Change: Adding "OR `glpi_ticketrecurrents`.`next_creation_date` IS NULL", because recurrent tickets have a "null" create date upon creation.
static function createTicket($data)
...
// Set date to creation date
if(is_null($data['next_creation_date'])) $data['next_creation_date'] = 'now';
$createtime = strtotime($data['next_creation_date']) + $data['create_before'];
...
// Set entity
$input['entities_id'] = $data['entities_id'];
$input['_auto_import'] = true;
$input['name'] = $data['name'];
Changes:
Altered next_creation_date to "now" to get a valid timestring in the next step.
Use data-name to name the ticket.
function computeNextCreationDate($begin_date, $end_date, $periodicity, $create_before, $calendars_id)
...
if (empty($begin_date) || $begin_date == 'NULL')
...
if ($now >= $timestart) {
Change:
$begin_date wasn't a comparison but an assignment
now vs. timestart starts even when they both are equal (now)
Offline
Have you define begin_date for ticket recurrent ?
This date is needed to define the start date
MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI : Support Contribute References Freshmeat
Offline
Yes, I created a valid recurrent ticket.
(Even if I didn't, there isn't any hint or rule that states your fact. The best would be to abort the creation process until all field match their rules (e.g. "not empty/null").)
As you can see in my post, the problem didn't arise from an empty begin_date, but from an empty next_creation_date.
("because recurrent tickets have a "null" create date upon creation" or better "have a null next creation date")
Offline