bug_tracker::project_new (public)
bug_tracker::project_new project_id
Defined in packages/bug-tracker/tcl/bug-tracker-procs.tcl
Create a new Bug Tracker project for a package instance.
- Parameters:
- project_id (required)
- Author:
- Peter Marklund
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if {![db_0or1row already_there {select 1 from bt_projects where project_id = :project_id} ] } { if {[db_0or1row instance_info { *SQL* } ]} { set folder_id [content::folder::new -name "bug_tracker_$project_id" -package_id $project_id -parent_id $project_id -context_id $project_id] content::folder::register_content_type -folder_id $folder_id -content_type {bt_bug_revision} -include_subtypes t content::folder::register_content_type -folder_id $folder_id -content_type "content_revision" content::folder::register_content_type -folder_id $folder_id -content_type "image" set keyword_id [content::keyword::new -heading "$instance_name"] set component_keyword_id [content::keyword::new -heading "Components $instance_name"] # Inserts into bt_projects set component_id [db_nextval acs_object_id_seq] db_dml bt_projects_insert {} db_dml bt_components_insert {} } }Generic XQL file: <fullquery name="bug_tracker::project_new.instance_info"> <querytext> select p.instance_name, o.creation_user, o.creation_ip from apm_packages p join acs_objects o on (p.package_id = o.object_id) where p.package_id = :project_id </querytext> </fullquery> <fullquery name="bug_tracker::project_new.bt_projects_insert"> <querytext> insert into bt_projects (project_id, folder_id, root_keyword_id, component_keyword_id) values (:project_id, :folder_id, :keyword_id, :component_keyword_id) </querytext> </fullquery> <fullquery name="bug_tracker::project_new.bt_components_insert"> <querytext> insert into bt_components (component_id, project_id, component_name) values (:component_id, :project_id, 'General') </querytext> </fullquery> <fullquery name="bug_tracker::project_new.instance_info"> <querytext> select p.instance_name, o.creation_user, o.creation_ip from apm_packages p join acs_objects o on (p.package_id = o.object_id) where p.package_id = :project_id </querytext> </fullquery>packages/bug-tracker/tcl/bug-tracker-procs.xql
PostgreSQL XQL file: <fullquery name="bug_tracker::project_new.create_project"> <querytext> select bt_project__new(:project_id); </querytext> </fullquery>packages/bug-tracker/tcl/bug-tracker-procs-postgresql.xql
Oracle XQL file: <fullquery name="bug_tracker::project_new.create_project"> <querytext> begin bt_project.new(:project_id); end; </querytext> </fullquery>packages/bug-tracker/tcl/bug-tracker-procs-oracle.xql