Skip to content

Commit

Permalink
fix(followup): credit consumed even if the followup fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Rom1-B authored and cedric-anne committed May 3, 2022
1 parent a1ce0d6 commit b86fdb0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,11 @@ function plugin_init_credit() {
'displayVoucherInTicketProcessingForm'
];

$PLUGIN_HOOKS['pre_item_add']['credit'] = [
$PLUGIN_HOOKS['item_add']['credit'] = [
'ITILFollowup' => ['PluginCreditTicket', 'consumeVoucher'],
'ITILSolution' => ['PluginCreditTicket', 'consumeVoucher'],
'TicketTask' => ['PluginCreditTicket', 'consumeVoucher'],
];

$PLUGIN_HOOKS['item_add']['credit'] = [
'Ticket' => ['PluginCreditTicketConfig', 'updateConfig'],
'Ticket' => ['PluginCreditTicketConfig', 'updateConfig'],
];
// Update config on 'pre_item_update' as only changing these fields in ticket form will not trigger 'item_update'.
$PLUGIN_HOOKS['pre_item_update']['credit'] = [
Expand Down

0 comments on commit b86fdb0

Please sign in to comment.