Commit f20e0c50 authored by Frank Bergmann's avatar Frank Bergmann

- Including the internal_sla in sla_options in order to handle ideas

parent ac075842
......@@ -1011,6 +1011,7 @@ ad_proc -public im_helpdesk_ticket_sla_options {
{-customer_id 0}
{-include_empty_p 1}
{-include_create_sla_p 0}
{-include_internal_sla_p 0}
} {
Returns a list of SLA tuples suitable for ad_form
} {
......@@ -1058,9 +1059,11 @@ ad_proc -public im_helpdesk_ticket_sla_options {
# "Internal SLA" Logic - Remove the Internal SLA from the list
# if there is an SLA specific to the user.
set count [db_string sla_count "select count(*) from ($sql) t"]
if {$count > 1} {
append sql "\t\tand p.project_nr != 'internal_sla'"
if {!$include_internal_sla_p} {
set count [db_string sla_count "select count(*) from ($sql) t"]
if {$count > 1} {
append sql "\t\tand p.project_nr != 'internal_sla'"
}
}
append sql "\t\torder by sla_name"
......
......@@ -497,7 +497,7 @@ if {"new" == $ticket_customer_contact_id && $user_can_create_new_customer_contac
# ------------------------------------------------------------------
if {([info exists ticket_customer_id] && $ticket_customer_id ne "")} {
set customer_sla_options [im_helpdesk_ticket_sla_options -customer_id $ticket_customer_id -include_create_sla_p $add_projects_p]
set customer_sla_options [im_helpdesk_ticket_sla_options -customer_id $ticket_customer_id -include_create_sla_p $add_projects_p -include_internal_sla_p 1]
set customer_contact_options [db_list_of_lists customer_contact_options "
select im_name_from_user_id(u.user_id) as name,
u.user_id
......
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