HRJ Task Take Survey Widget

Koji Yanase
Tera Contributor

I can't find where HRJ Task Take Survey Widget is used. Can we make a survey as to-do task in Employee Service Center portal?

Thanks.

1 ACCEPTED SOLUTION

Willem
Giga Sage
Giga Sage

Hi Koji,

 

In short, you can by creating an Employee form. By creating a new HR Task of HR Task type "Collect Employee input" you can select the Employee form you want:

find_real_file.png

That will then be presented to the assigned to in the HRM To-do widget.

 

Technical longer explanation:

It is loaded in the to-do app via:

  • HRM To-do contains the "To-dos task Line Item"-widget
  • It will get the tasks that are to-do and their mapping to widget via the "todoPageUtils"-script include.
  • The "todoPageUtils"-script include contains the function "_getWidgetMappings" which gets the mapping from the "sn_hr_sp_todos_widget_mapping"-table.
  • In that table we find entries for HR Task:find_real_file.png
  • "HRM Task Activity"-widget calls "hr_TaskTicket"-script include. We are looking for the collect_information as that is the one containing a survey:
if (gr.hr_task_type == 'collect_Information'){
				task.employee_form = {};
				task.employee_form.id = gr.getValue('employee_form');
				task.employee_form.form_definition = gr.getElement('employee_form.form_definition');
				task.employee_form.survey_instance = gr.getValue('survey_instance');
				task.employee_form.table_Name = gr.getElement('employee_form.table')+'';
				task.employee_form.condition = gr.getElement('employee_form.condition')+'';
			}
  • The "HRM Task Activity"-widget in line 21 gets the widget for the specific task:
data.widget = $sp.getWidget(getTaskWidgetId('hrj-task-'), taskOptions);
				if(!data.widget.sys_id)
					data.widget = $sp.getWidget(getTaskWidgetId('hr-task-'), taskOptions);

 

View solution in original post

11 REPLIES 11

Yes, Hi can help you on patching

Opened a Hi ticket.....thanks for quick response.