postgresql7.1
declare
v_ticket_id acs_objects.object_id%TYPE;
begin
v_ticket_id := ttracker_ticket__new (
null, -- ticket_id
'ttracker_ticket', -- object_type
:package_id, -- context_id
:subject, -- subject
:description, -- description
:mime_type, -- mime_type
:category_id, -- category_id
:severity, -- severity
:priority, -- priority
now(), -- creation_date
:user_id, -- creation_user
:creation_ip -- creation_ip
);
perform acs_permission__grant_permission(
v_ticket_id, -- object_id
:user_id, -- grantee_id
'write' -- privilege
);
return 0;
end;