Project Time Category Use

erico
Kilo Contributor

I'm trying to use the Project Time Category on my Time Cards.  I've been able to create some categories but I don't really understand how they are assigned.  For example:

If I am the assigned person on an Incident and I report time to it, I can then choose to edit the time entry.  Once I do that, I see it is set to a Category of Project/Project Task.  I am also able to set the Project Time Category to what I want. (Figure 1)

However, if I just enter time towards a task I'm not assigned directly, The Category field is set to Task Work.  I am unable to set the Project Time Category and unable to change the Category field. (Figure 2)

My questions are:

  • How does the Category field on the Time Card Table get set to either Project/Project Task or something else?
  • Is there a place I can set the default of what I want it to be?
  • Is there a way I can make the Category field part of the Incident, Problem, Change form, so I can set the Category field and the Project Time Category field to a particular value when those objects are created?
  • It seems if I click Edit on a time card and then choose Open in Platform, I am now able to edit the Category field.

Any help would be appreciated.

Eric

3 REPLIES 3

Allen Andreas
Administrator
Administrator

Hi,

 

You can set the default category when a time card is created by going to the dictionary entry for category within the time_card table and then typing in a default (like I did), BUT on the worker portal, it wasn't behaving that way. So I made this post and had an awesome dude help me out.

 

https://community.servicenow.com/community?id=community_question&sys_id=a65099a0db78d3c4fc5b7a9e0f96...

 

We did several changes to it, but some correlate to what you're wanting to do.

 

As far as linking the category field part from incidents etc - to the time card, you'd have to work out the mapping on that, but I'm sure it can be done via a BR or something. There's an option you can set within the time sheet policies to automatically create a time card when the it's being worked, so from there, when that's done, you could assign a matching category based off the form.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Neha Mishra
Giga Contributor

Hi , 

In Order to add Project Time Categories to Demand, Story or any other type of task in Worker Portal , you will need two configuration/customisation.

 

a. Add one line code in the Server Script - Time Card Portal - Task Selector widget to show the quick add drop down.

find_real_file.png

 

b. Change the Business Rule "Clear task related fields" and add one more condition 

 

if (current.category != 'project_work' )

to

if (current.category != 'project_work' && current.category != 'task_work').

 

It worked for me.

Thanks 

I made the above changes (for Incident table) but still the 'Project Time Category' is read only on the time sheet portal.