bug_tracker::bug::get (public)
bug_tracker::bug::get -bug_id bug_id -array array \ [ -enabled_action_id enabled_action_id ]
Defined in packages/bug-tracker/tcl/bug-procs.tcl
Get the fields for a bug
- Switches:
- -bug_id (required)
- -array (required)
- -enabled_action_id (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # Select the info into the upvar'ed Tcl Array upvar $array row db_1row select_bug_data {} -column_array row # Get the case ID, so we can get state information set case_id [workflow::case::get_id -object_id $bug_id -workflow_short_name [bug_tracker::bug::workflow_short_name]] # Derived fields set row(bug_number_display) "$row(bug_number)" set row(component_name) [bug_tracker::component_get_name -component_id $row(component_id) -package_id $row(project_id)] set row(found_in_version_name) [bug_tracker::version_get_name -version_id $row(found_in_version) -package_id $row(project_id)] set row(fix_for_version_name) [bug_tracker::version_get_name -version_id $row(fix_for_version) -package_id $row(project_id)] set row(fixed_in_version_name) [bug_tracker::version_get_name -version_id $row(fixed_in_version) -package_id $row(project_id)] # Get state information workflow::case::fsm::get -case_id $case_id -array case -enabled_action_id $enabled_action_id set row(pretty_state) $case(pretty_state) if { $row(resolution) ne "" } { append row(pretty_state) " ([bug_tracker::resolution_pretty $row(resolution)])" } set row(state_short_name) $case(state_short_name) set row(hide_fields) $case(state_hide_fields) set row(entry_id) $case(entry_id)Generic XQL file: <fullquery name="bug_tracker::bug::get.select_bug_data"> <querytext> select b.bug_id, b.project_id, b.bug_number, b.summary, b.component_id, to_char(b.creation_date,'YYYY-MM-DD HH24:MI:SS') as creation_date, to_char(b.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date_pretty, b.resolution, b.user_agent, b.found_in_version, b.found_in_version, b.fix_for_version, b.fixed_in_version, to_char(current_timestamp, 'YYYY-MM-DD HH24:MI:SS') as now_pretty from bt_bugs b where b.bug_id = :bug_id </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