Auto-generate time cards
As an admin, you can configure a scheduled job to generate time cards automatically for project tasks assigned to time card users.
시작하기 전에
Role required: admin
이 태스크 정보
주:
The scheduled job auto-generates time cards only for
those users who have the Auto create time cards every week
option set to true in their assigned time sheet policy.
프로시저
예
The following example script is executed when a scheduled job is run to generate time cards for the Current week for the Database and Hardware groups:
// Clone this schedule job to run separately for different groups at different times
// One of the following values
// TimeCardConstants.CURRENT_WEEK
// TimeCardConstants.NEXT_WEEK
// TimeCardConstants.LAST_WEEK
var runFor = TimeCardConstants.CURRENT_WEEK;
// Comma separated group sys ids or group names. TimeSheet/TimeCards will be auto generated for time card users in the given groups.
var includeGroups = [Database,Hardware];
var excludeGroups = [];
var generator = new TimeCardGenerator();
generator.generateFromConfig(runFor, includeGroups, excludeGroups);