Skip to content

Commit

Permalink
fix(targetticket): date 'now' from a template
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Mar 1, 2021
1 parent f4ec738 commit f40ec4d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,11 @@ public function getDefaultData(PluginFormcreatorFormAnswer $formanswer) : array
unset($predefined_fields['_groups_id_assign']);
}

// Manage special values
if (isset($predefined_fields['date']) && $predefined_fields['date'] == 'NOW') {
$predefined_fields['date'] = $_SESSION['glpi_currenttime'];
}

$data = array_merge($data, $predefined_fields);
return $data;
}
Expand Down

0 comments on commit f40ec4d

Please sign in to comment.