set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [ad_maybe_redirect_for_registration]
set page_title [lang::message::lookup "" intranet-helpdesk.Notify_Stakeholders "Notify Stakeholders"]
set context_bar [im_context_bar $page_title]
set action_name [im_category_from_id $action_id]
set action_name [im_category_from_id $action_id]
set action_forbidden_msg [lang::message::lookup "" intranet-helpdesk.Action_Forbidden "<b>Unable to execute action</b>:<br>You don't have the permissions to execute the action '%action_name%' on this ticket."]
set action_forbidden_msg [lang::message::lookup "" intranet-helpdesk.Action_Forbidden "<b>Unable to execute action</b>:<br>You don't have the permissions to execute the action '%action_name%' on this ticket."]
...
@@ -37,18 +39,56 @@ foreach ticket_id $tid {
...
@@ -37,18 +39,56 @@ foreach ticket_id $tid {
# Make sure an empty list of tickets won't cause an error further down.
# Make sure an empty list of tickets won't cause an error further down.
lappend tid -1
lappend tid -1
set ticket_sql "
select t.*,
p.*
from im_tickets t,
im_projects p
where t.ticket_id = p.project_id and
t.ticket_id in ([join$tid","])
"
set ticket_nr_list {}
set ticket_count 0
set ticket_name ""
db_foreach tickets $ticket_sql {
lappend ticket_nr_list "#$project_nr"
set ticket_name $project_name
incr ticket_count
}
set subject "undefined"
if{$ticket_count <= 1}{
set subject "Closed ticket: $ticket_name"
}else{
set subject "Closed tickets: [join$ticket_nr_list ", "]"