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 -r1.22 -r1.23 --- openacs-4/packages/bug-tracker/bug-tracker.info 13 Jan 2005 13:56:15 -0000 1.22 +++ openacs-4/packages/bug-tracker/bug-tracker.info 25 Feb 2005 17:08:11 -0000 1.23 @@ -8,16 +8,14 @@ f - - postgresql - oracle - Lars Pind Tracks bugs and features, versions and maintainers, in software projects. 2003-02-28 Musea Technologies Bug tracking application with notifications, configurable state management, and patch upload. Contains the best of SDM, Bugzilla, FogBUGZ, and bughost.com. + 0 + @@ -28,17 +26,18 @@ + - - + + Index: openacs-4/packages/bug-tracker/catalog/bug-tracker.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/catalog/bug-tracker.en_US.ISO-8859-1.xml,v diff -u -r1.7 -r1.8 --- openacs-4/packages/bug-tracker/catalog/bug-tracker.en_US.ISO-8859-1.xml 26 Jun 2004 12:47:12 -0000 1.7 +++ openacs-4/packages/bug-tracker/catalog/bug-tracker.en_US.ISO-8859-1.xml 25 Feb 2005 17:08:11 -0000 1.8 @@ -219,6 +219,8 @@ *Question Suggestion Support Type + Message Type + *Error platforms Table There are no open %pretty_names.bugs% to map the patch to. Try changing the component filter above. Index: openacs-4/packages/bug-tracker/sql/postgresql/auto-error-report-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/auto-error-report-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bug-tracker/sql/postgresql/auto-error-report-drop.sql 25 Feb 2005 17:08:11 -0000 1.1 @@ -0,0 +1,10 @@ +-- +-- +-- +-- @author Victor Guerra (guerra@galileo.edu) +-- @creation-date 2005-02-14 +-- @arch-tag: 7e46612a-8425-45fe-979a-27ebd837185e +-- @cvs-id $Id: auto-error-report-drop.sql,v 1.1 2005/02/25 17:08:11 victorg Exp $ +-- + +drop table bt_auto_bugs; \ No newline at end of file Index: openacs-4/packages/bug-tracker/sql/postgresql/auto-error-report.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/auto-error-report.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bug-tracker/sql/postgresql/auto-error-report.sql 25 Feb 2005 17:08:11 -0000 1.1 @@ -0,0 +1,21 @@ +-- +-- +-- +-- @author Victor Guerra (guerra@galileo.edu) +-- @creation-date 2005-02-14 +-- @arch-tag: 93a2a978-df17-4639-977d-6962e8c87e3c +-- @cvs-id $Id: auto-error-report.sql,v 1.1 2005/02/25 17:08:11 victorg Exp $ +-- + +create table bt_auto_bugs ( + bug_id integer constraint bt_auto_bugs_bug_id_fk + references bt_bugs(bug_id) + constraint bt_auto_bugs_pk + primary key, + package_id integer constraint bt_auto_package_id_fk + references apm_packages(package_id), + error_file varchar(300), + times_reported integer default 0 +); + +create index bt_auto_bugs_bug_idx on bt_auto_bugs(bug_id); Index: openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql 24 Feb 2005 13:33:03 -0000 1.13 +++ openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql 25 Feb 2005 17:08:11 -0000 1.14 @@ -838,3 +838,7 @@ create index bt_patch_bug_map_patch_id_idx on bt_patch_bug_map(patch_id); create index bt_patch_bug_map_bug_id_idx on bt_patch_bug_map(bug_id); +-- AutoSubmition functionality + +\i auto-error-report.sql + Index: openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql 29 Sep 2003 03:46:26 -0000 1.7 +++ openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql 25 Feb 2005 17:08:11 -0000 1.8 @@ -1,4 +1,7 @@ + +\i auto-error-report-drop.sql + drop function bt_bug__new( integer, -- bug_id integer, -- package_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 -r1.31 -r1.32 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 24 Feb 2005 13:33:04 -0000 1.31 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 25 Feb 2005 17:08:11 -0000 1.32 @@ -687,15 +687,20 @@ ] \ [_ bug-tracker.Support_Center] [list \ categories [list \ - "[_ bug-tracker.Support_Type]" [list \ - "[_ bug-tracker.Support_Question]" \ - "[_ bug-tracker.Support_Suggestion]" \ + "[_ bug-tracker.Message_Type]" [list \ "[_ bug-tracker.Support_Problem]" \ + "[_ bug-tracker.Support_Suggestion]" \ + "[_ bug-tracker.Support_Error]" \ ] \ + "[_ bug-tracker.Priority]" [list \ + "[_ bug-tracker.Prio_High_Cat]" \ + "[_ bug-tracker.Prio_Norm_Cat]" \ + "[_ bug-tracker.Prio_Low_Cat]" \ + ] \ ] \ parameters { - TicketPrettyName "issue" - TicketPrettyPlural "issues" + TicketPrettyName "message" + TicketPrettyPlural "messages" ComponentPrettyName "area" ComponentPrettyPlural "areas" PatchesP "0" @@ -1286,7 +1291,7 @@ } { if {![db_0or1row already_there {select 1 from bt_projects where project_id = :project_id} ] } { - if [db_0or1row instance_info {select p.instance_name, o.creation_user, o.creation_ip from apm_packages p join acs_objects o on (p.package_id = o.object_id) where p.package_id = :project_id }] { + if [db_0or1row instance_info { *SQL* } ] { set folder_id [content::folder::new -name "bug_tracker_$project_id" -package_id $project_id] content::folder::register_content_type -folder_id $folder_id -content_type {bt_bug_revision} -include_subtypes t 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 -r1.5 -r1.6 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.xql 24 Feb 2005 13:33:04 -0000 1.5 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.xql 25 Feb 2005 17:08:11 -0000 1.6 @@ -1,6 +1,13 @@ + + + select p.instance_name, o.creation_user, o.creation_ip from apm_packages p join acs_objects o on (p.package_id = o.object_id) where p.package_id = :project_id + + + + select bug_id from bt_bugs Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-init.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-init.tcl 25 Feb 2005 17:08:11 -0000 1.1 @@ -0,0 +1,15 @@ +# /packages/bug-tracker/tcl/bug-tracker-scheduled-init.tcl + + +ad_library { + + Scheduled procs for closing bugs that have not been + treated. + + @author Victor Guerra (guerra@galileo.edu) + @creation-date 2005-02-07 + @arch-tag: 0a081603-3a9e-449f-a6d5-d5962c7f681f + @cvs-id $Id: bug-tracker-scheduled-init.tcl,v 1.1 2005/02/25 17:08:11 victorg Exp $ +} + +ad_schedule_proc -thread t -schedule_proc ns_schedule_daily [list 03 20] bug_tacker::scheduled::close_bugs Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs-postgresql.xql 25 Feb 2005 17:08:11 -0000 1.1 @@ -0,0 +1,24 @@ + + + + + + + + + + + + postgresql + 7.2 + + + + + select 1 + from acs_objects + where object_id = :bug_id and + (now()::date - last_modified::date) > :time_to_compare_with + + + \ No newline at end of file Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs.tcl 25 Feb 2005 17:08:11 -0000 1.1 @@ -0,0 +1,74 @@ +# /packages/bug-tracker/tcl/bug-tracker-scheduled-procs.tcl + +ad_library { + + + + @author Victor Guerra (guerra@galileo.edu) + @creation-date 2005-02-07 + @arch-tag: bfe519e0-3005-46c5-835f-fa7c59938ddd + @cvs-id $Id: bug-tracker-scheduled-procs.tcl,v 1.1 2005/02/25 17:08:11 victorg Exp $ +} + +namespace eval bug_tacker {} +namespace eval bug_tracker::scheduled {} + +ad_proc -public bug_tracker::scheduled::close_bugs { +} { +} { + set bt_instance [parameter::get -parameter BugTrackerInstance -package_id [ad_acs_kernel_id] -default {}] + if {![empty_string_p $bt_instance]} { + array set community_info [site_node::get -url "${bt_instance}/[bug_tracker::package_key]"] + set bt_package_id $community_info(package_id) + db_foreach open_bug { *SQL* } { + set case_id [workflow::case::get_id \ + -object_id $bug_id \ + -workflow_short_name [bug_tracker::bug::workflow_short_name]] + workflow::case::fsm::get -case_id $case_id -array case + set time_to_compare_with [parameter::get -parameter TimeToLive -package_id $bt_package_id -default 0] + if { [string eq $case(state_short_name) "open"] && $time_to_compare_with > 0 && [db_string too_old {} -default 0] } { + foreach available_enabled_action_id [workflow::case::get_available_enabled_action_ids -case_id $case_id] { + workflow::case::enabled_action_get -enabled_action_id $available_enabled_action_id -array enabled_action + workflow::action::get -action_id $enabled_action(action_id) -array available_action + if { [string eq $available_action(short_name) "resolve"] } { + set action_id $enabled_action(action_id) + array set row [list] + foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { + set row($field) "" + } + foreach {category_id category_name} [bug_tracker::category_types] { + set row($category_id) "" + } + bug_tracker::bug::edit \ + -bug_id $bug_id \ + -enabled_action_id $available_enabled_action_id \ + -description descripcion \ + -desc_format text/html \ + -array row + } + } + foreach available_enabled_action_id [workflow::case::get_available_enabled_action_ids -case_id $case_id] { + workflow::case::enabled_action_get -enabled_action_id $available_enabled_action_id -array enabled_action + workflow::action::get -action_id $enabled_action(action_id) -array available_action + if { [string eq $available_action(short_name) "close"] } { + set action_id $enabled_action(action_id) + array set row [list] + foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { + set row($field) "" + } + foreach {category_id category_name} [bug_tracker::category_types] { + set row($category_id) "" + } + + bug_tracker::bug::edit \ + -bug_id $bug_id \ + -enabled_action_id $available_enabled_action_id \ + -description descripcion \ + -desc_format text/html \ + -array row + } + } + } + } + } +} \ No newline at end of file Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-scheduled-procs.xql 25 Feb 2005 17:08:11 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + + + + + + + + select bug_id + from bt_bugs + + + \ No newline at end of file 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 -r1.36 -r1.37 --- openacs-4/packages/bug-tracker/www/bug.tcl 24 Feb 2005 13:33:04 -0000 1.36 +++ openacs-4/packages/bug-tracker/www/bug.tcl 25 Feb 2005 17:08:12 -0000 1.37 @@ -56,7 +56,7 @@ -object_id $bug(bug_id) \ -workflow_short_name [bug_tracker::bug::workflow_short_name]] -set workflow_id [bug_tracker::bug::get_instance_workflow_id] +set workflow_id [bug_tracker::bug::get_instance_workflow_id ] ##### @@ -102,8 +102,6 @@ } } -ns_log Notice "actions: $actions" - ##### # # Create the form Index: openacs-4/packages/bug-tracker/www/admin/category-defaults.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/category-defaults.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/www/admin/category-defaults.tcl 29 Mar 2004 15:07:35 -0000 1.2 +++ openacs-4/packages/bug-tracker/www/admin/category-defaults.tcl 25 Feb 2005 17:08:12 -0000 1.3 @@ -15,7 +15,7 @@ } ad_form -name setup -cancel_url categories -form { - {setup:text(select) {label [_ bug-tracker.Choose_setup]} {options $options}} + {setup:text(select) {label "[_ bug-tracker.Choose_setup]"} {options $options}} } -on_submit { array set config $default_configs($setup)