In time sheet portal , Task tab only can see InProgress records

Anish9515
Tera Contributor

In time sheet portal , task tab i can see only in progress records 
This is OOB function , Please help me which widget can rework.

 

Anish9515_0-1735538320494.png

 

@Ankur Bawiskar

22 REPLIES 22

@Bhavya11  Thanks for the help 
But one question I have added change task  table on default tables list  , it doesn't reflect the change task on time sheet portal , can you help me this scenario

var defaultTables = 'rm_epic,sn_safe_epic,incident,problem,change_request,change_task,rm_story,rm_scrum_task,pm_project,pm_project_task,rm_defect,rm_enhancement,dmn_demand_task,sn_audit_task,sn_audit_engagement,sn_audit_advanced_milestone,sn_audit_advanced_engagement_project,sn_grc_issue';

Hi @Anish9515 ,

 

To bring CTASK to time card you need to update two things 

 

1. update the default tables list in 'Time Card Portal - Task Selector' widget like below

	var defaultTables = 'rm_epic,sn_safe_epic,incident,problem,change_request,change_task,rm_story,rm_scrum_task,pm_project,pm_project_task,rm_defect,rm_enhancement,dmn_demand_task,sn_audit_task,sn_audit_engagement,sn_audit_advanced_milestone,sn_audit_advanced_engagement_project,sn_grc_issue';

2. Goto the widget instance search widget is 'Time Card Portal Main Container' 

Bhavya11_0-1735561529380.png

 

open the record in additional options, JSON formant in tables   add your table here as well it will work

 

Bhavya11_1-1735561565601.png

 

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Thanks,

BK

 

Hi @Anish9515 ,

 

if my response helped you to solve the issue.please mark my answer as accepted solution and give a thumb up

 

Thanks,

BK

Still I'm able to other state incident  records , For example on hold, closed complete

 

Anish9515_1-1736153404208.pngAnish9515_2-1736153495174.png


Your solution working for change_task , but  I can able to see only In progress records 
Could you please help me only visible In progress records on time sheet portal and where to update the code on widget

 

 

hi @Anish9515 ,

 

Please check the widget code as there different way there are fetching records using 'addEncodedQuery'   Please check the if it is additional assigned record or something different on the basis add 'state=2' condition like above

 

gr.addEncodedQuery('assigned_to=' + data.userId + '^sys_created_on<=' + weekEndsOnDateTime + '^active=true^state=2');
			var gr_part1 = new GlideRecordSecure(table);
			gr_part1.addEncodedQuery('state=2^assigned_to=' + data.userId + '^sys_created_on<=' + weekEndsOnDateTime + '^closed_atBETWEEN' + weekStartsOnDateTime + '@' + weekEndsOnDateTime);
			gr_part1.query();
			_addRecordsToList(gr_part1, false);
			var gr_part2 = new GlideRecordSecure(table);
			gr_part2.addEncodedQuery('state=2^additional_assignee_listLIKE' + data.userId + '^sys_created_on<=' + weekEndsOnDateTime + '^active=true');
			gr_part2.query();
			_addRecordsToList(gr_part2, false);
			var gr_part3 = new GlideRecordSecure(table);
			gr_part3.addEncodedQuery('state=2^additional_assignee_listLIKE' + data.userId + '^sys_created_on<=' + weekEndsOnDateTime + '^closed_atBETWEEN' + weekStartsOnDateTime + '@' + weekEndsOnDateTime);
			gr_part3.query();
			_addRecordsToList(gr_part3, false);

 

 

if my response helped you to solve the issue.please mark my answer as accepted solution and give a thumb up

 

Thanks,

BK