- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2020 01:52 AM
Hello ,
I have a requirement to show Project Name or Number along with the project task in Time sheet portal under All Tasks.
Time sheet Portal - > All Tasks - > Project Tasks , we see 2 Project Tasks below ( PRJTASK0010746 & PRJTASK0010756 ) but we are not able to identify which project it belongs to , so we want to show the project details as well along with project tasks.
How can we achieve this ?
Thanks & Regards ,
Nilesh .
Solved! Go to Solution.
- Labels:
-
Project Portfolio Management
- 1,910 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2020 05:52 AM
Hi Nilesh,
Better to wait for Paris release. This changes is in timecard-task-selector widget and this gets many updates in subsequent release.
Still, I shared below quick fix to show Parent (i.e. Project for pm_project_task and Demand for dmn_demand_task) beside present task link in task selector card.
In timecard-task-selector widget
1. Server script ->
search for
if(gr.instanceOf('pm_project'))
record.quickAdd.showProjectCategory = true;
add below code after this if block
if (gr.instanceOf('pm_project_task') || gr.instanceOf('dmn_demand_task')) {
var parentRecord = '';
var parentDisplayValue = '';
var sysClassName = gr.getValue('sys_class_name');
var taskGr = new GlideRecord(sysClassName);
taskGr.get(gr.getValue('sys_id'));
if (gr.instanceOf('pm_project_task'))
parentRecord = taskGr.sub_tree_root;
else if (gr.instanceOf('dmn_demand_task'))
parentRecord = taskGr.parent;
if (!gs.nil(parentRecord) && !gs.nil(parentRecord.sys_class_name)) {
parentDisplayValue = '' + parentRecord.short_description;
}
record.parent = parentDisplayValue;
record.display_fields += ',parent';
}
2. In Body HTML template ->
search for
<a class="card-navigator
add below line after this <a> tag
<span class="card-navigator pull-left" style="padding-left: 10px;">{{::card.parent}}</span>
You can update the design, as per your requirement.
3. Save.
This change will update the task selector card as attached image.
Hope, this helps you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2020 01:26 PM
So, funny thing... OOB Paris does indeed resolve this issue, but ONLY for "Tasks".. NOT "Group Tasks":
So, here's what you need to do to apply this to group tasks as well..
Open up the widget "Time Card Portal - Task Selector" (timecard-task-selector).
In the HTML Template, look for the code:
<div class="tags-container">
Above that line, put this code:
<div class="parent-container">
<a class="card-navigator" target="_blank"
uib-tooltip="{{::card.parent.display_value}}" tooltip-placement="bottom"
ng-if="card.parent && card.parent.can_read"
ng-href="/{{::card.parent.sys_class_name}}.do?sys_id={{::card.parent.sys_id}}"
ng-click="stopPropagation($event)">{{::card.parent.display_value}}</a>
<p class="description" uib-tooltip="{{::card.parent.display_value}}" tooltip-placement="bottom"
ng-if="card.parent && !card.parent.can_read">{{::card.parent.display_value}}</p>
</div>
Save and enjoy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 06:36 AM
@xiaix Your code works beautifully in Tokyo. Thank you.