bug_tracker::get_mapped_bugs (public)

 bug_tracker::get_mapped_bugs -patch_number patch_number \
    [ -only_open_p only_open_p ]

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

Return a list of lists with the bug number in the first element and the bug summary in the second.

Switches:
-patch_number (required)
-only_open_p (optional, defaults to "0")

Partial Call Graph (max 5 caller/called nodes):
%3 bug_tracker::get_bug_links bug_tracker::get_bug_links (public) bug_tracker::get_mapped_bugs bug_tracker::get_mapped_bugs bug_tracker::get_bug_links->bug_tracker::get_mapped_bugs packages/bug-tracker/www/patch.tcl packages/bug-tracker/ www/patch.tcl packages/bug-tracker/www/patch.tcl->bug_tracker::get_mapped_bugs ad_conn ad_conn (public) bug_tracker::get_mapped_bugs->ad_conn bug_tracker::bug::get_instance_workflow_id bug_tracker::bug::get_instance_workflow_id (public) bug_tracker::get_mapped_bugs->bug_tracker::bug::get_instance_workflow_id bug_tracker::conn bug_tracker::conn (public) bug_tracker::get_mapped_bugs->bug_tracker::conn db_foreach db_foreach (public) bug_tracker::get_mapped_bugs->db_foreach workflow::fsm::get_initial_state workflow::fsm::get_initial_state (public) bug_tracker::get_mapped_bugs->workflow::fsm::get_initial_state

Testcases:
No testcase defined.
Source code:
    set bug_list [list]
    set package_id [ad_conn package_id]

    if { $only_open_p } {
        set workflow_id [bug_tracker::bug::get_instance_workflow_id]
        set initial_state [workflow::fsm::get_initial_state -workflow_id $workflow_id]

        set open_clause "\n        and exists (select 1
                                               from workflow_cases cas,
                                                    workflow_case_fsm cfsm
                                               where cas.case_id = cfsm.case_id
                                                 and cas.object_id = b.bug_id
                                                 and cfsm.current_state = :initial_state)"
    } else {
        set open_clause ""
    }

    db_foreach get_bugs_for_patch {} {
        lappend bug_list [list "[bug_tracker::conn Bug] #$bug_number: $summary" "$bug_number"]
    }

    return $bug_list
Generic XQL file:
<fullquery name="bug_tracker::get_mapped_bugs.get_bugs_for_patch">
    <querytext>
      select b.bug_number,
             b.summary
      from   bt_bugs b, bt_patch_bug_map bpbm
      where  b.bug_id = bpbm.bug_id
      and    bpbm.patch_id = (select patch_id
                              from bt_patches
                              where patch_number = :patch_number
                              and project_id = :package_id
                              )
             $open_clause
      </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: