Index: openacs-4/packages/bug-tracker/bug-tracker.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/bug-tracker.info,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/bug-tracker/bug-tracker.info 28 Aug 2003 09:45:29 -0000 1.13 +++ openacs-4/packages/bug-tracker/bug-tracker.info 28 Sep 2003 01:28:18 -0000 1.14 @@ -7,7 +7,7 @@ f f - + postgresql oracle @@ -17,12 +17,12 @@ 2003-02-28 Musea Technologies - + - + Index: openacs-4/packages/bug-tracker/lib/nav-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/lib/nav-bar.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/bug-tracker/lib/nav-bar.tcl 26 Sep 2003 08:10:35 -0000 1.9 +++ openacs-4/packages/bug-tracker/lib/nav-bar.tcl 28 Sep 2003 01:28:18 -0000 1.10 @@ -50,14 +50,22 @@ array set filter [bug_tracker::conn filter] -multirow append links "[bug_tracker::conn Bugs]" "${url_prefix}." +set workflow_id [bug_tracker::bug::get_instance_workflow_id] +set initial_state_id [workflow::fsm::get_initial_state -workflow_id $workflow_id] +multirow append links "[bug_tracker::conn Bugs]" [export_vars -base "${url_prefix}." { { f_fix_for_version {[bug_tracker::conn current_version_id]} } }] + if { $create_p } { multirow append links "New [bug_tracker::conn Bug]" "${url_prefix}bug-add" } if { [ad_conn untrusted_user_id] != 0 } { - multirow append links "My [bug_tracker::conn Bugs]" "${url_prefix}.?[export_vars -url { { filter.assignee {[ad_conn user_id]} } }]" + # Lars: Taken out + # Could mean one of + # - I submitted + # - I'm supposed to resolve + # - I'm supposed to verify and close + #multirow append links "My [bug_tracker::conn Bugs]" "${url_prefix}.?[export_vars -url { { filter.assignee {[ad_conn user_id]} } }]" } if { $patches_p } { Index: openacs-4/packages/bug-tracker/tcl/bug-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-procs-oracle.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/tcl/bug-procs-oracle.xql 5 Mar 2003 17:40:50 -0000 1.1 +++ openacs-4/packages/bug-tracker/tcl/bug-procs-oracle.xql 28 Sep 2003 01:28:18 -0000 1.2 @@ -52,4 +52,152 @@ + + + begin + workflow_case_pkg.delete(:case_id); + end; + + + + + + begin + notification.delete(:notification_id); + end; + + + + + + begin + content_item.delete(:bug_id); + end; + + + + + + + select kw.heading, + km.keyword_id, + count(b.bug_id) + from cr_keywords kw, + cr_item_keyword_map km, + bt_bugs b + where kw.parent_id = :parent_id + and km.keyword_id = kw.keyword_id + and b.bug_id (+) = km.item_id + and b.project_id = :package_id + group by kw.heading, km.keyword_id + order by kw.heading + + + + + + + + select v.version_name, + b.fix_for_version, + count(b.bug_id) as num_bugs + from bt_bugs b, + bt_versions v + where b.project_id = :package_id + and v.version_id (+) = b.fix_for_version + group by b.fix_for_version, v.anticipated_freeze_date, v.version_name + order by v.anticipated_freeze_date, v.version_name + + + + + + + select p.first_names || ' ' || p.last_name as name, + crum.user_id, + count(b.bug_id) as num_bugs + from bt_bugs b, + workflow_case_assigned_actions aa, + workflow_case_role_user_map crum, + persons p + where b.project_id = :package_id + and aa.workflow_id = :workflow_id + and aa.action_id = :action_id + and aa.object_id = b.bug_id + and crum.case_id (+) = aa.case_id + and crum.role_id (+) = aa.role_id + and p.person_id (+) = crum.user_id + group by p.first_names, p.last_name, crum.user_id + + + + + + content_keyword.is_assigned(b.bug_id, :f_category_$parent_id, 'none') = 't' + + + + + + + , cr_item_keyword_map km_order, + cr_keywords kw_order + + + + + + and km_order.item_id (+) = b.bug_id + and km_order.keyword_id = kw_order.keyword_id + and kw_order.parent_id = '[db_quote $orderby_parent_id]' + + + + + + + select q.*, + km.keyword_id + from ( + select b.bug_id, + b.bug_number, + b.summary, + b.comment_content, + b.comment_format, + b.component_id, + b.creation_date, + to_char(b.creation_date, 'fmMM/DDfm/YYYY') as creation_date_pretty, + b.creation_user as submitter_user_id, + submitter.first_names as submitter_first_names, + submitter.last_name as submitter_last_name, + submitter.email as submitter_email, + st.pretty_name as pretty_state, + st.short_name as state_short_name, + st.state_id, + st.hide_fields, + b.resolution, + b.found_in_version, + b.fix_for_version, + b.fixed_in_version + from $from_bug_clause, + cc_users submitter, + workflow_cases cas, + workflow_case_fsm cfsm, + workflow_fsm_states st + where submitter.user_id = b.creation_user + and cas.workflow_id = :workflow_id + and cas.object_id = b.bug_id + and cfsm.case_id = cas.case_id + and st.state_id = cfsm.current_state + $orderby_category_where_clause + [template::list::filter_where_clauses -and -name "bugs"] + [template::list::orderby_clause -orderby -name "bugs"] + ) q, + cr_item_keyword_map km + where km.item_id (+) = q.bug_id + + + + + Index: openacs-4/packages/bug-tracker/tcl/bug-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-procs-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/tcl/bug-procs-postgresql.xql 5 Mar 2003 17:40:50 -0000 1.2 +++ openacs-4/packages/bug-tracker/tcl/bug-procs-postgresql.xql 28 Sep 2003 01:28:18 -0000 1.3 @@ -49,5 +49,143 @@ + + + + select workflow_case_pkg__delete(:case_id); + + + + + select notification__delete(:notification_id); + + + + + + select content_item__delete(:bug_id); + + + + + + + + + + select kw.heading, + km.keyword_id, + count(b.bug_id) + from cr_keywords kw join + cr_item_keyword_map km using (keyword_id) left outer join + bt_bugs b on (b.bug_id = km.item_id) + where kw.parent_id = :parent_id + and b.project_id = :package_id + group by kw.heading, km.keyword_id + order by kw.heading + + + + + + + + + select p.first_names || ' ' || p.last_name as name, + crum.user_id, + count(b.bug_id) as num_bugs + from bt_bugs b, + workflow_case_assigned_actions aa left outer join + workflow_case_role_user_map crum on (crum.case_id = aa.case_id and crum.role_id = aa.role_id) left outer join + persons p on (p.person_id = crum.user_id) + where b.project_id = :package_id + and aa.workflow_id = :workflow_id + and aa.action_id = :action_id + and aa.object_id = b.bug_id + group by p.first_names, p.last_name, crum.user_id + + + + + + + select v.version_name, + b.fix_for_version, + count(b.bug_id) as num_bugs + from bt_bugs b left outer join + bt_versions v on (v.version_id = b.fix_for_version) + where b.project_id = :package_id + group by b.fix_for_version, v.anticipated_freeze_date, v.version_name + order by v.anticipated_freeze_date, v.version_name + + + + + + + content_keyword__is_assigned(b.bug_id, :f_category_$parent_id, 'none') = 't' + + + + + + left outer join cr_item_keyword_map km_order on (km_order.item_id = b.bug_id) + join cr_keywords kw_order on (km_order.keyword_id = kw_order.keyword_id and kw_order.parent_id = '[db_quote $orderby_parent_id]') + + + + + + + + + + + + select q.*, + km.keyword_id + from ( + select b.bug_id, + b.bug_number, + b.summary, + b.comment_content, + b.comment_format, + b.component_id, + b.creation_date, + to_char(b.creation_date, 'fmMM/DDfm/YYYY') as creation_date_pretty, + b.creation_user as submitter_user_id, + submitter.first_names as submitter_first_names, + submitter.last_name as submitter_last_name, + submitter.email as submitter_email, + st.pretty_name as pretty_state, + st.short_name as state_short_name, + st.state_id, + st.hide_fields, + b.resolution, + b.found_in_version, + b.fix_for_version, + b.fixed_in_version + from $from_bug_clause, + cc_users submitter, + workflow_cases cas, + workflow_case_fsm cfsm, + workflow_fsm_states st + where submitter.user_id = b.creation_user + and cas.workflow_id = :workflow_id + and cas.object_id = b.bug_id + and cfsm.case_id = cas.case_id + and st.state_id = cfsm.current_state + $orderby_category_where_clause + [template::list::filter_where_clauses -and -name "bugs"] + [template::list::orderby_clause -orderby -name "bugs"] + ) q left outer join + cr_item_keyword_map km on (km.item_id = q.bug_id) + + + + + + + Index: openacs-4/packages/bug-tracker/tcl/bug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-procs.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/bug-tracker/tcl/bug-procs.tcl 24 Sep 2003 15:14:10 -0000 1.4 +++ openacs-4/packages/bug-tracker/tcl/bug-procs.tcl 28 Sep 2003 01:28:18 -0000 1.5 @@ -275,6 +275,23 @@ } +ad_proc bug_tracker::bug::delete { bug_id } { + Delete a Bug Tracker bug. + This should only ever be run when un-instantiating a project! + + @author Mark Aufflick +} { + set case_id [db_string get_case_id {}] + db_exec_plsql delete_bug_case {} + set notifications [db_list get_notifications {}] + foreach notification_id $notifications { + db_exec_plsql delete_notification {} + } + db_dml unset_revisions {} + db_exec_plsql delete_cr_item {} +} + + ad_proc -public bug_tracker::bug::get_watch_link { {-bug_id:required} } { @@ -653,3 +670,302 @@ return [list $url $one_line $details_list $notification_subject_tag] } + +##### +# +# Bug list +# +##### + +ad_proc bug_tracker::bug::get_list { + {-ulevel 1} +} { + set package_id [ad_conn package_id] + set workflow_id [bug_tracker::bug::get_instance_workflow_id] + bug_tracker::get_pretty_names -array pretty_names + + set elements { + bug_number { + label "Bug \#" + display_template {\#@bugs.bug_number@} + html { align right } + } + summary { + label "Summary" + link_url_eval {[export_vars -base bug -entire_form -override { bug_number }]} + aggregate_label "Number of $pretty_names(bugs)" + } + comment { + label "Details" + display_col comment_short + hide_p 1 + } + state { + label "State" + display_template {@bugs.pretty_state@ (@bugs.resolution_pretty@)} + aggregate count + } + creation_date_pretty { + label "Submitted" + } + submitter { + label "Submitter" + display_template {@bugs.submitter_first_names@ @bugs.submitter_last_name@} + hide_p 1 + } + fix_for_version { + label "Fix for" + display_col fix_for_version_name + } + component { + label "Component" + display_col component_name + } + } + + set state_values [db_list_of_lists select_states {}] + set state_default_value [lindex [lindex $state_values 0] 1] + + set filters { + f_state { + label "State" + values $state_values + where_clause {cfsm.current_state = :f_state} + default_value $state_default_value + } + } + + set orderbys { + default_value bug_number,desc + bug_number { + label "Bug \#" + orderby b.bug_number + default_direction desc + } + summary { + label "Summary" + orderby_asc {upper(b.summary) asc, b.summary asc, b.bug_number asc} + orderby_desc {upper(b.summary) desc, b.summary desc, b.bug_number desc} + } + submitter { + label "Submitter" + orderby_asc {upper(submitter.first_names) asc, upper(submitter.last_name) asc, b.bug_number asc} + orderby_asc {upper(submitter.first_names) desc, upper(submitter.last_name) desc, b.bug_number desc} + } + } + + set category_defaults [list] + + + foreach { parent_id parent_heading } [bug_tracker::category_types] { + lappend elements category_$parent_id [list label [bug_tracker::category_heading -keyword_id $parent_id] display_col category_name_$parent_id] + + set values [db_list_of_lists select_categories {}] + + set name category_$parent_id + + set where_clause [db_map category_where_clause] + + lappend filters f_$name \ + [list \ + label $parent_heading \ + values $values \ + where_clause $where_clause] + + lappend orderbys $name \ + [list \ + label $parent_heading \ + orderby_desc {kw_order.heading desc, b.bug_number desc} \ + orderby_asc {kw_order.heading asc, b.bug_number asc}] + } + + if { [bug_tracker::versions_p] } { + lappend filters f_fix_for_version { + label "Fix for version" + values {[db_list_of_lists select_fix_for_versions {}]} + where_clause { b.fix_for_version = :f_fix_for_version } + null_where_clause { b.fix_for_version is null } + null_label "Undecided" + } + } + + foreach action_id [workflow::get_actions -workflow_id $workflow_id] { + array unset action + workflow::action::get -action_id $action_id -array action + + set values [db_list_of_lists select_action_assignees {}] + + lappend filters f_action_$action_id \ + [list \ + label $action(pretty_name) \ + values $values \ + null_label "Unassigned" \ + where_clause " + exists (select 1 + from workflow_case_assigned_actions aa, + workflow_case_role_user_map crum + where aa.case_id = cas.case_id + and aa.action_id = $action_id + and crum.case_id = aa.case_id + and crum.role_id = aa.role_id + and crum.user_id = :f_action_$action_id + ) + " \ + null_where_clause " + exists (select 1 + from workflow_case_assigned_actions aa, + workflow_case_role_user_map crum + where aa.case_id = cas.case_id + and aa.action_id = $action_id + and crum.case_id (+) = aa.case_id + and crum.role_id (+) = aa.role_id + and crum.user_id is null + )"] + } + + # Stat: By Component + + lappend filters f_component { + label "Component" + values {[db_list_of_lists select_components {}]} + where_clause {b.component_id = :f_component} + } + + upvar \#[template::adp_level] format format + + template::list::create \ + -ulevel [expr $ulevel + 1] \ + -name bugs \ + -multirow bugs \ + -class "list-tiny" \ + -sub_class "narrow" \ + -pass_properties { pretty_names } \ + -elements $elements \ + -filters $filters \ + -orderby $orderbys \ + -formats { + table { + label "Table" + layout table + } + list { + label "List" + layout list + template { +

+ + . +
+
+
+ @pretty_names.Component@: + - Opened + By
+ Status: + +

+ } + } + } \ + -selected_format $format +} + + + +ad_proc bug_tracker::bug::get_query {} { + + upvar #[template::adp_level] orderby orderby + + # Needed to handle ordering by categories + set from_bug_clause "bt_bugs b" + set orderby_category_where_clause {} + + # Lars: This is a little hack because we actually need to alter the query to sort by category + # but list builder currently doesn't support that. + + if { [info exists orderby] && [regexp {^category_(.*),.*$} $orderby match orderby_parent_id] } { + append from_bug_clause [db_map orderby_category_from_bug_clause] + set orderby_category_where_clause [db_map orderby_category_where_clause] + } + + return [db_map bugs] +} + + +ad_proc bug_tracker::bug::get_multirow {} { + foreach var [bug_tracker::get_export_variables] { + upvar \#[template::adp_level] $var $var + } + + set workflow_id [bug_tracker::bug::get_instance_workflow_id] + set truncate_len [parameter::get -parameter "TruncateDescriptionLength" -default 200] + + set extend_list { + comment_short + submitter_url + status_pretty + resolution_pretty + component_name + found_in_version_name + fix_for_version_name + fixed_in_version_name + } + + 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] { + + # 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] + set found_in_version_name [bug_tracker::version_get_name -version_id $found_in_version] + set fix_for_version_name [bug_tracker::version_get_name -version_id $fix_for_version] + set fixed_in_version_name [bug_tracker::version_get_name -version_id $fixed_in_version] + set comment_short [string_truncate -len $truncate_len -format $comment_format $comment_content] + set summary [ad_quotehtml $summary] + set submitter_url [acs_community_member_url -user_id $submitter_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) + set category_name_$parent_id $row_category_name($parent_id) + } + + array set row_category $category_defaults + array set row_category_names $category_defaults + } else { + continue + } + } + +} + +ad_proc bug_tracker::bug::get_bug_numbers {} { + bug_tracker::bug::get_list -ulevel 2 + bug_tracker::bug::get_multirow + + set filter_bug_numbers [list] + template::multirow foreach bugs { + lappend filter_bug_numbers $bug_number + } + + return $filter_bug_numbers +} Index: openacs-4/packages/bug-tracker/tcl/bug-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-procs.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/tcl/bug-procs.xql 28 Aug 2003 09:45:29 -0000 1.2 +++ openacs-4/packages/bug-tracker/tcl/bug-procs.xql 28 Sep 2003 01:28:18 -0000 1.3 @@ -1,6 +1,30 @@ + + + select case_id + from workflow_cases + where object_id = :bug_id + + + + + + select notification_id + from notifications + where response_id = :bug_id + + + + + + update cr_items + set live_revision = null, latest_revision = null + where item_id = :bug_id + + + select ba.action_id, @@ -60,5 +84,42 @@ + + + select st.pretty_name, + st.state_id, + count(b.bug_id) + from workflow_fsm_states st, + bt_bugs b, + workflow_cases cas, + workflow_case_fsm cfsm + where st.workflow_id = :workflow_id + and b.project_id = :package_id + and cas.workflow_id = :workflow_id + and cas.object_id = b.bug_id + and cfsm.case_id = cas.case_id + and st.state_id = cfsm.current_state + group by st.state_id, st.pretty_name, st.sort_order + order by st.sort_order + + + + + + + + select c.component_name, + c.component_id, + count(b.bug_id) as num_bugs + from bt_bugs b, + bt_components c + where b.project_id = :package_id + and c.component_id = b.component_id + group by c.component_name, c.component_id + order by c.component_name + + + + Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-oracle.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-oracle.xql 28 Aug 2003 09:45:29 -0000 1.2 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-oracle.xql 28 Sep 2003 01:28:18 -0000 1.3 @@ -117,21 +117,6 @@ - - - , cr_item_keyword_map km_order, - cr_keywords kw_order - - - - - - km_order.item_id (+) = b.bug_id - and km_order.keyword_id = kw_order.keyword_id - and kw_order.parent_id = :filter_orderby - - - begin @@ -148,28 +133,4 @@ - - - begin - workflow_case_pkg.delete(:case_id); - end; - - - - - - begin - notification.delete(:notification_id); - end; - - - - - - begin - content_item.delete(:bug_id); - end; - - - Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-postgresql.xql 28 Aug 2003 09:45:29 -0000 1.2 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-postgresql.xql 28 Sep 2003 01:28:18 -0000 1.3 @@ -143,21 +143,4 @@ - - - select workflow_case_pkg__delete(:case_id); - - - - - - select notification__delete(:notification_id); - - - - - - select content_item__delete(:bug_id); - - Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl,v diff -u -N -r1.21 -r1.22 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 25 Sep 2003 12:25:15 -0000 1.21 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 28 Sep 2003 01:28:18 -0000 1.22 @@ -103,6 +103,53 @@ return [db_string bug_id {}] } + +ad_proc bug_tracker::get_page_variables { + {extra_spec ""} +} { + Adds the bug listing filter variables for use in the page contract. + + ad_page_contract { doc } [bug_tracker::get_page_variables { foo:integer { bar "" } }] +} { + set filter_vars { + f_state:optional + f_fix_for_version:optional + f_component:optional + orderby:optional + {format "table"} + } + foreach { parent_id parent_heading } [bug_tracker::category_types] { + lappend filter_vars "f_category_$parent_id:optional" + } + foreach action_id [workflow::get_actions -workflow_id [bug_tracker::bug::get_instance_workflow_id]] { + lappend filter_vars "f_action_$action_id:optional" + } + + return [concat $filter_vars $extra_spec] +} + +ad_proc bug_tracker::get_export_variables { + {extra_vars ""} +} { + Gets a list of variables to export for the bug list +} { + set export_vars { + f_state + f_fix_for_version + f_component + orderby + format + } + foreach { parent_id parent_heading } [bug_tracker::category_types] { + lappend export_vars "f_category_$parent_id" + } + foreach action_id [workflow::get_actions -workflow_id [bug_tracker::bug::get_instance_workflow_id]] { + lappend export_vars "f_action_$action_id" + } + + return [concat $export_vars $extra_vars] +} + ##### # # Cached project info procs @@ -155,7 +202,7 @@ ##### # -# Stats procs (cache eventually) +# Stats procs # ##### @@ -253,32 +300,6 @@ ##### # -# Bug Types -# -##### - -ad_proc bug_tracker::bug_type_get_options {} { - return { { "Bug" bug } { "Suggestion" suggestion } { "Todo" todo } } -} - -ad_proc bug_tracker::bug_type_pretty { - bug_type -} { - array set bug_types { - bug "Bug" - suggestion "Suggestion" - todo "Todo" - } - if { [info exists bug_types($bug_type)] } { - return $bug_types($bug_type) - } else { - return "" - } -} - - -##### -# # Status # ##### @@ -369,101 +390,8 @@ -##### -# -# Severity/Priority codes -# -##### -ad_proc bug_tracker::severity_codes_get_options { -} { -# XXX FIXME obsolete - set package_id [ad_conn package_id] - return [util_memoize [list bug_tracker::severity_codes_get_options_not_cached $package_id]] -} -ad_proc bug_tracker::severity_codes_get_options_not_cached { - package_id -} { -# XXX FIXME obsolete - set severity_list [db_list_of_lists severities { - select sort_order || ' - ' || severity_name, severity_id - from bt_severity_codes - where project_id = :package_id - order by sort_order - }] - - return $severity_list -} - -ad_proc bug_tracker::severity_get_default { -} { -# XXX FIXME obsolete - set package_id [ad_conn package_id] - return [util_memoize [list bug_tracker::severity_get_default_not_cached $package_id]] -} - -ad_proc bug_tracker::severity_get_default_not_cached { - package_id -} { -# XXX FIXME obsolete - set default_severity_id [db_string default_severity { - select severity_id - from bt_severity_codes - where project_id = :package_id - and default_p = 't' - order by sort_order - limit 1 - } -default ""] - - return $default_severity_id -} - -ad_proc bug_tracker::priority_codes_get_options { -} { -# XXX FIXME obsolete - set package_id [ad_conn package_id] - return [util_memoize [list bug_tracker::priority_codes_get_options_not_cached $package_id]] -} - -ad_proc bug_tracker::priority_codes_get_options_not_cached { - package_id -} { -# XXX FIXME obsolete - set priority_list [db_list_of_lists priorities { - select sort_order || ' - ' || priority_name, priority_id - from bt_priority_codes - where project_id = :package_id - order by sort_order - }] - - return $priority_list -} - -ad_proc bug_tracker::priority_get_default { -} { -# XXX FIXME obsolete - set package_id [ad_conn package_id] - return [util_memoize [list bug_tracker::priority_get_default_not_cached $package_id]] -} - -ad_proc bug_tracker::priority_get_default_not_cached { - package_id -} { -# XXX FIXME obsolete - set default_priority_id [db_string default_priority { - select priority_id - from bt_priority_codes - where project_id = :package_id - and default_p = 't' - order by sort_order - limit 1 - } -default ""] - - return $default_priority_id -} - - ##### # # Categories/Keywords @@ -474,14 +402,23 @@ {-package_id ""} -keyword_id:required } { + return [bug_tracker::category_parent_element -package_id $pcakage_id -keyword_id $keyword_id -element heading] +} + +# TODO: This could be made faster if we do a reverse mapping array from child to parent + +ad_proc bug_tracker::category_parent_element { + {-package_id ""} + -keyword_id:required + {-element "heading"} +} { foreach elm [get_keywords -package_id $package_id] { set child_id [lindex $elm 0] - set child_heading [lindex $elm 1] - set parent_id [lindex $elm 2] - set parent_heading [lindex $elm 3] - + if { $child_id == $keyword_id } { - return $parent_heading + set parent(id) [lindex $elm 2] + set parent(heading) [lindex $elm 3] + return $parent($element) } } } @@ -498,6 +435,8 @@ if { $child_id == $keyword_id } { return $child_heading + } elseif { $parent_id == $keyword_id } { + return $parent_heading } } } @@ -594,8 +533,6 @@ set package_id [ad_conn package_id] } - # LARS NEW QUERIES - db_dml delete_existing { delete from bt_default_keywords @@ -643,8 +580,6 @@ } { Get the default keyword for a given type (parent), not cached. } { - # LARS NEW QUERIES - return [db_string default { select keyword_id from bt_default_keywords @@ -951,7 +886,7 @@ ##### # -# Description +# Description (still used by the patch code, to be removed when they've moved to workflow) # ##### @@ -975,37 +910,6 @@ # ##### -ad_proc bug_tracker::bug_action_pretty { - action - {resolution ""} -} { - array set action_codes { - open "Opened" - edit "Edited" - reassign "Reassigned" - comment "Comment" - resolve "Resolved" - reopen "Reopened" - close "Closed" - patched "Patched" - } - if { [info exists action_codes($action)] } { - - set action_pretty $action_codes($action) - - if { [string equal $action "resolve"] } { - set resolution_pretty [resolution_pretty $resolution] - if { ![empty_string_p $resolution_pretty] } { - append action_pretty " ($resolution_pretty)" - } - } - - return $action_pretty - } else { - return "" - } -} - ad_proc bug_tracker::patch_action_pretty { action } { @@ -1076,28 +980,8 @@ return $users_list } -ad_proc ::bug_tracker::users_get_searchquery { - -package_id -} { + -} - -ad_proc -private bug_tracker::get_maintainer_role_id { - -package_id -} { - if { ![info exists package_id] } { - set package_id [ad_conn package_id] - } - # We're using the assignee widget for a certain role to assign the version maintainer - set workflow_id [bug_tracker::bug::get_instance_workflow_id -package_id [ad_conn package_id]] - set role_ids [workflow::get_roles -workflow_id $workflow_id] - - # LARS HACK: - # We'll use the last role in sort order - return [lindex $role_ids end] -} - - ##### # # Patches @@ -1254,249 +1138,6 @@ return $content } -ad_proc bug_tracker::parse_filters { filter_array_name } { - Parses the array named in 'filter_array_name', setting local - variables for the filter parameters, and constructing a chunk - that can be used in a query, plus a human readable - string. Sets the result in bug_tracker::conn as - 'filter_human_readable', 'filter_where_clauses', 'filter_from_bug_clause', - 'filter_order_by_clause'. -} { - upvar $filter_array_name filter - - set where_clauses [list] - set from_bug_clause "bt_bugs b" - - set workflow_id [bug_tracker::bug::get_instance_workflow_id] - set initial_state_id [workflow::fsm::get_initial_state -workflow_id $workflow_id] - - set valid_filters { - {status $initial_state_id} - {action_id} - fix_for_version:integer - assignee:integer - enabled_action_assignee:integer - action_id:integer - component_id:integer - keyword:integer,multiple - {n_days 7} - {orderby ""} - } - - foreach name $valid_filters { - if { [llength $name] > 1 } { - set default [subst [lindex $name 1]] - set name [lindex $name 0] - } else { - if { [info exists default] } { - unset default - } - } - if { [llength [split $name ":"]] > 1 } { - set filters [split [lindex [split $name ":"] 1] ,] - set name [lindex [split $name ":"] 0] - } else { - set filters [list] - } - - # special case for annoying tcl'ism, whereby if you say - # lappend foo(bar) {}, your foo(bar) entry will be equal to {{}}, - # which we run into, because the page defines filters as - # :array,multiple - if { [info exists filter($name)] && [string equal $filter($name) {{}}] } { - if { [lsearch -exact $filters "multiple"] != -1 } { - unset filter($name) - } else { - set filter($name) {} - } - } - - if { [info exists filter($name)] } { - upvar filter_$name var - set var $filter($name) - - if { [lsearch -exact $filters "integer"] != -1 && ![empty_string_p $var]} { - if { [lsearch -exact $filters "multiple"] != -1 } { - foreach elm $var { - validate_integer $name $elm - } - } else { - validate_integer $name $var - } - } - - } elseif { [info exists default] } { - upvar filter_$name var - set var $default - } - # also upvar it under its real name - upvar filter_$name filter_$name - } - - if { [info exists filter_status] && ![string equal $filter_status "any"] } { - lappend where_clauses "cfsm.current_state = :filter_status" - - set status_pretty [workflow::state::fsm::get_element \ - -state_id $filter_status \ - -element pretty_name] - - set human_readable_filter "All $status_pretty [bug_tracker::conn bugs]" - } else { - set human_readable_filter "[bug_tracker::conn Bugs] of any status" - } - - if { [info exists filter_bug_type] } { - lappend where_clauses "b.bug_type = :filter_bug_type" - append human_readable_filter " of type [bug_tracker::bug_type_pretty $filter_bug_type]" - } - - if { [info exists filter_assignee] } { - if { [empty_string_p $filter_assignee] } { - lappend where_clauses "assignee.party_id is null" - - append human_readable_filter " that are unassigned" - } else { - - lappend where_clauses "assignee.party_id = :filter_assignee" - - if { $filter_assignee == [ad_conn user_id] } { - append human_readable_filter " assigned to me" - } else { - append human_readable_filter " assigned to [db_string assignee_name {}]" - } - } - } - - if { [info exists filter_keyword] } { - set keyword_human [list] - foreach keyword_id $filter_keyword { - lappend where_clauses [db_map keyword_filter] - set category_name [category_heading -keyword_id $keyword_id] - - # LARS: - # This is a hack to be smart about stripping out the "1 - " or "A - " part - # if people use that naming style - regsub {^[a-zA-Z0-9]\s[-*]*\s} $category_name {} category_name - - lappend keyword_human "[category_parent_heading -keyword_id $keyword_id] is $category_name" - } - append human_readable_filter " where [join $keyword_human " and "]" - } - - if { [info exists filter_enabled_action_assignee] } { - lappend where_clauses { - exists ( - select 1 - from workflow_cases cas2, - workflow_case_fsm cfsm2, - workflow_actions a2, - workflow_case_role_party_map crpm2 - where cas2.object_id = b.bug_id - and (a2.always_enabled_p = 't' - or exists (select 1 - from workflow_fsm_action_en_in_st aeis - where aeis.state_id = cfsm.current_state - and aeis.action_id = a2.action_id - and aeis.assigned_p = 't' - ) - ) - and cfsm2.case_id = cas2.case_id - and crpm2.case_id = cas2.case_id - and crpm2.role_id = a2.assigned_role - and crpm2.party_id = :filter_enabled_action_assignee - ) - } - if { $filter_enabled_action_assignee == [ad_conn user_id] } { - append human_readable_filter " awaiting action by me" - } else { - array set person [person::get -person_id $filter_enabled_action_assignee] - - append human_readable_filter " awaiting action by $person(first_names) $person(last_name)" - } - } - - if { ![empty_string_p [conn component_id]] } { - set filter_component_id [conn component_id] - } - - if { [info exists filter_component_id] } { - lappend where_clauses "b.component_id = :filter_component_id" - append human_readable_filter " in [component_get_name -component_id $filter_component_id]" - conn -set component_id $filter_component_id - } - - if { [info exists filter_fix_for_version] } { - if { [empty_string_p $filter_fix_for_version] } { - lappend where_clauses "b.fix_for_version is null" - append human_readable_filter " where fix for version is undecided" - } else { - lappend where_clauses "b.fix_for_version = :filter_fix_for_version" - append human_readable_filter " to be fixed in version [db_string version_name {}]" - } - } - - if { [empty_string_p $filter_orderby] } { - set order_by_clause "b.bug_number desc" - } else { - append from_bug_clause [db_map orderby_filter_from_bug] - lappend where_clauses [db_map orderby_filter_where] - set order_by_clause "kw_order.heading, bug_number desc " - } - - if { ![empty_string_p $filter_n_days] } { - if { ![string equal $filter_n_days "all"] } { - lappend where_clauses [db_map n_days_filter] - append human_readable_filter " opened in the last $filter_n_days days" - } - } - - conn -set filter [array get filter] - conn -set filter_human_readable $human_readable_filter - conn -set filter_where_clauses $where_clauses - conn -set filter_order_by_clause $order_by_clause - conn -set filter_from_bug_clause $from_bug_clause -} - -ad_proc bug_tracker::filter_url_vars { - {-array:required} - {-override:required} -} { - Returns query args for the URL string, overriding the existing filters with the new one given by name and value. - Existing orderby and n_days filters are kept, however, unless that's the one you're replacing - @param array the name of the array in the caller's scope holding the current filter values - @param override an array list of new values to set instead -} { - upvar $array cur_filters - - array set filter [list] - - foreach keeper { orderby n_days } { - if { [info exists cur_filters($keeper)] } { - set filter($keeper) $cur_filters($keeper) - } - } - - array set filter $override - return [export_vars { filter:array }] -} - -ad_proc bug_tracker::context_bar { args } { - Context bar that takes the component information into account -} { - set component_id [conn component_id] - if { ![empty_string_p $component_id] } { - set component_name [bug_tracker::component_get_name -component_id $component_id] - set url_name [bug_tracker::component_get_url_name -component_id $component_id] - if { [llength $args] == 0 } { - return [eval ad_context_bar [list $component_name]] - } else { - return [eval ad_context_bar [list [list "[ad_conn package_url]com/$url_name/" $component_name]] $args] - } - } else { - return [eval ad_context_bar $args] - } -} - ad_proc bug_tracker::security_violation { -user_id:required -bug_id:required @@ -1510,30 +1151,23 @@ " ad_script_abort } -ad_proc bug_tracker::bug_delete { bug_id } { - Delete a Bug Tracker bug. - This should only ever be run when un-instantiating a project! - @author Mark Aufflick -} { - set case_id [db_string get_case_id {}] - db_exec_plsql delete_bug_case {} - set notifications [db_list get_notifications {}] - foreach notification_id $notifications { - db_exec_plsql delete_notification {} - } - db_dml unset_revisions {} - db_exec_plsql delete_cr_item {} -} +##### +# +# Projects +# +##### + + ad_proc bug_tracker::project_delete { project_id } { Delete a Bug Tracker project and all its data. @author Peter Marklund } { #manually delete all bugs to avoid wierd integrity constraints while { [set bug_id [db_string min_bug_id {}]] > 0 } { - bug_delete $bug_id + bug_tracker::bug::delete $bug_id } db_exec_plsql delete_project {} } @@ -1545,73 +1179,3 @@ } { db_exec_plsql create_project {} } - -ad_proc bug_tracker::bug_notify { - {-bug_id:required} - {-action ""} - {-comment ""} - {-comment_format ""} - {-resolution ""} - {-patch_summary ""} -} { - set package_id [ad_conn package_id] - - db_1row bug {} -column_array bug - set bug(found_in_version_name) [version_get_name -version_id $bug(found_in_version)] - set bug(fix_for_version_name) [version_get_name -version_id $bug(fix_for_version)] - set bug(fixed_in_version_name) [version_get_name -version_id $bug(fixed_in_version)] - - get_pretty_names -array pretty_names - - set subject "$pretty_names(Bug) #$bug(bug_number). [ad_html_to_text -- [string_truncate -len 30 $bug(summary)]]: [bug_action_pretty $action $resolution] by [conn user_first_names] [conn user_last_name]" - - set body "$pretty_names(Bug) no: #$bug(bug_number) -Summary: $bug(summary) - -$pretty_names(Component): $bug(component_name) -Status: $bug(status) -" - -foreach {category_id category_name} [bug_tracker::category_types] { - append body "$category_name: [cr::keyword::item_get_assigned -item_id $bug(bug_id) -parent_id $category_id] -" -} - -append body "Found in version: $bug(found_in_version_name) - -Action: [bug_action_pretty $action $resolution] -By user: [conn user_first_names] [conn user_last_name] <[conn user_email]> - -" - - if { ![string equal $action "patched"] } { - if { ![empty_string_p $comment] } { - append body "Comment:\n\n[bug_convert_comment_to_text -comment $comment -format $comment_format]\n\n" - } - - } else { - append body "\n\nSummary: $patch_summary\n\n" - } - - - append body "--\nTo comment on, edit, resolve, close, or reopen this bug, go to:\n[ad_url][ad_conn package_url]bug?[export_vars -url { { bug_number $bug(bug_number) } }]\n" - - # Use the Notification service to alert (could be immediately, or daily, or weekly) - # people who have signed up for notification on this bug - notification::new \ - -type_id [notification::type::get_type_id -short_name bug_tracker_bug_notif] \ - -object_id $bug(bug_id) \ - -response_id $bug(bug_id) \ - -notif_subject $subject \ - -notif_text $body - - # Use the Notification service to alert people who have signed up for notification - # in this bug tracker package instance - notification::new \ - -type_id [notification::type::get_type_id -short_name bug_tracker_project_notif] \ - -object_id $bug(project_id) \ - -response_id $bug(bug_id) \ - -notif_subject $subject \ - -notif_text $body -} - Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.xql 5 Mar 2003 17:40:50 -0000 1.1 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.xql 28 Sep 2003 01:28:18 -0000 1.2 @@ -38,30 +38,6 @@ - - - - select sort_order || ' - ' || severity_name, severity_id - from bt_severity_codes - where project_id = :package_id - order by sort_order - - - - - - - - - select sort_order || ' - ' || priority_name, priority_id - from bt_priority_codes - where project_id = :package_id - order by sort_order - - - - - select version_name, version_id from bt_versions where project_id = :package_id order by version_name @@ -159,28 +135,6 @@ - - - select component_name from bt_components where component_id = :filter_component_id - - - - - - - select version_name from bt_versions where version_id = :filter_fix_for_version - - - - - - - - select component_name, url_name from bt_components where component_id = :component_id - - - - @@ -214,28 +168,5 @@ - - - select case_id - from workflow_cases - where object_id = :bug_id - - - - - - select notification_id - from notifications - where response_id = :bug_id - - - - - - update cr_items - set live_revision = null, latest_revision = null - where item_id = :bug_id - - Index: openacs-4/packages/bug-tracker/www/bug-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bug-add.adp,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/bug-tracker/www/bug-add.adp 22 Sep 2003 15:45:10 -0000 1.7 +++ openacs-4/packages/bug-tracker/www/bug-add.adp 28 Sep 2003 01:28:18 -0000 1.8 @@ -1,6 +1,6 @@ @page_title;noquote@ -@context_bar;noquote@ +@context;noquote@ bug.component_id Index: openacs-4/packages/bug-tracker/www/bug-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bug-add.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/bug-tracker/www/bug-add.tcl 28 Aug 2003 09:45:29 -0000 1.10 +++ openacs-4/packages/bug-tracker/www/bug-add.tcl 28 Sep 2003 01:28:18 -0000 1.11 @@ -24,7 +24,7 @@ set page_title "New [bug_tracker::conn Bug]" -set context_bar [bug_tracker::context_bar $page_title] +set context [list $page_title] set user_id [ad_conn user_id] Index: openacs-4/packages/bug-tracker/www/bug-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/Attic/bug-oracle.xql,v diff -u -N --- openacs-4/packages/bug-tracker/www/bug-oracle.xql 5 Mar 2003 17:41:04 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,34 +0,0 @@ - - - - oracle8.1.6 - - - - - select b.bug_number - from $from_bug_clause, - workflow_cases cas, - (select rpm.case_id, - p.party_id, - p.email, - acs_object.name(p.party_id) as name - from workflow_case_role_party_map rpm, - parties p - where rpm.role_id = :action_role - and p.party_id = rpm.party_id - ) assignee, - workflow_case_fsm cfsm, - workflow_fsm_states st - where cas.workflow_id = :workflow_id - and cas.object_id = b.bug_id - and assignee.case_id (+) = cas.case_id - and cfsm.case_id = cas.case_id - and st.state_id = cfsm.current_state - and [join $where_clauses "\n and "] - order by $order_by_clause - - - - - Index: openacs-4/packages/bug-tracker/www/bug-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/Attic/bug-postgresql.xql,v diff -u -N --- openacs-4/packages/bug-tracker/www/bug-postgresql.xql 5 Mar 2003 17:41:04 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,32 +0,0 @@ - - - - postgresql7.1 - - - - select b.bug_number - from $from_bug_clause, - workflow_cases cas left outer join - (select rpm.case_id, - p.party_id, - p.email, - acs_object__name(p.party_id) as name - from workflow_case_role_party_map rpm, - parties p - where rpm.role_id = :action_role - and p.party_id = rpm.party_id - ) assignee on (cas.case_id = assignee.case_id), - workflow_case_fsm cfsm, - workflow_fsm_states st - where cas.workflow_id = :workflow_id - and cas.object_id = b.bug_id - and cfsm.case_id = cas.case_id - and st.state_id = cfsm.current_state - and [join $where_clauses "\n and "] - order by $order_by_clause - - - - - Index: openacs-4/packages/bug-tracker/www/bug.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bug.adp,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/bug-tracker/www/bug.adp 22 Sep 2003 15:45:10 -0000 1.8 +++ openacs-4/packages/bug-tracker/www/bug.adp 28 Sep 2003 01:28:18 -0000 1.9 @@ -1,15 +1,15 @@ @page_title;noquote@ -@context_bar;noquote@ +@context;noquote@ @notification_link;noquote@
Index: openacs-4/packages/bug-tracker/www/bug.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bug.tcl,v diff -u -N -r1.21 -r1.22 --- openacs-4/packages/bug-tracker/www/bug.tcl 22 Sep 2003 15:45:10 -0000 1.21 +++ openacs-4/packages/bug-tracker/www/bug.tcl 28 Sep 2003 01:28:18 -0000 1.22 @@ -4,20 +4,19 @@ @author Lars Pind (lars@pinds.com) @creation-date 2002-03-20 @cvs-id $Id$ -} { +} [bug_tracker::get_page_variables { bug_number:integer,notnull {user_agent_p:boolean 0} {show_patch_status "open"} - filter:array,optional -} +}] ##### # # Setup # ##### -set return_url "[ad_conn url]?[export_vars -url { bug_number filter:array }]" +set return_url [export_vars -base [ad_conn url] [bug_tracker::get_export_variables { bug_number }]] set project_name [bug_tracker::conn project_name] set package_id [ad_conn package_id] @@ -29,7 +28,7 @@ set page_title "[bug_tracker::conn Bug] #$bug_number" -set context_bar [bug_tracker::context_bar $page_title] +set context [list $page_title] # Is this project using multiple versions? set versions_p [bug_tracker::versions_p] @@ -96,7 +95,10 @@ # set patch label -set patch_label [ad_decode $show_patch_status "open" "Open Patches (show all)" "all" "All Patches (show only open)" "Patches"] +set patch_label [ad_decode $show_patch_status \ + "open" "Open Patches (show all)" \ + "all" "All Patches (show only open)" \ + "Patches"] ad_form -name bug -cancel_url $return_url -mode display -has_edit 1 -actions $actions -form { {bug_number_display:text(inform) @@ -184,14 +186,14 @@ {entry_id:integer(hidden),optional} } -# Export filters -if { [llength [array names filter]] > 0 } { - set filters [list] - foreach name [array names filter] { - lappend filters [list "filter.${name}:text(hidden)" [list value $filter($name)]] +# TODO: Export filters +set filters [list] +foreach name [bug_tracker::get_export_variables] { + if { [info exists $name] } { + lappend filters [list "${name}:text(hidden),optional" [list value [set $name]]] } - ad_form -extend -name bug -form $filters } +ad_form -extend -name bug -form $filters # Set editable fields if { ![empty_string_p $action_id] } { @@ -232,17 +234,18 @@ -array row \ -entry_id [element get_value bug entry_id] + ad_returnredirect $return_url ad_script_abort } -edit_request { # Dummy # If we don't have this, ad_form complains - # Unfortunately, ad_form doesn't let us do what we want, namely have a block that executes - # whenever the form is displayed, whether initially or because of a validation error. } # Not-valid block (request or submit error) +# Unfortunately, ad_form doesn't let us do what we want, namely have a block that executes +# whenever the form is displayed, whether initially or because of a validation error. if { ![form is_valid bug] } { # Get the bug data @@ -335,22 +338,14 @@ set page_title "[bug_tracker::conn Bug] #$bug_number: $bug(summary)" # Context bar - if { [info exists filter] } { - if { [array names filter] == [list "assignee"] && $filter(assignee) == $user_id } { - set context_bar [bug_tracker::context_bar [list ".?[export_vars { filter:array }]" "My [bug_tracker::conn bugs]"] $page_title] - } else { - set context_bar [bug_tracker::context_bar [list ".?[export_vars { filter:array }]" "Filtered [bug_tracker::conn bug] list"] $page_title] - } - } else { - set context_bar [bug_tracker::context_bar $page_title] - } + set context [list [list "[export_vars -base . -entire_form -exclude { bug_number }]" "Filtered [bug_tracker::conn bug] list"] $page_title] # User agent show/hide URLs set show_user_agent_url "bug?[export_vars { bug_number { user_agent_p 1 }}]" set hide_user_agent_url "bug?[export_vars { bug_number }]" # Login - set login_url "/register/?[export_vars { return_url }]" + set login_url [ad_get_login_url] # Single-bug notifications if { [empty_string_p $action_id] } { @@ -359,45 +354,46 @@ # Filter management - set filter_parsed [bug_tracker::parse_filters filter] - if { [empty_string_p $action_id] } { - set human_readable_filter [bug_tracker::conn filter_human_readable] - set where_clauses [bug_tracker::conn filter_where_clauses] - set from_bug_clause [bug_tracker::conn filter_from_bug_clause] - set order_by_clause [bug_tracker::conn filter_order_by_clause] + set filter_bug_numbers [bug_tracker::bug::get_bug_numbers] + set filter_bug_index [lsearch -exact $filter_bug_numbers $bug_number] + + set prev_url {} + set next_url {} - lappend where_clauses "b.project_id = :package_id" + if { $filter_bug_index == -1 } { + # This bug is not included in the list, get the client property (if it exists) + set filter_bug_numbers [ad_get_client_property bug-tracker filter_bug_numbers] + } else { + # This bug is included in the list + ad_set_client_property bug-tracker filter_bug_numbers $filter_bug_numbers + } - set workflow_id [bug_tracker::bug::get_instance_workflow_id] - set initial_state [workflow::fsm::get_initial_state -workflow_id $workflow_id] + set filter_bug_index [lsearch -exact $filter_bug_numbers $bug_number] - set action_role [db_string select_resolve_role {}] + if { $filter_bug_index > 0 } { + set prev_bug_number [lindex $filter_bug_numbers [expr $filter_bug_index -1]] + set prev_url [export_vars -base bug -entire_form -override { { bug_number $prev_bug_number } }] + } + if { $filter_bug_index < [expr [llength $filter_bug_numbers]-1] } { + set next_bug_number [lindex $filter_bug_numbers [expr $filter_bug_index +1]] + set next_url [export_vars -base bug -entire_form -override { { bug_number $next_bug_number } }] + } - set filter_bug_numbers [db_list filter_bug_numbers {}] - - set filter_bug_index [lsearch -exact $filter_bug_numbers $bug_number] - multirow create navlinks url label if { $filter_bug_index != -1 } { - if { $filter_bug_index > 0 } { - multirow append navlinks "bug?[export_vars { { bug_number {[lindex $filter_bug_numbers [expr $filter_bug_index -1]]} } filter:array }]" "<" - } else { - multirow append navlinks "" "<" - } + multirow append navlinks \ + $prev_url \ + {Previous} multirow append navlinks "" "[expr $filter_bug_index+1] of [llength $filter_bug_numbers]" - if { $filter_bug_index < [expr [llength $filter_bug_numbers]-1] } { - multirow append navlinks "bug?[export_vars { { bug_number {[lindex $filter_bug_numbers [expr $filter_bug_index +1]]} } filter:array }]" ">" - } else { - multirow append navlinks "" ">" - } + multirow append navlinks \ + $next_url \ + {Previous} } } } - -ad_return_template Index: openacs-4/packages/bug-tracker/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/Attic/index-oracle.xql,v diff -u -N --- openacs-4/packages/bug-tracker/www/index-oracle.xql 22 Sep 2003 19:30:36 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,166 +0,0 @@ - - - - oracle8.1.6 - - - - - select q.*, - km.keyword_id - from ( - select b.bug_id, - b.bug_number, - b.summary, - b.comment_content, - b.comment_format, - b.component_id, - b.creation_date, - to_char(b.creation_date, 'fmMM/DDfm/YYYY') as creation_date_pretty, - b.creation_user as submitter_user_id, - submitter.first_names as submitter_first_names, - submitter.last_name as submitter_last_name, - submitter.email as submitter_email, - st.pretty_name as pretty_state, - st.short_name as state_short_name, - st.state_id, - st.hide_fields, - b.resolution, - b.found_in_version, - b.fix_for_version, - b.fixed_in_version, - assignee.party_id as assignee_party_id, - assignee.email as assignee_email, - assignee.name as assignee_name - from $from_bug_clause, - cc_users submitter, - workflow_cases cas, - (select rpm.case_id, - p.party_id, - p.email, - acs_object.name(p.party_id) as name - from workflow_case_role_party_map rpm, - parties p - where rpm.role_id = :action_role - and p.party_id = rpm.party_id - ) assignee, - workflow_case_fsm cfsm, - workflow_fsm_states st - where submitter.user_id = b.creation_user - and cas.workflow_id = :workflow_id - and cas.object_id = b.bug_id - and cas.case_id = assignee.case_id (+) - and cfsm.case_id = cas.case_id - and st.state_id = cfsm.current_state - and [join $where_clauses "\n and "] - order by $order_by_clause - ) q, - cr_item_keyword_map km - where km.item_id (+) = q.bug_id - - - - - - - select km.keyword_id as unique_id, - count(b.bug_id) as num_bugs - from cr_keywords kw, - cr_item_keyword_map km, - bt_bugs b, - workflow_cases cas, - workflow_case_fsm cfsm - where kw.parent_id = :parent_id - and km.keyword_id = kw.keyword_id - and b.bug_id (+) = km.item_id - and b.project_id = :package_id - and cas.object_id = b.bug_id - and cfsm.case_id = cas.case_id - and cfsm.current_state = :initial_state_id - group by kw.heading, km.keyword_id - order by kw.heading - - - - - - - - select b.fix_for_version as unique_id, - v.version_name as name, - count(b.bug_id) as num_bugs - from bt_bugs b, - bt_versions v, - workflow_cases cas, - workflow_case_fsm cfsm - where b.project_id = :package_id - and v.version_id (+) = b.fix_for_version - and cas.object_id = b.bug_id - and cfsm.case_id = cas.case_id - and cfsm.current_state = :initial_state_id - group by b.fix_for_version, v.anticipated_freeze_date, v.version_name - order by v.anticipated_freeze_date, name - - - - - - - - select a.action_id || '.' || cfsm.current_state || '.' || p.party_id as unique_id, - acs_object.name(p.party_id) as name, - a.pretty_name as stat_name, - count(b.bug_id) as num_bugs - from bt_bugs b, - workflow_cases cas, - workflow_case_fsm cfsm, - workflow_actions a, - workflow_case_role_party_map crpm, - parties p - where b.project_id = :package_id - and cas.object_id = b.bug_id - and (a.always_enabled_p = 't' - or exists (select 1 - from workflow_fsm_action_en_in_st aeis - where aeis.state_id = cfsm.current_state - and aeis.action_id = a.action_id - and aeis.assigned_p = 't' - ) - ) - and cfsm.case_id = cas.case_id - and crpm.case_id = cas.case_id - and crpm.role_id = a.assigned_role - and crpm.party_id = p.party_id - group by a.action_id || '.' || cfsm.current_state || '.' || p.party_id, acs_object.name(p.party_id), a.pretty_name - order by stat_name, name - - - - - - - - select unique_id, - name, - count(b.bug_id) as num_bugs - from bt_bugs b, - workflow_cases cas, - workflow_case_fsm cfsm, - (select nvl('com/'||com.url_name||'/', trim(to_char(com.component_id,'99999999'))) as unique_id, - com.component_name as name, - com.component_id - from bt_components com - where com.project_id = :package_id) c - where c.component_id = b.component_id - and b.project_id = :package_id - and cas.object_id = b.bug_id - and cas.case_id = cfsm.case_id - and cfsm.current_state = :initial_state_id - group by unique_id, name - order by name - - - - - - Index: openacs-4/packages/bug-tracker/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/Attic/index-postgresql.xql,v diff -u -N --- openacs-4/packages/bug-tracker/www/index-postgresql.xql 22 Sep 2003 19:30:36 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,160 +0,0 @@ - - - - postgresql7.1 - - - - - select q.*, - km.keyword_id - from ( - select b.bug_id, - b.bug_number, - b.summary, - b.comment_content, - b.comment_format, - b.component_id, - b.creation_date, - to_char(b.creation_date, 'fmMM/DDfm/YYYY') as creation_date_pretty, - b.creation_user as submitter_user_id, - submitter.first_names as submitter_first_names, - submitter.last_name as submitter_last_name, - submitter.email as submitter_email, - st.pretty_name as pretty_state, - st.short_name as state_short_name, - st.state_id, - st.hide_fields, - b.resolution, - b.found_in_version, - b.fix_for_version, - b.fixed_in_version, - assignee.party_id as assignee_party_id, - assignee.email as assignee_email, - assignee.name as assignee_name - from $from_bug_clause, - cc_users submitter, - workflow_cases cas left outer join - (select rpm.case_id, - p.party_id, - p.email, - acs_object__name(p.party_id) as name - from workflow_case_role_party_map rpm, - parties p - where rpm.role_id = :action_role - and p.party_id = rpm.party_id - ) assignee on (cas.case_id = assignee.case_id), - workflow_case_fsm cfsm, - workflow_fsm_states st - where submitter.user_id = b.creation_user - and cas.workflow_id = :workflow_id - and cas.object_id = b.bug_id - and cfsm.case_id = cas.case_id - and st.state_id = cfsm.current_state - and [join $where_clauses "\n and "] - order by $order_by_clause - ) q left outer join - cr_item_keyword_map km on (km.item_id = q.bug_id) - - - - - - select km.keyword_id as unique_id, - count(b.bug_id) as num_bugs - from cr_keywords kw join - cr_item_keyword_map km using (keyword_id) left outer join - bt_bugs b on (b.bug_id = km.item_id), - workflow_cases cas, - workflow_case_fsm cfsm - where kw.parent_id = :parent_id - and b.project_id = :package_id - and cas.object_id = b.bug_id - and cfsm.case_id = cas.case_id - and cfsm.current_state = :initial_state_id - group by kw.heading, unique_id - order by kw.heading - - - - - - - - select b.fix_for_version as unique_id, - v.version_name as name, - count(b.bug_id) as num_bugs - from bt_bugs b left outer join - bt_versions v on (v.version_id = b.fix_for_version), - workflow_cases cas, - workflow_case_fsm cfsm - where b.project_id = :package_id - and cas.object_id = b.bug_id - and cfsm.case_id = cas.case_id - and cfsm.current_state = :initial_state_id - group by unique_id, v.anticipated_freeze_date, name - order by v.anticipated_freeze_date, name - - - - - - - - select a.action_id || '.' || cfsm.current_state || '.' || p.party_id as unique_id, - acs_object__name(p.party_id) as name, - a.pretty_name as stat_name, - count(b.bug_id) as num_bugs - from bt_bugs b, - workflow_cases cas, - workflow_case_fsm cfsm, - workflow_actions a, - workflow_case_role_party_map crpm, - parties p - where b.project_id = :package_id - and cas.object_id = b.bug_id - and (a.always_enabled_p = 't' - or exists (select 1 - from workflow_fsm_action_en_in_st aeis - where aeis.state_id = cfsm.current_state - and aeis.action_id = a.action_id - and aeis.assigned_p = 't' - ) - ) - and cfsm.case_id = cas.case_id - and crpm.case_id = cas.case_id - and crpm.role_id = a.assigned_role - and crpm.party_id = p.party_id - group by a.action_id || '.' || cfsm.current_state || '.' || p.party_id, acs_object__name(p.party_id), a.pretty_name - order by stat_name, name - - - - - - - - select unique_id, - name, - count(b.bug_id) as num_bugs - from bt_bugs b, - workflow_cases cas, - workflow_case_fsm cfsm, - (select coalesce('com/'||com.url_name||'/', trim(to_char(com.component_id,'99999999'))) as unique_id, - com.component_name as name, - com.component_id - from bt_components com - where com.project_id = :package_id) c - where c.component_id = b.component_id - and b.project_id = :package_id - and cas.object_id = b.bug_id - and cas.case_id = cfsm.case_id - and cfsm.current_state = :initial_state_id - group by unique_id, name - order by name - - - - - - Index: openacs-4/packages/bug-tracker/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/index.adp,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/bug-tracker/www/index.adp 22 Sep 2003 15:45:10 -0000 1.8 +++ openacs-4/packages/bug-tracker/www/index.adp 28 Sep 2003 01:28:18 -0000 1.9 @@ -1,137 +1,24 @@ -@project_name;noquote@ -@context_bar;noquote@ +@page_title;noquote@ +@context;noquote@ -
-   @navlinks.label@   -   @navlinks.label@   + @navlinks.label;noquote@ + @navlinks.label;noquote@    
+
+ - - - + +
- - -

@stats.header@

-
- -

- - - - - - - - - - - - - - - -
- @stats.stat_name@ -
- @stats.name;noquote@ - - @stats.num_bugs@ -
-

-
-
+
+ +   -
- Showing: @human_readable_filter@ - (none1 bug@bugs_count@ @pretty_names.bug@@pretty_names.bugs@) - (show default listing) -
+
-
- @displaymode_form_export_vars;noquote@ + -
- -
- - Order by: - - -
- - - Opened in the last: [ - - | - @options_n_days.label@ - @options_n_days.label@ - - ] days - - - -
- -
- - -

- - - #@bugs.bug_number@. - @bugs.summary@
-
- - @bugs.comment_short@
- @pretty_names.Component@: @bugs.component_name@ - - Opened @bugs.creation_date_pretty@ - By @bugs.submitter_first_names@ @bugs.submitter_last_name@
- - - @bugs.category_name@: @bugs.category_value@ - - - -
-
- Assigned to: - - @bugs.assignee_name@ - - - Unassigned - -
- - Status: - @bugs.pretty_state@ - - (fix for version @bugs.fix_for_version_name@) - - - - @bugs.resolution_pretty@ - - in version @bugs.fixed_in_version_name@ - - - - -

-
- -

 

- No @pretty_names.bugs@ match these criteria. - -

+ Index: openacs-4/packages/bug-tracker/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/index.tcl,v diff -u -N -r1.16 -r1.17 --- openacs-4/packages/bug-tracker/www/index.tcl 28 Aug 2003 09:45:29 -0000 1.16 +++ openacs-4/packages/bug-tracker/www/index.tcl 28 Sep 2003 01:28:18 -0000 1.17 @@ -4,40 +4,14 @@ @author Lars Pind (lars@pinds.com) @creation-date 2002-03-20 @cvs-id $Id$ -} { - filter:optional,array,multiple -} +} [bug_tracker::get_page_variables] -ad_require_permission [ad_conn package_id] read - -set project_name [bug_tracker::conn project_name] -set package_id [ad_conn package_id] -set package_key [ad_conn package_key] - +set page_title [ad_conn instance_name] +set context [list $page_title] +set admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin] bug_tracker::get_pretty_names -array pretty_names -set project_root_keyword_id [bug_tracker::conn project_root_keyword_id] - -# Is this project using multiple versions? -set versions_p [bug_tracker::versions_p] - -if { [info exists filter] } { - if { [array names filter] == [list "assignee"] && $filter(assignee) == [ad_conn user_id] } { - set context_bar [bug_tracker::context_bar "My [bug_tracker::conn bugs]"] - } else { - set context_bar [bug_tracker::context_bar "Filtered [bug_tracker::conn bug] list"] - } -} else { - set context_bar [bug_tracker::context_bar] -} - -set admin_p [ad_permission_p [ad_conn package_id] admin] - -set return_url "[ad_conn url][ad_decode [ad_conn query] "" "" "?[ad_conn query]"]" - -set num_components [db_string num_components {}] - -if { $num_components == 0 } { +if { [llength [bug_tracker::components_get_options]] == 0 } { ad_return_template "no-components" return } @@ -48,212 +22,21 @@ } -##### -# -# Filter management -# -##### -set filter_parsed [bug_tracker::parse_filters filter] - -set human_readable_filter [bug_tracker::conn filter_human_readable] -set where_clauses [bug_tracker::conn filter_where_clauses] -set from_bug_clause [bug_tracker::conn filter_from_bug_clause] -set order_by_clause [bug_tracker::conn filter_order_by_clause] - -lappend where_clauses "b.project_id = :package_id" - -if { [llength [array names filter]] > 0 && [array names filter] != "orderby" } { - set clear_url [ad_conn package_url] -} - ##### # -# Order by -# -##### - -if { [info exists filter(orderby)] } { - set save_orderby $filter(orderby) - unset filter(orderby) -} -set displaymode_form_export_vars [export_vars -form { filter:array }] -if { [info exists save_orderby] } { - set filter(orderby) $save_orderby - unset save_orderby -} - -multirow create orderby value label selected_p - -multirow append orderby {} "[bug_tracker::conn Bug] number" [exists_and_equal filter(orderby) {}] - - -foreach { category_type_id label } [bug_tracker::category_types] { - multirow append orderby \ - $category_type_id \ - $label \ - [exists_and_equal filter(orderby) $category_type_id] -} - - -##### -# -# Last n days filter -# -##### - -multirow create options_n_days url label selected_p - -foreach n_days { 1 3 7 30 90 365 all } { - multirow append options_n_days ".?[bug_tracker::filter_url_vars -array filter -override [list n_days $n_days]]" $n_days [exists_and_equal filter_n_days $n_days] - -} - - -##### -# # Get bug list # ##### -set truncate_len [ad_parameter "TruncateDescriptionLength" -default 200] -set workflow_id [bug_tracker::bug::get_instance_workflow_id] -set initial_state_id [workflow::fsm::get_initial_state -workflow_id $workflow_id] +# TODO: Get /com/* URLs working again +# TODO: Other important suggestions from threads, etc. +# TODO: Bulk actions (set fix for version, reassign, etc.) -# Role will be assignee or submitter -set action_role [db_string select_resolve_role {}] -set initial_action_id [workflow::get_element -workflow_id $workflow_id -element initial_action_id] +bug_tracker::bug::get_list -set bugs_count 0 -set last_bug_id {} +bug_tracker::bug::get_multirow -db_multirow -extend { - comment_short - submitter_url - status_pretty - resolution_pretty - assignee_url - bug_url - component_name - found_in_version_name - fix_for_version_name - fixed_in_version_name - category_name - category_value -} bugs bugs {} { - if { ![string equal $bug_id $last_bug_id] } { - incr bugs_count - set last_bug_id $bug_id - } - - set component_name [bug_tracker::component_get_name -component_id $component_id] - set found_in_version_name [bug_tracker::version_get_name -version_id $found_in_version] - set fix_for_version_name [bug_tracker::version_get_name -version_id $fix_for_version] - set fixed_in_version_name [bug_tracker::version_get_name -version_id $fixed_in_version] - set comment_short [string_truncate -len $truncate_len -format $comment_format $comment_content] - set summary [ad_quotehtml $summary] - set submitter_url [acs_community_member_url -user_id $submitter_user_id] - set resolution_pretty [bug_tracker::resolution_pretty $resolution] - set assignee_url {} - if { ![empty_string_p $assignee_party_id] } { - set assignee_url [acs_community_member_url -user_id $assignee_party_id] - } - set bug_url "bug?[export_vars { bug_number filter:array }]" - set category_name [bug_tracker::category_parent_heading -keyword_id $keyword_id] - set category_value [bug_tracker::category_heading -keyword_id $keyword_id] - - # Hide fields in this state - foreach element $hide_fields { - set $element {} - } -} - - -##### -# -# Get stats -# -##### - -# Stat: Status - -db_multirow -extend { name_url stat_name header selected_p } stats by_status {} { - set header "All [bug_tracker::conn bugs] by status:" - set stat_name "Status" - set name_url "?[bug_tracker::filter_url_vars -array filter -override [list status $unique_id]]" - set selected_p [expr { [info exists filter(status)] && [string equal $filter(status) $unique_id] }] -} - -set open_bugs_header "Open [bug_tracker::conn bugs] summary:" - -# Stat: By Category - -foreach { parent_id parent_heading } [bug_tracker::category_types] { - db_multirow -extend { header selected_p stat_name name name_url } -append stats stats_by_category {} { - set header $open_bugs_header - set stat_name "By $parent_heading" - set name [bug_tracker::category_heading -keyword_id $unique_id] - set name_url "?[bug_tracker::filter_url_vars -array filter -override [list keyword $unique_id]]" - set selected_p [expr { [info exists filter(keyword)] && [lsearch -exact $filter(keyword) $unique_id] != -1 }] - } -} - -# Stat: Fix for version - -if { $versions_p } { - db_multirow -extend { name_url stat_name header selected_p } -append stats stats_by_fix_for_version {} { - set header $open_bugs_header - set stat_name "Fix For" - if { [empty_string_p $unique_id] } { - set name "Undecided" - } - set name_url "?[bug_tracker::filter_url_vars -array filter -override [list fix_for_version $unique_id]]" - set selected_p [expr { [info exists filter(fix_for_version)] && [string equal $filter(fix_for_version) $unique_id] }] - } -} - - -# Stat: Assigned action - -db_multirow -extend { name_url header selected_p } -append stats stats_by_assigned_action {} { - set header $open_bugs_header - - regexp {^([0-9]+)\.([0-9]+)\.([0-9]+)$} $unique_id match action_id state_id assignee_id - - set name_url "?[bug_tracker::filter_url_vars -array filter -override [list enabled_action_assignee $assignee_id status $state_id]]" - set selected_p [expr { [exists_and_equal filter(enabled_action_assignee) $assignee_id] && \ - [exists_and_equal filter(status) $state_id] } ] -} - -# Stat: Unassigned action - -db_multirow -extend { unique_id name stat_name name_url header selected_p } -append stats stats_by_unassigned_action {} { - set header $open_bugs_header - - set name "Unassigned" - set stat_name "Resolve" - - set unique_id "." - set action_id "" - set assignee_id "" - - set name_url "?[bug_tracker::filter_url_vars -array filter -override [list assignee $assignee_id status $initial_state_id]]" - set selected_p [expr { [exists_and_equal filter(assignee) $assignee_id] && \ - [exists_and_equal filter(status) $initial_state_id] } ] -} - -# Stat: By Component - -db_multirow -extend { name_url stat_name header selected_p } -append stats stats_by_component {} { - set header $open_bugs_header - set stat_name "[bug_tracker::conn Components]" - if { [string match "com/*" $unique_id] } { - set name_url "[ad_conn package_url]$unique_id" - } else { - set name_url "[ad_conn package_url]?[bug_tracker::filter_url_vars -array filter -override [list component_id $unique_id]]" - } - set selected_p [expr { [exists_and_equal filter(component_id) $unique_id] || [string equal [ad_conn extra_url] $unique_id] }] -} Index: openacs-4/packages/bug-tracker/www/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/Attic/index.xql,v diff -u -N --- openacs-4/packages/bug-tracker/www/index.xql 22 Sep 2003 19:30:36 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,70 +0,0 @@ - - - - - - select count(component_id) from bt_components where project_id = :package_id - - - - - - - select a.assigned_role - from workflow_actions a, - workflow_fsm_action_en_in_st aeis - where a.action_id = aeis.action_id - and aeis.state_id = :initial_state_id - and a.workflow_id = :workflow_id - and a.assigned_role is not null - - - - - - - - select st.state_id as unique_id, - count(b.bug_id) as num_bugs, - st.pretty_name as name - from workflow_fsm_states st, - bt_bugs b, - workflow_cases cas, - workflow_case_fsm cfsm - where st.workflow_id = :workflow_id - and b.project_id = :package_id - and cas.workflow_id = :workflow_id - and cas.object_id = b.bug_id - and cfsm.case_id = cas.case_id - and st.state_id = cfsm.current_state - group by st.state_id, st.pretty_name, st.sort_order - order by st.sort_order - - - - - - - select count(*) as num_bugs - from bt_bugs, - workflow_cases cas, - workflow_case_fsm cfsm - where cas.object_id = bt_bugs.bug_id - and cas.case_id = cfsm.case_id - and bt_bugs.project_id = :package_id - and cfsm.current_state = '4' - and not exists (select 1 - from workflow_actions a, - workflow_fsm_action_en_in_st aeis, - workflow_case_role_party_map rpm - where a.workflow_id = cas.workflow_id - and a.action_id = aeis.action_id - and aeis.state_id = '4' - and rpm.case_id = cas.case_id - and rpm.role_id = a.assigned_role - ) - - - - - Index: openacs-4/packages/bug-tracker/www/no-bugs.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/no-bugs.adp,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/bug-tracker/www/no-bugs.adp 22 Sep 2003 15:45:10 -0000 1.6 +++ openacs-4/packages/bug-tracker/www/no-bugs.adp 28 Sep 2003 01:28:18 -0000 1.7 @@ -1,6 +1,6 @@ -@project_name;noquote@ -@context_bar;noquote@ +@page_title;noquote@ +@context;noquote@

