bug_tracker::get_patch_links (public)

 bug_tracker::get_patch_links -bug_id bug_id \
    [ -show_patch_status show_patch_status ]

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

Switches:
-bug_id
(required)
-show_patch_status
(defaults to "open") (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-tcl/lib/page-error.tcl packages/acs-tcl/ lib/page-error.tcl bug_tracker::get_patch_links bug_tracker::get_patch_links packages/acs-tcl/lib/page-error.tcl->bug_tracker::get_patch_links packages/bug-tracker/www/bug.tcl packages/bug-tracker/ www/bug.tcl packages/bug-tracker/www/bug.tcl->bug_tracker::get_patch_links _ _ (public) bug_tracker::get_patch_links->_ bug_tracker::conn bug_tracker::conn (public) bug_tracker::get_patch_links->bug_tracker::conn db_foreach db_foreach (public) bug_tracker::get_patch_links->db_foreach

Testcases:
No testcase defined.
Source code:
    set patch_list [list]

    switch -- $show_patch_status {
        open {
            set status_where_clause "and bt_patches.status = :show_patch_status"
        }
        all {
            set status_where_clause ""
        }
    }

    db_foreach get_patches_for_bug {} {

        set status_indicator [expr {$show_patch_status eq "all" ? "($status)" : ""}]
        lappend patch_list "<a href=\"patch?patch_number=$patch_number\" title=\"patch $patch_number\">[ns_quotehtml $summary]</a> $status_indicator"
    } if_no_rows {
        set patches_name [bug_tracker::conn patches]
        set patches_string [_ bug-tracker.No_patches]
    }

    if { [llength $patch_list] != 0 } {
        set patches_string [join $patch_list ",&nbsp;"]
    }

    return $patches_string
Generic XQL file:
<fullquery name="bug_tracker::get_patch_links.get_patches_for_bug">
    <querytext>
      select bt_patches.patch_number,
             bt_patches.summary,
             bt_patches.status
        from bt_patch_bug_map, bt_patches
       where bt_patch_bug_map.bug_id = :bug_id
         and bt_patch_bug_map.patch_id = bt_patches.patch_id
             $status_where_clause
       order by bt_patches.summary
      </querytext>
</fullquery>
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: