Commit de360257 authored by Johan Cwiklinski's avatar Johan Cwiklinski

Load entity from itemtype on ticket creation; fxes #2173

parent 49426024
......@@ -4331,6 +4331,12 @@ class Ticket extends CommonITILObject {
function showForm($ID, $options = []) {
global $CFG_GLPI;
if (isset($options['_add_fromitem'])) {
$item = new $options['itemtype'];
$item->getFromDB($options['items_id'][$options['itemtype']][0]);
$options['entities_id'] = $item->fields['entities_id'];
}
$default_values = self::getDefaultValues();
// Restore saved value or override with page parameter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment