Index: openacs-4/packages/simulation/www/siminst/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/index.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/simulation/www/siminst/index.tcl 15 Dec 2003 13:40:22 -0000 1.15 +++ openacs-4/packages/simulation/www/siminst/index.tcl 15 Dec 2003 15:28:21 -0000 1.16 @@ -37,7 +37,7 @@ label "Tasks" link_url_col sim_tasks_url display_template { - @dev_sims.tasks@ , with @dev_sims.prop_empty_count@ incomplete props + @dev_sims.tasks@, with @dev_sims.prop_empty_count@ incomplete props } } delete { @@ -71,7 +71,7 @@ set sim_in_dev_filter_sql "and ao.creation_user = :user_id" } -db_multirow -extend { cast_url map_roles_url map_props_url sim_tasks_url delete_url } dev_sims select_dev_sims " +db_multirow -extend { cast_url map_roles_url map_props_url sim_tasks_url delete_url prop_empty_count } dev_sims select_dev_sims " select w.workflow_id, w.pretty_name, (select count(*) @@ -85,17 +85,16 @@ where sr.role_id = wr.role_id and wr.workflow_id = w.workflow_id and character_id is null) as role_empty_count, - (select count(*) - from sim_task_object_map stom, + (select sum(coalesce(attachment_num,0)) + from sim_tasks st, workflow_actions wa - where stom.task_id = wa.action_id + where st.task_id = wa.action_id and wa.workflow_id = w.workflow_id) as prop_count, (select count(*) from sim_task_object_map stom, workflow_actions wa where stom.task_id = wa.action_id - and wa.workflow_id = w.workflow_id - and stom.object_id is null) as prop_empty_count, + and wa.workflow_id = w.workflow_id) as prop_not_empty_count, (select count(*) from workflow_actions wa where wa.workflow_id = w.workflow_id) as tasks @@ -108,6 +107,7 @@ and ss.sim_type = 'dev_sim' $sim_in_dev_filter_sql " { + set prop_empty_count [expr $prop_count - $prop_not_empty_count] if { [simulation::template::ready_for_casting_p -role_empty_count $role_empty_count -prop_empty_count $prop_empty_count] } { set cast_url [export_vars -base "${base_url}siminst/simulation-casting" { workflow_id }] } else {