im_future_employees

one of the documented procedures in this installation of the ACS
Usage:
im_future_employees   db   { coverage "" }   { report_date "" }   { purpose "" }
What it does:
Returns a string that gives a list of future employees
Defined in: /web/philip/tcl/intranet-status-report-defs.tcl

Source code:



    set selection [ns_db select $db  "select u.user_id, first_names, last_name, email, start_date, 
 (select job_title from im_job_titles where original_job_id = job_title_id) as job_title, 
 decode(im_employee_percentage_time.percentage_time, NULL, '', im_employee_percentage_time.percentage_time||'% ') as percentage_string, 
 group_names_of_user_by_type(u.user_id, '[ad_parameter IntranetGroupType intranet intranet]') as group_names_of_user
from users_active u, im_employee_info info, im_employee_percentage_time
where u.user_id =info.user_id
  and im_employee_percentage_time.user_id = info.user_id
  and
  (im_employee_percentage_time.start_block = (select min(start_block) from
im_employee_percentage_time 
where im_employee_percentage_time.user_id = info.user_id) 
or im_employee_percentage_time.start_block is null)
and info.start_date > '$report_date'
order by start_date"]
    set return_list [list]
    while {[ns_db getrow $db $selection]} {
	set_variables_after_query

	if {$purpose == "web_display"} {
	 
	    lappend return_list "<a href=[im_url_stub]/users/view.tcl?[export_url_vars user_id]>$first_names $last_name</a> ($start_date) Groups: $group_names_of_user"
	} else {
	    lappend return_list "$first_names $last_name ($start_date) Groups: $group_names_of_user"
	}


    }

    if {[llength $return_list] == 0} {
	return "None \n"
    }
    
    if {$purpose == "web_display"} {
	return "<ul><li>[join $return_list "<li>"]</ul>"
    } else {
	return "[join $return_list "\n"]"
    }



philg@mit.edu