bug_tracker::bug::insert (public)
bug_tracker::bug::insert -bug_id bug_id -package_id package_id \ -component_id component_id -found_in_version found_in_version \ -summary summary -description description -desc_format desc_format \ [ -user_agent user_agent ] [ -user_id user_id ] \ [ -ip_address ip_address ] [ -item_subtype item_subtype ] \ [ -content_type content_type ] \ [ -fix_for_version fix_for_version ] [ -assign_to assign_to ]
Defined in packages/bug-tracker/tcl/bug-procs.tcl
Inserts a new bug into the content repository. You probably don't want to run this yourself - to create a new bug, use bug_tracker::bug::new and let it do the hard work for you.
- Switches:
- -bug_id
(required)- -package_id
(required)- -component_id
(required)- -found_in_version
(required)- -summary
(required)- -description
(required)- -desc_format
(required)- -user_agent
(optional)- -user_id
(optional)- -ip_address
(optional)- -item_subtype
(defaults to"bt_bug"
) (optional)- -content_type
(defaults to"bt_bug_revision"
) (optional)- -fix_for_version
(optional)- -assign_to
(optional)- Returns:
- bug_id The same bug_id passed in, just for convenience.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if { $user_agent eq "" && [ad_conn isconnected] } { set user_agent [ns_set get [ns_conn headers] "User-Agent"] } set comment_content $description set comment_format $desc_format if { ![info exists creation_date] || $creation_date eq "" } { set creation_date [db_string select_sysdate {}] } set extra_vars [ns_set create] oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list { bug_id package_id component_id found_in_version summary user_agent comment_content comment_format creation_date fix_for_version assign_to} ns_log notice "### bug::insert bug_id $bug_id ns_set $extra_vars // [ns_set array $extra_vars]" set bug_id [package_instantiate_object -creation_user $user_id -creation_ip $ip_address -extra_vars $extra_vars -package_name "bt_bug" "bt_bug"] cache_flush -bug_id $bug_id return $bug_idGeneric XQL file: <fullquery name="bug_tracker::bug::insert.select_sysdate"> <querytext> select current_timestamp from dual </querytext> </fullquery>packages/bug-tracker/tcl/bug-procs.xql
PostgreSQL XQL file: packages/bug-tracker/tcl/bug-procs-postgresql.xql
Oracle XQL file: packages/bug-tracker/tcl/bug-procs-oracle.xql