set company_id [db_string ticket_company "select company_id from im_projects where project_id = :ticket_sla_id" -default ""]
set company_id [db_string ticket_company "select company_id from im_projects where project_id = :parent_id" -default ""]
if {"" == $company_id}{
return [im_rest_error -http_status 406 -message "Invalid $object_type_pretty field 'parent_id': parent_id should represent an 'open' project of type 'Service Level Agreement'."]