bug_tracker::scheduled::close_bugs (public)
bug_tracker::scheduled::close_bugs
Defined in packages/bug-tracker/tcl/bug-tracker-scheduled-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set bt_instance [parameter::get -parameter BugTrackerInstance -package_id [ad_acs_kernel_id] -default {}] if {$bt_instance ne ""} { array set community_info [site_node::get -url "${bt_instance}/bug-tracker"] 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 { $case(state_short_name) eq "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 {$available_action(short_name) eq "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 {$available_action(short_name) eq "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 } } } } }XQL Not present: Oracle Generic XQL file: <fullquery name="bug_tracker::scheduled::close_bugs.open_bug"> <querytext> select bug_id from bt_bugs </querytext> </fullquery>packages/bug-tracker/tcl/bug-tracker-scheduled-procs.xql
PostgreSQL XQL file: <fullquery name="bug_tracker::scheduled::close_bugs.too_old"> <querytext> select 1 from acs_objects where object_id = :bug_id and (now()::date - last_modified::date) > :time_to_compare_with </querytext> </fullquery>packages/bug-tracker/tcl/bug-tracker-scheduled-procs-postgresql.xql