Index: openacs-4/packages/tasks/www/reassign-task-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/www/Attic/reassign-task-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/tasks/www/reassign-task-postgresql.xql 6 Oct 2005 16:32:53 -0000 1.1
@@ -0,0 +1,36 @@
+
+
+
+
+
+ select
+ case
+ when
+ email is not null
+ then
+ title||' ('||email||')'
+ else
+ title
+ end,
+ user_id
+ from
+ cc_users
+ where
+ user_id <> :user_id
+ order by
+ title asc
+
+
+
+
+
+ update
+ t_tasks
+ set
+ party_id = :reassign_party
+ where
+ task_id = :task
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/tasks/www/reassign-task.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/www/Attic/reassign-task.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/tasks/www/reassign-task.adp 6 Oct 2005 16:32:53 -0000 1.1
@@ -0,0 +1,5 @@
+
+@page_title;noquote@
+@context;noquote@
+
+
\ No newline at end of file
Index: openacs-4/packages/tasks/www/reassign-task.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/www/Attic/reassign-task.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/tasks/www/reassign-task.tcl 6 Oct 2005 16:32:53 -0000 1.1
@@ -0,0 +1,62 @@
+# packages/tasks/www/reassing-task.tcl
+
+ad_page_contract {
+ Reassigns checked tasks to another user
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ @creation-date 2005-10-06
+} {
+ {return_url ""}
+ task_id:multiple
+ reassign_party:optional
+}
+
+set user_id [ad_conn user_id]
+set page_title "[_ tasks.Reassign_Tasks]"
+set context [list $page_title]
+
+if { ![exists_and_not_null $return_url] } {
+ set return_url [get_referrer]
+}
+
+# To display the tasks in the ad_form
+set show_tasks [list]
+if { [exists_and_not_null task_id] } {
+ foreach task $task_id {
+ lappend show_tasks "\#$task"
+ }
+ set show_tasks [join $show_tasks ", "]
+}
+
+# We get allt the posible users to reassign
+# to use in the options of the select
+set reassign_parties [db_list_of_lists get_all_users { }]
+
+ad_form -name "reassign" -form {
+ {task_id:text(hidden)
+ {value $task_id}
+ }
+ {return_url:text(hidden)
+ {value $return_url}
+ }
+ {show_tasks:text(text)
+ {label "[_ tasks.Tasks]:"}
+ {value $show_tasks}
+ {mode display}
+ }
+ {reassign_party:text(search)
+ {label "[_ tasks.Reassign]:"}
+ {options { $reassign_parties}}
+ {help_text "[_ tasks.Select_the_user]"}
+ }
+} -on_submit {
+
+ # We are going to reassign the all the checked tasks to the new party_id
+ foreach task $task_id {
+ # We need to change the party_id in t_tasks table to reassign the task
+ db_dml update_t_tasks { }
+ }
+
+} -after_submit {
+ ad_returnredirect $return_url
+}
\ No newline at end of file