bug_tracker::conn (public)

 bug_tracker::conn [ args... ]

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

Partial Call Graph (max 5 caller/called nodes):
%3 bug_tracker::bug::get_list bug_tracker::bug::get_list (public) bug_tracker::conn bug_tracker::conn bug_tracker::bug::get_list->bug_tracker::conn bug_tracker::bug::get_watch_link bug_tracker::bug::get_watch_link (public) bug_tracker::bug::get_watch_link->bug_tracker::conn bug_tracker::get_bug_links bug_tracker::get_bug_links (public) bug_tracker::get_bug_links->bug_tracker::conn bug_tracker::get_mapped_bugs bug_tracker::get_mapped_bugs (public) bug_tracker::get_mapped_bugs->bug_tracker::conn bug_tracker::get_patch_links bug_tracker::get_patch_links (public) bug_tracker::get_patch_links->bug_tracker::conn _ _ (public) bug_tracker::conn->_ ad_conn ad_conn (public) bug_tracker::conn->ad_conn bug_tracker::get_pretty_names bug_tracker::get_pretty_names (public) bug_tracker::conn->bug_tracker::get_pretty_names bug_tracker::get_project_info bug_tracker::get_project_info (public) bug_tracker::conn->bug_tracker::get_project_info bug_tracker::get_user_prefs bug_tracker::get_user_prefs (public) bug_tracker::conn->bug_tracker::get_user_prefs

Testcases:
No testcase defined.
Source code:

    global bt_conn

    set flag [lindex $args 0]
    if { [string index $flag 0] ne "-" } {
        set var $flag
        set flag "-get"
    } else {
        set var [lindex $args 1]
    }

    switch -- $flag {
        -set {
            set bt_conn($var) [lindex $args 2]
        }

        -get {
            if { [info exists bt_conn($var)] } {
                return $bt_conn($var)
            } else {
                switch -- $var {
                    bug - bugs - Bug - Bugs -
                    component - components - Component - Components -
                    patch - patches - Patch - Patches {
                        if { ![info exists bt_conn($var)] } {
                            get_pretty_names -array bt_conn
                        }
                        return $bt_conn($var)
                    }
                    project_name - project_description -
                    project_root_keyword_id - project_folder_id -
                    current_version_id - current_version_name {
                        array set info [get_project_info]
                        foreach name [array names info] {
                            set bt_conn($name$info($name)
                        }
                        return $bt_conn($var)
                    }
                    user_first_names - user_last_name - user_email - user_version_id - user_version_name {
                        if { [ad_conn user_id] == 0 } {
                            return ""
                        } else {
                            array set info [get_user_prefs]
                            foreach name [array names info] {
                                set bt_conn($name$info($name)
                            }
                            return $bt_conn($var)
                        }
                    }
                    component_id -
                    filter - filter_human_readable -
                    filter_where_clauses -
                    filter_order_by_clause - filter_from_bug_clause {
                        return {}
                    }
                    default {
                        error "[_ bug-tracker.Unknown_variable]"
                    }
                }
            }
        }

        default {
            error "[_ bug-tracker.Unknown_flag]"
        }
    }
Generic XQL file:
packages/bug-tracker/tcl/bug-tracker-procs.xql

PostgreSQL XQL file:
packages/bug-tracker/tcl/bug-tracker-procs-postgresql.xql

Oracle XQL file:
packages/bug-tracker/tcl/bug-tracker-procs-oracle.xql

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