bug_tracker::bug::edit (public)
bug_tracker::bug::edit -bug_id bug_id \ -enabled_action_id enabled_action_id [ -user_id user_id ] \ [ -creation_ip creation_ip ] -description description \ -desc_format desc_format -array array [ -entry_id entry_id ]
Defined in packages/bug-tracker/tcl/bug-procs.tcl
Edit a bug, then send out notifications, etc. Calls bug_tracker::bug::update.
- Switches:
- -bug_id (required)
- -enabled_action_id (required)
- -user_id (optional)
- -creation_ip (optional)
- -description (required)
- -desc_format (required)
- -array (required)
- -entry_id (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: upvar $array row array set assignments [list] set role_prefix "role_" foreach name [array names row "${role_prefix}*"] { set assignments([string range $name [string length $role_prefix] end]) $row($name) unset row($name) } db_transaction { # Update the bug info update -bug_id $bug_id -user_id $user_id -creation_ip $creation_ip -array row # Update the keywords foreach {category_id category_name} [bug_tracker::category_types] { if { [info exists row($category_id)] && $row($category_id) ne "" } { content::keyword::item_assign -item_id $bug_id -keyword_id $row($category_id) } # LARS: # We don't unassign if no value is supplied for one of the categories # we just leave them untouched. } set case_id [workflow::case::get_id -workflow_short_name [workflow_short_name] -object_id $bug_id] # Assignments workflow::case::role::assign -replace -case_id $case_id -array assignments workflow::case::action::execute -enabled_action_id $enabled_action_id -comment $description -comment_mime_type $desc_format -user_id $user_id -entry_id $entry_id } return $bug_idGeneric 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