The search bar on Time sheet portal is not showing all tickets from Task table,like PRJ, REQTASK,etc

AbdurRahmanSnow
Giga Guru

Good morning.
On the Time sheet portal, on the left hand-side search bar, everyone should be able to search and see everyone ticket's such as INC, PRJ, DMND, PRB, GRQ, REQTASK, etc. (all the task records), irrespective of the tickets that are only assigned to them or not, and then, add it to the time cards.

AbdurRahmanSnow_1-1742279596924.png

In the screenshot above, you can see, it is only showing limited number of task records. But if you want to add other task records to Time sheet, then we should we going to Time cards>All, and then click "New", and from there, under Task field, manually add the record, along with timings worked and submit, and then the ticket comes and gets comes and gets stored in Time sheet.

AbdurRahmanSnow_3-1742279859951.png

But we don't want to do like this. We directly want to search from the Time sheet search bar and directly add.

How can we do this?
We can do the changes in the code, under Service Portal configuration. (Screenshot below). Please help.

AbdurRahmanSnow_4-1742280116304.png

 

 


1 ACCEPTED SOLUTION

Hi @shamil-ibrahim 
I have worked on re-configuring the code and finally, the code worked. Screenshot is at the last. Now, the "Add unassigned tasks to Time Sheet" button search bar is working perfectly.
Thank you so much for the help.

The code is below:

{
 "tm_grid_options": {
 "displayValue": "Time card grid options",
 "value": {
   "pageSize": 20,
"restrictedStatesForDuplicateMerge" : ['approved', 'processed'],
 "header_fields": [{
  "name": "task.short_description",
  "width_in_percent": 16
  },
    {
                     "name": "project_time_category",
                     "width_in_percent": 20
    }
  ]
  }
 },
"task_selector_options": {
 "displayValue": "Time Sheet Portal Task Selector Options, set maxVisibleTask, maxVisibleGroupTasks to positive integer to limit task selector cards.",
 "value": {
  "tables": "rm_epic,sn_safe_epic,incident,problem,change_request,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",
  "maxVisibleTasks": -1,
  "maxVisibleGroupTasks": -1,
 "disableTaskSelectorSync": false,
 "showDuplicateCards": false
  }
}
}

AbdurRahmanSnow_0-1744220755532.png

 



View solution in original post

5 REPLIES 5

shamil-ibrahim
Tera Expert

Dear Abdur Rahman,

 

You can use the OOB option to add unassigned tasks to achieve this. Click on the Add unassigned tasks to Time Sheet link to choose any task from the task table and add the time card entry.

 

 

shamilibrahim_1-1742305229040.png

 

When you are searching under the Tasks tab it only shows the tasks that are allocated to the user which is coming from the Resource Plan table.

 

 

Thanks,

 

 

Hi @shamil-ibrahim 
I have checked. When I click on it, it is fetching empty search bar. Search is not working. It shows empty records. Please check.

AbdurRahmanSnow_0-1742384420639.png

 



Dear Abdur Rahman,

 

You need to check 2 places to view or update the query applied on this task selector:

 

1. Open the Time Card Portal Main Container [timecard-portal-container] widget, go to related list and open the widget instance. On the widget instance record, inside the Additional options, JSON format field you will find the task_selector_options tables, where you can specify the table names which you would like to show on the selector.

 

below screenshot you will see the table names comma separated.

shamilibrahim_1-1742458760023.png

 

 

2. Open the Time Card Grid [tc-grid] widget and under the link controller section you will find the query which you can modify to suite your needs. Below screenshot its on line 407

shamilibrahim_0-1742458698999.png

 

Hi @shamil-ibrahim 
I checked the 1st screenshot, and when I went into Time Card Portal Main Container [timecard-portal-container] widget>Additional options, JSON format., the code which you have attached is not there. Please see the below screenshot.

AbdurRahmanSnow_0-1742538445821.pngWhat to do? Please provide the code. 
Regarding the 2nd screenshot Time Card Grid [tc-grid] widget, the code looks the same at Line 407. So, the problem looks to be in 1st screenshot code, which is missing on my side.

AbdurRahmanSnow_1-1742538596996.png

_________________________________________________________________________________

AbdurRahmanSnow_2-1742538627025.png