Index: openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/task-procs.tcl,v
diff -u -r1.4.2.22 -r1.4.2.23
--- openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 23 Sep 2004 21:46:41 -0000 1.4.2.22
+++ openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 27 Sep 2004 22:39:16 -0000 1.4.2.23
@@ -839,16 +839,28 @@
set role_id [pm::role::default]
}
- db_dml add_assignment "
- insert into pm_task_assignment
- (task_id,
- role_id,
- party_id)
- values
- (:task_item_id,
- :role_id,
- :party_id)
- "
+ db_transaction {
+ # make sure we avoid case when that assignment has already
+ # been made.
+ db_dml delete_assignment {
+ delete from
+ pm_task_assignment
+ where
+ task_id = :task_item_id and
+ party_id = :party_id
+ }
+
+ db_dml add_assignment {
+ insert into pm_task_assignment
+ (task_id,
+ role_id,
+ party_id)
+ values
+ (:task_item_id,
+ :role_id,
+ :party_id)
+ }
+ }
}
Index: openacs-4/contrib/packages/project-manager/www/task-assign-add-edit-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-assign-add-edit-postgresql.xql,v
diff -u -r1.5.2.4 -r1.5.2.5
--- openacs-4/contrib/packages/project-manager/www/task-assign-add-edit-postgresql.xql 24 Sep 2004 19:22:03 -0000 1.5.2.4
+++ openacs-4/contrib/packages/project-manager/www/task-assign-add-edit-postgresql.xql 27 Sep 2004 22:39:25 -0000 1.5.2.5
@@ -76,26 +76,6 @@
-
-
- delete from pm_task_assignment
- where task_id in ([join $task_id ","])
-
-
-
-
-
- insert into pm_task_assignment
- (task_id,
- role_id,
- party_id)
- values
- (:t_id,
- :r_id,
- :p_id)
-
-
-
select
Index: openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-assign-add-edit.tcl,v
diff -u -r1.8.2.7 -r1.8.2.8
--- openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl 24 Sep 2004 19:22:03 -0000 1.8.2.7
+++ openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl 27 Sep 2004 22:39:25 -0000 1.8.2.8
@@ -270,7 +270,10 @@
}
- db_dml delete_assignments { }
+ foreach t_i_i $task_id {
+ pm::task::assign_remove_everyone \
+ -task_item_id $t_i_i
+ }
# set up role names
foreach r [db_list_of_lists get_roles { }] {
@@ -348,7 +351,10 @@
# -notif_subject $subject \
# -notif_text $notification_text
- db_dml add_assignment { }
+ pm::task::assign \
+ -task_item_id $t_id \
+ -party_id $p_id \
+ -role_id $r_id \
}
@@ -412,7 +418,10 @@
}
- db_dml delete_assignments { }
+ foreach t_i_i $task_id {
+ pm::task::assign_remove_everyone \
+ -task_item_id $t_i_i
+ }
foreach pl $party_list {
@@ -429,7 +438,10 @@
set p_id $assignment_party($pl)
- db_dml add_assignment { }
+ pm::task::assign \
+ -task_item_id $t_id \
+ -party_id $p_id \
+ -role_id $r_id \
}