bug_tracker::bug::new (public)

 bug_tracker::bug::new -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 ] [ -keyword_ids keyword_ids ] \
    [ -fix_for_version fix_for_version ] [ -assign_to assign_to ]

Defined in packages/bug-tracker/tcl/bug-procs.tcl

Create a new bug, then send out notifications, starts workflow, etc. Calls bug_tracker::bug::insert.

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 (optional, defaults to "bt_bug")
-content_type (optional, defaults to "bt_bug_revision")
-keyword_ids (optional)
-fix_for_version (optional)
-assign_to (optional)
Returns:
bug_id The same bug_id passed in, just for convenience.
See Also:
  • bug_tracker::bug::insert.

Partial Call Graph (max 5 caller/called nodes):
%3 callback::acs_mail_lite::incoming_email::impl::bug-tracker callback::acs_mail_lite::incoming_email::impl::bug-tracker (private) bug_tracker::bug::new bug_tracker::bug::new callback::acs_mail_lite::incoming_email::impl::bug-tracker->bug_tracker::bug::new packages/acs-tcl/lib/page-error.tcl packages/acs-tcl/ lib/page-error.tcl packages/acs-tcl/lib/page-error.tcl->bug_tracker::bug::new packages/bug-tracker/www/bug-add.tcl packages/bug-tracker/ www/bug-add.tcl packages/bug-tracker/www/bug-add.tcl->bug_tracker::bug::new bug_tracker::access_policy bug_tracker::access_policy (public) bug_tracker::bug::new->bug_tracker::access_policy bug_tracker::bug::insert bug_tracker::bug::insert (public) bug_tracker::bug::new->bug_tracker::bug::insert bug_tracker::bug::workflow_short_name bug_tracker::bug::workflow_short_name (public) bug_tracker::bug::new->bug_tracker::bug::workflow_short_name bug_tracker::grant_direct_read_permission bug_tracker::grant_direct_read_permission (private) bug_tracker::bug::new->bug_tracker::grant_direct_read_permission content::keyword::item_assign content::keyword::item_assign (public) bug_tracker::bug::new->content::keyword::item_assign

Testcases:
No testcase defined.
Source code:


    db_transaction {

        set bug_id [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 ]

        foreach keyword_id $keyword_ids {
            content::keyword::item_assign -item_id $bug_id -keyword_id $keyword_id
        }

        if {$assign_to ne ""} {

            array set assign_array [list resolver $assign_to]

        } else {
            array set assign_array ""
        }


        set case_id [workflow::case::new  -workflow_id [workflow::get_id -object_id $package_id -short_name [workflow_short_name]]  -object_id $bug_id  -comment $description  -comment_mime_type $desc_format  -user_id $user_id  -assignment [array get assign_array]  -package_id $package_id]

        if {[lindex [bug_tracker::access_policy] 1] eq "user_bugs"} {
            bug_tracker::grant_direct_read_permission -bug_id $bug_id -party_id $user_id
        }

        return $bug_id
    }
Generic XQL file:
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

[ hide source ] | [ make this the default ]
Show another procedure: