Skip to content

Commit 51e0219

Browse files
authored
Add externalid for ticket templates
1 parent cf4d9da commit 51e0219

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/Ticket.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3521,6 +3521,7 @@ public static function getDefaultValues($entity = 0)
35213521
'_tag_filename' => [],
35223522
'_actors' => [],
35233523
'_contracts_id' => 0,
3524+
'externalid' => '',
35243525
];
35253526
}
35263527

src/TicketTemplate.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ public static function getExtraAllowedFields($withtypeandcategory = false, $with
141141
'type',
142142
'glpi_tickets'
143143
) => 'type',
144-
144+
$itil_object->getSearchOptionIDByField(
145+
'field',
146+
'externalid',
147+
'glpi_tickets'
148+
) => 'externalid',
145149
];
146150

147151
if ($withtypeandcategory) {

tests/functional/ITILTemplateTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ public static function fieldsProvider()
233233
180 => 'Internal time to resolve',
234234
185 => 'Internal time to own',
235235
193 => 'Contract',
236+
87 => 'External ID',
236237
],
237238
], [
238239
'Change',

0 commit comments

Comments
 (0)