- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2020 10:02 PM
Hello ,
I have a requirement to show only the project tasks which are in state "work in progress" in Time sheet portal .
Present i am see all the projects tasks with different states ( work in progress , On hold , Pending , open )
Time sheet portal - > All Tasks - > Project Tasks - > "Here i should see only the project tasks which are in state 'work in progress' ".
where do i need to make changes so that i can see only work in progress project tasks.
Thanks,
Nilesh.
Solved! Go to Solution.
- Labels:
-
Project Portfolio Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 12:04 AM
1. Go to
Service Portal Widget -> Time Card Portal - Task Selector
In server script,
2. Search for defaultTables -> it has all the table listed which shows in dropdown. if you want to only show project task then remove other table names and keep only 'pm_project_task'.
3. Search for function getRecords(table) ->
it has if (gr.instanceOf('pm_project') || gr.instanceOf('pm_project_task')) { block
in this if block you can see the encoded query formation for encodedQuery.
You can add 'state=2' to encodedQuery to show only WIP project tasks.
Hope this will help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 12:04 AM
1. Go to
Service Portal Widget -> Time Card Portal - Task Selector
In server script,
2. Search for defaultTables -> it has all the table listed which shows in dropdown. if you want to only show project task then remove other table names and keep only 'pm_project_task'.
3. Search for function getRecords(table) ->
it has if (gr.instanceOf('pm_project') || gr.instanceOf('pm_project_task')) { block
in this if block you can see the encoded query formation for encodedQuery.
You can add 'state=2' to encodedQuery to show only WIP project tasks.
Hope this will help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 10:53 AM
Please mark this answer correct, if it worked for you.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2022 10:21 PM
Hi
What if I want to make the state restriction in the drop down as well. How to do that?
Also, what precautions I need or need to share with customer for upgrades?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2022 10:37 PM
Hi there,
You can follow below article for more details.
Customer needs to compare and resolve conflicts while upgrade to get latest changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2022 06:58 AM
Hi
I am trying to follow the steps you mentioned but not ale to find the points listed.
If you wish to add/remove specific task types from the task selector dropdown, i.e. Add unassigned tasks to Time Sheet, follow below steps.
- Navigate to Service portal -> widgets from module.
- Search for record with ID : tc-grid (Time Card Grid).
- Search in Server Script -> var taskSelector = $('#task-selector'); NOT FOUND
There isn't anything like taskselector I could see either in my PDI or client instance.
Please suggest. - The select2 component is using OOB Table rest api to fetch records from task table, i.e. url: '/api/now/table/task'
- You can create your own Rest api to fetch specific records and replace the url here OR
- Extend the OOB Table rest api to query specific