alexk
committed
on 30 Nov 05
Correctly get the assignees for the notification. Someone should
doublecheck this.
openacs-4/.../workflow/tcl/case-procs.tcl (+9 -2)
1715 1715                     
1716 1716     # Output notification info
1717 1717     set object_details_lines [list]
1718 1718     foreach { label value } $object_details_list {
1719 1719         if { ![empty_string_p $label] } {
1720 1720             lappend object_details_lines "$label[string repeat " " [expr $max_label_len - [string length $label]]] : $value"
1721 1721         } else {
1722 1722             lappend object_details_lines "[string repeat " " $max_label_len]   $value"
1723 1723         }
1724 1724     }
1725 1725     set object_details_chunk [join $object_details_lines "\n"]
1726 1726
1727 1727     set activity_log_chunk [workflow::case::get_activity_text -case_id $case_id]
1728 1728
1729 1729     set the_subject "[ad_decode $object_notification_tag "" "" "\[$object_notification_tag\] "]$object_one_line: $latest_action(action_pretty_past_tense) [ad_decode $latest_action(log_title) "" "" "$latest_action(log_title) "]by $latest_action(user_first_names) $latest_action(user_last_name)"
1730 1730
1731 1731     # List of user_id's for people who are in the assigned_role to any enabled actions
1732 1732     # This takes deputies into account
1733 1733
1734 1734 #XXXXX Verify this ... probably wrong
1735       set assignee_list [db_list enabled_action_assignees {}]
  1735     set assigned_role_id [workflow::action::get_assigned_role -action_id $action_id]
  1736     set assignee_list [list]
  1737     foreach assignee_array [workflow::case::role::get_assignees \
  1738                           -case_id $case_id \
  1739                           -role_id $assigned_role_id] {
  1740         array set ass $assignee_array
  1741         lappend assignee_list $ass(party_id)
  1742     }
1736 1743        
1737 1744     # List of users who play some role in this case
1738 1745     # This takes deputies into account
1739 1746     set case_player_list [db_list case_players {}]
1740 1747
1741 1748     # Get pretty_name and pretty_plural for the case's object type
1742 1749     set object_id $case(object_id)
1743 1750     db_1row select_object_type_info {} -column_array object_type
1744 1751
1745 1752     # Get name of the workflow's object
1746 1753     set object_id $workflow(object_id)
1747 1754     db_1row select_object_name {} -column_array workflow_object
1748 1755
1749 1756     set next_action_chunk(workflow_assignee) [_ workflow.lt_You_are_assigned_to_t]
1750 1757
1751 1758     set next_action_chunk(workflow_my_cases) [_ workflow.lt_You_are_a_participant]
1752 1759
1753 1760     set next_action_chunk(workflow_case) [_ workflow.lt_You_have_a_watch_on_t]
1754 1761
1755 1762     set next_action_chunk(workflow) [_ workflow.lt_You_have_requested_to]