Page 1 of 1

Tickets raised by email piping don't have a due date

Posted: Mon Nov 21, 2022 4:23 pm
by yknivag
Script URL: Private
Version of script: 3.4.1
Hosting company: N/A
URL of phpinfo.php: N/A
URL of session_test.php: N/A
What terms did you try when SEARCHING for a solution: Piping due date

Write your message below:

When a category has a default due date, this is not applied to tickets raised via email piping, instead the ticket is given no due date.

This can be fixed by adding the following snippet of code from admin/admin_submit_ticket.php L261 to inc/pipe_functions.inc.php at L361 (just before the line $ticket = hesk_newTicket($tmpvar);

Code: Select all

if (($default_due_date_info = hesk_getCategoryDueDateInfo($tmpvar['category'])) !== null)
{
    $due_date = new DateTime('today midnight');
    $due_date->add(DateInterval::createFromDateString("+{$default_due_date_info['amount']} {$default_due_date_info['unit']}s"));
    $tmpvar['due_date'] = hesk_datepicker_format_date($due_date->getTimestamp());

    // Don't set a due date if any unexpected errors
    if ($tmpvar['due_date'] === false) {
        $tmpvar['due_date'] = '';
    }
}
This has resolved the issue for now for me, but as it will be lost with very upgrade it would be great if the fix could be incorporated officially.

Kind Regards,

Gavin.

Re: Tickets raised by email piping don't have a due date

Posted: Mon Nov 21, 2022 4:42 pm
by Klemen
Thanks for the heads up, will be fixed in the next release.

Re: Tickets raised by email piping don't have a due date

Posted: Sat Dec 03, 2022 4:22 pm
by Klemen
Fix included in Hesk 3.4.2

Re: Tickets raised by email piping don't have a due date

Posted: Tue Dec 06, 2022 3:16 pm
by yknivag
Many thanks for adding the fix so quickly, much appreciated!