Time sheet portal changes for "Add Unassigned Task".

Chandler2
Tera Guru

On time sheet portal we have a link "Add Unassigned Task" using which a user can select any task by searching it. I want to restrict this search so users can only select a particular type of task, for example only incidents or demands which are work in progress.

I found an article for the same and tried to follow the steps but can't find the names mentioned in the post. Below is the link of the post: https://community.servicenow.com/community?id=community_article&sys_id=f6a035a8db3c6c10fa192183ca961...

Below is the portal view: 

find_real_file.png  

1 ACCEPTED SOLUTION

Hello Chandler,

 

Go the Time Card Grid widget.

In that widget go to link function. In the link function you would see an AJAX call to /api/now/table/task.

There would be a sysparm_query to the AJAX call, change the parameter like this

sysparm_query: 'sys_class_name=pm_project^ORsys_class_name=pm_project_task^short_descriptionCONTAINS' + term + '^ORnumberCONTAINS'+ term,

 

This will restrict to project/project tasks alone.

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

View solution in original post

9 REPLIES 9

Hi Saurav,

yes, that default table part I have already done but that removes the tasks from the left side panel on the time sheet portal. It doesn't work for the "Add Unassigned Task".

Hello Chandler,

 

Go the Time Card Grid widget.

In that widget go to link function. In the link function you would see an AJAX call to /api/now/table/task.

There would be a sysparm_query to the AJAX call, change the parameter like this

sysparm_query: 'sys_class_name=pm_project^ORsys_class_name=pm_project_task^short_descriptionCONTAINS' + term + '^ORnumberCONTAINS'+ term,

 

This will restrict to project/project tasks alone.

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

I will try and update you in some time. Thanks for your response.

It worked like a charm, thanks. 

Could you please help with the below as well

Restrict tasks from showing up on time sheet portal group task tab

 

Talya
Tera Contributor

Hi @Saurav11 ,

 

I made the changes as suggested by you, I am trying to pull only Project/Project tasks/Demand tasks as per below screenshot but Still it is pulling all the tasks.  Please help here.

 

Talya_0-1674240542856.png

Thanks,

Talya