Hide Completed Project Tasks on Time Sheet Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 04:29 AM
Hi,
I have a requirement to hide closed complete project task(which has state=3) on time sheet portal.
for instance, this task shouldn't appear on all tasks.
Firstly I tried to do it on the time card portal - task selector widget. I edited the function getRecords(table) on server script. Here is the code that I changed:
var encodedQuery = actualDatesQuery + plannedDatesQuery + '^sys_class_name=pm_project_task^state!=3';
gr.addEncodedQuery(encodedQuery);
} else {
gr.addEncodedQuery('assigned_to=' + data.userId + '^sys_created_on<=' + weekEndsOnDateTime + '^sys_class_name=pm_project_task^state!=3');
As you see, I only added '^sys_class_name=pm_project_task^state!=3' to encodedquery.
It didn't work. I also tried to do it on script include which named TimeCardQueryHelper. I added gr.addQuery('active',true); line to _projectAndProjectTasksQuery and _allTasksQuery function.
neither that didn't work. If you have any idea, please don't hesitate to share it.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 06:43 AM
Hello @buseosaki
Go to the Widget, You can make changes in HTML Editor According to your req.
Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 06:32 AM
Thank you, I've already found out a mistake in my server script code and fixed it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 06:52 AM
Challenge this requirement.
Most Project Tasks will be closed before Time is entered.
Also... making alterations to the Time Card Portal is a DANGEROUS idea. The OOB interfaces they give you are not meant to be altered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 06:35 AM
Thank you for the warning, Robert! We decided to enter an Actual Time value.