Project and Portfolio Management Practitioners Forum
cancel

Script to Automate Timesheet Delegate Assignment.

Highlighted
kruegke
Respected Contributor.

Script to Automate Timesheet Delegate Assignment.

Our PPM Administrators have a need to search / view all timesheets, but are unable to do that for any that remain "Unsubmitted" after a Pay Period Close.  The solution to this is to have these Admininstrators named as timsheet "delegates" for all time reporters in the system. Our problem is that we periodically have Administrative turnover, and so are looking for some way to automate this timesheet "delegate" (re-)assignment.  It would also be beneficial to automate the removal of the former Admininstrator(s) as delegates.

 

When we initially converted to PPM, our HP Suppot Partners had provided a script for this purpose, but tis script was somehow not retained.

 

If anyone has such a script, or perhaps another solution to this requirement, it would be greatly appreciated if that could be shared.

 

Thank you.

 

1 REPLY
Utkarsh_Mishra
Acclaimed Contributor.

Re: Script to Automate Timesheet Delegate Assignment.

You can use this statement to add delegate from backend, similarly use update to populate end date once you need to delete (or you can simplye use delete based on delegate user_id and resource_id)

 

Get delegate to user id in variable - p_user_id
and Resource Id in - p_assigned_to

insert into rsc_resource_delegations (resource_delegation_id, version, delegated_to_user_id,                                    start_date, end_date, created_by, creation_date, last_updated_by, last_update_date, resource_id)
values 
(rsc_resource_delegations_s.nextval, 0, p_user_id, null, null, 1, sysdate, 1, sysdate, p_assigned_to) ;

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)