Commit 38bd270c authored by cosine's avatar cosine

- Now adding a vacation replacement user to tasks

parent 6805997f
...@@ -109,10 +109,10 @@ ad_proc -public wf_task_list { ...@@ -109,10 +109,10 @@ ad_proc -public wf_task_list {
} }
set sql " set sql "
select [join $select ",\n "] select [join $select ",\n "]
from [join $from ",\n "] from [join $from ",\n "]
where [join $where "\n and "]" where [join $where "\n and "]
"
db_foreach user_tasks $sql -column_array row { db_foreach user_tasks $sql -column_array row {
lappend result [array get row] lappend result [array get row]
} if_no_rows { } if_no_rows {
...@@ -153,7 +153,6 @@ ad_proc -public wf_task_info { ...@@ -153,7 +153,6 @@ ad_proc -public wf_task_info {
@param date_format Use this to customize the date-format @param date_format Use this to customize the date-format
used. Must be a valid Oracle date format specification. used. Must be a valid Oracle date format specification.
@return an <code>[array get]</code> representation with the following keys: @return an <code>[array get]</code> representation with the following keys:
<code>task_id, case_id, object_id, object_name, object_type_pretty, workflow_key, task_name, <code>task_id, case_id, object_id, object_name, object_type_pretty, workflow_key, task_name,
state, state_pretty, enabled_date, enabled_date_pretty, started_date, started_date_pretty, state, state_pretty, enabled_date, enabled_date_pretty, started_date, started_date_pretty,
...@@ -162,30 +161,19 @@ ad_proc -public wf_task_info { ...@@ -162,30 +161,19 @@ ad_proc -public wf_task_info {
holding_user_email, hold_timeout, hold_timeout_pretty, deadline, deadline_pretty, days_till_deadline holding_user_email, hold_timeout, hold_timeout_pretty, deadline, deadline_pretty, days_till_deadline
estimated_minutes, instructions, sysdate, journal, attributes_to_set, assigned_users, estimated_minutes, instructions, sysdate, journal, attributes_to_set, assigned_users,
this_user_is_assigned_p, roles_to_assign</code>. this_user_is_assigned_p, roles_to_assign</code>.
<p> <p>
The values for the keys <code>journal, attributes_to_set and assigned_users</code> The values for the keys <code>journal, attributes_to_set and assigned_users</code>
are themselves Tcl lists of <code>[array are themselves Tcl lists of <code>[array
get]</code> repesentations. For the journal entry, see <a get]</code> repesentations. For the journal entry, see <a
href="/api-doc/proc-view?proc=wf_journal"><code>wf_journal</code></a>. href="/api-doc/proc-view?proc=wf_journal"><code>wf_journal</code></a>.
<p> <p>
The key <code>attribute_to_set</code> contains these keys: <code>attribute_id, attribute_name, The key <code>attribute_to_set</code> contains these keys: <code>attribute_id, attribute_name,
pretty_name, datatype, value, wf_datatype</code>. pretty_name, datatype, value, wf_datatype</code>.
<p> <p>
The key <code>assigned_users</code> contains these keys: <code>user_id, name, email</code>. The key <code>assigned_users</code> contains these keys: <code>user_id, name, email</code>.
<p> <p>
The key <code>transitions_to_assign</code> contains these keys: <code>transition_key, transition_name</code> The key <code>transitions_to_assign</code> contains these keys: <code>transition_key, transition_name</code>
<p> <p>
Sysdate is provided, so you can calculate the number of days Sysdate is provided, so you can calculate the number of days
between now and any of the other dates provided. between now and any of the other dates provided.
......
...@@ -29,6 +29,10 @@ if {[llength $approval_attributes] == 0} { set approval_task_p 0 } ...@@ -29,6 +29,10 @@ if {[llength $approval_attributes] == 0} { set approval_task_p 0 }
# is assigned to the task. # is assigned to the task.
if {!$task(this_user_is_assigned_p)} { set approval_task_p 0 } if {!$task(this_user_is_assigned_p)} { set approval_task_p 0 }
# ad_return_complaint 1 "<pre>[join [array get task] "\n"]</pre>"
# Show reassign links (Assign yourself / reassign)? # Show reassign links (Assign yourself / reassign)?
set reassign_p [im_permission $user_id wf_reassign_tasks] set reassign_p [im_permission $user_id wf_reassign_tasks]
...@@ -115,7 +119,7 @@ set reassign_p [im_permission $user_id wf_reassign_tasks] ...@@ -115,7 +119,7 @@ set reassign_p [im_permission $user_id wf_reassign_tasks]
<tr> <tr>
<th align="right">#acs-workflow.Comment#<br></th> <th align="right">#acs-workflow.Comment#<br></th>
<td><textarea name="msg" cols=20 rows=4></textarea></td> <td><textarea name="msg" cols=30 rows=5></textarea></td>
</tr> </tr>
<tr> <tr>
......
...@@ -58,6 +58,14 @@ wf_sweep_message_transition_tcl ...@@ -58,6 +58,14 @@ wf_sweep_message_transition_tcl
# ---------------------------------------------------------
# Does the current user have a vacation replacement?
# In this case assign the user so that he or she can
# execute the same actions
im_absences_assign_vacation_replacement -task_id $task_id
# --------------------------------------------------------- # ---------------------------------------------------------
# Get everything about the task # Get everything about the task
...@@ -70,8 +78,10 @@ if {[catch { ...@@ -70,8 +78,10 @@ if {[catch {
[lang::message::lookup "" acs-workflow.Task_not_found_message " [lang::message::lookup "" acs-workflow.Task_not_found_message "
This error can occur if a system administrator has deleted a workflow.<br> This error can occur if a system administrator has deleted a workflow.<br>
This situation should not occur during normal operations.<p> This situation should not occur during normal operations.<p>
Please contact your System Administrator Please contact your System Administrator.
"] "]
<br>&nbsp;<br>Here is the error message:
<pre>$err_msg</pre>
" "
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment