Hi Sveinung,
I hopefully can enlight you on question 4 (Time
units): you can extract that info from table time_accounting, and join it with
ticket and customer_company, like this:
select customer_company.name as "Customer",
sum(time_unit) as "Total time spent"
from ticket, customer_company, time_accounting
where customer_company.customer_id = ticket.customer_id and
time_accounting.ticket_id = ticket.id
group by customer_company.name;
Of course you have to set in OTRS the relations between
customer users and customer company and assign the customer user for each
ticket.
Regards
Fabio