Visible only work in progress Tasks in Time sheet portal

NiKhil70
Kilo Guru

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.

1 ACCEPTED SOLUTION

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.

View solution in original post

9 REPLIES 9

Jayarnab Saha
ServiceNow Employee

Hi Nilesh,

 

Do you want to update the list appearing from 'Add unassigned tasks to Time Sheet' link or 'Task' tab?

 

Regards,

Jayarnab

Hi Jayarnab ,

Thanks for the quick response , I did not understand your question clearly.

Let me explain my requirement ,Hours should be billed only in work in progress time sheets.

Ex : There are 5 Project Tasks where my name is added in "Additional Assign List" .

PRJTASK001 - >State is "Open"

PRJTASK002 - >State is "Pending"

PRJTASK003 - >State is "Work in Progress"

PRJTASK004 - >State is "Work in Progress"

PRJTASK005 - >State is "On Hold"

If the go to Time sheet portal - > All Tasks - > Project Tasks - > Here i should see only the project tasks which are in state "work in progress" 

Nothing but ( PRJTASK003PRJTASK004 )

Thanks,

Nilesh.

 

Where do you want to filter out the project tasks?

find_real_file.png

Are you talking about this list?

OR

Below dropdown?

find_real_file.png

Hi Jayarnab ,

The first screen shot , see below which is highlighted in yellow.

Under ( Tasks -  Project Tasks ) .

find_real_file.png

find_real_file.png

Thanks, 

Nilesh