Index: openacs-4/packages/bug-tracker/sql/oracle/bug-tracker-create-packages.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/oracle/bug-tracker-create-packages.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/bug-tracker/sql/oracle/bug-tracker-create-packages.sql	24 Feb 2005 13:33:03 -0000	1.6
+++ openacs-4/packages/bug-tracker/sql/oracle/bug-tracker-create-packages.sql	27 Jun 2008 00:40:15 -0000	1.7
@@ -201,15 +201,21 @@
     )
     is
         v_folder_id         integer;
+        v_workflow_id       integer;
         v_root_keyword_id   integer;
     begin
 
-        -- get the content folder for this instance
-        select folder_id, root_keyword_id
-        into   v_folder_id, v_root_keyword_id
+        -- get the content folder and workflow_id for this instance
+        select folder_id, root_keyword_id, workflow_id
+        into   v_folder_id, v_root_keyword_id, v_workflow_id
         from   bt_projects
         where  project_id = bt_project.del.project_id;
 
+        if v_workflow_id is not null then
+          -- DRB: Kludge as workflow.del is incorrectly created as a function!!!!
+          v_workflow_id := workflow.del(v_workflow_id);
+        end if;
+
         -- This get''s done in tcl before we are called ... for now
         -- Delete the bugs
         -- for rec in select item_id from cr_items where parent_id = v_folder_id
