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.12.2.7 -r1.12.2.8 --- openacs-4/packages/bug-tracker/www/bug.tcl 5 Mar 2003 18:13:52 -0000 1.12.2.7 +++ openacs-4/packages/bug-tracker/www/bug.tcl 22 Apr 2003 17:20:43 -0000 1.12.2.8 @@ -53,9 +53,7 @@ set workflow_id [bug_tracker::bug::get_instance_workflow_id] -set role_ids [workflow::get_roles -workflow_id $workflow_id] - ##### # # Action @@ -64,12 +62,6 @@ set action_id [form get_action bug] -if { ![empty_string_p $action_id] } { - set action_short_name [workflow::action::get_element -action_id $action_id -element short_name] -} else { - set action_short_name {} -} - # Registration required for all actions if { ![empty_string_p $action_id] } { ad_maybe_redirect_for_registration @@ -211,8 +203,10 @@ foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { element set_properties bug $field -mode edit } - if {[string compare $action_short_name "edit"] == 0} { - foreach {category_id category_name} [bug_tracker::category_types] { + + # LARS: Hack! How do we set editing of dynamic fields? + if { [string equal [workflow::action::get_element -action_id $action_id -element short_name] "edit"] } { + foreach { category_id category_name } [bug_tracker::category_types] { element set_properties bug $category_id -mode edit } } @@ -253,7 +247,7 @@ # whenever the form is displayed, whether initially or because of a validation error. } -# Not-valid block (request, error) +# Not-valid block (request or submit error) if { ![form is_valid bug] } { # Get the bug data @@ -340,8 +334,14 @@ } # Set values for description field + if { ![empty_string_p $action_id] } { + set current_action_html "

$bug(now_pretty) [workflow::action::get_element -action_id $action_id -element pretty_past_tense] by [bug_tracker::conn user_first_names] [bug_tracker::conn user_last_name]

" + } else { + set current_action_html {} + } + element set_properties bug description \ - -before_html "[workflow::case::get_activity_html -case_id $case_id][ad_decode $action_id "" "" "

$bug(now_pretty) [bug_tracker::bug_action_pretty $action_short_name] by [bug_tracker::conn user_first_names] [bug_tracker::conn user_last_name]

"]" + -before_html "[workflow::case::get_activity_html -case_id $case_id]$current_action_html" # Set page title set page_title "[bug_tracker::conn Bug] #$bug_number: $bug(summary)"