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):
%3 bug_tracker::bug::notification_info::get_notification_info bug_tracker::bug::notification_info::get_notification_info (private) bug_tracker::bug::get bug_tracker::bug::get bug_tracker::bug::notification_info::get_notification_info->bug_tracker::bug::get bug_tracker::bug::update bug_tracker::bug::update (public) bug_tracker::bug::update->bug_tracker::bug::get bug_tracker::search::bug::datasource bug_tracker::search::bug::datasource (private) bug_tracker::search::bug::datasource->bug_tracker::bug::get bug_tracker::security_violation bug_tracker::security_violation (public) bug_tracker::security_violation->bug_tracker::bug::get packages/acs-tcl/lib/page-error.tcl packages/acs-tcl/ lib/page-error.tcl packages/acs-tcl/lib/page-error.tcl->bug_tracker::bug::get bug_tracker::bug::workflow_short_name bug_tracker::bug::workflow_short_name (public) bug_tracker::bug::get->bug_tracker::bug::workflow_short_name bug_tracker::component_get_name bug_tracker::component_get_name (public) bug_tracker::bug::get->bug_tracker::component_get_name bug_tracker::resolution_pretty bug_tracker::resolution_pretty (public) bug_tracker::bug::get->bug_tracker::resolution_pretty bug_tracker::version_get_name bug_tracker::version_get_name (public) bug_tracker::bug::get->bug_tracker::version_get_name db_1row db_1row (public) bug_tracker::bug::get->db_1row

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

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