Hi, I´m trying to get some static statistics working. I want to select all the time an agent has accounted within a specific time.
It works fine, if I don´t select the agent with this: my $Select = "SELECT ta.create_by, ta.time_unit, ta.ticket_id, t.customer_id, u.login, t.title FROM ticket t, time_accounting ta, users u WHERE t.id = ta.ticket_id AND (ta.change_by = u.id AND ( month( ta.change_time ) = $Month AND year( ta.change_time ) = $Year ) AND ( t.queue_id IN ( 5, 6, 8, 9, 10, 11, 12 ) ) )"; So, I just added "AND (u.login = $User)" to my statement, before, I´ve added: my %UserList = $Self->{UserObject}->UserList( Type => 'Short', Valid => 0, ); push (@Params, { Frontend => 'User', Name => 'User', Multiple => 0, Size => 0, Data => { %UserList, }, and in sub Run(): my $User = $Param{UserList}; but it fails, cause $User is empty, why?: ... AND ( t.queue_id IN ( 5, 6, 8, 9, 10, 11, 12 ) ) AND ( u.login = ) ... Regards Guenther -- Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02 --------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW! http://www.otrs.com/en/support/enterprise-subscription/