OTRS Support Quota Add-on DynamicButton

English! place to talk about development, programming and coding
Post Reply
maho
Znuny newbie
Posts: 15
Joined: 14 Feb 2014, 16:09
Znuny Version: 3.x,4.x,5.x
Real Name: mario

OTRS Support Quota Add-on DynamicButton

Post by maho »

Hi Guys,

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";
Can anybody help me or helpful tip?

Thanks,
BR,
mario
You do not have the required permissions to view the files attached to this post.
Post Reply