Here the nice Add-on Link
https://github.com/denydias/otrs/tree/m ... pportQuota
...and i will modify this Addon for OTRS 5 with a Dynamic_Button in Ticket Close View. (TicketClose.jpg)
So I can choose yes or no.
Yes he subtract the working Hours with the Quota.
No the Qutoa is the same and he do nothing.
But i have a Problem with the SQL Querie.
if i add my Querry he cant Show me any Information.
The right side is empty
Here my SQL Statment in vim /opt/otrs/Kernel/Output/HTML/OutputFilter/SupportQuota.pm
Code: Select all
# main sql statement with mandatory data
my $SQL = "
SELECT cc.cquota AS Cquota,
SUM(COALESCE(ta.time_unit, 0)) AS Uquota
FROM customer_company cc
LEFT OUTER JOIN ticket t
ON t.customer_id = cc.customer_id
LEFT OUTER JOIN time_accounting ta
ON ta.ticket_id = t.id
${SqlRecurrence}
LEFT OUTER JOIN dynamic_field_value d
ON d.object_id = t.id
AND d.value_text = "ja"
WHERE cc.customer_id = (SELECT customer_id FROM ticket WHERE id = ?)
GROUP BY cc.customer_id";
Thanks,
BR,
mario