This project is empty. Index: openacs-4/packages/bug-tracker/www/no-components.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/no-components.adp,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/bug-tracker/www/no-components.adp 22 Sep 2003 15:45:10 -0000 1.5 +++ openacs-4/packages/bug-tracker/www/no-components.adp 28 Sep 2003 01:28:18 -0000 1.6 @@ -1,6 +1,6 @@ -@project_name;noquote@ -@context_bar;noquote@ +@page_title;noquote@ +@context;noquote@ Before you can get started using the bug-tracker, you need to create at least one component. Index: openacs-4/packages/bug-tracker/www/patch-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-add.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/bug-tracker/www/patch-add.tcl 26 Sep 2003 06:40:22 -0000 1.9 +++ openacs-4/packages/bug-tracker/www/patch-add.tcl 28 Sep 2003 01:28:18 -0000 1.10 @@ -150,12 +150,6 @@ set bug_id [bug_tracker::get_bug_id -bug_number $bug_number -project_id $package_id] bug_tracker::map_patch_to_bug -patch_id $patch_id -bug_id $bug_id - # Trigger notifications for the bug that we are mapping to - bug_tracker::bug_notify \ - -bug_id $bug_id \ - -action "patched" \ - -patch_summary $summary - } else { # No bug id provided so redirect to page for selecting bugs if the # user wishes to go there Index: openacs-4/packages/bug-tracker/www/patch-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-list.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/bug-tracker/www/patch-list.tcl 26 Sep 2003 08:10:36 -0000 1.6 +++ openacs-4/packages/bug-tracker/www/patch-list.tcl 28 Sep 2003 01:28:18 -0000 1.7 @@ -17,7 +17,7 @@ set page_title "Patches" set context [list $page_title] -# TODO: Undecided aply to version +# TODO: Use bug_tracker::patch_status_pretty for pretty state (problem with the filter, but it can be done) template::list::create \ -name patches \