bug_tracker::bug::get_multirow (public)

 bug_tracker::bug::get_multirow [ -package_id package_id ] \
    [ -user_id user_id ] [ -truncate_len truncate_len ] \
    [ -query_name query_name ]

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

Switches:
-package_id (optional)
-user_id (optional)
-truncate_len (optional)
-query_name (optional, defaults to "bugs")

Partial Call Graph (max 5 caller/called nodes):
%3 bug_tracker::bug::get_bug_numbers bug_tracker::bug::get_bug_numbers (public) bug_tracker::bug::get_multirow bug_tracker::bug::get_multirow bug_tracker::bug::get_bug_numbers->bug_tracker::bug::get_multirow packages/bug-tracker/www/core.tcl packages/bug-tracker/ www/core.tcl packages/bug-tracker/www/core.tcl->bug_tracker::bug::get_multirow packages/bug-tracker/www/index.tcl packages/bug-tracker/ www/index.tcl packages/bug-tracker/www/index.tcl->bug_tracker::bug::get_multirow acs_community_member_url acs_community_member_url (public) bug_tracker::bug::get_multirow->acs_community_member_url ad_conn ad_conn (public) bug_tracker::bug::get_multirow->ad_conn ad_string_truncate ad_string_truncate (public) bug_tracker::bug::get_multirow->ad_string_truncate bug_tracker::bug::get_instance_workflow_id bug_tracker::bug::get_instance_workflow_id (public) bug_tracker::bug::get_multirow->bug_tracker::bug::get_instance_workflow_id bug_tracker::bug::get_query bug_tracker::bug::get_query (public) bug_tracker::bug::get_multirow->bug_tracker::bug::get_query

Testcases:
No testcase defined.
Source code:
    if { $package_id eq "" } {
        set package_id [ad_conn package_id]
    }
    if { $truncate_len eq "" } {
        set truncate_len [parameter::get  -package_id $package_id  -parameter  "TruncateDescriptionLength"  -default 200]
    }
    foreach var [bug_tracker::get_export_variables -package_id $package_id] {
#JOEL put this back later
        upvar \#[template::adp_level$var $var
    }

    set workflow_id [bug_tracker::bug::get_instance_workflow_id -package_id $package_id]

    set extend_list {
        comment_short
        submitter_url
        assignee_url
        status_pretty
        resolution_pretty
        component_name
        found_in_version_name
        fix_for_version_name
        fixed_in_version_name
    }

    set category_defaults [list]

    foreach { parent_id parent_heading } [bug_tracker::category_types] {
        lappend category_defaults $parent_id {}
        lappend extend_list "category_$parent_id" "category_name_$parent_id"
    }

    array set row_category $category_defaults
    array set row_category_names $category_defaults
    db_multirow -extend $extend_list bugs select_bugs [get_query -query_name $query_name] {

        # parent_id is part of the column name
        set parent_id [bug_tracker::category_parent_element -keyword_id $keyword_id -element id]

        # Set the keyword_id and heading for the category with this parent
        set row_category($parent_id$keyword_id
        set row_category_name($parent_id) [bug_tracker::category_heading -keyword_id $keyword_id]

        if { [db_multirow_group_last_row_p -column bug_id] } {
            set component_name [bug_tracker::component_get_name  -component_id $component_id  -package_id $package_id]
            set found_in_version_name [bug_tracker::version_get_name  -version_id $found_in_version  -package_id $package_id]
            set fix_for_version_name [bug_tracker::version_get_name  -version_id $fix_for_version -package_id $package_id]
            set fixed_in_version_name [bug_tracker::version_get_name  -version_id $fixed_in_version  -package_id $package_id]
            set comment_short [ad_string_truncate -len $truncate_len -- $comment_content]
            set submitter_url [acs_community_member_url -user_id $submitter_user_id]
            set assignee_url [acs_community_member_url -user_id $assigned_user_id]
            set resolution_pretty [bug_tracker::resolution_pretty $resolution]

            # Hide fields in this state
            foreach element $hide_fields {
                set $element {}
            }

            # Move categories from array to normal variables, then clear the array for next row
            foreach parent_id [array names row_category] {
                set category_$parent_id $row_category($parent_id)
                if {[info exists row_category_name($parent_id)]} {
                    set category_name_$parent_id $row_category_name($parent_id)
                } else {
                    set category_name_$parent_id {}
                }
            }


            unset row_category
            unset row_category_name
            array set row_category $category_defaults
            array set row_category_name $category_defaults
        } else {
            continue
        }
    }
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: